/*
 * LinguaLive — design system.
 * Software UI, so one grotesque (Geist) with Geist Mono for codes and clocks.
 * Zinc neutrals, one accent (emerald, kept under 80% saturation), red only for
 * "on air" and destructive actions. Primary actions are ink-filled.
 * Major surfaces: white, 1px hairline, large radius, wide diffusion shadow.
 * Motion: transform/opacity only, one spring-like easing, staggered load-ins.
 * Light by default, dark when the device asks for it.
 */
:root {
  --bg: #f9fafb;
  /* the green panel on the public page: light with dark text here, deep with light text in the dark theme */
  --band: #7ccbb0; --band-rgb: 124, 203, 176; --band-ink: #08281f; --band-ink-2: #153f33; --band-ink-3: #245648; --band-line: rgba(8, 40, 31, .2); --band-accent: #0b5c47; --band-link: #063d2f;
  --surface: #ffffff;
  --sunk: #f1f2f4;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #6f6f79;
  --line: #e4e4e7;
  --accent: #1a9f7c;
  --accent-soft: #e3f4ee;
  --accent-ink: #0b5c47;
  --live: #d43a2a;
  --live-soft: #fbe7e4;
  --btn: #18181b;
  --btn-hover: #2c2c31;
  --btn-ink: #fafafa;
  --tone-0: #b4552b;
  --tone-1: #1a9f7c;
  --tone-2: #6b57b8;
  --tone-3: #2f72b3;
  --shadow: 0 20px 40px -15px rgba(24, 24, 27, .07), 0 1px 2px rgba(24, 24, 27, .03);
  --glow: rgba(26, 159, 124, .12);
  --dot: rgba(24, 24, 27, .09);

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 2rem;
  --r-xl: 2.5rem;

  /* names still used by inline styles and script-built markup */
  --text-muted: var(--ink-3);
  --text-primary: var(--ink);
  --border: var(--line);
}
/* dark: chosen with the toggle (data-theme) or, with no choice made, by the device */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b;
    --band: #0e4337; --band-rgb: 14, 67, 55; --band-ink: #f2fbf8; --band-ink-2: #c9e6dd; --band-ink-3: #9cc7ba; --band-line: rgba(255, 255, 255, .16); --band-accent: #7fe0c2; --band-link: #b6f0de;
    --surface: #131316;
    --sunk: #1c1c21;
    --ink: #fafafa;
    --ink-2: #a1a1aa;
    --ink-3: #80808a;
    --line: #27272a;
    --accent: #38c79e;
    --accent-soft: #0f2a23;
    --accent-ink: #7fe0c2;
    --live: #ff6452;
    --live-soft: #331613;
    --btn: #fafafa;
    --btn-hover: #e4e4e7;
    --btn-ink: #18181b;
    --tone-0: #eb9d7b;
    --tone-1: #38c79e;
    --tone-2: #ab9eea;
    --tone-3: #80b6e8;
    --shadow: 0 20px 40px -15px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
    color-scheme: dark;
    --glow: rgba(56, 199, 158, .14);
    --dot: rgba(255, 255, 255, .07);
  }
}
:root[data-theme="dark"] {
  --bg: #09090b;
  --band: #0e4337; --band-rgb: 14, 67, 55; --band-ink: #f2fbf8; --band-ink-2: #c9e6dd; --band-ink-3: #9cc7ba; --band-line: rgba(255, 255, 255, .16); --band-accent: #7fe0c2; --band-link: #b6f0de;
  --surface: #131316;
  --sunk: #1c1c21;
  --ink: #fafafa;
  --ink-2: #a1a1aa;
  --ink-3: #80808a;
  --line: #27272a;
  --accent: #38c79e;
  --accent-soft: #0f2a23;
  --accent-ink: #7fe0c2;
  --live: #ff6452;
  --live-soft: #331613;
  --btn: #fafafa;
  --btn-hover: #e4e4e7;
  --btn-ink: #18181b;
  --tone-0: #eb9d7b;
  --tone-1: #38c79e;
  --tone-2: #ab9eea;
  --tone-3: #80b6e8;
  --shadow: 0 20px 40px -15px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
  color-scheme: dark;
  --glow: rgba(56, 199, 158, .14);
  --dot: rgba(255, 255, 255, .07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* Scroll bars: thin, in the theme's own grey, a little stronger while the pointer is over what they scroll */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink-3) 40%, transparent) transparent; }
*:hover { scrollbar-color: color-mix(in srgb, var(--ink-3) 75%, transparent) transparent; }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { border-radius: 8px; background: color-mix(in srgb, var(--ink-3) 45%, transparent); }
}
html, body { height: 100%; }
html { background: var(--bg); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); -webkit-font-smoothing: antialiased; }
/* the room: a microphone-grille dot grid fading down the page, with an accent glow in one corner */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(56rem 34rem at 88% -8%, var(--glow), transparent 62%),
    radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%); mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ping { to { transform: scale(2.8); opacity: 0; } }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- shared pieces ---------- */
.wordmark { display: inline-flex; align-items: baseline; font-weight: 600; font-size: 1.4rem; letter-spacing: -.04em; text-transform: lowercase; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark i { font-style: normal; font-weight: 400; }
/* the wave draws itself from left to right when a page opens */
@keyframes wave-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) { .wordmark i::before { animation: none !important; } }
.wordmark i::before { /* the wave between the two words: speech turning into text. Its flat end sits at half the height of the lowercase letters */
  content: ""; display: inline-block; width: .945em; height: .84em; margin: 0 .04em 0 .12em; vertical-align: -.153em; background: var(--accent);
  animation: wave-in 1.1s cubic-bezier(.65, 0, .35, 1) .25s both;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round' d='M2 12C4 12 4.5 3 7.5 3S11 20 14 20S17 7.5 19.5 7.5S22 12 25 12'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round' d='M2 12C4 12 4.5 3 7.5 3S11 20 14 20S17 7.5 19.5 7.5S22 12 25 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-toggle {
  display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .7rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font-size: .8rem; font-weight: 500;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.theme-toggle::before { content: ""; width: .7em; height: .7em; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.theme-toggle:hover { border-color: var(--ink-3); color: var(--ink); }
.theme-toggle:active { transform: scale(.96); }
.bar-right { display: flex; align-items: center; gap: 1rem; }

/* language "channel" code, as on an interpreting receiver */
.ch { font-family: var(--mono); font-size: .72em; font-weight: 500; letter-spacing: .04em; color: var(--ink-3); margin-right: .5em; }
/* Where the device can draw flags, the flag theme.js found stands in for the two letters: the name of the language is
   right beside it. The letters stay in the page for screen readers, and show where flags cannot be drawn (Windows). */
:root.flags :is(.ch, .lang-code)[data-flag] { display: inline-block; vertical-align: middle; font-size: 0; line-height: 0; letter-spacing: 0; margin-right: .45rem; padding: 0; background: none; }
/* a box exactly as tall as the flag, set at the middle of the line beside it: on the baseline it hung below the letters */
:root.flags :is(.ch, .lang-code)[data-flag]::before { content: attr(data-flag); display: block; font-family: system-ui, sans-serif; font-size: 1.05rem; line-height: 1; }
:root.flags .marquee .ch[data-flag] { margin-right: .6rem; position: relative; top: -.14rem; }   /* beside large type, the middle of the line sits a little low */
:root.flags .marquee .ch[data-flag]::before { font-size: 1.5rem; }

.btn, .join-btn, .card-btn, .download-btn, .ctrl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink);
  font-weight: 500; letter-spacing: -.01em; text-decoration: none; padding: .7rem 1.15rem;
  transition: transform .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn:hover, .download-btn:hover, .ctrl-btn:hover { border-color: var(--ink-3); }
.btn:active, .join-btn:active, .card-btn:active, .download-btn:active, .ctrl-btn:active { transform: scale(.98); }
.btn-primary, .join-btn, .card-btn { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn-primary:hover, .join-btn:hover, .card-btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn-danger { color: var(--live); }
.btn-danger:hover, .btn-danger[data-armed] { background: var(--live); border-color: var(--live); color: #fff; }
.join-btn:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.lang-chip, .lang-btn {
  flex-shrink: 0; display: inline-flex; align-items: baseline; padding: .42rem .75rem;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink);
  font-size: .9rem; white-space: nowrap;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.lang-chip:hover, .lang-btn:hover { border-color: var(--ink-3); }
.lang-chip:active, .lang-btn:active { transform: scale(.97); }
.lang-chip.selected, .lang-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.lang-chip.selected .ch, .lang-btn.active .ch { color: var(--accent-ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  max-width: min(92vw, 34rem); padding: .7rem 1.1rem; border-radius: var(--r-m);
  background: var(--btn); color: var(--btn-ink); font-size: .9rem; font-weight: 500; text-align: center; box-shadow: var(--shadow);
  opacity: 0; transform: translate(-50%, 16px) scale(.98); pointer-events: none; transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.lang-badge { font-family: var(--mono); font-size: .72rem; font-weight: 500; padding: .14rem .45rem; background: var(--sunk); border-radius: 6px; color: var(--ink-2); }
.icon:empty { display: none; }

/* breathing status lamp with an expanding ring */
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s var(--ease) infinite; }
.live-dot.ended { background: var(--ink-3); }
.live-dot.ended::after { animation: none; opacity: 0; }

/* the latest sentence, on its own raised surface */
.hero-segment, .hero-translation, .preview {
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  /* a speech bubble: three soft corners, one tight one where the voice comes from */
  border-radius: var(--r-xl) var(--r-xl) var(--r-xl) .6rem; box-shadow: var(--shadow);
}
.hero-text { font-weight: 500; letter-spacing: -.028em; line-height: 1.18; text-wrap: pretty; }
/* empty state: a label over two breathing skeleton lines */
.hero-waiting { display: grid; gap: .8rem; color: var(--ink-3); font-size: .95rem; }
.hero-waiting::before, .hero-waiting::after { content: ""; height: 1.15rem; border-radius: 999px; background: var(--sunk); animation: breathe 1.8s var(--ease) infinite; }
.hero-waiting::before { width: 68%; order: 2; }
.hero-waiting::after { width: 42%; order: 3; animation-delay: .25s; }

/* a speaker is told apart by a small coloured dot, never by a coloured panel */
.s0, .speaker-1 { --tone: var(--tone-0); }
.s1, .speaker-2 { --tone: var(--tone-1); }
.s2, .speaker-3 { --tone: var(--tone-2); }
.s3 { --tone: var(--tone-3); }
.hero-speaker, .segment-speaker, .history-item .speaker { display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 500; color: var(--ink-2); margin-bottom: .6rem; }
.hero-speaker::before, .segment-speaker::before, .history-item .speaker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--ink-3)); flex: none; }
.segment-speaker { margin-bottom: 0; }
/* the newest line in a list slides in; older ones stay still */
.history-list > .segment:first-child, .history-list > .history-item:first-child { animation: rise .6s var(--ease) both; }

/* ---------- speaker console ---------- */
.pg-speaker {
  .app-container { display: flex; flex-direction: column; height: 100dvh; }
  .header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.75rem; flex-shrink: 0; }
  .back-link { color: var(--ink-3); text-decoration: none; font-size: .88rem; transition: color .3s var(--ease); }
  .back-link:hover { color: var(--ink); }
  .phase { display: none; }
  .phase.active { display: flex; flex-direction: column; flex: 1; overflow: hidden; }

  /* setup: wide details card, narrower audio card */
  .setup-container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 3.5rem 1.75rem 4rem; overflow-y: auto; flex: 1; }
  .setup-container > * { animation: rise .7s var(--ease) both; }
  .setup-container > :nth-child(2) { animation-delay: .08s; }
  .setup-container > :nth-child(3) { animation-delay: .16s; }
  .setup-title { font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1; letter-spacing: -.045em; max-width: 16ch; margin-bottom: 2.5rem; }
  .setup-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; align-items: start; }
  .card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: var(--r-l); padding: 2rem; box-shadow: var(--shadow); }
  .card-title { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 1.4rem; }
  .form-group { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
  .form-group:last-child { margin-bottom: 0; }
  .form-group > label { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
  .form-group textarea { resize: vertical; min-height: 4.5rem; line-height: 1.45; }
  .field-hint { font-size: .78rem; color: var(--ink-3); }
  .notes-fill { display: grid; gap: .5rem; justify-items: start; margin-top: .7rem; }
  .notes-fill #notesBox { display: grid; gap: .4rem; width: 100%; justify-items: start; }
  .notes-fill #notesBox[hidden] { display: none; }
  .notes-fill textarea { width: 100%; }
  .setup-note { margin-top: .9rem; font-size: .88rem; color: var(--ink-3); }
  .stats-bar .bar-right { gap: .5rem; }
  .form-group input[type="text"], .form-group textarea, .form-group select, .lang-dropdown {
    width: 100%; padding: .72rem .9rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  }
  .form-group input[type="text"]:focus, .form-group textarea:focus, .form-group select:focus, .lang-dropdown:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .provider-badge { display: none; }
  .audio-options { display: grid; gap: .45rem; }
  .audio-option { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; font-size: .92rem; transition: border-color .3s var(--ease), background-color .3s var(--ease); }
  .audio-option:hover { border-color: var(--ink-3); }
  .audio-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
  .audio-option input, .checkbox-group input { accent-color: var(--accent); }
  .checkbox-group { display: flex; align-items: center; gap: .6rem; padding-top: 1.1rem; font-size: .92rem; }
  .checkbox-group input { width: 16px; height: 16px; }
  .start-btn-container { margin-top: 2rem; }
  .start-btn-container .btn { padding: 1rem 2.25rem; font-size: 1.02rem; }

  /* live: floating control panel on the left, the talk on the right */
  .live-container { display: flex; flex: 1; gap: 1.25rem; overflow: hidden; padding: 0 1.25rem 1.25rem; }
  .sidebar { width: 312px; flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto;
    background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: var(--r-l); box-shadow: var(--shadow);
    animation: rise .7s var(--ease) both; }
  .sidebar > * { padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); }
  .session-code-label, .lang-label, .speakers-title { font-size: .8rem; color: var(--ink-3); margin-bottom: .45rem; }
  .speakers-title { display: flex; justify-content: space-between; }
  /* the code as six key caps */
  .session-code { display: flex; gap: 5px; font-family: var(--mono); font-size: 1.35rem; font-weight: 600; }
  .session-code span { flex: 1; display: grid; place-items: center; height: 2.6rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: 0 2px 0 var(--line); animation: rise .5s var(--ease) both; }
  .session-code span:nth-child(2) { animation-delay: .04s; } .session-code span:nth-child(3) { animation-delay: .08s; }
  .session-code span:nth-child(4) { animation-delay: .12s; } .session-code span:nth-child(5) { animation-delay: .16s; }
  .session-code span:nth-child(6) { animation-delay: .2s; }

  .mic-btn, .mobile-mic {
    display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; min-height: 58px;
    border: 0; border-radius: var(--r-m); background: var(--btn); color: var(--btn-ink); font-weight: 500; letter-spacing: -.01em;
    transition: transform .3s var(--ease), background-color .3s var(--ease);
  }
  .mic-btn:hover, .mobile-mic:hover { background: var(--btn-hover); }
  .mic-btn:active, .mobile-mic:active { transform: scale(.98); }
  .mic-btn svg, .mobile-mic svg { width: 20px; height: 20px; flex: none; }
  .mic-label::after { content: "Start microphone"; }
  .listening .mic-label::after { content: "On air · stop"; }
  .mic-btn.listening, .mobile-mic.listening { background: var(--live); color: #fff; }
  .listening svg { display: none; }
  /* level bars while the microphone is live */
  .eq { display: none; align-items: center; gap: 3px; height: 16px; }
  .listening .eq { display: flex; }
  .eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: eq .9s var(--ease) infinite alternate; }
  .eq i:nth-child(2) { animation-delay: -.35s; }
  .eq i:nth-child(3) { animation-delay: -.6s; }
  .eq i:nth-child(4) { animation-delay: -.15s; }
  .mic-status { margin-top: .7rem; font-size: .85rem; line-height: 1.4; color: var(--ink-3); min-height: 1.2em; }
  .mic-status.active { color: var(--live); font-weight: 500; }

  /* join block: big QR over the key-cap code */
  .sidebar-header { display: grid; gap: .85rem; }
  .sidebar-header .session-code-label { margin-bottom: 0; }
  .sidebar-header .qr-code { justify-self: center; padding: 12px; border-radius: 16px; box-shadow: var(--shadow); cursor: zoom-in; transition: transform .35s var(--ease); }
  .sidebar-header .qr-code:hover { transform: scale(1.03); }
  .sidebar-header .qr-code:active { transform: scale(.98); }
  .sidebar-header .qr-code img { width: 176px; height: 176px; }
  .sidebar-header .share-url { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* language picker: flag and code inside the select */
  .lang-pick { position: relative; }
  .lang-pick .lang-dropdown { appearance: none; -webkit-appearance: none; height: 3rem; padding: 0 2.6rem 0 3.6rem; font-weight: 500; cursor: pointer; }
  .lang-pick .lang-dropdown:hover { border-color: var(--ink-3); }
  .flags & .lang-pick .lang-dropdown { padding-left: 2.9rem; }
  .flags & .lang-pick .lang-code[data-flag] { left: .95rem; margin: 0; }
  .lang-code { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); pointer-events: none;
    font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: .2rem .45rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
  .lang-pick::after { content: ""; position: absolute; right: 1.05rem; top: 50%; width: .5rem; height: .5rem; pointer-events: none;
    border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); }

  .speakers-section { flex: 1; }
  .speakers-list { max-height: 170px; overflow-y: auto; display: grid; gap: .55rem; }
  .speaker-item { display: flex; align-items: center; gap: .6rem; }
  .speaker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--ink-3)); flex: none; }
  .speaker-info { min-width: 0; display: flex; align-items: baseline; gap: .5rem; flex: 1; justify-content: space-between; }
  .speaker-name { font-size: .9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .speaker-count { font-family: var(--mono); font-size: .74rem; color: var(--ink-3); white-space: nowrap; }

  .qr-section { display: flex; gap: 1rem; align-items: center; flex: 1; }
  .qr-code { background: #fff; padding: 6px; border-radius: var(--r-s); border: 1px solid var(--line); flex: none; }
  .qr-code img { width: 84px; height: 84px; display: block; }
  .share-url { font-family: var(--mono); font-size: .7rem; color: var(--ink-3); word-break: break-all; line-height: 1.5; }
  /* always reachable, even when the panel is taller than the window */
  .sidebar-actions { display: flex; gap: .5rem; border-bottom: 0; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); border-radius: 0 0 var(--r-l) var(--r-l); }
  .speakers-section { border-bottom: 0; }
  .sidebar-actions .btn { flex: 1; padding: .65rem; font-size: .88rem; }

  .main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; animation: rise .7s var(--ease) .08s both; }
  .stats-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: .35rem .75rem 1.25rem; flex-shrink: 0; }
  .stats { display: grid; grid-auto-flow: column; gap: 2.5rem; }
  .stat-value { font-family: var(--mono); font-size: 1.35rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
  .stat-label { font-size: .78rem; color: var(--ink-3); }
  .stat-time { padding-left: 2.5rem; border-left: 1px solid var(--line); }
  .stat-time .stat-value { color: var(--accent-ink); transition: color .3s var(--ease); }
  .stat-time .stat-value.low { color: var(--live); }
  .download-btn { padding: .55rem 1rem; font-size: .88rem; }

  .transcript-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; gap: 1.75rem; }
  .hero-segment { padding: 2.25rem 2.5rem; min-height: 220px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; }
  .hero-text { font-size: clamp(1.5rem, 2.5vw, 2.3rem); max-width: 30ch; }
  .hero-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4rem; font-size: .8rem; color: var(--ink-3); }
  .hero-meta > div { display: flex; align-items: center; gap: .75rem; }
  .hero-time, .segment-time { font-family: var(--mono); font-size: .74rem; color: var(--ink-3); }

  .history-section { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 0 .75rem; }
  .history-header { padding-bottom: .7rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
  .history-title { font-size: .82rem; font-weight: 500; color: var(--ink-3); }
  .history-list { flex: 1; overflow-y: auto; padding-bottom: 2rem; }
  .segment { padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
  .segment-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .35rem; }
  .segment-text { font-size: 1.05rem; line-height: 1.5; letter-spacing: -.01em; max-width: 65ch; }
  .segment-meta { display: flex; gap: 1rem; margin-top: .3rem; font-size: .76rem; color: var(--ink-3); }

  .mobile-bar { display: none; align-items: center; gap: .75rem; padding: 0 1rem .9rem; }
  .mobile-mic { width: auto; min-height: 46px; padding: 0 1.1rem; flex: none; }
  .mobile-mic .mic-label::after { content: "Start"; }
  .mobile-mic.listening .mic-label::after { content: "On air"; }
  .mobile-code { font-family: var(--mono); font-weight: 600; letter-spacing: .1em; }
  .mobile-bar .lang-dropdown { min-width: 7.5rem; padding: .55rem .6rem; }

  @media (max-width: 767px) {
    .header { padding: .9rem 1rem; }
    .setup-container { padding: 2rem 1rem 3rem; }
    .setup-grid { grid-template-columns: 1fr; }
    .card { padding: 1.5rem; }
    .live-container { padding: 0 1rem 0; }
    .sidebar { display: none; }
    .mobile-bar { display: flex; }
    .stats-bar { padding: .25rem 0 1rem; align-items: center; }
    .stats { gap: 1.1rem; }
    .stat-value { font-size: 1.1rem; }
    .stat-time { padding-left: 1.1rem; }
    .download-btn { padding: .5rem .7rem; font-size: .8rem; }
    .transcript-area { gap: 1.25rem; }
    .hero-segment { padding: 1.5rem; min-height: 160px; border-radius: var(--r-l) var(--r-l) var(--r-l) .5rem; }
    .history-section { padding: 0 .25rem; }
  }
}

/* ---------- audience (phone first) ---------- */
.pg-audience {
  .join-screen { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 27rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
  .join-screen.hidden { display: none; }
  .join-screen > * { animation: rise .7s var(--ease) both; }
  .join-screen > :nth-child(2) { animation-delay: .06s; }
  .join-screen > :nth-child(3) { animation-delay: .12s; }
  .join-screen > :nth-child(4) { animation-delay: .18s; }
  .join-logo { margin-bottom: 3rem; display: flex; justify-content: space-between; align-items: center; }
  .join-screen h1 { font-weight: 600; font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.02; letter-spacing: -.045em; margin-bottom: .75rem; }
  .join-screen p { color: var(--ink-2); margin-bottom: 2rem; max-width: 34ch; }
  .join-input {
    width: 100%; padding: 1.05rem 1rem; margin-bottom: .5rem; text-align: center; text-transform: uppercase;
    font-family: var(--mono); font-size: 1.8rem; font-weight: 600; letter-spacing: .28em; text-indent: .28em;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  }
  .join-input::placeholder { color: var(--line); }
  .join-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .join-error { min-height: 1.5em; font-size: .88rem; color: var(--live); margin-bottom: .9rem; }
  .lang-select-section { margin-bottom: 1.75rem; }
  .lang-select-label { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-2); margin-bottom: .6rem; }
  .lang-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
  .join-btn { width: 100%; padding: 1.05rem; font-size: 1.02rem; }

  .live-screen { display: none; flex-direction: column; height: 100dvh; overflow: hidden; }
  .live-screen.active { display: flex; }
  .live-header { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; flex-shrink: 0; }
  .live-header .wordmark { font-size: 1.2rem; }
  .header-info { display: flex; align-items: center; gap: .6rem; }
  .session-code { font-family: var(--mono); font-size: .82rem; font-weight: 500; letter-spacing: .08em; color: var(--ink-2); }
  .ended-banner { display: none; margin: 0 1rem .75rem; padding: .65rem 1rem; border-radius: var(--r-m); background: var(--live-soft); color: var(--live); font-size: .9rem; font-weight: 500; text-align: center; flex-shrink: 0; }
  .ended-banner.show { display: block; animation: rise .5s var(--ease) both; }
  .lang-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 0 1rem .9rem; flex-shrink: 0; }
  /* current language: opens the sheet with all fifteen */
  .lang-current { position: relative; display: inline-flex; align-items: center; gap: .6rem; height: 2.75rem; padding: 0 2.4rem 0 .6rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-weight: 500;
    transition: border-color .3s var(--ease), transform .3s var(--ease); }
  .lang-current:hover { border-color: var(--ink-3); }
  .lang-current:active { transform: scale(.98); }
  .lang-current::after { content: ""; position: absolute; right: 1rem; top: 50%; width: .45rem; height: .45rem; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); }
  .lang-current .lang-code { font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: .2rem .45rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
  .lang-bar .ctrl-btn { height: 2.75rem; padding: 0 .9rem; font-size: .85rem; border-radius: var(--r-m); }

  .live-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 0 1rem; gap: 1.5rem; width: 100%; max-width: 46rem; margin: 0 auto; }
  .hero-translation { border-radius: var(--r-l) var(--r-l) var(--r-l) .5rem; padding: 1.6rem 1.5rem; min-height: 180px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; animation: rise .7s var(--ease) both; }
  .hero-text { font-size: 1.6rem; }
  .hero-original { display: none; font-size: .95rem; color: var(--ink-2); margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
  .hero-original.show { display: block; }
  .hero-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1.2rem; font-family: var(--mono); font-size: .74rem; color: var(--ink-3); }
  .font-small .hero-text { font-size: 1.25rem; }
  .font-large .hero-text { font-size: 2.05rem; }
  .font-xlarge .hero-text { font-size: 2.5rem; }

  .history-section { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 0 .25rem; }
  .history-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: .6rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
  .history-header h3 { font-size: .82rem; font-weight: 500; color: var(--ink-3); }
  .history-controls { display: flex; gap: .35rem; }
  .ctrl-btn { padding: .3rem .65rem; font-size: .8rem; border-radius: var(--r-s); }
  .ctrl-btn.active { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
  .history-list { flex: 1; overflow-y: auto; padding-bottom: 1rem; }
  .history-item { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .history-item .speaker { margin-bottom: .25rem; font-size: .76rem; }
  .history-item .text { font-size: 1.05rem; line-height: 1.45; letter-spacing: -.01em; }
  .history-item .orig { display: none; font-size: .88rem; color: var(--ink-3); margin-top: .35rem; }
  .history-item .orig.show { display: block; }
  .ai-footer { padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: .74rem; color: var(--ink-3); flex-shrink: 0; }
}

/* ---------- home and admin ---------- */
.pg-home, .pg-admin {
  .shell { min-height: 100dvh; width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.75rem 2.5rem; display: flex; flex-direction: column; }
  .top { display: flex; justify-content: space-between; align-items: center; }
  .top .bar-right { font-size: .85rem; color: var(--ink-3); }

  /* left: the pitch and the code field. right: a live caption, set lower on purpose */
  .lead { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 4rem; align-items: center; padding: 4rem 0 3rem; }
  .pitch > * { animation: rise .8s var(--ease) both; }
  .pitch > :nth-child(2) { animation-delay: .07s; }
  .pitch > :nth-child(3) { animation-delay: .14s; }
  .pitch > :nth-child(4) { animation-delay: .21s; }
  .pitch > :nth-child(5) { animation-delay: .28s; }
  .status { display: inline-flex; align-items: center; gap: .6rem; font-size: .85rem; font-weight: 500; color: var(--ink-2); margin-bottom: 1.5rem; }
  h1 { font-weight: 600; font-size: clamp(2.25rem, 5.2vw, 3.75rem); line-height: 1; letter-spacing: -.05em; max-width: 14ch; }
  /* the last words of the headline change with the language being typed */
  .swap { display: inline-block; color: var(--accent); }
  .swap.in { animation: rise .55s var(--ease) both; }
  .pitch > p { margin-top: 1.5rem; max-width: 48ch; color: var(--ink-2); font-size: 1.05rem; }

  .join-row { margin-top: 2.25rem; display: grid; gap: .5rem; max-width: 27rem; }
  .join-row label { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
  .join-row div { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
  .join-row .join-btn { padding-inline: 1.6rem; }
  input.code, .panel input, .panel select {
    width: 100%; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  }
  input.code:focus, .panel input:focus, .panel select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  input.code { text-transform: uppercase; font-family: var(--mono); font-size: 1.15rem; font-weight: 600; letter-spacing: .3em; }
  input.code::placeholder { color: var(--line); }
  .join-row small, .note { font-size: .85rem; color: var(--ink-3); }

  /* a deck: the caption in front, two more languages waiting behind it */
  .stack { position: relative; isolation: isolate; margin-top: 5rem; animation: rise .9s var(--ease) .2s both; }
  .stack::before, .stack::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl) var(--r-xl) var(--r-xl) .6rem; }
  .stack::before { transform: rotate(-4deg) translate(-14px, 12px); opacity: .75; }
  .stack::after { transform: rotate(3.5deg) translate(18px, 4px); opacity: .45; }
  .preview { padding: 2.5rem; min-height: 22rem; display: flex; flex-direction: column; }
  .preview-langs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: auto; padding-bottom: 2.5rem; }
  .preview .hero-text { font-size: clamp(1.5rem, 2.4vw, 2.1rem); min-height: 3.6em; }
  .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: var(--accent); vertical-align: -.12em; animation: blink 1s steps(1) infinite; }
  .preview-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; font-family: var(--mono); font-size: .74rem; color: var(--ink-3); }

  /* every language on offer, drifting past */
  .marquee { overflow: hidden; margin: .5rem 0 3rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
  .marquee-track { display: flex; gap: 2.75rem; width: max-content; animation: drift 60s linear infinite; font-size: clamp(1.6rem, 3.2vw, 2.5rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.3; color: var(--ink); white-space: nowrap; }
  .marquee .ch { font-size: .4em; vertical-align: 1em; color: var(--accent); letter-spacing: .04em; }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  /* three facts on one rule, the first given more room */
  .facts { list-style: none; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
  .facts b { display: block; font-family: var(--mono); font-weight: 500; font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink); }

  .panel { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 2.5rem; display: grid; gap: 1rem; animation: rise .9s var(--ease) .15s both; }
  .panel h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
  .panel form { display: grid; gap: .5rem; }
  .panel label { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
  .panel input, .panel select { background: var(--bg); margin-bottom: .5rem; }
  .panel .error { font-size: .88rem; color: var(--live); min-height: 1.4em; }
  .panel .link { font-family: var(--mono); font-size: .8rem; line-height: 1.5; word-break: break-all; background: var(--sunk); border-radius: var(--r-m); padding: .9rem 1rem; }
  .panel #result { display: grid; gap: .6rem; animation: rise .6s var(--ease) both; }
  .rules { list-style: none; margin-top: 2rem; display: grid; gap: .9rem; max-width: 26rem; }
  .rules li { display: grid; grid-template-columns: 5.5rem 1fr; align-items: baseline; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; }
  .rules b { font-family: var(--mono); font-weight: 500; color: var(--ink); }

  @media (max-width: 767px) {
    .shell { padding: 1.25rem 1rem 2rem; }
    .lead { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0 2rem; }
    .stack { margin-top: 0; }
    .stack::before, .stack::after { display: none; }
    .preview { padding: 1.5rem; min-height: 17rem; border-radius: var(--r-l) var(--r-l) var(--r-l) .5rem; }
    .panel { padding: 1.5rem; border-radius: var(--r-l); }
    .facts { grid-template-columns: 1fr; gap: 1rem; }
  }
}
.pg-admin h1 { font-size: clamp(2rem, 4vw, 3rem); }
.pg-admin .lead { align-items: start; }

/* ---------- personality layer ---------- */
/* the channel code, huge and outlined, behind the sentence it belongs to */
.hero-segment, .hero-translation, .preview { position: relative; overflow: hidden; isolation: isolate; }
.hero-segment::after, .hero-translation::after, .preview::after {
  content: attr(data-ch); position: absolute; right: .08em; top: -.2em; z-index: -1; pointer-events: none; user-select: none;
  font: 700 clamp(7rem, 17vw, 13rem) / 1 var(--mono); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px var(--line);
}
/* the home preview has its language chips on top, so its letters sit at the bottom */
.preview::after { top: auto; bottom: -.24em; }
/* the sentence still being spoken: quieter, with a caret */
.hero-text.interim { color: var(--ink-2); }
.hero-text.interim::after { content: ""; display: inline-block; width: 2px; height: .95em; margin-left: 3px; background: var(--accent); vertical-align: -.1em; animation: blink 1s steps(1) infinite; }
/* a new sentence arrives word by word */
.w { display: inline-block; animation: word .6s var(--ease) both; animation-delay: calc(var(--i) * 38ms); }
/* a word the reviser added because the speech service dropped it: readers must be able to tell */
.added { color: var(--accent-ink); text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: .22em; cursor: help; }
.added-note { margin: .75rem 0 0; font-size: .8rem; color: var(--text-muted); }
.added-note::before { content: "abc"; margin-right: .5em; color: var(--accent-ink); text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
@keyframes word { from { opacity: 0; transform: translateY(.45em) rotate(2deg); } }
/* surfaces light up softly under the pointer */
:root :is(.hero-segment, .hero-translation, .preview, .panel, .card, .sidebar) {
  background-image: radial-gradient(22rem circle at var(--mx, -40rem) var(--my, -40rem), var(--glow), transparent 65%);
}
/* primary buttons lean toward the pointer (set from theme.js) */
:root :is(.join-btn, .btn-primary, .mic-btn) { transition-property: transform, translate, background-color, border-color, color; transition-duration: .35s; }

/* full-screen QR for the room */
.qr-dialog { margin: auto; border: 0; border-radius: var(--r-xl); padding: 2.5rem; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); text-align: center; max-width: min(92vw, 44rem); cursor: zoom-out; }
.qr-dialog[open] { display: grid; gap: 1.5rem; justify-items: center; animation: rise .5s var(--ease) both; }
.qr-dialog::backdrop { background: rgba(9, 9, 11, .72); backdrop-filter: blur(6px); }
.qr-dialog-title { font-size: 1.35rem; font-weight: 600; letter-spacing: -.03em; }
/* as large as fits: the window's height less the title, code and address; the dialog's own width less its padding.
   (Sized by height alone it grew wider than the dialog on a tall window, and was cut off with a scroll bar.) */
.qr-dialog { --qr: min(calc(100dvh - 20rem), calc(92vw - 5rem), 39rem); overflow: hidden; }
.qr-dialog img { box-sizing: border-box; width: var(--qr); height: auto; aspect-ratio: 1; padding: 18px; border-radius: 24px; background: #fff; }
.qr-dialog .session-code { width: var(--qr); font-size: clamp(1.5rem, 4vh, 2.4rem); gap: 8px; }
.qr-dialog .share-url { max-width: var(--qr); overflow-wrap: anywhere; }
.qr-dialog .session-code span { height: 2.1em; }

/* bottom sheet (language list on the audience page) */
.sheet { margin: auto auto 0; width: 100%; max-width: 34rem; max-height: 82dvh; border: 0; border-radius: var(--r-l) var(--r-l) 0 0; padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sheet[open] { animation: rise .45s var(--ease) both; }
.sheet::backdrop { background: rgba(9, 9, 11, .6); backdrop-filter: blur(4px); }
.sheet h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 1rem; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .4rem; }
.lang-grid .lang-btn { justify-content: flex-start; padding: .7rem .8rem; }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: var(--r-l); } }
/* key-cap code inside any QR dialog */
.qr-dialog .session-code { display: flex; font-family: var(--mono); font-weight: 600; letter-spacing: 0; color: var(--ink); }
.qr-dialog .session-code span { flex: 1; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: 0 2px 0 var(--line); }

/* links in running text and footers */
a { color: inherit; text-underline-offset: .18em; }
.facts a, .ai-footer a, .prose a { color: var(--accent-ink); }

/* ---------- screen view: captions for the room ---------- */
.pg-screen {
  .screen { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; gap: 1rem; padding: 1.5rem 4vw 2rem; }
  .screen-top { display: flex; justify-content: space-between; align-items: center; opacity: .45; transition: opacity .3s var(--ease); }
  .screen-top:hover, .screen-top:focus-within { opacity: 1; }
  .screen-top select { padding: .35rem .6rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); font-size: .85rem; }
  .screen-stage { display: flex; flex-direction: column; justify-content: flex-end; gap: 1.75rem; padding-bottom: 3vh; min-height: 0; overflow: hidden; }
  .screen-prev { font-size: clamp(1.2rem, 2.5vw, 2.6rem); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; color: var(--ink-3); max-width: 34ch; }
  .screen-now { font-size: clamp(2rem, 5vw, 5.25rem); font-weight: 600; line-height: 1.08; letter-spacing: -.04em; max-width: 22ch; }
  .screen-join { display: flex; align-items: center; gap: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
  .screen-join img { width: clamp(88px, 9vw, 150px); aspect-ratio: 1; padding: 8px; border-radius: 14px; background: #fff; }
  .screen-join-label { font-size: clamp(.95rem, 1.4vw, 1.4rem); font-weight: 500; color: var(--ink-2); margin-bottom: .6rem; }
  .session-code { display: flex; gap: 6px; font-family: var(--mono); font-weight: 600; font-size: clamp(1.2rem, 2vw, 2.1rem); }
  .session-code span { display: grid; place-items: center; width: 1.9em; height: 2.2em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: 0 2px 0 var(--line); }
  .share-url { margin-top: .6rem; font-family: var(--mono); font-size: clamp(.75rem, 1vw, 1rem); color: var(--ink-3); }
}

/* ---------- long-form text (privacy) ---------- */
.prose { max-width: 65ch; margin-inline: auto; padding: 3.5rem 0 2rem; }   /* the column sits in the middle of the page; its lines still start at the left */
.prose h1 { font-weight: 600; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.02; letter-spacing: -.045em; max-width: none; }
.prose .lede { margin-top: 1.25rem; font-size: 1.1rem; color: var(--ink-2); }
.prose h2 { margin-top: 2.25rem; font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
.prose p, .prose ul { margin-top: .75rem; color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; display: grid; gap: .4rem; }
.prose b { color: var(--ink); font-weight: 600; }
.prose .note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-3); }

/* ---------- public page: sections under the hero ---------- */
.pg-home {
  .top nav { display: flex; gap: 1.5rem; }
  .top nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; transition: color .3s var(--ease); }
  .top nav a:hover { color: var(--ink); }
  .lead { min-height: min(46rem, 82dvh); }

  .block { padding: 5.5rem 0 0; scroll-margin-top: 1rem; }
  .block-head { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: end; margin-bottom: 2.75rem; }
  .block-head h2, .cta h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 600; line-height: 1.02; letter-spacing: -.045em; }
  .block-head p { color: var(--ink-2); max-width: 52ch; }

  /* where it fits: a short list on the left, one room at a time on the right */
  .cases { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); gap: 2.5rem; align-items: start; }
  .case-tabs { display: none; gap: .25rem; position: sticky; top: 1.5rem; }
  .tabs-on .case-tabs { display: grid; }
  .case-tabs button { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .9rem 1.1rem; border: 0; border-radius: var(--r-m);
    background: transparent; color: var(--ink-2); font-size: 1.02rem; font-weight: 500; letter-spacing: -.01em; text-align: left;
    transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
  .case-tabs button span { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink-3); }
  .case-tabs button:hover { color: var(--ink); }
  .case-tabs button:active { transform: scale(.98); }
  .case-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
  .case-tabs button[aria-selected="true"] span { color: var(--accent); }
  .case-panels { display: grid; gap: 1rem; grid-column: 1 / -1; }
  .tabs-on .case-panels { grid-column: auto; }
  .case { display: grid; gap: 1.75rem; padding: 2.5rem; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
    border-radius: var(--r-xl) var(--r-xl) var(--r-xl) .6rem; box-shadow: var(--shadow); }
  .tabs-on .case { display: none; }
  .tabs-on .case.on { display: grid; animation: rise .5s var(--ease) both; }
  .case h3 { font-size: 1.6rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
  .case-scene { font-size: 1.15rem; line-height: 1.45; color: var(--ink-2); max-width: 46ch; margin-top: -.9rem; }
  /* the signal path, as a row of labelled boxes */
  .flow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .8rem; }
  .flow span { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
  .flow i { font-style: normal; color: var(--accent); }
  .case dl { display: grid; }
  .case dl div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.25rem; padding: 1rem 0; border-top: 1px solid var(--line); }
  .case dt { font-size: .85rem; color: var(--ink-3); }
  .case dd { max-width: 58ch; }

  /* how it works: a real sequence, so it is numbered */
  .steps3 { list-style: none; counter-reset: step; display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 2.5rem; }
  .steps3 li { counter-increment: step; padding-top: 1.25rem; border-top: 1px solid var(--line); }
  .steps3 li::before { content: "0" counter(step); display: block; margin-bottom: 1.25rem; font-family: var(--mono); font-size: .82rem; color: var(--accent); }
  .steps3 h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.03em; margin-bottom: .5rem; }
  .steps3 p { color: var(--ink-2); max-width: 40ch; }

  .limits ul { list-style: none; display: grid; gap: .9rem; max-width: 62ch; margin-left: auto; }
  .limits li { position: relative; padding-left: 1.6rem; color: var(--ink-2); }
  .limits li::before { content: ""; position: absolute; left: 0; top: .72em; width: .75rem; height: 1.5px; background: var(--ink-3); }
  .limits b { color: var(--ink); font-weight: 600; }

  .cta { margin: 6rem 0 2.5rem; padding: 3rem; scroll-margin-top: 1rem; display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: center;
    border-radius: var(--r-xl); background: var(--accent-soft); color: var(--accent-ink); }
  .cta p { margin-top: .9rem; max-width: 54ch; }
  .cta .cta-address { font-family: var(--mono); font-size: .9rem; user-select: all; }
  .cta .join-btn { padding: 1rem 1.75rem; white-space: nowrap; }
  .cta-actions { display: grid; gap: .75rem; justify-items: stretch; max-width: 22rem; }
  .cta-actions .btn { padding: .85rem 1.75rem; text-align: center; background: transparent; border-color: currentColor; color: inherit; }
  .cta-actions .note { color: inherit; }
  /* as wide as the row with the code and Join above it (27rem at most), so their edges line up; the whole width on a phone */
  .try-live { margin-top: 1.25rem; display: grid; gap: .5rem; justify-items: stretch; max-width: 27rem; }
  .try-live .btn { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
  .try-live .btn span { margin-left: .6em; color: var(--ink-3); font-weight: 400; }
  .note.refused, .cta-actions .note.refused { padding: .8rem 1rem; border: 1px solid var(--live); border-left-width: 4px; border-radius: 10px;
    background: var(--live-soft); color: var(--ink); font-size: .95rem; font-weight: 500; line-height: 1.45; }
  .foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
  .foot-brand { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
  .foot .wordmark { font-size: 1.15rem; }
  .foot-by { justify-self: end; display: inline-flex; align-items: center; gap: .55em; }
  .foot-links { display: inline-flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }
  .foot-cookie { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
  @media (max-width: 640px) { .foot { grid-template-columns: 1fr; justify-items: start; } .foot-by { justify-self: start; } }
  .join-row small a { color: var(--accent-ink); }

  @media (max-width: 767px) {
    .top nav { display: none; }
    .lead { min-height: 0; }
    .block { padding-top: 3.5rem; }
    .block-head { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.75rem; }
    .cases { grid-template-columns: 1fr; gap: 1.25rem; }
    .tabs-on .case-tabs { display: flex; position: static; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem .25rem; }
    .case-tabs button { flex: none; padding: .6rem .9rem; font-size: .95rem; border: 1px solid var(--line); }
    .case-tabs button span { display: none; }
    .case { padding: 1.5rem; border-radius: var(--r-l) var(--r-l) var(--r-l) .5rem; }
    .case dl div { grid-template-columns: 1fr; gap: .25rem; }
    .steps3 { grid-template-columns: 1fr; gap: 1.5rem; }
    .limits ul { margin-left: 0; }
    .cta { grid-template-columns: 1fr; padding: 1.75rem; margin-top: 4rem; }
  }
}

/* ---------- microphone: level meter, picker and sound check ---------- */
.level { height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.level i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .1s linear; }
.level.hot i { background: var(--live); }
.mic-control .level { margin-top: .7rem; }
.mic-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.mic-text { display: grid; justify-items: start; min-width: 0; line-height: 1.25; text-align: left; }
.mic-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; font-weight: 400; opacity: .7; }
.mic-change { display: grid; place-items: center; width: 58px; border: 1px solid var(--line); border-radius: var(--r-m); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.mic-change:hover { border-color: var(--ink-3); color: var(--ink); }
.mic-change:active { transform: scale(.96); }
.mic-change svg { width: 20px; height: 20px; }
.mic-status.warn { color: var(--live); }
/* 3. the session's state, top right beside the clock: a picture and a word or two */
.session-state { align-self: center; display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .75rem .4rem .6rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease); }
.session-state svg { width: 16px; height: 16px; flex: none; }
.session-state[data-state="live"] { border-color: var(--live); background: var(--live-soft); color: var(--live); }
.session-state[data-state="live"] svg { animation: pulse 1.6s var(--ease) infinite alternate; }
.session-state[data-state="warn"] { border-color: var(--live); color: var(--live); }
.session-state[data-state="ended"] { color: var(--ink-3); }
@keyframes pulse { from { opacity: 1; } to { opacity: .35; } }
.mic-pick { display: flex; justify-content: space-between; gap: 1rem; width: 100%; font-weight: 400; }
.mic-pick span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mic-pick span:last-child { color: var(--ink-3); white-space: nowrap; }
.audio-option small { display: block; font-size: .78rem; color: var(--ink-3); }
.sheet .form-group { margin-bottom: 1rem; }
.check-msg { min-height: 3em; margin: .8rem 0 1rem; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
.sheet-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.end-sheet { max-width: 26rem; }
.end-sheet p { margin-bottom: 1.5rem; color: var(--ink-2); line-height: 1.5; }
.end-sheet .btn-danger { background: var(--live); border-color: var(--live); color: #fff; }

/* ---------- Social IT mark, next to its name, in footers ---------- */
a.socialit { display: inline-flex; align-items: center; gap: .45em; vertical-align: middle; color: var(--ink-2); font-weight: 600; text-decoration: none; white-space: nowrap; transition: color .3s var(--ease); }
a.socialit:hover { color: var(--ink); }
a.socialit::before { content: ""; width: 2.4em; aspect-ratio: 100.7 / 68.3; background: currentColor; -webkit-mask: url(social-it.svg) center / contain no-repeat; mask: url(social-it.svg) center / contain no-repeat; }

/* ---------- public page: hero background ---------- */
.pg-home { overflow-x: clip; }
.pg-home .lead { position: relative; isolation: isolate; min-height: min(38rem, 68dvh); padding-top: 2.5rem; }
.hero-bg { position: absolute; z-index: -1; inset: -5.5rem calc(50% - 50vw) 0; overflow: hidden; pointer-events: none; }
/* voices on the left settle into ruled lines on the right; nearly gone behind the text, and fading out at the bottom */
.hb-wave { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(#000 50%, transparent), radial-gradient(ellipse 40% 52% at 30% 56%, rgba(0, 0, 0, .08) 60%, #000);
  mask-image: linear-gradient(#000 50%, transparent), radial-gradient(ellipse 40% 52% at 30% 56%, rgba(0, 0, 0, .08) 60%, #000);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.hb-wave path { fill: none; stroke: url(#hbFade); stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: .3;
  transform-box: view-box; animation: sway 8s ease-in-out infinite alternate; }
@keyframes sway { from { transform: scaleY(.45); } to { transform: scaleY(1.1); } }
@media (prefers-reduced-motion: reduce) { .hb-wave path { animation: none; } }

/* ---------- public page: what you get, a numbered list on a dark picture of the hall ---------- */
.pg-home .block-head a, .pg-home .limits a { color: var(--accent-ink); }
.pg-home .band { position: relative; isolation: isolate; overflow: hidden; margin-top: 5.5rem; padding: 4.5rem 3.5rem 10rem; border-radius: var(--r-xl);
  background: var(--band); color: var(--band-ink);
  /* the panel has its own text colours, set per theme next to the other tokens */
  --ink: var(--band-ink); --ink-2: var(--band-ink-2); --ink-3: var(--band-ink-3); --line: var(--band-line); --accent: var(--band-accent); --accent-ink: var(--band-link); }
/* the picture: a hall full of people holding up their phones.
   Photo by Stardust.house, CC0 (public domain), cropped from
   commons.wikimedia.org/wiki/File:STEFAN_RADOVIC_I_PUBLIKA_U_MTS_DOVRANI_NA_NJEGOVOM_PREDAVANJU.jpg */
/* screened over the green: the dark of the hall takes the colour, only the lights and outlines of people stay */
.band-bg { position: absolute; inset: 0; z-index: -1; background: url(hall.jpg) center bottom / cover, var(--band); background-blend-mode: screen; }
/* the overlay: solid behind the heading, thick behind the list, then it lets go so the lights fill the space under the last row */
.band-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--band) 12%, rgba(var(--band-rgb), .85) 40%, rgba(var(--band-rgb), .7) 72%, rgba(var(--band-rgb), .05)); }
/* the heading sits on the same three columns as the list, so its sentence starts where the descriptions start */
.pg-home .band .block-head { grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem; align-items: baseline; }
.pg-home .band .block-head h2 { grid-column: 1 / 3; }

.gets { list-style: none; counter-reset: get; display: grid; }
.gets li { counter-increment: get; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem; align-items: baseline; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.gets li::before { content: "0" counter(get); font-family: var(--mono); font-size: .82rem; color: var(--accent); }
.gets b { font-size: 1.2rem; font-weight: 600; letter-spacing: -.03em; transition: transform .4s var(--ease); }
.gets li:hover b { transform: translateX(6px); }
.gets span { color: var(--ink-2); max-width: 58ch; }

@media (max-width: 767px) {
  .pg-home .lead { min-height: 0; padding-top: 2rem; }
  .hero-bg { inset: -4.5rem -1rem 0; }
  .hb-wave { -webkit-mask-image: linear-gradient(#000 20%, transparent 60%); mask-image: linear-gradient(#000 20%, transparent 60%); }
  .pg-home .band { margin-top: 3.5rem; padding: 2.5rem 1.25rem 7rem; border-radius: var(--r-l); }
  .pg-home .band .block-head { grid-template-columns: 1fr; } .pg-home .band .block-head h2 { grid-column: auto; }
  /* on a tall narrow panel the photo stays at the bottom instead of being blown up behind the whole list */
  .band-bg { background-size: 260% auto, auto; background-repeat: no-repeat; }
  .gets li { grid-template-columns: 2.5rem 1fr; gap: .25rem 1rem; } .gets span { grid-column: 2; }
}

/* ---------- sound for your room: the guide and the sheet for the venue ---------- */
.pg-room .room-head { padding: 3.5rem 0 2.75rem; }
.pg-room .room-head h1 { max-width: none; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.02; }
.pg-room .room-head p { margin-top: 1.25rem; max-width: 58ch; font-size: 1.1rem; color: var(--ink-2); }
.pg-room .case .note { font-size: .9rem; color: var(--ink-3); max-width: 62ch; }
.venue { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); gap: 2.5rem; align-items: start; }
.venue-tools { display: grid; gap: 1.1rem; position: sticky; top: 1.5rem; }
.venue-tools .row { display: flex; flex-wrap: wrap; gap: .4rem; }
.venue-tools label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.venue-tools input { width: 100%; padding: .72rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); font: inherit; font-weight: 400; }
.venue-tools input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.venue-tools .btn { text-decoration: none; }
.paper { padding: 2.5rem; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: var(--r-l); box-shadow: var(--shadow); }
.paper h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.035em; }
.paper p { margin-top: .9rem; max-width: 62ch; color: var(--ink-2); }
.paper ol { margin-top: 1.1rem; padding-left: 1.4rem; display: grid; gap: .6rem; max-width: 62ch; }
.paper li::marker { font-family: var(--mono); font-size: .85em; color: var(--accent); }
@media (max-width: 767px) { .venue { grid-template-columns: 1fr; gap: 1.5rem; } .venue-tools { position: static; } .paper { padding: 1.5rem; } }
@media print {
  body::before, .pg-room .top, .pg-room .foot, .pg-room .room-head, .pg-room #rooms, .pg-room .block-head, .pg-room .venue-tools { display: none !important; }
  .pg-room, .pg-room .shell { background: #fff; color: #000; padding: 0; min-height: 0; }
  .pg-room .block { padding: 0; } .venue { display: block; } .paper { border: 0; box-shadow: none; padding: 0; } .paper p, .paper li { color: #000; }
}

/* ---------- written questions: the button and form on the phone, the list in the speaker console ---------- */
.ask-bar { flex-shrink: 0; padding: .5rem 1rem 0; width: 100%; max-width: 46rem; margin: 0 auto; }
.ask-bar .join-btn { width: 100%; animation: rise .5s var(--ease) both; }
.ask-form { display: grid; gap: .45rem; }
.ask-form label { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.ask-form textarea, .ask-form input { width: 100%; padding: .75rem .9rem; margin-bottom: .5rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); font: inherit; font-size: 1rem; resize: vertical; }
.ask-form textarea:focus, .ask-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-note { min-height: 2.6em; font-size: .85rem; line-height: 1.45; color: var(--ink-3); }
.q-count { margin-left: .5rem; padding: .05rem .45rem; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--mono); font-size: .72rem; font-weight: 600; }
.sheet.questions { max-width: 40rem; }
.q-state { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.q-state .btn { flex: none; }
.q-list { list-style: none; display: grid; max-height: 52dvh; overflow-y: auto; margin-bottom: 1rem; }
.q-list li { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.q-text { font-size: 1.2rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.q-meta { grid-column: 1; font-size: .8rem; color: var(--ink-3); }
.q-list .btn { grid-column: 2; grid-row: 1 / 3; padding: .45rem .8rem; font-size: .82rem; }
.q-list .done .q-text { color: var(--ink-3); font-weight: 400; }
.q-list .q-empty { display: block; padding: 1.5rem 0; color: var(--ink-3); font-size: .92rem; }

/* ---------- feedback: five numbers to pick from on the phone, the tally in the speaker console ---------- */
.ask-bar + .ask-bar { padding-top: .4rem; }
.ask-label { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-bottom: .6rem; }
.rate label { position: relative; }
.rate input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.rate span { display: grid; place-items: center; padding: .8rem 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); font-family: var(--mono); font-size: 1.15rem; font-weight: 600; color: var(--ink-2); transition: transform .2s var(--ease); }
.rate input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.rate input:active + span { transform: scale(.96); }
.rate input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-summary { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.fb-summary[hidden] { display: none; }
.fb-summary b { display: block; font-family: var(--mono); font-size: 2.75rem; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.fb-summary div > span { font-size: .8rem; color: var(--ink-3); }
.fb-bars { display: grid; gap: .25rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }
.fb-bars div { display: grid; grid-template-columns: 1rem 1fr 1.6rem; gap: .5rem; align-items: center; }
.fb-bars i { height: .45rem; border-radius: 999px; background: var(--accent); transform: scaleX(var(--w)); transform-origin: left; transition: transform .5s var(--ease); }
.fb-bars div span:last-child { text-align: right; }

/* ---------- polls: answers to pick on the phone, then bars; the same bars in the console and on the projector ---------- */
.pg-speaker .stats-bar, .pg-speaker .stats-bar .bar-right { flex-wrap: wrap; }
.poll-options { display: grid; gap: .5rem; margin: .25rem 0 .75rem; }
.poll-options .btn { justify-content: flex-start; padding: .95rem 1rem; font-size: 1.02rem; text-align: left; white-space: normal; }
.poll-row { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; align-items: baseline; padding: .45rem 0; }
.poll-row b { font-family: var(--mono); font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.poll-row i { grid-column: 1 / -1; height: .5rem; border-radius: 999px; background: linear-gradient(var(--accent), var(--accent)) left / calc(var(--w) * 100%) 100% no-repeat, var(--sunk); }
.poll-row.mine span { font-weight: 600; }
.poll-row.mine span::after { content: "your answer"; margin-left: .6rem; font-family: var(--mono); font-size: .7rem; font-weight: 500; color: var(--accent-ink); }
.poll-list li.poll { display: block; }
.poll-list .q-meta { margin: .2rem 0 .4rem; }
.poll-list .open .q-meta { color: var(--live); font-weight: 500; }
.poll-actions { display: flex; gap: .4rem; margin-top: .6rem; }
.poll-actions .btn { padding: .45rem .8rem; font-size: .82rem; }
#pollForm { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.screen-poll { flex: 1; max-width: 52rem; margin-left: auto; padding: 1.25rem 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); animation: rise .5s var(--ease) both; }
.screen-poll[hidden] { display: none; }
.screen-poll h2 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.15; margin-bottom: .75rem; }
.screen-poll .poll-row { font-size: clamp(1.05rem, 1.7vw, 1.5rem); padding: .55rem 0; }
.screen-poll .poll-row b { font-size: .8em; }
.screen-poll .poll-row i { height: .7rem; }
.screen-poll p { margin-top: .6rem; font-size: .95rem; color: var(--ink-3); }

/* ---------- the floor: asking to speak on the phone, giving the floor in the console ---------- */
.floor { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.floor[hidden], .floor-state[hidden], .floor-now[hidden], .floor-strip[hidden] { display: none; }
.floor .btn { white-space: nowrap; }
.ask-bar > input { width: 100%; margin-bottom: .5rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); font: inherit; }
.ask-bar > input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-bar > input[hidden] { display: none; }
.floor-state { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .8rem .7rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-weight: 500; }
.floor-state.on-air { background: var(--live); border-color: var(--live); color: #fff; }
.floor-state.on-air .btn { background: #fff; border-color: #fff; color: var(--live); }
#floorNote:empty { display: none; }
#floorNote { min-height: 0; padding-top: .4rem; }
.floor-now { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .9rem; padding: .9rem 1rem; border-radius: var(--r-m); background: var(--live-soft); color: var(--live); }
.floor-now b { flex: 1; font-weight: 600; }
.floor-now label { display: flex; align-items: center; gap: .5rem; font-size: .82rem; }
.floor-now input { accent-color: var(--live); }
.floor-now .level { flex-basis: 100%; order: 3; background: color-mix(in srgb, var(--live) 18%, transparent); }
.floor-now .level i, .floor-strip .level i { background: var(--live); }
.floor-strip .level { flex: 1; max-width: 12rem; background: color-mix(in srgb, var(--live) 18%, transparent); }
#handList { max-height: none; margin-bottom: 0; }
.floor-strip { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding: .7rem .8rem .7rem 1.1rem; border-radius: var(--r-m); background: var(--live-soft); color: var(--live); font-weight: 500; }
.floor-strip .btn { margin-left: auto; padding: .45rem .8rem; font-size: .82rem; }
.floor-strip .live-dot { background: var(--live); }
.q-hint { padding-top: .8rem; font-size: .8rem; color: var(--ink-3); }
.q-test { padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- public page: the header stays, sections arrive, steps get a prop ---------- */
.pg-home .top { position: sticky; top: .75rem; z-index: 4; margin: 0 -1rem; padding: .55rem 1rem; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 55%, transparent); }
.pg-home .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.pg-home .reveal.in { opacity: 1; transform: none; }
.pg-home .block, .pg-home .cta { scroll-margin-top: 5rem; }
.step-prop { display: flex; align-items: center; gap: .6rem; height: 4.5rem; margin-bottom: 1.25rem; padding: 0 1.1rem; overflow: hidden; white-space: nowrap;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--r-m); box-shadow: var(--shadow);
  font-family: var(--mono); font-size: .8rem; color: var(--ink-3); }
.step-prop b { color: var(--ink); font-weight: 500; }
.step-prop em { margin-left: auto; padding: .15rem .5rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-style: normal; font-size: .72rem; }
.step-prop.keys { gap: .3rem; }
.step-prop.keys span { display: grid; place-items: center; width: 2rem; height: 2.4rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: 0 2px 0 var(--line); font-size: 1rem; font-weight: 600; color: var(--ink); }
.step-prop.said { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; letter-spacing: -.03em; color: var(--ink); gap: 0; }
.step-prop.said span { overflow: hidden; text-overflow: clip; }

/* ---------- public page: the room answers back (a phone showing each way to take part) ---------- */
.takes .case { grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem 4.5rem; align-items: center; padding-right: 3.5rem; }
.take-text { display: grid; gap: 1.75rem; }
/* A phone with the outline of an iPhone 13 mini (64.2 x 131.5 mm): frame, status bar, home bar, side buttons; no notch, by request.
   On its screen the talk runs dimmed at the top and the app's sheet rises from the bottom, as in the real page. */
.phone { position: relative; flex: none; width: 16rem; --frame: #1b1b1f; }
.phone-screen { position: relative; overflow: hidden; display: grid; grid-template-rows: 1fr auto; aspect-ratio: 64.2 / 131.5;
  border: .68rem solid var(--frame); border-radius: 2.85rem;
  background: var(--bg); color: var(--ink); font-size: .8rem; line-height: 1.4;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }   /* the rings keep the dark frame visible on the dark theme */
.phone-screen::after { content: ""; position: absolute; bottom: .45rem; left: 50%; width: 36%; height: .26rem; translate: -50% 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 75%, transparent); }   /* the home bar */
.phone::before, .phone::after { content: ""; position: absolute; width: .16rem; border-radius: .1rem; background: var(--frame); }
.phone::before { left: -.13rem; top: 7rem; height: 2.1rem; box-shadow: 0 2.7rem 0 var(--frame); }   /* the two volume buttons */
.phone::after { right: -.13rem; top: 8.4rem; height: 3.6rem; }   /* the side button */
.phone-status { position: absolute; top: .7rem; left: 1.4rem; right: 1.3rem; display: flex; justify-content: space-between; align-items: center; font-size: .68rem; letter-spacing: -.01em; }
.phone-status b { font-weight: 600; }
.phone-status i { width: 1.3rem; height: .6rem; border: 1px solid color-mix(in srgb, var(--ink) 45%, transparent); border-radius: .2rem;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat .07rem 50% / 68% 62%; }
.mock-sheet { display: grid; gap: .55rem; padding: 1.15rem 1rem 2.2rem; background: var(--surface); border-top: 1px solid var(--line); border-radius: 1.3rem 1.3rem 0 0;
  box-shadow: 0 -1rem 2rem -1rem color-mix(in srgb, var(--ink) 18%, transparent); }
.phone-screen > .floor-state { align-self: end; margin: 0 .75rem 1.9rem; }
.takes .case dl div { grid-template-columns: 1fr; gap: .2rem; }
.phone .mock-title { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-bottom: .2rem; }
.phone .mock-label { font-size: .72rem; color: var(--ink-3); }
.phone .mock-field { padding: .6rem .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); }
.phone .mock-field.tall { min-height: 4.4rem; }
.phone .join-btn { justify-content: center; width: 100%; margin-top: .3rem; padding: .7rem; font-size: .8rem; }
.phone .poll-row { padding: .3rem 0; }
.phone .poll-row.mine span::after { font-size: .62rem; margin-left: .4rem; }
.phone .rate { margin: 0; gap: .3rem; }
.phone .rate span { padding: .55rem 0; font-size: .95rem; }
.rate span.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.phone .floor-state { padding: .7rem .7rem .7rem .9rem; font-size: .8rem; line-height: 1.35; }
.phone .floor-state .btn { padding: .45rem .7rem; font-size: .76rem; white-space: nowrap; }
.mock-lines { align-self: start; display: grid; gap: .5rem; padding: 3rem 1.1rem 0; opacity: .7; }
.mock-lines i { height: .85rem; width: var(--w); border-radius: 999px; background: var(--sunk); }
/* what the same moment looks like on the other side */
.take-note { position: relative; width: 14.5rem; margin: -1.1rem 0 0 -2.5rem; display: grid; gap: .3rem; padding: .9rem 1rem; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--r-m); box-shadow: var(--shadow); font-size: .8rem; line-height: 1.4; color: var(--ink-2); }
.take-note small { font-family: var(--mono); font-size: .66rem; letter-spacing: .03em; color: var(--accent-ink); }
.take-note b { color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.take-note b.big { font-family: var(--mono); font-size: 2rem; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.take-note .level { margin-top: .3rem; }
.take-note .level i { background: var(--live); }
@media (max-width: 1100px) { .takes .case { padding-right: 2.5rem; gap: 2.5rem; } }
@media (max-width: 767px) {
  .pg-home .top { top: .5rem; margin: 0 -.5rem; padding: .45rem .7rem; }
  .takes .case { grid-template-columns: 1fr; padding-right: 1.5rem; }
  .phone { justify-self: center; }
  .take-note { margin-left: -1rem; }
  .step-prop { height: 3.75rem; }
}

/* The cookie question, as on socialit.ro: Analytics starts only after "Accept" (assets/analytics.js) */
.consent { position: fixed; left: 50%; bottom: 1rem; translate: -50% 0; z-index: 50; width: min(38rem, calc(100% - 2rem)); display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); font-size: .9rem; color: var(--ink-2); }
.consent p { flex: 1 1 18rem; }
.consent a { color: var(--accent-ink); }
.consent div { display: flex; gap: .5rem; margin-left: auto; }
.consent .btn { padding: .5rem 1rem; font-size: .85rem; }
