/* Idea Lab: light Sky-style theme. Figtree stands in for Sky Text; swap the font and tokens for official brand assets. */
:root {
  --bg: #F5F6FA; --panel: #FFFFFF; --ink: #0A1633; --ink-2: #3D4766; --muted: #6B7390; --line: #E3E6EF; --line-2: #CDD2E0;
  --blue: #0072C9; --blue-ink: #FFFFFF; --blue-soft: #E6F1FB;
  --spectrum: linear-gradient(90deg, #FF9E1B 0%, #F6423C 26%, #E4007C 50%, #8A2BE2 74%, #0091FF 100%);
  --yes: #0E9F6E; --no: #E0364C; --love: #8A2BE2; --agent: #8A2BE2; --agent-soft: #F4ECFD; --warn: #B45309;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgba(10,22,51,.06), 0 6px 20px rgba(10,22,51,.06);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.spectrum { height: 4px; background: var(--spectrum); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; }
.brand-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--spectrum); box-shadow: inset 0 0 0 4px rgba(255,255,255,.25); }
.brand-name { font-size: 18px; }
.brand-org { font-size: 12px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 10px; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--panel); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--blue); color: var(--blue-ink); border-color: var(--blue); }
.btn.primary:hover { background: #005FA8; }
.btn.spectrum-btn { background: var(--ink); color: #fff; border: 0; position: relative; }
.btn.spectrum-btn::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--spectrum); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.big { padding: 14px 22px; font-size: 16px; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
label.field > small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type=text], textarea, select { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 11px 13px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input[type=text]:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { resize: vertical; min-height: 84px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.chip.agent { background: var(--agent-soft); border-color: #E3D2FA; color: var(--agent); }
.chip.theme { background: var(--blue-soft); border-color: #CFE4F7; color: #00599E; }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--yes); }
.chip.off::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.empty { color: var(--muted); font-size: 14px; padding: 18px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.alert { background: #FDECEE; border: 1px solid #F5B5BE; color: #8A1328; border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: .25s; pointer-events: none; z-index: 100; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--no); }

/* ================= Facilitator ================= */
.topbar { display: flex; align-items: center; gap: 20px; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .title { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phases { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 999px; margin-left: auto; }
.phases span { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; color: var(--muted); }
.phases span.on { background: var(--ink); color: #fff; }
.phases span.done { color: var(--ink-2); }

.setup { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.setup h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -.02em; font-weight: 800; margin-bottom: 10px; grid-column: 1 / -1; }
.setup .lede { color: var(--ink-2); font-size: 18px; max-width: 60ch; grid-column: 1 / -1; margin-bottom: 8px; }
.setup form.card, .setup aside .card { padding: 24px; }
.fw-preview { background: var(--bg); border-radius: var(--r-sm); padding: 14px; font-size: 14px; color: var(--ink-2); margin: -6px 0 16px; }
.fw-preview ol { margin: 6px 0 0 18px; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.settings label { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.settings select { width: auto; padding: 6px 8px; }
.recent { list-style: none; }
.recent li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.recent li:last-child { border-bottom: 0; }
.howto ol { margin-left: 18px; font-size: 14px; color: var(--ink-2); }
.howto li { margin-bottom: 6px; }

.console { padding: 20px 24px 40px; display: grid; gap: 18px; }
.headline { display: grid; grid-template-columns: 1fr auto; gap: 18px; }
.question { padding: 22px 24px; position: relative; overflow: hidden; }
.question::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--spectrum); }
.question h1 { font-size: clamp(22px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.015em; font-weight: 800; margin: 6px 0 10px; max-width: 46ch; }
.question details { font-size: 14px; color: var(--ink-2); }
.question summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.question details p { margin-top: 8px; max-width: 90ch; white-space: pre-wrap; }
.join { padding: 16px 18px; display: flex; gap: 16px; align-items: center; }
.join .qr { width: 112px; height: 112px; background: #fff; border-radius: 8px; display: grid; place-items: center; flex: none; }
.join .qr svg { width: 100%; height: 100%; display: block; }
.join .code { font-size: 40px; font-weight: 800; letter-spacing: .12em; line-height: 1; }
.join .url { font-size: 12px; color: var(--muted); word-break: break-all; max-width: 220px; margin: 6px 0 10px; }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.controls .stat { font-size: 14px; color: var(--ink-2); }
.controls .stat b { font-size: 18px; color: var(--ink); }
.spark-banner { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: var(--r); background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.spark-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--spectrum); }
.spark-banner .kicker { color: #B9C2DB; }
.spark-banner p { font-weight: 700; font-size: 17px; }

.cols { display: grid; grid-template-columns: 1.15fr 1.1fr 1fr; gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 120px); position: sticky; top: 76px; }
.col-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.col-head h2 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.col-head h2 .n { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 9px; }
.col-sub { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.col-body { padding: 14px 18px 18px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.col-body > * { flex: none; }

.idea { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: #fff; position: relative; }
.idea.new { animation: pop .35s ease; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
.idea .t { font-weight: 700; }
.idea .d { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.idea .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.idea.agent { border-color: #E3D2FA; background: linear-gradient(180deg, #FCF9FF, #fff); }
.idea.is-hidden { opacity: .45; }
.idea .tools { position: absolute; top: 8px; right: 8px; display: none; gap: 4px; }
.idea:hover .tools { display: flex; }
.idea .why { font-size: 13px; color: var(--ink-2); margin-top: 6px; font-style: italic; }
.theme-block { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.theme-block > header { padding: 10px 14px; background: var(--blue-soft); }
.theme-block > header b { display: block; }
.theme-block > header span { font-size: 13px; color: var(--ink-2); }
.theme-block ul { list-style: none; }
.theme-block li { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.theme-block li b { display: block; font-size: 15px; }
.note { font-size: 14px; background: #FFF8EC; border: 1px solid #F8E3BD; border-radius: var(--r-sm); padding: 10px 12px; }
.gaps { font-size: 14px; } .gaps li { margin-left: 18px; }

.deck { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lcard { border-radius: 10px; padding: 10px; min-height: 92px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; border: 2px solid transparent; text-align: left; }
.lcard small { font-weight: 600; color: #9FA9C6; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.lcard.sel { border-color: #FFB13B; box-shadow: 0 0 0 2px rgba(255,177,59,.25); }
.agent-row { display: flex; gap: 10px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.agent-row input[type=number] { width: 56px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.toggle input { width: 36px; height: 20px; appearance: none; background: var(--line-2); border-radius: 999px; position: relative; cursor: pointer; transition: .2s; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle input:checked { background: var(--agent); }
.toggle input:checked::after { left: 18px; }
.personas { display: flex; gap: 6px; flex-wrap: wrap; }

.board { display: grid; gap: 8px; }
.brow { display: grid; grid-template-columns: 22px 1fr 90px 46px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.brow .rank { font-weight: 800; color: var(--muted); }
.brow .t { font-weight: 700; font-size: 15px; }
.brow .bar { height: 10px; border-radius: 6px; background: #FBE3E6; overflow: hidden; display: flex; }
.brow .bar i { background: var(--yes); display: block; }
.brow .pct { text-align: right; font-weight: 800; }
.brow small { display: block; color: var(--muted); font-size: 12px; }
.progress { height: 8px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--spectrum); transition: width .4s; }

.report { max-width: 980px; margin: 0 auto; padding: 32px 36px; }
.report h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; margin: 8px 0 14px; }
.report h2 { font-size: 22px; font-weight: 800; margin: 34px 0 12px; }
.report .summary { font-size: 18px; color: var(--ink-2); max-width: 70ch; }
.report .stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.report .stats div { background: var(--bg); border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; color: var(--muted); }
.report .stats b { display: block; font-size: 22px; color: var(--ink); }
.short { display: grid; gap: 14px; }
.short article { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; position: relative; overflow: hidden; }
.short article::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--spectrum); }
.short h3 { font-size: 19px; font-weight: 800; display: flex; justify-content: space-between; gap: 12px; }
.short h3 span { font-size: 14px; color: var(--yes); white-space: nowrap; }
.short p { margin-top: 6px; color: var(--ink-2); }
.short .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; font-size: 14px; }
.short ul { margin-left: 18px; }
table.long { width: 100%; border-collapse: collapse; font-size: 14px; }
table.long th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--line); }
table.long td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.long td.theme-cell { font-weight: 700; color: #00599E; white-space: nowrap; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; max-width: 980px; margin: 0 auto 14px; }

.overlay { position: fixed; inset: 0; background: rgba(10,22,51,.94); z-index: 60; display: grid; place-items: center; color: #fff; padding: 40px; text-align: center; }
.overlay .big-qr { width: min(46vh, 420px); height: min(46vh, 420px); background: #fff; border-radius: 18px; padding: 18px; margin: 24px auto; }
.overlay .big-qr svg { width: 100%; height: 100%; display: block; }
.overlay .big-code { font-size: clamp(48px, 9vw, 120px); font-weight: 800; letter-spacing: .14em; line-height: 1; }
.overlay p.q { font-size: clamp(20px, 2.4vw, 32px); font-weight: 700; max-width: 40ch; margin: 0 auto; }
.overlay .url { color: #B9C2DB; margin-top: 12px; font-size: 18px; }
.overlay .spectrum { position: absolute; left: 0; right: 0; top: 0; height: 6px; }

@media (max-width: 1180px) {
  .cols { grid-template-columns: 1fr 1fr; }
  .cols .col.agents { grid-column: 1 / -1; }
  .col { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .setup { grid-template-columns: 1fr; padding: 24px 16px 60px; }
  .headline, .cols { grid-template-columns: 1fr; }
  .console { padding: 16px; }
  .topbar { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .phases { margin-left: 0; }
  .settings { grid-template-columns: 1fr; }
  .report { padding: 22px 18px; }
  .short .cols2 { grid-template-columns: 1fr; }
  .brow { grid-template-columns: 24px 1fr 60px; } .brow .bar { display: none; }
}

@media print {
  body { background: #fff; }
  .topbar, .console > :not(#report-wrap), .report-actions, .toast { display: none !important; }
  .report { box-shadow: none; border: 0; padding: 0; }
  .short article { break-inside: avoid; }
}

/* ================= Participant (phone) ================= */
.phone { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.phone header.p-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.phone header .alias { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.p-main { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.p-q { padding: 16px; position: relative; overflow: hidden; }
.p-q::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--spectrum); }
.p-q h1 { font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.p-q details { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.p-q summary { color: var(--blue); font-weight: 600; cursor: pointer; }
.p-q details p { margin-top: 6px; white-space: pre-wrap; }
.join-card { padding: 22px; margin-top: 8vh; }
.join-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 8px; }
.code-input { font-size: 30px !important; letter-spacing: .3em; text-transform: uppercase; text-align: center; font-weight: 800; }
.tabs { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px 6px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; }
.composer { padding: 16px; display: grid; gap: 10px; }
.composer textarea.main { font-size: 18px; min-height: 110px; }
.composer .count { font-size: 12px; color: var(--muted); text-align: right; }
.building { display: flex; gap: 8px; align-items: center; font-size: 13px; background: var(--blue-soft); color: #00599E; padding: 8px 10px; border-radius: 10px; }
.building button { margin-left: auto; border: 0; background: none; color: inherit; font-weight: 700; cursor: pointer; }
.spark-card { background: var(--ink); color: #fff; border-radius: var(--r); padding: 16px 18px; position: relative; overflow: hidden; }
.spark-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--spectrum); }
.spark-card .kicker { color: #B9C2DB; display: flex; justify-content: space-between; }
.spark-card p { font-size: 18px; font-weight: 800; line-height: 1.25; margin-top: 6px; }
.spark-card small { display: block; color: #CBD2E6; margin-top: 6px; font-size: 13px; }
.spark-card.fresh { animation: glow 1.4s ease 2; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(228,0,124,.25); } }
.plist { display: grid; gap: 10px; }
.p-done { text-align: center; padding: 32px 20px; }
.p-done h2 { font-size: 24px; font-weight: 800; margin: 10px 0 6px; }
.big-emoji { font-size: 44px; }

/* Swipe deck */
.swipe-area { position: relative; flex: 1; min-height: 380px; margin-top: 4px; }
.scard { position: absolute; inset: 0; background: var(--panel); border-radius: 22px; box-shadow: 0 10px 30px rgba(10,22,51,.12); border: 1px solid var(--line); padding: 26px 22px; display: flex; flex-direction: column; touch-action: none; user-select: none; will-change: transform; cursor: grab; overflow: hidden; }
.scard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--spectrum); }
.scard.under { transform: scale(.95) translateY(14px); opacity: .7; pointer-events: none; }
.scard h2 { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.015em; margin: 12px 0 10px; }
.scard p { font-size: 17px; color: var(--ink-2); }
.scard .foot { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.scard .stamp { position: absolute; top: 26px; font-size: 22px; font-weight: 800; padding: 4px 12px; border: 3px solid; border-radius: 10px; opacity: 0; transform: rotate(-10deg); }
.scard .stamp.yes { left: 20px; color: var(--yes); }
.scard .stamp.no { right: 20px; color: var(--no); transform: rotate(10deg); }
.scard .stamp.love { left: 50%; top: auto; bottom: 90px; transform: translateX(-50%); color: var(--love); }
.swipe-btns { display: flex; justify-content: center; gap: 18px; padding: 12px 0 4px; }
.swipe-btns button { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); font-size: 26px; cursor: pointer; display: grid; place-items: center; }
.swipe-btns button.no { color: var(--no); } .swipe-btns button.yes { color: var(--yes); } .swipe-btns button.love { color: var(--love); width: 52px; height: 52px; font-size: 20px; align-self: center; }
.swipe-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
