/* ============================================================
   VERBATIM - Base, layout, components
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background-color: var(--bg-deep); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 50% -8%, rgba(98,230,200,0.05), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.ink-soft  { color: var(--ink-soft); }
.ink-faint { color: var(--ink-faint); }
.accent    { color: var(--accent); }

.wrap { width: 100%; max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--s5); }
.measure { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.section { padding: var(--s10) 0; position: relative; }
.section--tight { padding: var(--s9) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  color: var(--accent); font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(9, 12, 15, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--hairline-soft);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--s5); }
.wordmark { display: inline-flex; align-items: center; gap: var(--s3); font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.wordmark__mark { width: 26px; height: 26px; color: var(--accent); flex: 0 0 auto; filter: drop-shadow(0 0 10px var(--accent-glow)); }

.privacy-pill {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 7px 13px 7px 11px;
  border: 1px solid var(--hairline);
  background: rgba(22, 28, 34, 0.5);
  border-radius: var(--r-pill);
  font-size: 13px; color: var(--ink-soft); white-space: nowrap;
}
.privacy-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.privacy-pill svg { width: 14px; height: 14px; color: var(--accent); }
@media (max-width: 640px) { .privacy-pill .pill-long { display: none; } }

/* ============================================================
   Hero + tool (the centerpiece)
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: calc(var(--header-h) + var(--s7)) var(--s5) var(--s8); overflow: hidden; }
/* when the tool is working, let content flow from the top instead of centering */
.hero.tool-active { min-height: 100svh; justify-content: flex-start; padding-top: calc(var(--header-h) + var(--s8)); padding-bottom: var(--s10); }

/* WebGL canvas sits behind, concentrated upper-center */
.field { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.field canvas { width: 100%; height: 100%; display: block; }
/* CSS gradient fallback (also shown under canvas as base) */
.field__fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(95,224,196,0.16), transparent 70%),
    radial-gradient(40% 40% at 64% 30%, rgba(84,169,214,0.12), transparent 70%),
    radial-gradient(45% 45% at 36% 46%, rgba(154,146,228,0.10), transparent 72%);
  opacity: 0.9;
}
.hero::after { /* bottom vignette to settle content into page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%;
  background: linear-gradient(180deg, transparent, var(--bg-deep)); z-index: 1; pointer-events: none;
}

.hero__inner { position: relative; z-index: 2; width: 100%; max-width: 780px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__eyebrow { margin-bottom: var(--s5); }
.hero h1 { margin-bottom: var(--s4); text-wrap: balance; }
.hero__sub { color: var(--ink-soft); max-width: 30em; margin-bottom: var(--s7); text-wrap: pretty; }
.hero__sub b { color: var(--ink); font-weight: 600; }

/* The record orb - heart of the field */
.orb-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s5); margin-bottom: var(--s6); }
.orb-wrap { position: relative; width: 168px; height: 168px; display: grid; place-items: center; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--hairline); }
.orb-pulse { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; }

.orb {
  position: relative; z-index: 2;
  width: 116px; height: 116px; border-radius: 50%;
  background: radial-gradient(120% 120% at 50% 28%, var(--surface-2), #0d1216 78%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-2), inset 0 1px 1px rgba(255,255,255,0.04);
  display: grid; place-items: center; color: var(--ink);
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out);
}
.orb svg { width: 34px; height: 34px; transition: color var(--dur-2) var(--ease-out); }
.orb:hover { transform: translateY(-2px); border-color: var(--accent-strong); box-shadow: var(--shadow-2), 0 0 0 1px var(--accent-glow), 0 0 40px var(--accent-glow); }
.orb:active { transform: translateY(0) scale(0.985); }
.orb__label { position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--ink-faint); font-size: 13px; letter-spacing: 0.02em; }

/* listening state */
.is-listening .orb { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 50px var(--accent-glow); }
.is-listening .orb-pulse { animation: orb-pulse 2.4s var(--ease-out) infinite; }
@keyframes orb-pulse { 0% { opacity: 0.5; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
/* live amplitude ring driven by --level (0..1) via JS */
.orb-level { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: calc(0.25 + var(--level, 0) * 0.75); transform: scale(calc(1 + var(--level, 0) * 0.16)); transition: transform 90ms linear, opacity 90ms linear; display: none; }
.is-listening .orb-level { display: block; }
.is-listening .orb-stop { display: inline-flex; }

@media (prefers-reduced-motion: reduce) {
  .orb-pulse { animation: none !important; }
}

/* file affordance under orb */
.dropline { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 15px; white-space: nowrap; }
.dropline button { color: var(--accent); font-weight: 600; border-bottom: 1px solid transparent; transition: border-color var(--dur-1) var(--ease-out); }
.dropline button:hover { border-color: var(--accent); }
.hero__formats { color: var(--ink-faint); font-size: 12.5px; margin-top: var(--s2); white-space: nowrap; }
@media (max-width: 480px) { .dropline, .hero__formats { white-space: normal; text-align: center; } }

/* ============================================================
   Settings row (quiet, optional)
   ============================================================ */
.settings { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s2) var(--s5); margin-top: var(--s6); position: relative; z-index: 2; }
.setting { display: inline-flex; align-items: center; gap: var(--s3); }
.setting > label { color: var(--ink-faint); font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }

.select {
  position: relative; display: inline-flex; align-items: center;
  background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.select:hover { border-color: #2e3942; background: var(--surface-2); }
.select:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.select select {
  appearance: none; -webkit-appearance: none; background: transparent; border: none; color: var(--ink);
  font-family: var(--font-ui); font-size: 14px; font-weight: 500; padding: 8px 38px 8px 13px; border-radius: var(--r-sm); cursor: pointer;
}
.select svg { position: absolute; right: 10px; width: 14px; height: 14px; color: var(--ink-faint); pointer-events: none; }

/* divider line below hero settings on mobile */
@media (max-width: 560px) {
  .settings { flex-direction: column; gap: var(--s4); align-items: stretch; max-width: 320px; margin-left: auto; margin-right: auto; }
  .setting { justify-content: space-between; }
  .select { flex: 0 0 auto; }
}

/* ============================================================
   Tool panel (download / processing / result)
   ============================================================ */
.panel {
  position: relative; z-index: 2;
  width: 100%; max-width: 860px; margin: var(--s7) auto 0;
  background: linear-gradient(180deg, rgba(16,21,26,0.86), rgba(13,17,21,0.86));
  border: 1px solid var(--hairline); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  text-align: left;
}
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s5) var(--s6); border-bottom: 1px solid var(--hairline-soft); }
.panel__head .t-mono { white-space: nowrap; }
.panel__title { display: flex; align-items: center; gap: var(--s3); }
.panel__title h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.panel__body { padding: var(--s6); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.status-dot--live { animation: blink 1.4s var(--ease-in-out) infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .status-dot--live { animation: none; } }

/* progress */
.progress { display: flex; flex-direction: column; gap: var(--s3); }
.progress__bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; position: relative; }
.progress__fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent-strong), var(--accent)); width: 0%; transition: width var(--dur-3) var(--ease-out); box-shadow: 0 0 16px var(--accent-glow); }
.progress__fill.is-indeterminate { width: 36% !important; animation: indet 1.5s var(--ease-in-out) infinite; }
@keyframes indet { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .progress__fill.is-indeterminate { animation: none; width: 100% !important; opacity: 0.6; } }
.progress__meta { display: flex; justify-content: space-between; align-items: baseline; }
.progress__meta .pct { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); font-size: 14px; }

.note { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r-md); background: rgba(98,230,200,0.05); border: 1px solid rgba(98,230,200,0.14); color: var(--ink-soft); font-size: 14px; }
.note svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }

/* ============================================================
   Transcript editor + segments
   ============================================================ */
.transcript-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.seg-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 3px; }
.seg-toggle button { padding: 7px 16px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: color var(--dur-1) var(--ease-out); white-space: nowrap; }
.seg-toggle button[aria-pressed="true"] { background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow-1); }

.exports { display: inline-flex; gap: var(--s2); flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 9px 15px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; border: 1px solid var(--hairline); background: var(--surface-2); color: var(--ink); transition: all var(--dur-1) var(--ease-out); white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: #36424b; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; }
.btn--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); box-shadow: 0 0 30px var(--accent-glow); }
.btn--sm { padding: 7px 11px; font-size: 13px; }
.btn.is-confirmed { color: var(--success); border-color: rgba(132,214,162,0.4); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.transcript-doc {
  margin-top: var(--s5); padding: var(--s6); border-radius: var(--r-lg);
  background: rgba(7,10,13,0.5); border: 1px solid var(--hairline-soft);
  max-height: 420px; overflow-y: auto;
}
.transcript-doc[contenteditable="true"] { outline: none; }
.transcript-doc[contenteditable="true"]:focus-within { border-color: var(--hairline); box-shadow: inset 0 0 0 1px var(--hairline); }
.transcript-doc p { font-family: var(--font-read); font-size: 20px; line-height: 1.72; color: #DDE2E0; margin-bottom: 1.1em; }
.transcript-doc p:last-child { margin-bottom: 0; }
.transcript-doc p::selection, .transcript-doc *::selection { background: rgba(98,230,200,0.22); }

/* live caption interim text */
.interim { color: var(--ink-faint); font-style: italic; }
.interim::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: var(--accent); vertical-align: text-bottom; animation: caret 1s step-end infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* segment list */
.segments { margin-top: var(--s5); display: flex; flex-direction: column; }
.segment { display: grid; grid-template-columns: 96px 1fr; gap: var(--s4); padding: var(--s4) var(--s4); border-radius: var(--r-md); transition: background var(--dur-1) var(--ease-out); }
.segment + .segment { border-top: 1px solid var(--hairline-soft); }
.segment:hover { background: rgba(98,230,200,0.04); }
.segment__time { font-family: var(--font-mono); font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 4px; }
.segment__text { font-family: var(--font-read); font-size: 18px; line-height: 1.65; color: #D7DCDA; }
.segment:hover .segment__time { color: var(--accent); }

/* dropzone overlay (drag-over of whole hero) */
.dropzone-overlay { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: rgba(7,10,13,0.78); backdrop-filter: blur(8px); }
.dropzone-overlay.is-active { display: grid; }
.dropzone-card { width: min(520px, 86vw); padding: var(--s8); border-radius: var(--r-xl); border: 2px dashed var(--accent); background: var(--surface-1); text-align: center; box-shadow: var(--shadow-pop); }
.dropzone-card svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: var(--s4); }

/* ============================================================
   Generic content sections
   ============================================================ */
.section__head { max-width: 640px; margin-bottom: var(--s8); }
.section__head .eyebrow { margin-bottom: var(--s4); }
.section__head h2 { margin-bottom: var(--s4); text-wrap: balance; }
.section__head p { color: var(--ink-soft); }
.section--center .section__head { margin-left: auto; margin-right: auto; text-align: center; }

/* Privacy band */
.privacy-band { position: relative; }
.privacy-band__card {
  border: 1px solid var(--hairline); border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(16,21,26,0.9), rgba(11,14,18,0.9));
  padding: var(--s9) var(--s8);
  position: relative; overflow: hidden;
}
.privacy-band__card::before { content:""; position: absolute; inset: 0; background: radial-gradient(70% 120% at 50% -10%, rgba(98,230,200,0.08), transparent 60%); pointer-events: none; }
.privacy-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s7); margin-top: var(--s7); position: relative; }
.privacy-point .pp-icon { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: rgba(98,230,200,0.08); border: 1px solid rgba(98,230,200,0.18); color: var(--accent); margin-bottom: var(--s4); }
.privacy-point .pp-icon svg { width: 20px; height: 20px; }
.privacy-point h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: var(--s2); letter-spacing: -0.01em; }
.privacy-point p { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 720px) { .privacy-points { grid-template-columns: 1fr; gap: var(--s6); } .privacy-band__card { padding: var(--s7) var(--s5); } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); counter-reset: step; }
.step { position: relative; padding-top: var(--s6); border-top: 1px solid var(--hairline); }
.step__num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: var(--s4); }
.step h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: var(--s3); letter-spacing: -0.015em; }
.step p { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; gap: var(--s7); } }

/* Features grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline-soft); border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); overflow: hidden; }
.feature { background: var(--bg); padding: var(--s6); transition: background var(--dur-2) var(--ease-out); }
.feature:hover { background: var(--surface-1); }
.feature__icon { width: 34px; height: 34px; color: var(--accent); margin-bottom: var(--s4); }
.feature__icon svg { width: 100%; height: 100%; stroke-width: 1.5; }
.feature h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: var(--s2); letter-spacing: -0.01em; }
.feature p { color: var(--ink-soft); font-size: 14.5px; }
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .features { grid-template-columns: 1fr; } }

/* Use cases */
.usecases { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s4); }
.usecase { padding: var(--s5); border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-1); transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
.usecase:hover { transform: translateY(-3px); border-color: #2f3a42; }
.usecase__icon { color: var(--accent); margin-bottom: var(--s5); }
.usecase__icon svg { width: 22px; height: 22px; stroke-width: 1.5; }
.usecase h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: var(--s2); }
.usecase p { color: var(--ink-faint); font-size: 13px; line-height: 1.5; }
@media (max-width: 900px) { .usecases { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .usecases { grid-template-columns: repeat(2, 1fr); } }

/* FAQ */
.faq { border-top: 1px solid var(--hairline); }
.faq__item { border-bottom: 1px solid var(--hairline); }
.faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s5) 0; text-align: left; font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); transition: color var(--dur-1) var(--ease-out); }
.faq__q:hover { color: var(--accent); }
.faq__icon { flex: 0 0 auto; width: 20px; height: 20px; position: relative; }
.faq__icon::before, .faq__icon::after { content:""; position: absolute; background: currentColor; border-radius: 2px; transition: transform var(--dur-2) var(--ease-out); }
.faq__icon::before { top: 9px; left: 2px; right: 2px; height: 2px; }
.faq__icon::after { left: 9px; top: 2px; bottom: 2px; width: 2px; }
.faq__item.is-open .faq__icon::after { transform: scaleY(0); }
.faq__a { overflow: hidden; max-height: 0; transition: max-height var(--dur-3) var(--ease-in-out); }
.faq__a-inner { padding: 0 0 var(--s5); color: var(--ink-soft); max-width: 62ch; }
.faq__a-inner b { color: var(--ink); font-weight: 600; }

/* Footer */
.footer { border-top: 1px solid var(--hairline); padding: var(--s8) 0 var(--s8); background: var(--bg-deep); }
.footer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s6); flex-wrap: wrap; }
.footer__tag { color: var(--ink-soft); font-size: 14px; max-width: 34ch; margin-top: var(--s3); }
.footer__meta { color: var(--ink-faint); font-size: 13px; line-height: 1.7; }
.footer__meta a { color: var(--ink-soft); border-bottom: 1px solid var(--hairline); }
.footer__meta a:hover { color: var(--accent); border-color: var(--accent); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--hairline-soft); color: var(--ink-faint); font-size: 13px; flex-wrap: wrap; }

/* ============================================================
   Toast / inline error
   ============================================================ */
.toast-zone { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: var(--s3); align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: var(--s3); padding: 12px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: var(--shadow-pop); font-size: 14px; transform: translateY(16px); opacity: 0; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); pointer-events: auto; }
.toast.is-in { transform: translateY(0); opacity: 1; }
.toast svg { width: 16px; height: 16px; }
.toast--ok svg { color: var(--success); }
.toast--err { border-color: rgba(235,149,140,0.4); }
.toast--err svg { color: var(--danger); }

.inline-error { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r-md); background: var(--danger-soft); border: 1px solid rgba(235,149,140,0.3); color: #F0B7B1; font-size: 14px; }
.inline-error svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--danger); margin-top: 1px; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }
/* frozen-compositor failsafe (background tab / static capture): snap visible */
html.anim-static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ============================================================
   State previewer (review aid)
   ============================================================ */
.state-peek { position: fixed; right: 18px; bottom: 18px; z-index: 95; font-family: var(--font-ui); }
.state-peek__toggle { display: inline-flex; align-items: center; gap: var(--s2); padding: 9px 13px; border-radius: var(--r-pill); background: rgba(16,21,26,0.92); border: 1px solid var(--hairline); color: var(--ink-soft); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-2); backdrop-filter: blur(10px); }
.state-peek__toggle svg { width: 14px; height: 14px; color: var(--accent); }
.state-peek__menu { position: absolute; right: 0; bottom: 46px; width: 210px; background: rgba(13,17,21,0.96); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: var(--s2); display: none; backdrop-filter: blur(14px); }
.state-peek.is-open .state-peek__menu { display: block; }
.state-peek__menu .sp-label { padding: var(--s3) var(--s3) var(--s2); color: var(--ink-faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.state-peek__menu button { display: flex; width: 100%; align-items: center; gap: var(--s3); padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-soft); font-size: 13.5px; text-align: left; transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.state-peek__menu button:hover { background: var(--surface-2); color: var(--ink); }
.state-peek__menu button.is-current { color: var(--accent); }
.state-peek__menu button .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5; }

/* visibility helpers */
[hidden] { display: none !important; }
.fade-swap { animation: fade-swap var(--dur-3) var(--ease-out); }
@keyframes fade-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-swap { animation: none; } }
/* frozen-compositor failsafe: keyframe entrances would stick at opacity 0 */
html.anim-static .fade-swap { animation: none !important; }
html.anim-static .status-dot--live, html.anim-static .orb-pulse, html.anim-static .progress__fill.is-indeterminate { animation: none !important; }
