/* Don't Close the Tab. One design system, four kinds of light. */

/* Inter, self-hosted under the OFL. One variable file covers every weight and optical size. */
@font-face {
  font-family: "Inter";
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-var.woff2) format("woff2");
}

:root {
  --bg: #000;
  --surface: rgba(255, 255, 255, .06);
  --text: #F5F5F7;
  --muted: #B4B4BB; /* 9:1 or better on the dark surfaces. Never thinner or fainter than this. */
  --line: rgba(255, 255, 255, .16);
  --accent: #5EEAD4;
  --on-accent: #04211C;
  --ring: #C9321A;
  --ease: cubic-bezier(.22, .8, .2, 1);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}
/* The per-session tint: a quiet change of accent on the Hold section. */
[data-tint="sky"] { --accent: #7DD3FC; --on-accent: #06222F; }
[data-tint="lime"] { --accent: #BEF264; --on-accent: #1A2605; }
[data-tint="amber"] { --accent: #FCD34D; --on-accent: #2B2002; }
[data-tint="coral"] { --accent: #FDA08F; --on-accent: #33100A; }
[data-tint="ice"] { --accent: #E2E8F0; --on-accent: #12171E; }

html[data-tab="directory"] {
  --bg: #F4F4F2; --surface: #fff; --text: #111113; --muted: #55555C; --line: rgba(0, 0, 0, .14);
  --accent: #0A5BD3; --on-accent: #fff; color-scheme: light;
}
html[data-tab="manual"] {
  --bg: #0B1118; --surface: rgba(255, 255, 255, .05); --text: #F2F6FA; --muted: #B3BFCC; --line: rgba(255, 255, 255, .16);
  --accent: #62D2E8; --on-accent: #04202A;
}
html[data-tab="complaints"] {
  --bg: #F3EFE9; --surface: #FBF9F6; --text: #1C1815; --muted: #5C544C; --line: rgba(40, 25, 10, .16);
  --accent: #B23C0E; --on-accent: #fff; color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html.calling { overflow: hidden; background: var(--ring); }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; font-size: 17px; line-height: 1.5; color: var(--text); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; font-weight: inherit; }
ul, ol { list-style: none; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.doc-hidden *, .doc-hidden *::before, .doc-hidden *::after { animation-play-state: paused !important; }

.kicker { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; color: var(--accent); }
.big-copy { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.35; font-weight: 500; letter-spacing: -.012em; color: var(--text); max-width: 34em; }
.quiet { padding: 10px 20px; min-height: 44px; border-radius: 999px; background: transparent; border: 1px solid var(--muted); color: var(--text); font-size: 16px; font-weight: 500; transition: transform .25s var(--ease), background-color .25s; }
.quiet:hover { background: var(--surface); }
.quiet:active { transform: scale(.97); }

/* ---------- Top bar ---------- */
#top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 20px; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); }
#masthead { display: contents; }
.brand { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; line-height: 1.2; }
.brand-site { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand-co { font-size: 13px; color: var(--muted); }
#line { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 8px; font-size: 14px; text-align: right; min-width: 0; }
#line-clock { font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-phase="idle"] #line-clock, html[data-phase="ended"] #line-clock { display: none; }
.line-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--muted); }
html[data-phase="holding"] .line-dot { background: #22C55E; }
html[data-phase="frozen"] .line-dot, html.reconnecting .line-dot { background: #F59E0B; animation: none; }
#tabbar { grid-column: 2; grid-row: 1; }
[role="tablist"] { position: relative; display: grid; grid-template-columns: repeat(4, minmax(92px, 1fr)); padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
#tab-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 4); border-radius: 999px; background: var(--text); transition: transform .45s var(--ease); }
[role="tab"] { position: relative; min-height: 36px; padding: 0 12px; background: none; border: 0; border-radius: 999px; font-size: 14px; font-weight: 550; color: var(--text); transition: color .25s; white-space: nowrap; }
[role="tab"][aria-selected="true"] { color: var(--bg); }
[role="tab"]:active { opacity: .8; }

#downbar { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 12px 20px; background: #F5B942; color: #1E1503; font-size: 16px; line-height: 1.35; }
#downbar strong { font-weight: 700; }

/* ---------- Moving between sections: a slow cross-dissolve, with a little travel ---------- */
::view-transition-old(root) { animation: vt-out .42s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * -24px)) scale(.995); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * 24px)) scale(.995); } }
html[data-vt="back"] { --vt-dir: -1; }

/* ---------- Scroll reveals, where the browser can run them off the main thread ---------- */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(36px); } }
}

#panels { flex: 1; display: flex; flex-direction: column; }
#panels > [role="tabpanel"] { flex: 1; }

/* ---------- HOLD ---------- */
#panel-hold { position: relative; overflow: clip; }
.light { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; left: 50%; top: 42vh; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; border-radius: 50%; will-change: transform; }
.glow-a { background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 17%, transparent), transparent 62%); animation: drift 22s ease-in-out infinite alternate; }
.glow-b { width: 90vmax; height: 90vmax; margin: -45vmax 0 0 -45vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%); }
@keyframes drift { from { transform: translate(-14vw, 6vh) scale(.9); } to { transform: translate(14vw, -10vh) scale(1.05); } }
html[data-phase="frozen"] .glow { display: none; }
/* The ambient drift is for the start screen. A hold can last all day, so its light stays still. */
html[data-phase="ended"] .glow-a, html[data-phase="holding"] .glow-a { animation: none; }
#setup, #live, #over { position: relative; }

.hero { padding: clamp(36px, 8vh, 84px) 20px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.poster { margin: 10px 0 18px; font-size: min(10.4vw, 22vh); line-height: 1; font-weight: 700; letter-spacing: -.045em; white-space: nowrap; background: linear-gradient(180deg, #fff 30%, #C9C9CF); -webkit-background-clip: text; background-clip: text; color: transparent; animation: arrive 1.1s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(28px) scale(.975); } }
.kicker { animation: arrive .9s var(--ease) both; }
.rules { max-width: 40em; font-size: clamp(17px, 1.65vw, 20px); line-height: 1.45; color: var(--text); animation: arrive 1.1s var(--ease) .12s both; }
#start { margin-top: 24px; min-height: 56px; padding: 0 36px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 19px; font-weight: 650; letter-spacing: -.01em; transition: transform .3s var(--ease); animation: arrive 1.1s var(--ease) .22s both; }
#start:hover { transform: scale(1.035); }
#start:active { transform: scale(.975); transition-duration: .08s; }
#start:disabled { opacity: .6; cursor: progress; }
#test-call[hidden] { display: none; }
.test-title { font-size: clamp(40px, 8vw, 88px); line-height: 1.02; font-weight: 700; letter-spacing: -.04em; }
.test-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 28px; }
#test-heard { min-height: 56px; padding: 0 36px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 19px; font-weight: 650; }
#error { margin-top: 12px; color: #FF9E8A; font-weight: 600; }
#error:empty { display: none; }

.prefs { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1120px; margin: 0 auto 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pref { display: block; padding: 16px 22px; }
.pref + .pref { border-left: 1px solid var(--line); }
label.pref { cursor: pointer; }
.pref-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; margin-bottom: 4px; }
.pref-name { font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.pref-why { display: block; font-size: 15px; line-height: 1.4; color: var(--muted); }
input[role="switch"] { appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: #55555C; cursor: pointer; transition: background-color .25s; }
input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0006; transition: transform .3s var(--ease); }
input[role="switch"]:checked { background: var(--accent); }
input[role="switch"]:checked::after { transform: translateX(20px); background: var(--on-accent); }

.story { position: relative; max-width: 1120px; margin: 0 auto; padding: 8vh 20px 16vh; }
.story p { padding: 16vh 0; font-size: clamp(44px, 8vw, 112px); line-height: 1.02; font-weight: 700; letter-spacing: -.04em; }
.story em { font-style: normal; color: var(--accent); }

/* Live hold */
#live { display: flex; flex-direction: column; align-items: center; padding: clamp(20px, 6vh, 64px) 20px 48px; text-align: center; }
.clock-label { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; color: var(--accent); }
#digits { display: flex; justify-content: center; font-size: min(16vw, 40vh); line-height: 1.04; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; color: #fff; }
.digit { position: relative; display: inline-block; width: .63em; height: 1.04em; overflow: hidden; text-align: center; }
.digit span { position: absolute; inset: 0; will-change: transform; }
.colon { width: .26em; text-align: center; font-size: .82em; line-height: 1.27; color: var(--muted); }
html[data-phase="frozen"] #digits { color: #F5B942; }
.minute { width: min(100%, 1120px); height: 2px; margin: 6px 0 22px; background: var(--line); border-radius: 2px; overflow: hidden; }
#minute-fill { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.voice { font-size: clamp(22px, 2.8vw, 36px); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin-bottom: 28px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 1120px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.stats > div { padding: 14px 20px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; font-variant-numeric: tabular-nums; }
#sound { margin-top: 8px; padding: 6px 14px; min-height: 40px; font-size: 14px; }
#quit { margin-top: 28px; }

/* ---------- Result card ---------- */
#over { display: flex; justify-content: center; padding: clamp(20px, 5vh, 56px) 16px 56px; }
.card { width: min(100%, 760px); padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: rgba(28, 28, 30, .72); border: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 30px 80px #000a; animation: arrive .9s var(--ease) both; }
.card h2 { font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.card-label { margin-top: 26px; font-size: 16px; font-weight: 600; color: var(--accent); }
#result-time { font-size: clamp(60px, 17vw, 136px); line-height: 1.02; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
.card-items { margin-top: 18px; border-top: 1px solid var(--line); }
.card-items > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.card-items dt { color: var(--muted); }
.card-items dd { font-weight: 600; text-align: right; }
.card-due { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; color: var(--muted); }
#again { width: 100%; margin-top: 16px; min-height: 56px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 19px; font-weight: 650; transition: transform .3s var(--ease); }
#again:hover { transform: scale(1.015); }
#again:active { transform: scale(.985); }
.card-foot { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Shared content layouts ---------- */
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 56px; max-width: 1120px; margin: 0 auto; padding: 32px 20px; border-top: 1px solid var(--line); }
.columns h3, #complaint h3 { font-size: 24px; font-weight: 650; letter-spacing: -.018em; margin-bottom: 8px; }
.columns p + p { margin-top: 10px; }
table { width: 100%; border-collapse: collapse; }
caption:not(.sr) { text-align: left; font-size: 17px; font-weight: 600; padding-bottom: 12px; }
th, td { padding: 12px 14px 12px 0; text-align: left; border-bottom: 1px solid var(--line); font-weight: 400; }
thead th { font-size: 15px; font-weight: 600; color: var(--muted); }
tbody th { font-weight: 600; }

/* ---------- DIRECTORY ---------- */
#panel-directory { padding-bottom: 56px; }
.dir-hero { max-width: 1120px; margin: 0 auto; padding: clamp(36px, 9vh, 96px) 20px 36px; }
.dir-hero h2 { margin: 6px 0 22px; font-size: min(17vw, 34vh); line-height: .98; font-weight: 700; letter-spacing: -.05em; animation: arrive 1s var(--ease) both; }
.dir-zero { color: var(--accent); }
.dir-board, .dir-search { max-width: 1120px; margin: 0 auto; padding: 0 20px 36px; }
.dir-board td { padding: 14px 14px 14px 0; font-variant-numeric: tabular-nums; }
.dir-board td[colspan] { color: var(--muted); padding: 24px 0; }
.dir-board tr.mine td { font-weight: 700; color: var(--accent); }
.dir-board .table-wrap { min-height: 320px; }
.dir-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dir-controls [role="group"] { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.dir-controls button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font-size: 15px; font-weight: 600; }
.dir-controls button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
#board-say:empty { display: none; }
#board-say { margin-bottom: 12px; color: var(--muted); }
#listing { margin-top: 18px; padding: 14px 0 2px; }
#listing[hidden] { display: none; }
#listing label { display: block; margin-bottom: 8px; font-weight: 600; }
.listing-row { display: flex; flex-wrap: wrap; gap: 10px; }
#list-name { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #76767C; background: transparent; color: var(--text); }
.listing-note { margin-top: 8px; font-size: 14px; color: var(--muted); }
#list-say { margin: 8px 0 12px; font-weight: 600; }
#list-say:empty { display: none; }
.dir-search label { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.018em; margin-bottom: 8px; }
#lookup { width: min(100%, 460px); min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid #76767C; background: var(--surface); }
#lookup::placeholder { color: var(--muted); }
#lookup-say { margin-top: 10px; color: var(--muted); }

/* ---------- MANUAL ---------- */
#panel-manual { position: relative; padding-bottom: 72px; }
#progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; background: var(--accent); transform: scaleX(0); transform-origin: left; }
@supports (animation-timeline: scroll()) {
  #progress { animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { to { transform: scaleX(1); } }
}
.man-head { max-width: 1120px; margin: 0 auto; padding: clamp(36px, 9vh, 96px) 20px 24px; }
.man-head h2 { margin: 6px 0 20px; font-size: min(10vw, 24vh); line-height: 1; font-weight: 700; letter-spacing: -.045em; animation: arrive 1s var(--ease) both; }
.man-story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 88px); max-width: 1120px; margin: 0 auto; padding: 0 20px; align-items: start; }
.man-figure { position: sticky; top: 92px; padding: 16px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
#plot { display: block; width: 100%; max-height: 68vh; font-family: inherit; }
.nodes rect { fill: #17202B; stroke: #8E97A6; stroke-width: 1; transition: fill .45s var(--ease), stroke .45s; }
.nodes text { fill: #F2F6FA; transition: fill .3s; }
.nodes .on rect { fill: var(--accent); stroke: var(--accent); }
.nodes .on text { fill: var(--on-accent); }
.man-steps article { min-height: 74vh; padding-top: 18vh; opacity: .55; transition: opacity .5s var(--ease); }
.man-steps article.on { opacity: 1; }
.man-steps article:last-child { min-height: 60vh; }
.man-steps h3 { font-size: clamp(38px, 5vw, 64px); line-height: 1.03; font-weight: 700; letter-spacing: -.035em; margin-bottom: 12px; }
.man-steps p { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.42; }
.man-rules { max-width: 1120px; margin: 0 auto; padding: 56px 20px 0; scroll-margin-top: 72px; }
.section-title { font-size: clamp(34px, 4.8vw, 60px); line-height: 1.05; font-weight: 700; letter-spacing: -.035em; margin-bottom: 24px; }
.section-note { margin: 12px 0; }
.table-wrap { overflow-x: auto; }
.rule-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin-top: 16px; }
.rule-list > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rule-list dt { font-weight: 650; margin-bottom: 2px; }
.rule-list dd { color: var(--muted); }
#fav-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 40px; }
#fav-key li { display: flex; align-items: center; gap: 12px; }
#fav-key img { flex: none; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- COMPLAINTS ---------- */
#panel-complaints { padding-bottom: 64px; }
.com-hero { max-width: 1120px; margin: 0 auto; padding: clamp(36px, 9vh, 96px) 20px 40px; }
.com-hero h2 { margin-top: 6px; font-size: min(7.4vw, 18vh); line-height: 1.02; font-weight: 700; letter-spacing: -.04em; animation: arrive 1s var(--ease) both; }
.com-hero h2 span { color: var(--muted); }
.faq dt { font-weight: 600; margin-top: 10px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { color: var(--muted); }
.placeholder { padding: 14px 16px; border: 1px dashed var(--muted); border-radius: 12px; }
#complaint { max-width: 1120px; margin: 0 auto; padding: 32px 20px 0; border-top: 1px solid var(--line); display: grid; justify-items: start; gap: 6px; }
#complaint p { margin-bottom: 10px; }
#complaint label { font-weight: 600; margin-top: 8px; }
#complaint select, #complaint textarea { width: min(100%, 560px); padding: 10px 14px; border: 1px solid #7C746C; border-radius: 12px; background: var(--surface); }
#complaint select { min-height: 46px; }
#complaint button { margin-top: 14px; min-height: 46px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; transition: transform .25s var(--ease); }
#complaint button:hover { transform: scale(1.03); }
#complaint button:active { transform: scale(.97); }
#filing-say { margin-top: 12px; font-weight: 500; }

/* ---------- THE RING: the whole screen fills with colour, and stays calm about it ---------- */
#takeover { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; overflow: hidden auto; color: #fff; --accent: #fff; --on-accent: #8A1F0E; --line: rgba(255, 255, 255, .35); }
.bloom { position: fixed; left: 50%; top: 50%; width: 300vmax; height: 300vmax; margin: -150vmax 0 0 -150vmax; border-radius: 50%; background: var(--ring); animation: bloom .55s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes bloom { from { transform: scale(0); } }
.ripples { position: fixed; left: 50%; top: 50%; pointer-events: none; }
.ripples i { position: absolute; left: -45vmin; top: -45vmin; width: 90vmin; height: 90vmin; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); opacity: 0; animation: ripple 3.6s ease-out infinite; }
.ripples i:nth-child(2) { animation-delay: 1.2s; }
.ripples i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ripple { from { transform: scale(.3); opacity: .55; } to { transform: scale(1.7); opacity: 0; } }
html[data-phase="answering"] .ripples { display: none; }
.time-bar { position: fixed; top: 0; left: 0; right: 0; height: 6px; background: rgba(255, 255, 255, .25); z-index: 3; }
#time-fill { display: block; height: 100%; background: #fff; transform-origin: left; }
#ring, #challenge { position: relative; z-index: 2; width: 100%; padding: 28px 20px; text-align: center; animation: rise .5s var(--ease) .1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.985); } }
#ring h2 { font-size: min(10.4vw, 22vh); line-height: 1; font-weight: 700; letter-spacing: -.045em; }
.time-left { margin: 12px 0 24px; font-size: 20px; font-weight: 500; display: flex; justify-content: center; align-items: baseline; gap: 10px; }
#ring-count, #answer-count { font-size: clamp(44px, 9vh, 80px); line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
#pickup { min-height: 84px; padding: 0 clamp(48px, 9vw, 112px); border: 0; border-radius: 999px; background: #fff; color: #8A1F0E; font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -.025em; box-shadow: 0 20px 60px rgba(60, 8, 0, .4); transition: transform .3s var(--ease); }
#pickup:hover { transform: scale(1.03); }
#pickup:active { transform: scale(.97); transition-duration: .06s; }
#takeover button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.hint { margin-top: 18px; font-size: 16px; line-height: 1.4; }
kbd { display: inline-block; padding: 1px 8px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 6px; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; }
#challenge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 12px clamp(24px, 6vw, 80px); align-items: center; max-width: 1040px; }
.ask-word { font-size: clamp(32px, 6vh, 56px); line-height: 1; font-weight: 600; letter-spacing: -.03em; }
#target { display: block; font-size: min(26vw, 52vh); line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ask .time-left { margin: 4px 0 0; }
#keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#keys button { height: clamp(64px, 16vh, 124px); border: 1px solid rgba(255, 255, 255, .35); border-radius: 20px; background: rgba(255, 255, 255, .16); color: #fff; font-size: clamp(30px, 6vh, 48px); font-weight: 600; transition: transform .2s var(--ease), background-color .2s; animation: keyin .4s var(--ease) both; animation-delay: calc(var(--i) * 22ms); }
@keyframes keyin { from { opacity: 0; transform: translateY(10px); } }
#keys button:hover { background: rgba(255, 255, 255, .28); }
#keys button:active { transform: scale(.95); }
#keys button.spent { background: rgba(60, 8, 0, .5); border-color: transparent; }
#takeover-say { min-height: 1.4em; margin-top: 6px; font-size: 20px; font-weight: 650; }
#challenge { animation-duration: .18s; animation-delay: 0s; } /* The answer window is only seconds long. */
#keys button { animation-duration: .18s; animation-delay: 0s; }
#target .dialled { opacity: .35; }
#challenge[data-kind="extension"] #target { font-size: min(14vw, 34vh); }
#challenge[data-kind="operator"] #target { margin: 12px 0; font-size: clamp(30px, 6.5vh, 56px); line-height: 1.1; letter-spacing: -.025em; }
#lamps { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: clamp(10px, 2.4vh, 22px); margin: clamp(12px, 3vh, 28px) 0; }
#lamps[hidden] { display: none; }
#lamps i { display: block; width: clamp(40px, 10vh, 76px); aspect-ratio: 1; border: 2px solid rgba(255, 255, 255, .4); border-radius: 50%; }
#lamps i.lit { background: #fff; border-color: #fff; box-shadow: 0 0 22px rgba(255, 255, 255, .55); }
#challenge[data-kind="operator"] #keys, #challenge[data-kind="routing"] #keys, #challenge[data-kind="oddShape"] #keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#challenge[data-kind="operator"] #keys button, #challenge[data-kind="routing"] #keys button { font-size: clamp(20px, 3.6vh, 30px); }
#challenge[data-kind="oddShape"] #keys button { font-size: clamp(40px, 9vh, 72px); line-height: 1; }
#keys button { position: relative; }
.key-number { position: absolute; top: 8px; left: 12px; font-size: 14px; font-weight: 600; opacity: .75; }

#connected { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; background: var(--ring); color: #fff; font-size: min(7vw, 16vh); line-height: 1.04; font-weight: 700; letter-spacing: -.04em; pointer-events: none; }

/* ---------- Narrower ---------- */
@media (max-width: 1000px) {
  #top { display: contents; }
  #masthead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 10px 16px 6px; }
  #line { text-align: left; }
  #tabbar { position: sticky; top: 0; z-index: 20; padding: 6px 12px; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); }
  [role="tablist"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [role="tab"] { padding: 0 2px; font-size: 13px; min-height: 40px; letter-spacing: -.01em; }
}
@media (max-width: 720px) {
  .hero { padding-top: 28px; }
  .poster { white-space: normal; font-size: 19vw; line-height: .98; margin: 8px 0 14px; }
  .prefs, .stats, .rule-list { grid-template-columns: minmax(0, 1fr); }
  .prefs { margin: 0 16px 8px; }
  .pref { padding: 14px 0; }
  .pref + .pref { border-left: 0; border-top: 1px solid var(--line); }
  #digits { font-size: 18.2vw; }
  #live { padding: 20px 16px 36px; }
  .voice { min-height: 3.6em; } /* The lines differ in length: keep the page from shifting between calls. */
  .stats > div { padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
  .stats > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stats dd { font-size: 18px; text-align: right; }
  #sound { grid-column: 1 / -1; }
  .card-items > div { flex-direction: column; gap: 0; }
  .card-items dd { text-align: left; }
  .card-due { flex-wrap: wrap; }
  #result-time { font-size: 19vw; }
  .columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dir-hero h2 { font-size: 21vw; }
  .dir-board th:nth-child(4), .dir-board td:nth-child(4) { display: none; }
  .man-head h2 { font-size: 15vw; }
  .com-hero h2 { font-size: 11.5vw; }
  .man-story { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .man-figure { top: 60px; padding: 8px; z-index: 5; background: #111821; border-radius: 16px; }
  #plot { max-height: 30vh; }
  .man-steps article { min-height: 56vh; padding-top: 6vh; }
  .man-steps h3 { font-size: 34px; }
  th, td { padding-right: 10px; font-size: 15px; }
  #ring h2 { font-size: 16vw; }
  #pickup { width: 100%; }
  #challenge { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 16px; }
  .ask { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 14px; }
  .ask-word { grid-row: 1; }
  #target { grid-row: 1 / span 2; grid-column: 2; font-size: min(30vw, 18vh); }
  .ask .time-left { grid-column: 1; grid-row: 2; flex-direction: column; align-items: center; gap: 0; }
  #challenge:not([data-kind="keypad"]) .ask { grid-template-columns: minmax(0, 1fr); }
  #challenge:not([data-kind="keypad"]) .ask-word, #challenge:not([data-kind="keypad"]) #target, #challenge:not([data-kind="keypad"]) .ask .time-left { grid-column: 1; grid-row: auto; }
  #challenge[data-kind="extension"] #target { font-size: min(24vw, 14vh); }
  #challenge[data-kind="operator"] #target { font-size: clamp(24px, 4vh, 34px); }
  #lamps i { width: clamp(28px, 6.5vh, 48px); }
  #answer-count { font-size: 36px; }
  .ask .time-unit { font-size: 14px; }
  #keys button { height: clamp(58px, 12.5vh, 92px); }
  .hint { margin-top: 10px; font-size: 15px; }
  #takeover-say { margin-top: 2px; }
  #connected { font-size: 12vw; }
}

/* ---------- A still version, for anyone who asked for one ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .man-steps article { opacity: 1; min-height: 0; padding: 28px 0 0; }
  .man-figure { position: static; }
  .man-story { display: block; }
  .ripples, #progress, .glow-b { display: none; }
  .story p { padding: 6vh 0; }
}

/* ---------- Added with the Directory's second half ---------- */
#extended, #share-reason { width: 100%; min-height: 44px; padding: 8px 12px; margin: 6px 0; border: 1px solid var(--muted); border-radius: 10px; background: var(--surface); }
#extended option, #share-reason option { color: #111; }
#scan-row { margin: 6px 0; }
#share { margin-top: 18px; text-align: left; }
#share label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
#share #share-reason { margin: 0; flex: 1; min-width: 0; }
#share-say { min-height: 1.5em; margin-top: 6px; font-size: 15px; overflow-wrap: anywhere; }
#rescue { display: block; width: 100%; margin-top: 12px; }
#human-check { min-height: 65px; margin-top: 16px; }
#site-foot { padding: 20px; border-top: 1px solid var(--line); font-size: 14px; }
#site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
#site-foot a { color: var(--muted); }
html.calling #site-foot { display: none; }
#site-foot .foot-link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Sharing: plain links, no network scripts ---------- */
#share-site { margin-top: 14px; animation: arrive 1.1s var(--ease) .3s both; }
.share-links { margin-top: 12px; }
.share-links[hidden] { display: none; }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
#share .share-row { justify-content: flex-start; }
.share-to { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .2s, transform .2s var(--ease); }
.share-to:hover { background: var(--surface); }
#site-foot .share-to { color: var(--text); }
.share-to:active { transform: scale(.97); }
.share-copied { min-height: 1.4em; margin-top: 6px; font-size: 14px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
#share .share-copied { text-align: left; }
.scanning #keys button:focus, .scanning #pickup:focus { outline: 4px solid #fff; outline-offset: 3px; }
#board-rows .badge { display: inline-block; margin-left: 6px; padding: 0 8px; border: 1px solid var(--muted); border-radius: 999px; font-size: 13px; color: var(--muted); white-space: nowrap; }
#board-rows a { color: inherit; overflow-wrap: anywhere; }
.explainer { position: relative; max-width: 40em; margin: 0 auto; padding: 8px 20px 56px; color: var(--muted); }
.explainer h2 { margin-bottom: 10px; font-size: 22px; font-weight: 650; letter-spacing: -.015em; color: var(--text); }
.explainer p + p { margin-top: 12px; }
