/* Leda live — client styles. Brand tokens from docs/deck-system/brand-tokens.json (via the vote test). */
@font-face { font-family: "Heebo"; font-weight: 400; src: url("/fonts/Heebo-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Heebo"; font-weight: 500; src: url("/fonts/Heebo-500.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Heebo"; font-weight: 700; src: url("/fonts/Heebo-700.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #F8F8FA; --card: #FFFFFF; --ink: #4D4D4D; --text: #666767; --muted: #828282; --line: #EFEFF1; --line-2: #DADCE0;
  --blue: #61C0E0; --blue-dk: #30A1C9; --navy: #225987; --tint: rgba(97,192,224,.20); --tint-mine: rgba(97,192,224,.34);
  --green: #76CECE; --num: #225987; --amber: #B26A00; --amber-bg: #FFF4E0; --red: #B3261E; --red-bg: #FDECEA;
  --note: #FFF7D1; --note-ink: #4D4D4D; --shadow: 0 1px 4px rgba(34,89,135,.08);
  --display: "Gilroy", "Quicksand", system-ui, sans-serif; --body: "Heebo", "Roboto", system-ui, sans-serif;
}
/* Dark: Teams dark/contrast theme, or the OS setting when Teams hasn't said otherwise. */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-default) body:not(.theme-default) {
    --bg: #1B1F24; --card: #262B31; --ink: #FFFFFF; --text: #D6D9DC; --muted: #A3A9AF; --line: #353B42; --line-2: #4A515A;
    --tint: rgba(97,192,224,.22); --tint-mine: rgba(97,192,224,.40); --num: #61C0E0; --amber: #FFB74D; --amber-bg: #3A2E1A;
    --red: #FF8A80; --red-bg: #3B2222; --note: #3A3A2A; --note-ink: #F3F0D8; --shadow: none;
  }
}
body.theme-dark, body.theme-contrast {
  --bg: #1B1F24; --card: #262B31; --ink: #FFFFFF; --text: #D6D9DC; --muted: #A3A9AF; --line: #353B42; --line-2: #4A515A;
  --tint: rgba(97,192,224,.22); --tint-mine: rgba(97,192,224,.40); --num: #61C0E0; --amber: #FFB74D; --amber-bg: #3A2E1A;
  --red: #FF8A80; --red-bg: #3B2222; --note: #3A3A2A; --note-ink: #F3F0D8; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 16px; background: var(--bg); color: var(--text); font: 15px/1.45 var(--body); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); line-height: 1.2; margin: 0 0 6px; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0 0 8px; }
a { color: var(--blue-dk); }
.muted { color: var(--muted); font-size: 13px; }
.kicker { font: 600 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-dk); }
.card { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

button { font: 500 14px var(--body); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; min-height: 38px; }
button:hover:not(:disabled) { border-color: var(--blue); }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--blue-dk); border-color: var(--blue-dk); }
button.danger { color: var(--red); }
button:disabled { opacity: .5; cursor: default; }
button.small { padding: 5px 12px; font-size: 13px; min-height: 30px; }
:focus-visible { outline: 3px solid var(--blue-dk); outline-offset: 2px; }
input[type=text], input[type=number], input[type=date], textarea {
  font: 15px var(--body); color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; width: 100%;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--tint); }
label.field { display: block; font-weight: 500; color: var(--ink); margin: 8px 0 4px; }
.saved { color: var(--blue-dk); font-weight: 500; font-size: 13px; }
.err { color: var(--red); font-size: 13px; }

/* ---------- Moment (stage + participant) ---------- */
.moment { max-width: 980px; margin: 0 auto; }
.m-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.m-head .icon { width: 36px; height: 36px; border-radius: 50%; background: var(--card); flex: none; }
.m-head .logo { margin-left: auto; height: 16px; flex: none; }
.lead { font-size: 1.05em; color: var(--text); margin: 0 0 12px; }
.status { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }
.waiting { text-align: center; padding: 40px 20px; max-width: 520px; margin: 8vh auto 0; }
.waiting .wait-logo { height: 28px; margin-bottom: 18px; }
.waiting h1 { margin-bottom: 8px; }
.waiting .dots span { display: inline-block; width: 8px; height: 8px; margin: 14px 4px 0; border-radius: 50%; background: var(--blue); animation: pulse 1.4s infinite ease-in-out; }
.waiting .dots span:nth-child(2) { animation-delay: .2s; } .waiting .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .waiting .dots span { animation: none; opacity: .6; } .opt .fill, .bar i { transition: none !important; } }

/* Slides */
.slide { min-height: 50vh; display: flex; flex-direction: column; justify-content: center; }
.slide h1 { font-size: 30px; }
.slide .body { font-size: 1.1em; margin-top: 6px; white-space: pre-line; }
.slide ul.bullets { list-style: none; padding: 0; margin: 14px 0 0; }
.slide ul.bullets li { position: relative; padding: 6px 0 6px 28px; color: var(--ink); font-size: 1.1em; }
.slide ul.bullets li::before { content: ""; position: absolute; left: 4px; top: .95em; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.slide.cover { background: var(--blue); color: #fff; border-radius: 20px; padding: 36px 32px; min-height: 60vh; position: relative; }
.slide.cover .kicker, .slide.cover h1, .slide.cover .body { color: #fff; }
.slide.cover h1 { font-size: 36px; max-width: 18ch; }
.slide.cover .cover-logo { position: absolute; top: 28px; right: 32px; height: 22px; }
.slide.cover .icon { width: 56px; height: 56px; border-radius: 50%; background: #fff; margin-bottom: 18px; }
.slide.title, .slide.statement { text-align: center; align-items: center; }
.slide.statement h1 { color: var(--navy); font-size: 34px; max-width: 22ch; }
body.theme-dark .slide.statement h1, body.theme-contrast .slide.statement h1 { color: var(--blue); }
@media (prefers-color-scheme: dark) { body:not(.theme-default) .slide.statement h1 { color: var(--blue); } }
.slide blockquote { margin: 10px 0 0; padding: 0 0 0 22px; border-left: 5px solid var(--blue); font: 600 1.5em/1.35 var(--display); color: var(--ink); }
.slide .cite { margin: 12px 0 0 27px; color: var(--muted); }
.slide figure { margin: 10px 0 0; text-align: center; }
.slide figure img { max-width: 100%; max-height: 52vh; border-radius: 12px; object-fit: contain; }

/* Vote */
.opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 2px solid transparent; border-radius: 14px; cursor: pointer; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.opt.locked { cursor: default; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:focus-within { outline: 3px solid var(--blue-dk); outline-offset: 2px; }
.opt .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--tint); transition: width .5s ease; z-index: 0; }
.opt.mine .fill { background: var(--tint-mine); }
.opt .tick { position: relative; z-index: 1; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: #fff; font: 700 13px var(--body); }
.opt.mine { border-color: var(--blue); } .opt.mine .tick { background: var(--blue); border-color: var(--blue); }
.opt .t { position: relative; z-index: 1; flex: 1; color: var(--ink); font-weight: 500; }
.opt .n { position: relative; z-index: 1; font-family: var(--display); font-weight: 700; color: var(--num); white-space: nowrap; }
.opt .n small { font: 400 12px var(--body); color: var(--muted); margin-left: 6px; }

/* Words */
.words-form { display: grid; gap: 8px; margin: 8px 0 12px; }
.words-form .inputs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 18px; padding: 18px; min-height: 120px; }
.cloud span { font-family: var(--display); font-weight: 700; line-height: 1.1; }
.cloud .c0 { color: var(--navy); } .cloud .c1 { color: var(--blue-dk); } .cloud .c2 { color: #3E9C9C; }
body.theme-dark .cloud .c0, body.theme-contrast .cloud .c0 { color: var(--blue); }
@media (prefers-color-scheme: dark) { body:not(.theme-default) .cloud .c0 { color: var(--blue); } body:not(.theme-default) .cloud .c2 { color: var(--green); } }
body.theme-dark .cloud .c2 { color: var(--green); }
.wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wlist li { display: flex; justify-content: space-between; gap: 10px; background: var(--card); border-radius: 10px; padding: 8px 12px; color: var(--ink); box-shadow: var(--shadow); }
.wlist b { font-family: var(--display); color: var(--num); }
.empty { color: var(--muted); text-align: center; padding: 18px; font-style: italic; }

/* Board */
.board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 8px; }
.col { background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col h2 { font-size: 17px; margin: 0; color: var(--navy); }
body.theme-dark .col h2, body.theme-contrast .col h2 { color: var(--blue); }
@media (prefers-color-scheme: dark) { body:not(.theme-default) .col h2 { color: var(--blue); } }
.col .hint { font-size: 13px; color: var(--muted); margin-top: -4px; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notes li { background: var(--note); color: var(--note-ink); border-radius: 8px; padding: 7px 10px; font-size: 14px; display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.notes li.mine { box-shadow: inset 3px 0 0 var(--blue); }
.notes li span { flex: 1; }
.notes li button { padding: 0 6px; min-height: 22px; border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; }
.note-form { display: flex; gap: 6px; margin-top: auto; }
.note-form input { padding: 7px 10px; font-size: 14px; }
.note-form button { padding: 6px 12px; min-height: 34px; }

/* Timer */
.rounds { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--line); color: var(--text); }
.chip.on { background: var(--blue); color: #fff; }
.chip.done { background: var(--tint); color: var(--ink); }
.countdown { font: 700 72px/1 var(--display); color: var(--navy); text-align: center; margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
body.theme-dark .countdown, body.theme-contrast .countdown { color: var(--blue); }
@media (prefers-color-scheme: dark) { body:not(.theme-default) .countdown { color: var(--blue); } }
.countdown.low { color: var(--red); }
.round-label { text-align: center; font-weight: 500; color: var(--ink); margin-bottom: 10px; }
ol.steps { margin: 6px 0 12px; padding-left: 22px; color: var(--ink); }
ol.steps li { margin: 4px 0; }
.score-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 8px 0; }
.score-form .grow { flex: 0 1 280px; }
.score-form .saved { padding-bottom: 10px; }
.bars { display: grid; gap: 10px; margin: 10px 0; }
.bar .lbl { display: flex; justify-content: space-between; gap: 8px; color: var(--ink); font-weight: 500; }
.bar .lbl small { color: var(--muted); font-weight: 400; }
.bar .track { height: 18px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .5s ease; }
.bar:nth-child(2) i { background: var(--navy); }
.reveal { background: var(--tint); border-radius: 14px; padding: 14px 16px; color: var(--ink); font-weight: 500; margin-top: 12px; white-space: pre-line; }

/* Prompts */
.banner { background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 500; margin: 0 0 12px; }
ol.prompts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; counter-reset: p; }
ol.prompts li { counter-increment: p; background: var(--card); border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: baseline; color: var(--ink); box-shadow: var(--shadow); }
ol.prompts li::before { content: counter(p); flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--blue); color: #fff; font: 700 .85em/1.6em var(--display); text-align: center; }

/* Commitment */
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.examples span { background: var(--tint); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.count-big { text-align: center; margin: 10px 0; }
.commit-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .commit-grid { grid-template-columns: 1fr 280px; align-items: center; } }
.count-big b { display: block; font: 700 56px/1 var(--display); color: var(--num); }
.mine-box { border-left: 4px solid var(--blue); padding: 8px 12px; background: var(--card); border-radius: 8px; color: var(--ink); margin: 8px 0; }

/* ---------- Facilitator panel ---------- */
.fac-wrap { display: grid; gap: 20px; }
.fac { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fac-head { display: flex; align-items: center; gap: 10px; }
.fac-head img { height: 16px; flex: none; }
.fac-head .t { min-width: 0; }
.fac-head b { display: block; color: var(--ink); font-family: var(--display); font-size: 15px; line-height: 1.2; }
.clock { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clock div { background: var(--card); border-radius: 12px; padding: 8px 10px; box-shadow: var(--shadow); }
.clock b { display: block; font: 700 20px/1.1 var(--display); color: var(--num); font-variant-numeric: tabular-nums; }
.clock small { color: var(--muted); font-size: 12px; }
.clock .over { background: var(--amber-bg); } .clock .over b { color: var(--amber); }
.warn { background: var(--red-bg); color: var(--red); border-radius: 12px; padding: 8px 12px; font-weight: 500; font-size: 14px; }
.navrow { display: flex; align-items: center; gap: 8px; }
.navrow .pos { flex: 1; text-align: center; color: var(--muted); font-size: 13px; }
.navrow button { min-width: 84px; }
.cur h2 { margin: 2px 0 6px; }
.cur .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.pill.open { background: var(--blue); color: #fff; } .pill.closed { background: var(--navy); color: #fff; } .pill.opt { background: var(--amber-bg); color: var(--amber); }
.notes-text { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; font-size: 14px; color: var(--text); }
.notes-text ul { margin: 4px 0 8px; padding-left: 18px; }
.res { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; font-size: 13px; }
.res .mini { display: grid; gap: 4px; }
.res .mini div { display: grid; grid-template-columns: 1fr auto; gap: 6px; position: relative; padding: 3px 6px; border-radius: 6px; overflow: hidden; color: var(--ink); }
.res .mini div i { position: absolute; inset: 0 auto 0 0; background: var(--tint); z-index: 0; }
.res .mini div span, .res .mini div b { position: relative; z-index: 1; }
.res ul { margin: 4px 0; padding-left: 18px; }
.res table { width: 100%; border-collapse: collapse; } .res td, .res th { text-align: left; padding: 3px 4px; border-bottom: 1px solid var(--line); }
.linkbox { display: flex; gap: 6px; } .linkbox input { font-size: 12px; }
.runsheet { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.runsheet h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue-dk); margin: 10px 0 4px; font-family: var(--body); }
.runsheet button { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; text-align: left; width: 100%; border-radius: 10px; border: 1px solid transparent; background: transparent; padding: 6px 8px; min-height: 34px; font-size: 13px; }
.runsheet button .i { color: var(--muted); font-size: 12px; text-align: right; }
.runsheet button .m { color: var(--muted); font-size: 12px; white-space: nowrap; }
.runsheet button.done { color: var(--muted); }
.runsheet button.on { background: var(--card); border-color: var(--blue); box-shadow: var(--shadow); font-weight: 500; }
.picker { display: grid; gap: 8px; }
.picker button { text-align: left; border-radius: 14px; padding: 12px 14px; display: block; width: 100%; }
.picker button small { display: block; color: var(--muted); font-weight: 400; }
.preview { display: none; }
.preview .label { margin-bottom: 8px; }
.more summary { cursor: pointer; color: var(--muted); font-size: 13px; }
@media (min-width: 900px) {
  .fac-wrap { grid-template-columns: 360px 1fr; align-items: start; }
  .preview { display: block; position: sticky; top: 16px; border: 1px dashed var(--line-2); border-radius: 20px; padding: 20px; }
}

/* Diagnostics */
.testinfo { margin: 28px auto 0; max-width: 980px; } .testinfo summary { cursor: pointer; color: var(--muted); font-size: 12px; }
#diag { margin: 8px 0 0; padding: 10px; background: var(--card); border-radius: 10px; font: 12px/1.5 ui-monospace, Menlo, monospace; color: var(--muted); white-space: pre-wrap; word-break: break-all; }
body.simple { max-width: 640px; margin: 0 auto; }

/* ---------- Shared stage: big, calm, readable from the back of a room ---------- */
body.stage { padding: 24px 48px; font-size: 21px; }
body.stage .moment { max-width: 1180px; }
body.stage h1 { font-size: 38px; margin-bottom: 8px; }
body.stage .kicker { font-size: 15px; }
body.stage .status, body.stage .muted { font-size: 17px; }
body.stage .m-head { margin-bottom: 14px; } body.stage .m-head .icon { width: 56px; height: 56px; } body.stage .m-head .logo { height: 26px; }
body.stage .waiting { max-width: 760px; margin-top: 14vh; padding: 48px 40px; }
body.stage .slide { min-height: 540px; }
body.stage .slide h1 { font-size: 52px; }
body.stage .slide.cover { padding: 56px 64px; min-height: 600px; }
body.stage .slide.cover h1 { font-size: 64px; }
body.stage .slide.cover .cover-logo { top: 48px; right: 64px; height: 34px; }
body.stage .slide.cover .icon { width: 84px; height: 84px; }
body.stage .slide.statement h1 { font-size: 60px; }
body.stage .slide figure img { max-height: 470px; }
body.stage .opts { gap: 8px; } body.stage .opt { padding: 12px 22px; border-radius: 16px; }
body.stage .opt .tick { width: 30px; height: 30px; font-size: 17px; } body.stage .opt .n { font-size: 28px; }
body.stage button { font-size: 18px; padding: 11px 22px; }
body.stage input[type=text], body.stage input[type=number], body.stage input[type=date], body.stage textarea { font-size: 19px; padding: 11px 14px; }
body.stage .notes li { font-size: 18px; padding: 9px 12px; }
body.stage .col h2 { font-size: 24px; }
body.stage .countdown { font-size: 150px; margin: 20px 0 10px; }
body.stage .chip { font-size: 15px; padding: 4px 14px; }
body.stage .bar .track { height: 28px; }
body.stage .count-big b { font-size: 110px; }
body.stage .wlist li { font-size: 20px; }
body.stage .testinfo { max-width: 1180px; }
@media (max-width: 700px) { body.stage { padding: 16px; font-size: 17px; } body.stage h1 { font-size: 26px; } body.stage .slide h1, body.stage .slide.cover h1, body.stage .slide.statement h1 { font-size: 32px; } body.stage .countdown { font-size: 90px; } body.stage .slide.cover { padding: 28px 24px; } }

/* Board columns get narrow on a shared stage next to the video strip: let the note box take the
   full column width and drop the Add button underneath instead of squashing the placeholder. */
.col { container-type: inline-size; }
.note-form { display: flex; flex-wrap: wrap; gap: 8px; }
.note-form input { flex: 1 1 140px; min-width: 0; }
@container (max-width: 240px) { .note-form input { flex-basis: 100%; } .note-form button { width: 100%; } }

/* Offline / back-online notice */
.notice { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.2); z-index: 10; }

/* A busy board (15+ notes) mustn't push the "Add a note" boxes off a 720px stage: notes scroll inside
   each column, newest at the bottom, and the add box stays in view. */
body.stage .col .notes { max-height: 38vh; overflow-y: auto; }

/* "How this works" in the facilitator panel and the plan picker. */
.howto { margin: 14px 0 6px; background: var(--card); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.howto summary { cursor: pointer; font-weight: 600; color: var(--blue-dk, #30A1C9); font-size: 14px; }
.howto ol { margin: 10px 0 4px; padding-left: 20px; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.howto li { margin: 0 0 6px; }

/* Setup-code form (gate) */
.code-form { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.code-form input { font-size: 18px; letter-spacing: 2px; text-transform: uppercase; padding: 8px 10px; width: 12ch; border: 1px solid #ccd; border-radius: 6px; }
.code-form p { flex-basis: 100%; text-align: center; margin: 4px 0 0; }

/* "Facilitating this session?" link under the participant view in the Teams side panel */
.fac-claim { margin: 16px auto 8px; text-align: center; }
.linkish { background: none; border: 0; color: #30A1C9; text-decoration: underline; font-size: 13px; cursor: pointer; padding: 4px; }
