/* SecondSpeaker shared styles: screen (dark stage), presenter, ask (light, mobile first), landing.
   Chrome (card column, ask, presenter shell, landing) uses the --ss-* tokens (Dawnbreaker ink and gold,
   see docs/SS_STYLE.md). The stage uses only --stage-* and never reads --ss-*. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --stage-bg: #0b0f17;
  --stage-fg: #f4f6fa;
  --stage-muted: #a9b2c3;
  --stage-accent: #ffd166;
  --stage-accent-2: #6ee7b7;
  --stage-card: #141a26;
  /* --pres-* stay: the deck (tiles, rows, placeholders) borrows --pres-line as a neutral border. */
  --pres-bg: #101419;
  --pres-panel: #171d25;
  --pres-fg: #eef1f6;
  --pres-muted: #94a0b4;
  --pres-line: #2a3340;

  /* Dawnbreaker brand mapped to SecondSpeaker chrome (light) */
  --ss-brand: #F5A623;        /* gold: primary button, active state, accent rule */
  --ss-brand-deep: #EE9B1C;   /* hover only */
  --ss-brand-ink: #242220;    /* text on gold (gold is light, white text fails contrast) */
  --ss-accent: #A96F0B;       /* gold as text, links, small labels (3.96 : 1 on paper, fine at 15 px and up) */
  --ss-accent-text: #9A6509;  /* one step deeper for 13 to 14 px gold text (4.6 : 1 on paper, 4.95 : 1 on white) */
  --ss-ink: #242220;
  --ss-ink-body: #4A453E;
  --ss-muted: #8C8477;
  --ss-paper: #FBF7F0;
  --ss-paper-2: #F3EDE1;
  --ss-card: #FFFFFF;         /* cards and fields on paper */
  --ss-line: #E5DCCB;
  --ss-ok: #3F7D4E;           /* status only, not brand */
  --ss-warn: #A96F0B;
  --ss-bad: #B0412E;
  --ss-ok-text: #3F7D4E;      /* status text colours (flip to lighter tints on ink) */
  --ss-warn-text: #A96F0B;
  --ss-bad-text: #B0412E;
  --ss-ok-bg: #E7F1E9;
  --ss-warn-bg: #FBEFD6;
  --ss-bad-bg: #F8E3DE;
  --ss-focus: #242220;        /* focus ring: ink on paper, gold on ink */
  --ss-radius: 8px;
  --ss-radius-sm: 6px;
  --ss-shadow: 0 1px 2px rgba(36, 34, 32, 0.08);
  --ss-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
             "PingFang HK", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --ss-font-en: "Montserrat", var(--ss-font); /* only resolves when a page self hosts the woff2 (ask, landing) */
  --ss-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ss-ls-label: 0.06em;      /* tracking for small caps labels */
}

/* Dark variant: presenter console, and the screen card column */
.ss-dark, body.presenter, .ask-card {
  --ss-ink: #FBF7F0;          /* roles flip: "ink" is now the text colour */
  --ss-ink-body: #E4DED2;
  --ss-muted: #97907F;
  --ss-paper: #242220;        /* brand ink as ground */
  --ss-paper-2: #2E2B28;      /* panels one step up */
  --ss-card: #1C1A18;         /* fields and code wells one step down */
  --ss-line: #3B3733;
  --ss-brand: #F5A623;        /* gold stays gold */
  --ss-brand-ink: #242220;
  --ss-accent: #F5A623;       /* on dark, full gold is readable as text */
  --ss-accent-text: #F5A623;
  --ss-ok-text: #9BD3A6;
  --ss-warn-text: #F0C06A;
  --ss-bad-text: #F2A093;
  --ss-ok-bg: #22362A;
  --ss-warn-bg: #3D3320;
  --ss-bad-bg: #3D2420;
  --ss-focus: #F5A623;
  --ss-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Optional deck theme (docs/SS_STYLE.md section 4). The stage reads --deck-* when a later loader sets them
   (inline style or a data-theme rule on .stage); every fallback is the current default, so nothing changes
   until a theme is set. The stage never reads --ss-*. */
.stage {
  --stage-bg: var(--deck-bg, #0b0f17);
  --stage-fg: var(--deck-fg, #f4f6fa);
  --stage-muted: var(--deck-muted, #a9b2c3);
  --stage-accent: var(--deck-accent, #ffd166);
  --stage-card: var(--deck-card, #141a26);
  font-family: var(--deck-font, var(--font));
}

/* ======================================================================
   Stage: 1920 x 1080 design space, scaled by JS to fit its box.
   ====================================================================== */
.stage-box { position: relative; overflow: hidden; background: var(--stage-bg); }
.stage {
  position: absolute; top: 0; left: 0; width: 1920px; height: 1080px;
  transform-origin: top left; background: var(--stage-bg); color: var(--stage-fg);
  font-size: 48px; line-height: 1.35; overflow: hidden;
}
.slide { position: absolute; inset: 0; }
.slide-inner { position: absolute; inset: 0; padding: 100px 420px 120px 140px; /* right padding keeps text clear of the QR card */ display: flex; flex-direction: column; justify-content: center; gap: 0.25em; }
.slide p { margin: 0.35em 0; }
.slide h1 { font-size: 120px; line-height: 1.1; margin: 0 0 0.2em 0; letter-spacing: -0.01em; }
.slide h2 { font-size: 72px; line-height: 1.15; margin: 0 0 0.3em 0; }
.slide strong { color: var(--stage-accent); font-weight: 700; }
.slide .sub { font-size: 56px; color: var(--stage-muted); }
.slide .meta { font-size: 34px; color: var(--stage-muted); margin-top: 1.2em; }
.slide .kicker { font-size: 48px; color: var(--stage-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.2em; }
.slide .big { font-size: 1.33em; line-height: 1.25; }
.slide .cite { font-size: 30px; color: var(--stage-muted); margin-top: 0.6em; }
.slide .corner { position: absolute; right: 60px; bottom: 40px; font-size: 32px; color: var(--stage-muted); }
.slide .fragment { opacity: 0; transform: translateY(12px); transition: opacity 0.45s ease, transform 0.45s ease; }
.slide .fragment.on { opacity: 1; transform: none; }
.slide .tag { position: absolute; top: 40px; left: 140px; font-size: 28px; color: var(--stage-bg); background: var(--stage-accent); padding: 6px 18px; border-radius: 8px; font-weight: 700; letter-spacing: 0.05em; }

.slide.kind-title .slide-inner, .slide.kind-part .slide-inner { align-items: center; text-align: center; padding-left: 200px; padding-right: 200px; }
.slide.kind-part h1 { font-size: 150px; color: var(--stage-accent); }
.slide.kind-quote .slide-inner { padding-left: 200px; }
.slide.kind-quote blockquote { margin: 0.3em 0; font-size: 1.125em; line-height: 1.35; padding-left: 0.7em; border-left: 10px solid var(--stage-accent); }
.slide.kind-vote .slide-inner { align-items: center; text-align: center; }
.slide.kind-vote .opts { display: flex; gap: 60px; justify-content: center; align-items: center; flex-wrap: wrap; }
.slide.kind-vote .opts span { font-size: 96px; font-weight: 800; padding: 0.2em 0.5em; border: 8px solid var(--stage-accent); border-radius: 28px; white-space: nowrap; }
.slide.kind-vote .big { font-size: 84px; }
.slide .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.slide .cols h2 { color: var(--stage-accent); }
.slide .tiles { list-style: none; margin: 0.4em 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.slide .tiles li { font-size: 34px; line-height: 1.2; padding: 22px 26px; border-radius: 16px; background: var(--stage-card); border: 3px solid var(--pres-line); color: var(--stage-muted); min-height: 120px; display: flex; align-items: center; }
.slide .tiles li.done { color: var(--stage-fg); border-color: var(--stage-accent-2); }
.slide .tiles li.done::before { content: "✓ "; color: var(--stage-accent-2); font-weight: 800; margin-right: 0.3em; }
.slide.kind-map .slide-inner { padding-right: 420px; }
.slide.kind-vote .slide-inner { padding-right: 420px; padding-bottom: 160px; }
.slide.kind-map h2 { font-size: 56px; }

/* qa slide */
.slide.kind-qa .slide-inner { justify-content: flex-start; padding-top: 90px; padding-right: 500px; }
.slide.kind-qa h1 { font-size: 96px; }
.qa-panel { margin-top: 0.2em; }
.qa-empty { font-size: 44px; color: var(--stage-muted); }
.qa-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.qa-list li { display: flex; align-items: center; gap: 28px; font-size: 50px; line-height: 1.2; padding: 18px 28px; border-radius: 18px; background: var(--stage-card); }
.qa-list li .tick { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; border: 4px solid var(--stage-muted); display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--stage-bg); }
.qa-list li.answered .tick { background: var(--stage-accent-2); border-color: var(--stage-accent-2); }
.qa-list li.answered .head { color: var(--stage-muted); }
.qa-list li .cnt { margin-left: auto; font-size: 34px; color: var(--stage-muted); background: var(--stage-bg); padding: 4px 18px; border-radius: 999px; }

/* qr slide */
.slide.kind-qr .slide-inner { flex-direction: row; align-items: center; gap: 90px; padding-right: 440px; padding-bottom: 110px; }
.slide.kind-qr .base { flex: 1 1 50%; }
.slide.kind-qr h2 { font-size: 64px; }
.qr-big { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.qr-big .qr-box { width: 560px; height: 560px; background: #fff; border-radius: 28px; padding: 24px; }
.qr-big .qr-box svg { width: 100%; height: 100%; display: block; }
.qr-big .qr-url { font-size: 40px; color: var(--stage-accent); word-break: break-all; max-width: 700px; text-align: center; }

/* black screen */
.stage.black .slide, .stage.black .ask-card { visibility: hidden; }

/* ======================================================================
   Screen: SecondSpeaker card (product chrome, ink and gold). screen-layout.css turns it into the
   fixed right column; this block is the base look. White QR tile, gold top rule, no logo.
   ====================================================================== */
.ask-card {
  position: absolute; right: 40px; bottom: 40px; width: 340px;
  background: var(--ss-paper); color: var(--ss-ink); border-radius: var(--ss-radius); padding: 25px 22px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--ss-font); font-size: 28px; line-height: 1.2; text-align: center;
  overflow: hidden;
}
.ask-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--ss-brand); }
.ask-card .qr { width: 296px; height: 296px; background: #ffffff; border-radius: var(--ss-radius); padding: 12px; }
.ask-card .qr svg { width: 100%; height: 100%; display: block; }
.ask-card .url { font-size: 22px; font-weight: 700; color: var(--ss-ink); overflow-wrap: anywhere; line-height: 1.15; letter-spacing: 0.02em; }
.ask-card .hint { font-size: 22px; color: var(--ss-ink-body); }
.ask-card .count { font-size: 24px; color: var(--ss-ink); font-weight: 700; min-height: 1.2em; display: flex; align-items: center; justify-content: center; gap: 10px; }
/* Live indicator: gold dot before the count text; when offline the JS leaves only the grey dot. */
.ask-card .count::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ss-brand); display: inline-block; flex: 0 0 12px; }
.ask-card .count:has(.dot)::before, .ask-card .count:empty::before { display: none; }
.ask-card .count .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ss-muted); display: inline-block; }
.stage.on-qa .ask-card { width: 400px; }
.stage.on-qa .ask-card .qr { width: 356px; height: 356px; }
.content-missing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--stage-muted); font-size: 44px; }

/* screen page shell */
body.screen { background: #000; overflow: hidden; }
body.screen .stage-box { position: fixed; inset: 0; background: #000; }
body.screen:fullscreen { cursor: none; }

/* ======================================================================
   Presenter (dark console on brand ink, gold accents, red only for destructive actions)
   ====================================================================== */
body.presenter { background: var(--ss-paper); color: var(--ss-ink); font-family: var(--ss-font); font-size: 16px; height: 100vh; overflow: hidden; }
.pres-wrap { display: grid; grid-template-columns: 2fr 1fr; height: 100vh; }
.pres-left { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--ss-line); }
.pres-top { display: flex; gap: 16px; padding: 14px 16px; align-items: stretch; border-bottom: 1px solid var(--ss-line); border-top: 3px solid var(--ss-brand); }
.pres-preview { flex: 0 0 40%; }
.pres-preview .stage-box { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--ss-radius); overflow: hidden; border: 1px solid var(--ss-line); }
.pres-meta { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pres-title { font-size: 13px; color: var(--ss-muted); text-transform: uppercase; letter-spacing: var(--ss-ls-label); }
.pres-slide-id { font-size: 26px; font-weight: 700; }
.pres-slide-id small { color: var(--ss-muted); font-weight: 400; font-size: 15px; margin-left: 8px; }
.pres-times { display: flex; gap: 20px; align-items: baseline; flex-wrap: wrap; }
.pres-times .planned { font-size: 16px; color: var(--ss-muted); }
.pres-times .planned b { color: var(--ss-ink); font-family: var(--ss-mono); font-size: 22px; }
.pres-times .elapsed { font-family: var(--ss-mono); font-size: 38px; font-weight: 700; letter-spacing: 0.02em; }
.pres-times .elapsed.over { color: var(--ss-warn-text); }
.pres-timer-btns { display: flex; gap: 8px; }
.pres-next { font-size: 15px; color: var(--ss-muted); }
.pres-next b { color: var(--ss-ink); }
.pres-notes { flex: 1; overflow: auto; padding: 22px 28px; font-size: 26px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; color: var(--ss-ink); }
.pres-notes.empty { color: var(--ss-muted); font-style: italic; }
.pres-controls { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--ss-line); align-items: center; flex-wrap: wrap; }
.pres-controls select { max-width: 360px; }
.pres-qrurl { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--ss-line); background: var(--ss-paper-2); }
.pres-qrurl input { flex: 1; }
.pres-qrurl label { font-size: 14px; color: var(--ss-muted); white-space: nowrap; }

.btn { background: var(--ss-paper-2); color: var(--ss-ink); border: 1px solid var(--ss-line); border-radius: var(--ss-radius); padding: 10px 14px; font-size: 15px; line-height: 1; }
.btn:hover { background: var(--ss-line); }
.btn.primary { background: var(--ss-brand); border-color: var(--ss-brand); color: var(--ss-brand-ink); font-weight: 700; }
.btn.primary:hover { background: var(--ss-brand-deep); border-color: var(--ss-brand-deep); }
.btn.big { font-size: 18px; padding: 14px 22px; }
.btn.danger { border-color: var(--ss-bad); color: var(--ss-bad-text); }
.btn.danger:hover { background: var(--ss-bad-bg); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn:focus-visible, .tab:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: 2px; }
select, input[type="text"], input[type="url"] { font-family: inherit; font-size: 15px; padding: 9px 10px; border-radius: var(--ss-radius); border: 1px solid var(--ss-line); background: var(--ss-card); color: var(--ss-ink); }

.pres-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pres-right-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--ss-line); border-top: 3px solid var(--ss-brand); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tab { background: transparent; border: 1px solid transparent; color: var(--ss-muted); padding: 8px 12px; border-radius: var(--ss-radius); font-size: 15px; }
.tab.active { background: var(--ss-paper-2); color: var(--ss-brand); border-color: var(--ss-line); box-shadow: inset 0 -2px 0 var(--ss-brand); }
.tab .badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--ss-line); color: var(--ss-ink); font-size: 12px; margin-left: 6px; text-align: center; font-weight: 700; }
.tab.active .badge { background: var(--ss-brand); color: var(--ss-brand-ink); }
.pres-right-head .spacer { flex: 1; }
.status-badge { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: var(--ss-ok-bg); color: var(--ss-ok-text); border: 1px solid var(--ss-ok-text); }
.status-badge.off { background: var(--ss-bad-bg); color: var(--ss-bad-text); border-color: var(--ss-bad-text); }
.status-badge.mock { background: var(--ss-warn-bg); color: var(--ss-warn-text); border-color: var(--ss-warn-text); }
.pane { flex: 1; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.pane-tools { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ss-muted); flex-wrap: wrap; }
.pane-empty { color: var(--ss-muted); font-size: 14px; padding: 20px 0; text-align: center; }
.item { background: var(--ss-paper-2); border: 1px solid var(--ss-line); border-radius: var(--ss-radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.item.hidden-item { opacity: 0.45; }
.item .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item .sid { font-family: var(--ss-mono); font-size: 12px; background: var(--ss-card); padding: 2px 6px; border-radius: 4px; color: var(--ss-muted); }
.item .kind { font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.kind.answered { background: var(--ss-ok-bg); color: var(--ss-ok-text); }
.kind.recorded { background: var(--ss-warn-bg); color: var(--ss-warn-text); }
.kind.noted { background: var(--ss-line); color: var(--ss-ink-body); }
.item .time { font-size: 12px; color: var(--ss-muted); margin-left: auto; }
.item .text { font-size: 16px; line-height: 1.4; }
.item .reply { font-size: 14px; line-height: 1.4; color: var(--ss-ink-body); border-left: 3px solid var(--ss-brand); padding-left: 8px; }
.item .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cluster .headline { font-size: 18px; font-weight: 700; }
.cluster.answered .headline { color: var(--ss-muted); text-decoration: line-through; }
.cluster .question { font-size: 15px; line-height: 1.4; }
.cluster .meta { font-size: 12px; color: var(--ss-muted); }
.cluster .answer { font-size: 15px; line-height: 1.45; background: var(--ss-card); border-radius: var(--ss-radius); padding: 8px 10px; border-left: 3px solid var(--ss-brand); }
.cluster .answer b { color: var(--ss-brand); }
.cluster .backing { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cluster .backing li { font-size: 13px; color: var(--ss-muted); line-height: 1.35; }
.cluster .backing li b { color: var(--ss-ink); font-weight: 600; }
.pres-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ss-line); align-items: center; flex-wrap: wrap; }
.pres-foot .spacer { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ss-paper-2); color: var(--ss-ink); border: 1px solid var(--ss-line); padding: 10px 16px; border-radius: var(--ss-radius); font-size: 14px; box-shadow: var(--ss-shadow); opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; }
.pres-missing { padding: 40px; font-size: 18px; color: var(--ss-muted); }

/* ======================================================================
   Ask page (mobile first, light: paper ground, ink text, gold Send)
   ====================================================================== */
body.ask { background: var(--ss-paper); color: var(--ss-ink-body); font-family: var(--ss-font); font-size: 17px; line-height: 1.5; border-top: 3px solid var(--ss-brand); }
.ask-wrap { max-width: 560px; margin: 0 auto; padding: 14px 16px 40px; }
.ask-head { display: flex; align-items: center; gap: 14px; padding: 8px 0 12px; }
.ask-head img { height: 30px; width: auto; display: block; } /* lockup is 4.55 : 1, so about 136 px wide */
.ask-head .title { font-family: var(--ss-font-en); font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--ss-ink); letter-spacing: 0.02em; border-left: 2px solid var(--ss-line); padding-left: 14px; }
.ask-privacy { font-size: 14px; color: var(--ss-ink-body); margin: 0 0 14px; }
.ask-card-form { background: var(--ss-card); border: 1px solid var(--ss-line); border-radius: var(--ss-radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--ss-shadow); }
.ask-card-form label { font-size: 12px; color: var(--ss-ink-body); font-weight: 700; text-transform: uppercase; letter-spacing: var(--ss-ls-label); }
.ask-card-form select, .ask-card-form textarea {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ss-ink); background: var(--ss-card);
  border: 1px solid var(--ss-line); border-radius: var(--ss-radius); padding: 10px 12px;
}
.ask-card-form select { appearance: auto; }
.ask-card-form select:focus, .ask-card-form textarea:focus { outline: 2px solid var(--ss-focus); outline-offset: 1px; border-color: var(--ss-ink); }
.ask-card-form textarea { min-height: 110px; resize: vertical; line-height: 1.4; }
.ask-card-form .follow { font-size: 12px; color: var(--ss-muted); }
.ask-card-form .follow.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ss-brand); margin-right: 6px; }
.ask-row { display: flex; align-items: center; gap: 10px; }
.ask-row .counter { font-size: 12px; color: var(--ss-muted); margin-left: auto; }
.ask-send { font-family: var(--ss-font-en); background: var(--ss-brand); color: var(--ss-brand-ink); border: 2px solid var(--ss-brand); border-radius: var(--ss-radius); padding: 12px 18px; font-size: 17px; font-weight: 700; letter-spacing: 0.03em; width: 100%; }
.ask-send:hover, .ask-send:active { background: var(--ss-brand-deep); border-color: var(--ss-brand-deep); }
.ask-send:active { transform: translateY(1px); }
.ask-send:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: 2px; }
.ask-status { font-size: 14px; color: var(--ss-ink-body); min-height: 1.2em; }
.ask-status.err { color: var(--ss-bad); }
.ask-status.thinking::before { content: ""; display: inline-block; width: 12px; height: 12px; border: 2px solid var(--ss-line); border-top-color: var(--ss-brand); border-radius: 50%; margin-right: 8px; vertical-align: -2px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Reply cards: one shape, three quiet variants told apart by the left rule (gold = answered from the pack,
   ink = recorded for Q&A, paper line = noted). */
.reply-card { border-radius: var(--ss-radius); padding: 14px; border: 1px solid var(--ss-line); border-left: 4px solid var(--ss-line); background: var(--ss-card); display: flex; flex-direction: column; gap: 8px; color: var(--ss-ink); }
.reply-card.answered { border-left-color: var(--ss-brand); }
.reply-card.recorded { border-left-color: var(--ss-ink-body); }
.reply-card.noted { border-left-color: var(--ss-line); background: var(--ss-paper-2); }
.reply-card .q { font-size: 13px; color: var(--ss-ink-body); }
.reply-card .q b { color: var(--ss-ink); font-weight: 700; font-family: var(--ss-mono); }
.reply-card .a { font-size: 16px; line-height: 1.5; }
.reply-card .label { font-size: 13px; color: var(--ss-accent-text); font-weight: 600; }
.ask-history h2 { font-size: 12px; color: var(--ss-ink-body); margin: 20px 0 8px; font-weight: 700; text-transform: uppercase; letter-spacing: var(--ss-ls-label); }
.ask-history .list { display: flex; flex-direction: column; gap: 8px; }
.ask-offline { background: var(--ss-bad-bg); border: 1px solid var(--ss-bad); color: var(--ss-bad); border-radius: var(--ss-radius); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.ask-foot { margin-top: 24px; font-size: 12px; color: var(--ss-muted); text-align: center; }

/* ======================================================================
   Landing (paper, ink, gold; one column, print-like lines)
   ====================================================================== */
body.landing { background: var(--ss-paper); color: var(--ss-ink-body); font-family: var(--ss-font); font-size: 17px; line-height: 1.6; border-top: 3px solid var(--ss-brand); }
.land-wrap { max-width: 720px; margin: 0 auto; padding: 28px 20px 60px; }
.land-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.land-head img { height: 34px; width: auto; display: block; }
.land-wrap h1 { font-family: var(--ss-font-en); font-size: 20px; font-weight: 700; margin: 0; color: var(--ss-ink); letter-spacing: 0.02em; border-left: 2px solid var(--ss-line); padding-left: 16px; line-height: 1.3; }
.land-wrap .lead { color: var(--ss-ink-body); margin: 0 0 22px; }
.land-session { background: var(--ss-card); border: 1px solid var(--ss-line); border-radius: var(--ss-radius); padding: 18px 20px; margin-bottom: 14px; }
.land-session h2 { font-family: var(--ss-font-en); margin: 0 0 4px; font-size: 19px; color: var(--ss-ink); letter-spacing: 0.01em; }
.land-session .when { color: var(--ss-ink-body); font-size: 14px; margin: 0 0 12px; }
.land-links { display: flex; gap: 10px; flex-wrap: wrap; }
.land-links a { font-family: var(--ss-font-en); display: inline-block; padding: 10px 16px; border-radius: var(--ss-radius); background: var(--ss-brand); color: var(--ss-brand-ink); border: 2px solid var(--ss-brand); text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: 0.03em; }
.land-links a:hover { background: var(--ss-brand-deep); border-color: var(--ss-brand-deep); }
.land-links a.alt { background: transparent; color: var(--ss-ink); border-color: var(--ss-ink); }
.land-links a.alt:hover { background: var(--ss-paper-2); }
.land-links a:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: 2px; }
.land-note { font-size: 14px; color: var(--ss-ink-body); margin-top: 14px; border-top: 1px solid var(--ss-line); padding-top: 14px; }
.land-wrap code { font-family: var(--ss-mono); font-size: 13px; background: var(--ss-paper-2); border: 1px solid var(--ss-line); padding: 1px 6px; border-radius: 4px; color: var(--ss-ink); }
@media (max-width: 480px) { .land-head { gap: 12px; } .land-head img { height: 26px; } .land-wrap h1 { font-size: 17px; padding-left: 12px; } } /* lockup shrinks on phones, never crops */

/* ======================================================================
   Content markup from event/hkugac-0826/content (Lane C conventions).
   Added at integration so the canonical JSON renders without edits.
   ====================================================================== */
/* vote: three options as a list */
.slide.kind-vote ul.options { list-style: none; margin: 0; padding: 0; display: flex; gap: 60px; justify-content: center; align-items: center; flex-wrap: wrap; }
.slide.kind-vote ul.options li { font-size: 96px; font-weight: 800; padding: 0.2em 0.5em; border: 8px solid var(--stage-accent); border-radius: 28px; white-space: nowrap; }
/* vote: single question lines (E10, W21) */
.slide.kind-vote .question { font-size: 72px; line-height: 1.25; margin: 0.15em 0; }
.slide.kind-vote .question strong { color: var(--stage-fg); }
/* quote: blockquote with cite */
.slide.kind-quote blockquote p { font-size: 1em; }
.slide.kind-quote blockquote cite { display: block; font-style: normal; font-size: 32px; color: var(--stage-muted); margin-top: 0.5em; }
/* map (E20): ul.tiles.done has the ticks in the text already, ul.tiles.next the arrows */
.slide .tiles li::before { content: none; }
.slide ul.tiles.done li { color: var(--stage-fg); border-color: var(--stage-accent-2); }
.slide ul.tiles.next li { color: var(--stage-muted); }
.slide.kind-map .tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.slide.kind-map .tiles li { font-size: 30px; min-height: 96px; padding: 14px 20px; }
.slide.kind-map p { font-size: 36px; }
/* cold screen (W1) */
.slide .corner { position: absolute; right: 80px; bottom: 60px; font-size: 40px; color: var(--stage-muted); }
/* placeholders left in the canonical text (images and QR to be added) */
.slide .placeholder { color: var(--stage-muted); border: 3px dashed var(--pres-line); border-radius: 16px; padding: 0.4em 0.8em; font-size: 34px; display: inline-block; }
/* W5 two column rows */
.slide .row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; font-size: 44px; }
.slide .row.head { border-bottom: 4px solid var(--pres-line); padding-bottom: 0.2em; margin-bottom: 0.2em; }
.slide .row .l, .slide .row .r { display: block; }
/* W6 the brief: smaller text, labels light up the matching sentences */
.slide blockquote.brief { font-size: 30px; line-height: 1.4; margin: 0.2em 0; padding-left: 0.7em; border-left: 8px solid var(--stage-accent); }
.slide blockquote.brief p { margin: 0.3em 0; }
.slide blockquote.brief ul { margin: 0.2em 0 0.2em 1.2em; padding: 0; }
.slide .q { transition: background 0.4s ease, color 0.4s ease; border-radius: 6px; padding: 0 4px; }
.slide .hl { position: absolute; left: 140px; bottom: 70px; font-size: 44px; font-weight: 800; padding: 0.15em 0.7em; border-radius: 12px; background: var(--stage-accent); color: var(--stage-bg); }
.slide .hl.fragment { transform: none; }
.slide .hl-user { background: #93c5fd; }
.slide .hl-benefit { background: #6ee7b7; }
.slide .hl-picture { background: #fca5a5; }
.slide .hl-boundaries { background: #fdba74; }
.slide .hl-done { background: #c4b5fd; }
.slide .hl-delivery { background: #f9a8d4; }
.slide:has(.hl-change.on) .q.change, .slide:has(.fragment.on .hl-change) .q.change { background: var(--stage-accent); color: var(--stage-bg); }
.slide:has(.hl-user.on) .q.user, .slide:has(.fragment.on .hl-user) .q.user { background: #93c5fd; color: var(--stage-bg); }
.slide:has(.hl-benefit.on) .q.benefit, .slide:has(.fragment.on .hl-benefit) .q.benefit { background: #6ee7b7; color: var(--stage-bg); }
.slide:has(.hl-picture.on) .q.picture, .slide:has(.fragment.on .hl-picture) .q.picture { background: #fca5a5; color: var(--stage-bg); }
.slide:has(.hl-boundaries.on) .q.boundaries, .slide:has(.fragment.on .hl-boundaries) .q.boundaries { background: #fdba74; color: var(--stage-bg); }
.slide:has(.hl-done.on) .q.done, .slide:has(.fragment.on .hl-done) .q.done { background: #c4b5fd; color: var(--stage-bg); }
.slide:has(.hl-delivery.on) .q.delivery, .slide:has(.fragment.on .hl-delivery) .q.delivery { background: #f9a8d4; color: var(--stage-bg); }
/* label badges sit in a row along the bottom (each label is its own fragment paragraph) */
.slide .hl-change { left: 140px; }
.slide .hl-user { left: 380px; }
.slide .hl-benefit { left: 570px; }
.slide .hl-picture { left: 820px; }
.slide .hl-boundaries { left: 1060px; }
.slide .hl-done { left: 1390px; }
.slide .hl-delivery { left: 1570px; }
/* W7 question zero */
.slide .q0 { color: var(--stage-muted); }
/* W15 steps, W19 copy line */
.slide ul.steps { list-style: none; margin: 0.3em 0; padding: 0; display: flex; flex-direction: column; gap: 0.4em; }
.slide ul.steps li { font-size: 52px; }
.slide .copy { font-family: var(--mono); font-size: 32px; line-height: 1.4; background: var(--stage-card); border-radius: 16px; padding: 0.6em 0.9em; }
/* generic lists in content slides */
.slide ul { margin: 0.3em 0; padding-left: 1.1em; }
.slide li { margin: 0.15em 0; }
/* backup slide (W25) */
.slide.kind-backup .slide-inner { align-items: center; text-align: center; }

/* ======================================================================
   W4 session gate: ask page banner and closed reply card, presenter Open / Close pill
   (additive; uses the --ss-* tokens only)
   ====================================================================== */
.ask-closed { background: var(--ss-paper-2); border: 1px solid var(--ss-line); border-left: 4px solid var(--ss-ink-body); color: var(--ss-ink-body); border-radius: var(--ss-radius); padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.ask-card-form.is-closed textarea { background: var(--ss-paper-2); color: var(--ss-muted); }
.ask-card-form.is-closed .ask-send, .ask-send:disabled { opacity: 0.45; cursor: not-allowed; }
.ask-card-form.is-closed .ask-send:hover { background: var(--ss-brand); border-color: var(--ss-brand); }
.reply-card.closed { border-left-color: var(--ss-ink-body); }
.reply-card.unconfirmed { border-left-color: var(--ss-warn-text); }

.open-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 14px; border-radius: 999px; border: 1px solid var(--ss-ok-text); background: var(--ss-ok-bg); color: var(--ss-ok-text); font-size: 14px; font-weight: 700; line-height: 1.2; text-align: left; touch-action: manipulation; }
.open-toggle::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.open-toggle .act { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor; opacity: 0.85; white-space: nowrap; }
.open-toggle.is-closed { background: var(--ss-warn-bg); color: var(--ss-warn-text); border-color: var(--ss-warn-text); }
.open-toggle.is-unknown { background: var(--ss-paper-2); color: var(--ss-muted); border-color: var(--ss-line); }
.open-toggle:disabled { opacity: 0.6; cursor: progress; }
.open-toggle:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: 2px; }
.pres-open-slot { display: none; }
.live-open { font-weight: 700; }
.live-open.is-open { color: var(--ss-ok-text); }
.live-open.is-closed { color: var(--ss-warn-text); }
@media (max-width: 899px) {
  /* phone: the pill sits right under the sticky bar, full width, thumb sized (W2 layout untouched) */
  .pres-open-slot { display: block; order: 1; padding: 10px 10px 0; }
  .pres-open-slot .open-toggle { width: 100%; min-height: 48px; font-size: 14px; justify-content: flex-start; }
  .pres-open-slot .open-toggle .act { margin-left: auto; }
}

/* ======================================================================
   W5 presenter: wider jump select on desktop, Sign out link, presenter key gate
   (additive; uses the --ss-* tokens only; the phone dock lives in presenter-mobile.css)
   ====================================================================== */
.pres-controls select { flex: 1 1 280px; min-width: 200px; max-width: 640px; min-height: 40px; font-size: 15px; }
.pres-controls #sync-badge { margin-left: auto; }
.pres-signout { font-size: 13px; color: var(--ss-muted); text-decoration: underline; text-underline-offset: 2px; padding: 8px 4px; white-space: nowrap; }
@media (min-width: 900px) { .pres-foot .pres-signout { flex: 1 1 100%; text-align: right; padding: 0 4px 2px; margin-top: -2px; } }
.pres-signout:hover { color: var(--ss-ink); }
.pres-signout:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: 2px; border-radius: 4px; }
/* Key gate: opaque ink ground, one card, nothing else visible behind it */
.pres-keygate { position: fixed; inset: 0; z-index: 100; background: var(--ss-paper); color: var(--ss-ink); display: flex; align-items: center; justify-content: center; padding: 24px; border-top: 3px solid var(--ss-brand); font-family: var(--ss-font); }
.pres-keygate[hidden] { display: none; }
.keygate-card { width: 100%; max-width: 360px; background: var(--ss-paper-2); border: 1px solid var(--ss-line); border-radius: var(--ss-radius); padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--ss-shadow); }
.keygate-brand { font-size: 12px; color: var(--ss-muted); text-transform: uppercase; letter-spacing: var(--ss-ls-label); }
.keygate-title { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.25; color: var(--ss-ink); }
.keygate-hint { font-size: 14px; color: var(--ss-ink-body); margin: 0 0 6px; line-height: 1.45; }
.keygate-label { font-size: 12px; color: var(--ss-ink-body); font-weight: 700; text-transform: uppercase; letter-spacing: var(--ss-ls-label); }
.keygate-card input[type="password"] { font-family: inherit; font-size: 18px; padding: 12px 12px; min-height: 48px; border-radius: var(--ss-radius); border: 1px solid var(--ss-line); background: var(--ss-card); color: var(--ss-ink); width: 100%; letter-spacing: 0.08em; }
.keygate-card input[type="password"]:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: 2px; }
.keygate-err { font-size: 14px; color: var(--ss-bad); margin: 0; line-height: 1.4; }
.keygate-btn { min-height: 48px; font-size: 16px; margin-top: 4px; }
body.keygate-open, html.keygate-open { overflow: hidden; }

/* ======================================================================
   W9 presenter: Black as a toggle with an on state, Sync screen with a state dot
   (additive; uses the --ss-* tokens only; the phone dock and More sheet live in presenter-mobile.css)
   ====================================================================== */
.black-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 96px; }
.black-toggle .blk-swatch { width: 12px; height: 12px; border-radius: 3px; border: 2px solid currentColor; background: transparent; flex: none; box-sizing: border-box; }
/* on: gold ground (active state), ink text, the swatch fills solid: the projector is black */
.black-toggle.is-on { background: var(--ss-brand); border-color: var(--ss-brand); color: var(--ss-brand-ink); font-weight: 700; }
.black-toggle.is-on:hover { background: var(--ss-brand-deep); border-color: var(--ss-brand-deep); }
.black-toggle.is-on .blk-swatch { background: var(--ss-brand-ink); border-color: var(--ss-brand-ink); }
.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ss-muted); flex: none; }
.st-dot.is-ok { background: var(--ss-ok-text); }
.st-dot.is-warn { background: var(--ss-warn-text); }
.st-dot.is-bad { background: var(--ss-bad-text); }
.sync-btn { display: inline-flex; align-items: center; gap: 7px; }
.sync-btn .sync-state { display: none; } /* desktop: the dot carries the state, the tooltip the words; phones show the text */

/* ======================================================================
   W11 "Now discussing": qa slide panel focus treatment (stage tokens only), presenter Discuss button,
   cluster card research block, ask page banner (additive; the chrome parts use --ss-* tokens only)
   ====================================================================== */
/* qa panel: sizes follow --qa-fs (set by slides.js when the list would overflow; 50 px base in design space),
   headlines clamp at two lines, the focused cluster gets a gold left rule, a slightly larger headline and a
   small gold "Discussing" label on the right. Answered ticks unchanged. */
.qa-list { gap: 0.36em; font-size: var(--qa-fs, 50px); }
.qa-list.many { gap: 0.28em; }
.qa-list li { font-size: 1em; gap: 0.56em; padding: 0.36em 0.56em; border-radius: 0.36em; border-left: 0.28em solid transparent; padding-left: 0.32em; }
.qa-list li .tick { font-size: 0.8em; width: 1.6em; height: 1.6em; flex: 0 0 1.6em; border-width: 0.1em; } /* 64 px tick, 4 px ring at the 50 px base */
.qa-list li .head { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.qa-list li .cnt { margin-left: 0; font-size: 0.68em; padding: 0.12em 0.54em; flex: 0 0 auto; }
.qa-list li.focus { border-left-color: var(--stage-accent); background: var(--stage-card); }
.qa-list li.focus .head { font-size: 1.1em; font-weight: 700; color: var(--stage-fg); }
.qa-list li.focus .now { flex: 0 0 auto; font-size: 0.5em; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stage-accent); border: 0.12em solid var(--stage-accent); border-radius: 999px; padding: 0.28em 0.9em; line-height: 1.1; white-space: nowrap; }
.qa-list li.focus.answered .head { color: var(--stage-muted); }

/* presenter: Discuss toggle (gold on state, same pattern as the Black toggle), Now discussing line, summary note */
.btn.focus-btn.is-on { background: var(--ss-brand); border-color: var(--ss-brand); color: var(--ss-brand-ink); font-weight: 700; }
.btn.focus-btn.is-on:hover { background: var(--ss-brand-deep); border-color: var(--ss-brand-deep); }
.cluster.focus { border-color: var(--ss-brand); box-shadow: inset 3px 0 0 var(--ss-brand); }
.cluster.focus .headline { color: var(--ss-brand); }
.focus-line { display: none; font-size: 14px; color: var(--ss-ink); background: var(--ss-paper-2); border: 1px solid var(--ss-line); border-left: 3px solid var(--ss-brand); border-radius: var(--ss-radius); padding: 8px 10px; line-height: 1.4; }
.focus-line.is-on { display: block; }
.focus-line b { color: var(--ss-brand); font-weight: 700; }
.summary-note { display: none; font-size: 13px; color: var(--ss-warn-text); background: var(--ss-warn-bg); border: 1px solid var(--ss-warn-text); border-radius: var(--ss-radius); padding: 6px 10px; line-height: 1.4; }
.summary-note.is-on { display: block; }
/* cluster card research block: headline, merged question, count and slides, suggested answer, citations, members */
.cluster .backing li { color: var(--ss-ink-body); }
.cluster .members { font-size: 13px; color: var(--ss-muted); }
.cluster .members summary { cursor: pointer; color: var(--ss-ink-body); font-weight: 600; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px; min-height: 28px; }
.cluster .members summary::-webkit-details-marker { display: none; }
.cluster .members summary::before { content: ""; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform 0.15s; flex: none; }
.cluster .members[open] summary::before { transform: rotate(90deg); }
.cluster .members ul { list-style: none; margin: 0; padding: 0 0 2px; display: flex; flex-direction: column; gap: 6px; }
.cluster .members li { font-size: 14px; line-height: 1.4; color: var(--ss-ink); background: var(--ss-card); border-radius: var(--ss-radius-sm); padding: 6px 8px; }
.cluster .members li .sid { margin-right: 6px; }
.cluster .members .note { font-style: italic; }
@media (max-width: 899px) {
  /* phone: the three cluster buttons are thumb targets (wins over the .item rule in presenter-mobile.css) */
  .item.cluster .actions .btn.small { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  .item.cluster .members summary { min-height: 44px; }
}

/* ask page: quiet "Now discussing" banner above the form (shown only while the presenter has a cluster focused) */
.ask-focus { background: var(--ss-paper-2); border: 1px solid var(--ss-line); border-left: 4px solid var(--ss-brand); color: var(--ss-ink-body); border-radius: var(--ss-radius); padding: 10px 12px; font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
.ask-focus b { color: var(--ss-ink); font-weight: 700; }
