/* Layout: a guided path of five screens (Add slides, Check points, Get ready, Present, Recap), one at a time,
   with a step rail on top. The presenting screen is a stage monitor: big slide, next slide, timer, points left. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --line: #e3e7ed;
  --line-2: #cfd5de;
  --fg: #0f172a;
  --muted: #566174;
  --tally: #f26522;       /* the Onword orange "on air" light */
  --tally-ink: #b23f0c;
  --on-tally: #1c0b03;
  --go: #c2410c;
  --warn: #cc4f39;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 28px -10px rgba(15, 23, 42, .14);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .05), 0 30px 70px -20px rgba(15, 23, 42, .35);
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0b0e14; --surface: #141a23; --surface-2: #1b222d; --line: #252d3a; --line-2: #333c4b; --fg: #edf1f6; --muted: #9ba6b6;
  --tally: #ff7a3d; --tally-ink: #ffa178; --go: #ff8a50; --warn: #ef7a63;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -10px rgba(0, 0, 0, .7); --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .85); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0b0e14; --surface: #141a23; --surface-2: #1b222d; --line: #252d3a; --line-2: #333c4b; --fg: #edf1f6; --muted: #9ba6b6;
  --tally: #ff7a3d; --tally-ink: #ffa178; --go: #ff8a50; --warn: #ef7a63;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -10px rgba(0, 0, 0, .7); --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .85); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 14px 48px;
}
.wrap { max-width: 1180px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 20px; }
h1, h2 { font-family: var(--display); text-wrap: balance; margin: 0; }
h3 { font-family: var(--body); text-wrap: balance; margin: 0; }
h2 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
h3 { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
section > div:first-child > .lead { margin-top: 8px; }
.lead { color: var(--muted); max-width: 62ch; font-size: 16.5px; }
button, input, textarea, select { font: inherit; color: inherit; }
button {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 15px; cursor: pointer; min-height: 42px;
  font-weight: 550; box-shadow: var(--shadow-sm); transition: background-color .15s, border-color .15s, box-shadow .15s;
}
button:hover { background: var(--surface-2); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--tally); color: var(--on-tally); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--tally); outline-offset: 2px; }
button.big { padding: 13px 22px; font-size: 16px; font-weight: 650; border-radius: 12px; }
button.primary { background: var(--tally); border-color: color-mix(in srgb, var(--tally) 82%, #000); color: var(--on-tally); font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(15, 23, 42, .12), 0 6px 16px -6px color-mix(in srgb, var(--tally) 70%, transparent); }
button.primary:hover { background: color-mix(in srgb, var(--tally) 90%, #000); }
button.link { background: none; border: none; box-shadow: none; color: var(--tally-ink); text-decoration: underline; text-underline-offset: 2px; padding: 6px 4px; min-height: 0; font-weight: 550; }
button.link:hover { background: none; }
button.on { box-shadow: inset 0 0 0 2px var(--tally); }
button:disabled { opacity: .45; cursor: default; }
input[type=text], input[type=number], input[type=email], select, textarea { background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 11px; transition: border-color .15s, box-shadow .15s; }
input[type=text]:focus, input[type=number]:focus, input[type=email]:focus, select:focus, textarea:focus { outline: none; border-color: var(--tally); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tally) 25%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input[type=checkbox] { accent-color: var(--tally); width: 18px; height: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* top bar: logo, the five steps, then Help, Settings and your account */
header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px 8px 14px; box-shadow: var(--shadow-sm); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; order: 0; margin-right: 8px; }
.brand h1 { font-size: 22px; white-space: nowrap; }
.wordmark { display: inline-flex; align-items: center; gap: .16em; font-family: 'Space Grotesk', var(--body); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.wm-arrow { width: .78em; height: .78em; fill: none; stroke: var(--tally); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* the microphone light: shows while it's listening */
.lamp { display: none; }
.lamp.live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tally) 16%, transparent); color: var(--tally-ink); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.lamp.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tally); animation: pulse 1.8s ease-out infinite; }
header .lamp.live::after { content: "Listening"; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tally) 65%, transparent); } 80%, 100% { box-shadow: 0 0 0 7px transparent; } }
header > .navlink, header > #setBtn, header > #installBtn, header > #acctBtn { order: 2; }
header > #setBtn, header > #installBtn, header > #acctBtn { min-height: 36px; padding: 6px 12px; font-size: 14.5px; }
header > #setBtn { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
header > #setBtn:hover { background: var(--surface-2); color: var(--fg); }
header > #acctBtn.on { border-radius: 999px; }
ol.steps { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 auto; padding: 0; order: 1; }
ol.steps li { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--muted); padding: 5px 10px 5px 5px; border-radius: 999px; }
ol.steps li + li::before { content: ""; width: 14px; height: 1.5px; background: var(--line-2); margin-left: -6px; margin-right: 2px; border-radius: 1px; }
ol.steps li b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
ol.steps li.now { color: var(--fg); font-weight: 650; background: color-mix(in srgb, var(--tally) 13%, transparent); }
ol.steps li.now b { background: var(--tally); border-color: var(--tally); color: var(--on-tally); }
ol.steps li.done { color: var(--fg); }
ol.steps li.done b { background: var(--tally); border-color: var(--tally); color: #fff; font-size: 0; }
ol.steps li.done b::after { content: ""; width: 13px; height: 13px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%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 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 1080px) { ol.steps { order: 3; width: 100%; justify-content: center; padding-top: 8px; border-top: 1px solid var(--line); } .brand { margin-right: auto; } }
@media (max-width: 480px) { .brand h1 { font-size: 19px; } header { padding-left: 10px; } }
@media (max-width: 640px) { ol.steps li { font-size: 0; gap: 0; padding: 4px; } ol.steps li.now { font-size: 13px; gap: 6px; padding-right: 10px; } ol.steps li + li::before { margin-left: 0; } }
/* small phones: the five steps stay on one line, and "Listening" shrinks to its dot so the header doesn't wrap */
@media (max-width: 420px) { ol.steps { flex-wrap: nowrap; } ol.steps li + li::before { width: 8px; margin-right: 1px; } header .lamp.live { padding: 3px; } header .lamp.live::after { content: none; } }
/* a phone turned sideways: hide the steps while presenting so the slide and its buttons fit */
@media (max-height: 500px) and (orientation: landscape) { :root[data-stage] ol.steps { display: none; } .stage { width: min(100%, calc((100svh - 170px) * 16 / 9)); margin-inline: auto; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; box-shadow: var(--shadow-sm); }
.banner { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tally); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-sm); }

/* 1. add slides */
.drop {
  border: 1.5px dashed var(--line-2); border-radius: 20px; padding: 52px 20px; text-align: center; cursor: pointer;
  background: radial-gradient(60% 90% at 50% 0%, color-mix(in srgb, var(--tally) 7%, transparent), transparent 70%), var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 10px; transition: border-color .15s, background-color .15s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
.drop:hover { border-color: color-mix(in srgb, var(--tally) 70%, var(--line-2)); box-shadow: var(--shadow); }
.drop.over { border-color: var(--tally); border-style: solid; background: color-mix(in srgb, var(--tally) 9%, var(--surface)); }
.drop .icon { width: 72px; height: 72px; padding: 14px; border-radius: 20px; background: color-mix(in srgb, var(--tally) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tally) 25%, transparent); color: var(--fg); margin-bottom: 6px; }
.drop h3 { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.howto { display: grid; gap: 12px; }
.slideopts .tag { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; }
.htabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.htabs span { margin-right: 4px; }
.htabs button { min-height: 34px; padding: 5px 14px; border-radius: 999px; font-size: 14px; background: transparent; box-shadow: none; border-color: var(--line); }
.htabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.howto ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.howto ol.shots { list-style: none; padding: 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; counter-reset: shot; }
.shots li { counter-increment: shot; display: grid; gap: 8px; align-content: start; font-size: 14px; }
.shots a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.shots a:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.shots img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.shots span::before { content: counter(shot) ". "; font-weight: 700; }
.howto p { margin: 0; }
.howto ol + p { margin-top: 4px; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; width: min(320px, 100%); }
.progress i { display: block; height: 100%; background: var(--tally); width: 0; transition: width .2s; }
.decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.deck { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s; }
.deck:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.deck img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: var(--surface-2); display: block; border-bottom: 1px solid var(--line); }
.deck .meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.deck .meta b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck .acts { display: flex; gap: 6px; padding: 0 12px 12px; }
.deck .acts button { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.deck .acts .open { flex: 1; }

/* 2. check points */
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.field span { color: var(--muted); font-weight: 500; }
.field input, .field select { min-height: 40px; }
.cards { display: flex; flex-direction: column; gap: 12px; }
.scard { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 640px) { .scard { grid-template-columns: minmax(0, 1fr); } }
.thumb { position: relative; aspect-ratio: 16/9; max-width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.thumb span { position: absolute; left: -9px; top: -9px; min-width: 26px; height: 26px; padding: 0 7px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; background: var(--fg); color: var(--surface); border-radius: 999px; box-shadow: 0 0 0 3px var(--surface); }
.plist { display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; gap: 6px; align-items: center; }
.prow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tally); flex: 0 0 auto; }
.prow input { flex: 1; min-width: 0; min-height: 40px; border-color: var(--line); }
.prow input:hover { border-color: var(--line-2); }
.prow button { min-height: 36px; padding: 4px 10px; background: none; border-color: transparent; box-shadow: none; color: var(--muted); }
.prow button:hover { color: var(--warn); border-color: var(--line); }
.describe { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.describe textarea { min-height: 64px; resize: vertical; background: var(--surface); }
.slideopts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 14px; color: var(--muted); align-items: center; }
.slideopts label { display: flex; gap: 6px; align-items: center; }
.slideopts select { padding: 4px 8px; }
.sticky-bar { position: sticky; bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 5; padding: 10px; border-radius: 16px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); box-shadow: var(--shadow); }

/* 3. get ready */
.ready { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.check { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.check .mark { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-weight: 700; color: #fff; }
.check.ok .mark { background: var(--go); border-color: var(--go); }
.check.wait .mark { border-color: var(--tally); border-top-color: transparent; animation: spin 1s linear infinite; }
.check.bad .mark { background: var(--warn); border-color: var(--warn); }
@keyframes spin { to { transform: rotate(360deg); } }
.heardbox { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-height: 40px; font-size: 15px; margin-top: 8px; overflow-wrap: anywhere; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.mode { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: 18px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s, background-color .15s; }
.mode:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.mode b { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.mode span { color: var(--muted); font-size: 15px; font-weight: 400; }
.mode.primary span { color: var(--on-tally); opacity: .8; }

/* 4. present */
.stagegrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .stagegrid { grid-template-columns: minmax(0, 1fr); } }
.stage { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; max-width: 100%; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
.stage:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.ring { position: absolute; right: 12px; bottom: 12px; width: 58px; height: 58px; }
.stage { container-type: inline-size; }
.caption { position: absolute; left: 50%; transform: translateX(-50%); bottom: 5%; width: max-content; max-width: 78%; background: rgba(0,0,0,.8); color: #fff; font-size: clamp(13px, 2.4cqw, 30px); line-height: 1.35; padding: .25em .7em; border-radius: 8px; text-align: center; }
.chip { position: absolute; left: 12px; top: 12px; background: rgba(15,18,24,.85); color: #fff; font-size: 14px; padding: 4px 10px; border-radius: 999px; }
.toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(15,18,24,.92); color: #fff; border-radius: 999px; padding: 6px 8px 6px 16px; display: flex; gap: 10px; align-items: center; font-size: 15px; max-width: calc(100% - 40px); }
.toast button { background: var(--tally); color: var(--on-tally); border: none; min-height: 34px; padding: 4px 14px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar .count { font-family: var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.bar.tools { gap: 6px; }
.bar.tools button { min-height: 36px; padding: 6px 11px; font-size: 13.5px; }
.side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.clock { font-family: var(--mono); font-size: 34px; font-variant-numeric: tabular-nums; line-height: 1; }
.clock.late { color: var(--warn); }
.label { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 8px; }
.pace { font-size: 14px; margin-top: 8px; }
.pace.late { color: var(--warn); }
.nextthumb { aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; max-width: 100%; display: grid; place-items: center; color: #9aa5b5; font-size: 14px; }
.nextthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.meter { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--go); width: 0; transition: width .3s; }
.countdown { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.countdown i { display: block; height: 100%; background: var(--tally); width: 0; }
.status { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 12px 0 10px; }
.points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.points li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 15px; color: var(--muted); }
.points li::before { content: ""; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--line); }
.points li.done { color: var(--fg); }
.points li.done::before { background: var(--go); border-color: var(--go); }
.heard { font-size: 14px; color: var(--muted); max-height: 5.5em; overflow-y: auto; overflow-wrap: anywhere; }
.heard em { color: var(--fg); font-style: normal; }
.heard:empty::before { content: "Nothing heard yet on this slide."; }
.type { display: flex; gap: 8px; margin-top: 8px; }
.type input { flex: 1; min-width: 0; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.settings { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; font-size: 14px; margin-top: 10px; }
.settings input[type=range] { width: 120px; accent-color: var(--tally); }
.qa { background: color-mix(in srgb, var(--tally) 14%, var(--surface)); border-color: var(--tally); }

/* 5. recap */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.stat.score { border-color: var(--tally); background: color-mix(in srgb, var(--tally) 8%, var(--surface)); }
.history { display: flex; align-items: flex-end; gap: 6px; height: 90px; padding-top: 18px; }
.history div { flex: 1; max-width: 46px; background: var(--surface-2); border-radius: 6px 6px 0 0; position: relative; min-height: 4px; }
.history div.last { background: var(--tally); }
.history div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; font-size: 13px; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.pill.good { background: color-mix(in srgb, var(--go) 18%, transparent); color: var(--go); }
.pill.miss { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }

/* phone remote */
dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--fg); padding: 24px; max-width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(10, 12, 16, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog h3 { margin-bottom: 6px; }
.caption[data-size="s"] { font-size: clamp(11px, 1.8cqw, 22px); }
.caption[data-size="l"] { font-size: clamp(16px, 3.4cqw, 42px); }

/* settings */
dialog.setdlg { max-width: min(560px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px); padding: 0; display: none; flex-direction: column; overflow: hidden; }
dialog.setdlg[open] { display: flex; }
.sethead { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.sethead h3 { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 2px; }
.sethead > div { flex: 1; }
.hb-close { width: 40px; height: 40px; min-height: 0; padding: 0; border: none; box-shadow: none; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; border-radius: 10px; }
.hb-close:hover { background: var(--surface-2); color: var(--fg); }
.setbody { overflow-y: auto; padding: 8px 20px; overscroll-behavior: contain; }
.setbody fieldset { border: none; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.setbody fieldset:last-child { border-bottom: none; }
.setbody legend { font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 0; margin-bottom: 4px; }
.setrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 6px 0; }
.setrow input[type=range] { grid-column: 1 / -1; width: 100%; min-height: 28px; }
/* sliders: a thin track filled up to the handle (--p is set by the app) */
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 28px; cursor: pointer; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(var(--tally), var(--tally)) 0 / var(--p) 100% no-repeat, var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--tally); box-shadow: 0 1px 4px rgba(15, 23, 42, .25); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--surface-2); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--tally); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--tally); box-shadow: 0 1px 4px rgba(15, 23, 42, .25); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tally) 35%, transparent); }
.setrow select { max-width: 60vw; }
.setrow output { font-family: var(--mono); font-size: 14px; background: var(--surface-2); border-radius: 6px; padding: 1px 8px; min-width: 52px; text-align: center; }
.setrow.dim { opacity: .5; }
.setrow.switch { cursor: pointer; min-height: 44px; }
.setrow.switch input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.setrow.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.setrow.switch input:checked { background: var(--tally); border-color: var(--tally); }
.setrow.switch input:checked::after { transform: translateX(18px); background: var(--on-tally); }
.setrow.switch input:focus-visible { outline: 2px solid var(--tally); outline-offset: 2px; }
#setTotal { margin-top: 4px; }
.setdeck { display: flex; align-items: center; gap: 12px; margin: 0 20px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.setdeck > div { flex: 1; }
.settip { padding: 10px 20px 0; }
dialog.setdlg > .row { padding: 10px 20px 18px; }
.acctbody { padding: 18px 20px 6px; display: flex; flex-direction: column; gap: 14px; }
.oauths { display: flex; flex-direction: column; gap: 10px; }
button.oauth { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; font-weight: 600; background: #fff; color: #1f1f1f; border-color: #747775; border-radius: 999px; box-shadow: none; }
button.oauth:hover { background: #f6f8fb; border-color: #1f1f1f; }
button.oauth svg { width: 20px; height: 20px; flex: 0 0 auto; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.acctform { display: flex; flex-wrap: wrap; gap: 8px; }
.acctform input { flex: 1 1 220px; min-height: 44px; border-radius: 10px; padding: 8px 12px; }
.acctform button { flex: 1 1 auto; }
.who { display: flex; align-items: center; gap: 12px; }
.who img, .who .avatar { width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; }
.who .avatar { display: grid; place-items: center; background: var(--tally); color: var(--on-tally); font: 700 20px var(--display); }
.who b, .who span { display: block; overflow-wrap: anywhere; }
a.btn { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 15px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; font-weight: 550; box-shadow: var(--shadow-sm); }
button.link.danger { color: var(--warn); }
.plan { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.plan > div { flex: 1; min-width: 0; }
.plan b, .plan span { display: block; }
.plan.pro { border-color: color-mix(in srgb, var(--tally) 55%, transparent); background: color-mix(in srgb, var(--tally) 10%, var(--surface)); }
.plan .btn { flex: 0 0 auto; }
a.btn.primary { background: var(--tally); border-color: color-mix(in srgb, var(--tally) 82%, #000); color: var(--on-tally); }
header > #acctBtn .pro { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--tally); color: var(--on-tally); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; vertical-align: 1px; }
.acctmsg { padding: 4px 20px 18px; }
.acctmsg:empty { padding-bottom: 12px; }
@media (max-width: 520px) { .setrow { grid-template-columns: 1fr; } .setrow output { justify-self: start; } .setrow.switch { grid-template-columns: 1fr auto; } .setdeck { flex-direction: column; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .setrow.switch input, .setrow.switch input::after { transition: none; } }
.qr { background: #fff; padding: 12px; border-radius: 10px; width: fit-content; margin: 14px auto; }
.qr img, .qr canvas { display: block; width: 220px; height: 220px; }
.remote { max-width: 520px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.rtop { display: flex; align-items: center; gap: 10px; }
.remote img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; border-radius: 10px; display: block; }
.remote #rNextImg { width: 45%; opacity: .85; }
.rbtns { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; }
.rbtns button { min-height: 72px; font-size: 18px; font-weight: 700; }
body.remote-mode > .wrap { display: none; }

/* presenting: a dark stage, whatever the page theme, so the laptop screen doesn't glare */
:root[data-stage] {
  --bg: #0b0e14; --surface: #141a23; --surface-2: #1b222d; --line: #252d3a; --line-2: #333c4b; --fg: #edf1f6; --muted: #9ba6b6;
  --tally: #ff7a3d; --tally-ink: #ffa178; --go: #ff8a50; --warn: #ef7a63;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -10px rgba(0, 0, 0, .7); --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .85); color-scheme: dark;
}
.blankcover { position: absolute; inset: 0; background: rgba(0,0,0,.86); color: #c9d1dc; display: grid; place-items: center; text-align: center; padding: 20px; font-size: 18px; }
#blankBtn.on { background: var(--fg); color: var(--bg); }
.navlink { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 550; padding: 7px 12px; border-radius: 9px; }
.navlink:hover { color: var(--fg); background: var(--surface-2); }
table.keys { border-collapse: collapse; width: 100%; margin-top: 10px; font-size: 15px; }
table.keys td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
table.keys td:first-child { white-space: nowrap; padding-right: 18px; }
kbd { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

/* the recap as a printable report */
.printonly { display: none; }
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #f1f3f6; --line: #cfd5de; --fg: #111; --muted: #4a5361; color-scheme: light; }
  body { background: #fff; color: #111; padding: 0; }
  header, .banner, #s-recap .row, dialog { display: none !important; }
  .printonly { display: block; color: var(--muted); margin-top: 4px; }
  .panel, .stat { break-inside: avoid; box-shadow: none; }
  #s-recap h2::after { content: " · Onword"; font-weight: 400; color: #666; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.rtop .lamp.live { padding: 0; background: none; }
