/* CiteSieve by Braivex. Base identity: Braivex tokens (public/brand/braivex.css), Assistant, black and cyan.
   CiteSieve's own device is the mesh: a band of perforations that answers pass through.
   Motion: transform and opacity only; 100/150/200/300 ms; ease-out in, ease-in out; nothing loops for decoration. */
@font-face { font-family: 'Assistant'; src: url('/brand/Assistant-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Assistant'; src: url('/brand/Assistant-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #000000; --panel: #0a0a0a; --panel-2: #0a0d12;
  --ink: #ffffff; --ink-70: #b0b0b0; --ink-55: #999999;
  --accent: #00f0ff; --accent-2: #0055ff; --on-accent: #04070a;
  --line: rgba(255, 255, 255, .1); --line-strong: rgba(255, 255, 255, .22);
  /* The edge of a form control is the only thing that marks it out on the dark panel: about 4.3:1 against it (WCAG 1.4.11 asks 3:1). */
  --line-field: rgba(255, 255, 255, .45);
  --good: #6ee7a8; --warn: #ffd27a; --bad: #ff8f8f;
  --radius: 4px; --radius-lg: 16px; --max: 1200px;
  --motion-100: 100ms; --motion-150: 150ms; --motion-200: 200ms; --motion-300: 300ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.7, 0, .84, 0);
  --mesh: radial-gradient(circle, var(--accent) 1.1px, transparent 1.7px);
  --mesh-dim: radial-gradient(circle, rgba(255, 255, 255, .34) 1px, transparent 1.6px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #7ff7ff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-55); } .soft { color: var(--ink-70); } .small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript, .plain-page { max-width: 560px; margin: 15vh auto; padding: 0 24px; display: grid; gap: 16px; }
.skip { position: absolute; left: 12px; top: 12px; z-index: 10; padding: 10px 16px; background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: var(--radius); transform: translateY(-200%); }
.skip:focus { transform: none; color: var(--on-accent); }
main:focus { outline: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }
.stack { display: grid; gap: 16px; } .stack-lg { display: grid; gap: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }

/* the mesh: CiteSieve's device */
.mesh { height: 14px; background: var(--mesh) 0 0 / 10px 7px; opacity: .9; }
.mesh-rule { height: 7px; background: var(--mesh-dim) 0 0 / 10px 7px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; transition: opacity var(--motion-150) var(--ease-out), transform var(--motion-100) var(--ease-out); }
.btn:hover { color: var(--ink); border-color: var(--ink-70); }
.btn:active { transform: scale(.98); }
.btn-primary { position: relative; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:not([disabled])::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 1px rgba(0, 240, 255, .5), 0 10px 44px rgba(0, 240, 255, .5); opacity: 0; transition: opacity var(--motion-300) var(--ease-out); pointer-events: none; }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover { color: var(--on-accent); border-color: var(--accent); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { color: var(--bad); border-color: var(--bad); opacity: .85; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-quiet { border-color: transparent; color: var(--ink-70); padding: 0 10px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; }
.linkish { display: inline-flex; align-items: center; min-height: 24px; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-align: left; justify-self: start; }

/* forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 14px; color: var(--ink-70); }
.input { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line-field); border-radius: var(--radius); color: var(--ink); }
.input::placeholder { color: #7d7d7d; }
.input[aria-invalid='true'] { border-color: var(--bad); }
.field > .field-err { color: var(--bad); font-size: 14px; }
.copyable { user-select: all; overflow-wrap: anywhere; }
.form-head h2 { font-size: 22px; line-height: 1.25; }
.input:focus-visible { outline-offset: 0; border-color: var(--accent); }
textarea.input { min-height: 72px; resize: vertical; }
.hint { font-size: 14px; color: var(--ink-55); }
.msg { padding: 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--warn); border-radius: var(--radius); background: var(--panel); font-size: 15px; }
.msg-bad { border-left-color: var(--bad); } .msg-good { border-left-color: var(--good); } .msg-info { border-left-color: var(--accent); }

/* brand lockup */
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.lockup:hover { color: var(--ink); }
.lockup b { font-size: 20px; letter-spacing: -.01em; line-height: 1; }
.lockup small { display: block; font-size: 12px; color: var(--ink-55); line-height: 1.2; margin-top: 2px; }
.mark { width: 30px; height: 30px; flex: none; }

/* ---------- landing ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 18px; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.topbar nav a:not(.btn) { color: var(--ink-70); text-decoration: none; font-size: 16px; }
.topbar nav a:not(.btn):hover { color: var(--ink); }
.hero { display: grid; gap: 40px; padding-block: 40px 72px; align-items: start; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.028em; font-weight: 700; text-wrap: balance; }
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-70); max-width: 34em; text-wrap: pretty; }
.report-form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }
.report-form .wide { grid-column: 1 / -1; }
.section { padding-block: 72px; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.02em; max-width: 22em; text-wrap: balance; }
.section .lede { color: var(--ink-70); max-width: 40em; margin-top: 12px; }
.facts { display: grid; gap: 0; margin-top: 36px; border-top: 1px solid var(--line); }
.facts > div { display: grid; gap: 4px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; font-size: 19px; }
.facts dd { color: var(--ink-70); max-width: 44em; }
.plans-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--ink-55) transparent; border-radius: var(--radius); }
/* Each card's five rows (name, price, saving, features, action) sit on the row's shared tracks via subgrid, so prices and buttons line up across cards whatever wraps. */
.plans { display: grid; grid-auto-flow: column; grid-auto-columns: min(250px, 78%); grid-template-rows: repeat(5, auto); column-gap: 12px; row-gap: 8px; }
.plan { grid-row: span 5; scroll-snap-align: start; display: grid; grid-template-rows: subgrid; padding: 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.plan.is-current { border-color: var(--accent); }
.plan h3 { font-size: 17px; line-height: 1.2; }
.plan .price { font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.plan .price small { font-size: 13px; font-weight: 400; color: var(--ink-55); letter-spacing: 0; white-space: nowrap; }
.plan-saving { color: var(--good); line-height: 1.3; }
.plan li { padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; color: var(--ink-70); }
.plan-foot { display: grid; gap: 4px; justify-items: start; align-content: start; min-height: 76px; padding-top: 6px; }
.plan-foot .btn { width: 100%; padding: 0 8px; }
.packs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.packs .plan { grid-row: auto; grid-template-rows: none; align-content: start; gap: 8px; }
.seg { display: inline-flex; justify-self: start; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; }
.seg button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-70); font-size: 15px; }
.seg button[aria-pressed='true'] { background: var(--ink); color: #000; font-weight: 700; }
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--ink-55); font-size: 15px; }
.footer-grid { display: grid; gap: 32px 28px; grid-template-columns: minmax(0, 1fr); }
.footer-brand { display: grid; gap: 10px; align-content: start; justify-items: start; }
.footer-tagline { color: var(--ink); font-weight: 700; font-size: 17px; }
.footer-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent); font-weight: 700; text-decoration: none; }
.footer-cta:hover { text-decoration: underline; }
.footer-col h2 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-70); margin-bottom: 8px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-70); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; display: grid; gap: 6px; }
@media (min-width: 560px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: auto; } }
.wrap.unsub { max-width: 640px; padding-top: 48px; padding-bottom: 72px; display: grid; gap: 16px; justify-items: start; }
.unsub h1 { font-size: 28px; line-height: 1.2; }

/* ---------- the sieve stage (the one orchestrated motion moment) ---------- */
.sieve { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.sieve-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-55); }
.sieve-q { padding: 16px 18px 0; font-weight: 700; }
.sieve-answer { padding: 10px 18px 18px; color: var(--ink-70); font-size: 16px; max-height: 15.5em; overflow: hidden; position: relative; white-space: pre-wrap; }
.sieve-answer.is-long::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3.2em; background: linear-gradient(transparent, var(--panel)); }
.hit { position: relative; color: var(--ink); font-weight: 700; white-space: nowrap; }
.hit::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink-55); transform-origin: left; }
.hit.is-you::after { background: var(--accent); }
.sieve-out { display: grid; gap: 18px; padding: 18px; }
.sieve-out h2 { font-size: 14px; font-weight: 400; color: var(--ink-55); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 3px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 15px; background: var(--bg); max-width: 100%; }
.chip .pos { color: var(--ink-55); font-variant-numeric: tabular-nums; }
.chip.is-you { border-color: var(--accent); color: var(--accent); }
.chip.is-you .pos { color: var(--accent); }
.chip.is-tracked { border-style: dashed; }
.sieve.is-playing .sieve-answer { animation: cs-fade var(--motion-300) var(--ease-out) both; }
.sieve.is-playing .hit::after { animation: cs-underline var(--motion-300) var(--ease-out) both; animation-delay: 350ms; }
.sieve.is-playing .mesh { animation: cs-fade var(--motion-200) var(--ease-out) both; animation-delay: 500ms; }
.sieve.is-playing .chip { animation: cs-drop var(--motion-300) var(--ease-out) both; animation-delay: calc(700ms + var(--i, 0) * 90ms); }
.chip:nth-child(1) { --i: 0; } .chip:nth-child(2) { --i: 1; } .chip:nth-child(3) { --i: 2; } .chip:nth-child(4) { --i: 3; } .chip:nth-child(5) { --i: 4; } .chip:nth-child(6) { --i: 5; } .chip:nth-child(7) { --i: 6; } .chip:nth-child(n+8) { --i: 7; }
.sieve-out > div:nth-child(2) .chip { animation-delay: calc(1100ms + var(--i, 0) * 90ms); }
@keyframes cs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cs-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cs-drop { from { opacity: 0; transform: translateY(-22px); } to { opacity: 1; transform: translateY(0); } }

/* progress (functional: shows ongoing work) */
.progress { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }
.progress li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-55); font-size: 15px; }
.progress li.is-on { color: var(--ink); }
.progress li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink-55); flex: none; transform: translateY(-1px); }
.progress li.is-on::before { background: var(--accent); border-color: var(--accent); animation: cs-pulse 1200ms ease-in-out infinite; }
.progress li.is-done::before { background: var(--ink-55); }
@keyframes cs-pulse { 50% { opacity: .35; } }

/* ---------- results, tables, metrics ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; min-width: 0; }
.panel > h2, .panel > h3 { font-size: 18px; margin-bottom: 4px; }
.grid-2 { display: grid; gap: 16px; } .grid-3 { display: grid; gap: 16px; }
.figure { font-size: clamp(44px, 7vw, 72px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.figure-2 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.ival { position: relative; height: 22px; margin: 10px 0 4px; }
.ival::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 7px; background: var(--mesh-dim) 0 0 / 10px 7px; }
.ival-band { position: absolute; top: 5px; height: 11px; background: rgba(0, 240, 255, .22); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.ival-point { position: absolute; top: 0; width: 3px; height: 22px; margin-left: -1.5px; background: var(--ink); }
.ival-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-55); }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--ink-70); white-space: nowrap; }
.tag-you { border-color: var(--accent); color: var(--accent); }
.tag-good { border-color: var(--good); color: var(--good); } .tag-bad { border-color: var(--bad); color: var(--bad); } .tag-warn { border-color: var(--warn); color: var(--warn); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 400; color: var(--ink-55); font-size: 13px; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table .r { text-align: right; }
.table-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--ink-55) transparent; }
.bar { height: 8px; background: rgba(255, 255, 255, .08); border-radius: 2px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--ink-55); transform-origin: left; }
.bar.is-you > i { background: var(--accent); }
.split { display: flex; height: 10px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.split i { display: block; height: 100%; } .split .pos-s { background: var(--good); } .split .neu-s { background: var(--ink-55); } .split .neg-s { background: var(--bad); }
.dots { display: flex; flex-wrap: wrap; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink-55); }
.dot.is-hit { background: var(--accent); border-color: var(--accent); }
.chart { width: 100%; min-width: 560px; height: auto; display: block; }
.chart text { fill: var(--ink-55); font-size: 11px; font-family: inherit; }
.empty { display: grid; gap: 12px; justify-items: start; padding: 36px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty h2, .empty h3 { font-size: 22px; }
.empty p { color: var(--ink-70); max-width: 34em; }
.answer-text { white-space: pre-wrap; color: var(--ink-70); font-size: 16px; max-width: 46em; }
/* Credits: the balance chip in the app header, the engine filter, the engine list in Settings. */
.app-top { display: flex; justify-content: flex-end; }
.credit-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--ink); text-decoration: none; font-size: 15px; }
.credit-chip:hover { color: var(--ink); border-color: var(--ink-70); }
.credit-chip.is-low { border-color: var(--warn); } .credit-chip.is-zero { border-color: var(--bad); }
.credit-chip-state { font-size: 13px; color: var(--warn); } .credit-chip.is-zero .credit-chip-state { color: var(--bad); }
.credit-chip.is-unknown { color: var(--ink-70); }
.bad-text { color: var(--bad); }
.engine-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-70); }
.engine-pick .input { width: auto; min-height: 40px; padding-top: 0; padding-bottom: 0; }
.engine-list { display: grid; gap: 4px; border: 0; padding: 0; margin: 0; }
.engine-opt { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; }
.engine-opt input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: #00f0ff; }
.forecast { gap: 8px; }
.progress p { font-size: 15px; }
.progress ol { gap: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--ink-55); } .kv dd { min-width: 0; overflow-wrap: anywhere; }
details.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
details.acc > summary { cursor: pointer; padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; list-style: none; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > .acc-body { padding: 0 18px 18px; display: grid; gap: 16px; }
.check { display: grid; grid-template-columns: 72px 1fr; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check .fix { color: var(--ink); } .check p { font-size: 15px; color: var(--ink-70); }

/* ---------- app shell ---------- */
.shell { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr); }
.side { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.side nav { display: flex; flex-wrap: wrap; gap: 4px; }
.side nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--radius); color: var(--ink-70); text-decoration: none; font-size: 15px; }
.side nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.side nav a[aria-current='page'] { color: var(--ink); font-weight: 700; background: rgba(0, 240, 255, .1); box-shadow: inset 2px 0 0 var(--accent); }
.side-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; color: var(--ink-55); }
.main { padding: 24px 20px 64px; min-width: 0; display: grid; gap: 24px; align-content: start; }
.page-head { display: grid; gap: 10px; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.1; }
.page-head p { color: var(--ink-70); max-width: 44em; }
.view { animation: cs-fade var(--motion-200) var(--ease-out) both; display: grid; gap: 24px; min-width: 0; }
.prompt-row { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.prompt-row:first-child { border-top: 1px solid var(--line); }
.loading { color: var(--ink-55); padding: 24px 0; }

@media (min-width: 720px) {
  .facts > div { grid-template-columns: 260px 1fr; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sieve-out { grid-template-columns: 1fr 1fr; }
  .prompt-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}
@media (min-width: 1200px) {
  .plans-scroll { overflow-x: visible; padding-bottom: 0; }
  /* The column count comes from a data attribute, not an inline style: the page is server-rendered and the CSP allows no inline style. */
  .plans[data-plans="1"] { --plans: 1; } .plans[data-plans="2"] { --plans: 2; } .plans[data-plans="3"] { --plans: 3; } .plans[data-plans="4"] { --plans: 4; } .plans[data-plans="5"] { --plans: 5; } .plans[data-plans="6"] { --plans: 6; } .plans[data-plans="7"] { --plans: 7; } .plans[data-plans="8"] { --plans: 8; }
  .plans { grid-template-columns: repeat(var(--plans, 6), minmax(0, 1fr)); grid-auto-columns: auto; column-gap: 10px; }
  .plans-hint { display: none; }
}
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; padding-top: 56px; }
  .shell { grid-template-columns: 232px minmax(0, 1fr); }
  .main { border-left: 1px solid var(--line); }
  .side { border-bottom: 0; align-content: start; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px; gap: 22px; }
  .side nav { display: grid; gap: 2px; }
  .side-foot { display: grid; margin-top: auto; }
  .main { padding: 36px 40px 80px; }
  .main > * { max-width: 1020px; }
  .main > .view-wide { max-width: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .report-form { grid-template-columns: 1fr; padding: 16px; }
  .panel { padding: 16px; }
  .check { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 56px; }
  .side { padding: 14px 16px; }
}

/* ---------- landing page finish (class .lp on <main>) ---------- */
.topbar-shell { position: relative; z-index: 6; border-bottom: 1px solid transparent; }
.topbar-shell::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity var(--motion-300) var(--ease-out); z-index: -1; }
.topbar-shell.is-stuck::before { opacity: 1; }
.topbar nav .nav-opt { display: none; }
.hero-shell { position: relative; isolation: isolate; }
.hero-bg { position: absolute; inset: -90px 0 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-bg::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 55% at 78% 8%, rgba(0, 85, 255, .34), transparent 70%), radial-gradient(42% 40% at 18% 0%, rgba(0, 240, 255, .16), transparent 70%); }
.hero-bg::after { content: ''; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(transparent, var(--bg)); }
.mesh-field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 80%); mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 80%); }
.lp .hero h1 { font-size: clamp(38px, 5.9vw, 76px); line-height: 1; letter-spacing: -.036em; max-width: 15em; }
.lp .hero { row-gap: 32px; }
.lp .report-form, .lp .sieve, .lp .progress { border-radius: var(--radius-lg); border-color: var(--line-strong); background: linear-gradient(180deg, rgba(18, 22, 30, .92), rgba(8, 9, 12, .94)); box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .6); }
.lp .report-form { padding: 24px; gap: 14px; }
.lp .sieve { overflow: hidden; }
.lp .sieve-head { padding: 14px 22px; }
.lp .sieve-q { padding: 20px 22px 0; font-size: 19px; }
.lp .sieve-answer { padding: 10px 22px 20px; }
.lp .sieve-out { padding: 22px; }
.lp .input { border-radius: 10px; background: rgba(0, 0, 0, .55); }
.engines { display: grid; gap: 14px; padding-top: 4px; padding-bottom: 72px; }
.engines p { font-size: 14px; color: var(--ink-55); }
.engines ul { display: flex; flex-wrap: wrap; gap: 10px; }
.engines li { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-70); font-size: 15px; background: rgba(255, 255, 255, .025); }
.lp .section { padding-block: 88px; border-top: 0; position: relative; }
.lp .section::before { content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 7px; background: var(--mesh-dim) 0 0 / 10px 7px; opacity: .5; -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); }
.lp .section h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.06; letter-spacing: -.028em; }
.lp .section .lede { font-size: clamp(17px, 1.5vw, 19px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 32px; }

/* cards, with a light that follows the pointer */
.card { position: relative; overflow: hidden; display: grid; gap: 10px; align-content: start; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); }
.card h3 { font-size: 21px; line-height: 1.2; letter-spacing: -.012em; }
.card p { color: var(--ink-70); }
.spot::before, .lp .plan::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 240, 255, .14), transparent 62%); opacity: 0; transition: opacity var(--motion-300) var(--ease-out); pointer-events: none; }
.spot::after, .lp .plan::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 240, 255, .9), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; transition: opacity var(--motion-300) var(--ease-out); pointer-events: none; }
.spot:hover::before, .spot:hover::after, .lp .plan:hover::before, .lp .plan:hover::after { opacity: 1; }
.steps { display: grid; gap: 28px; margin-top: 48px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line-strong); position: relative; }
.steps li::before { content: counter(step); font-size: 15px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps li::after { content: ''; position: absolute; left: 0; top: -1px; width: 56px; height: 1px; background: var(--accent); }
.steps h3 { font-size: 21px; line-height: 1.2; letter-spacing: -.012em; }
.steps p { color: var(--ink-70); }
.bento { display: grid; gap: 14px; margin-top: 56px; }
.ival-demo { position: relative; height: 22px; margin-top: 14px; max-width: 420px; background: var(--mesh-dim) 0 7px / 10px 7px repeat-x; }
.ival-demo i { position: absolute; left: 34%; width: 27%; top: 5px; height: 11px; background: rgba(0, 240, 255, .22); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.ival-demo b { position: absolute; left: 46%; top: 0; width: 3px; height: 22px; background: var(--ink); }
.lp .plan { position: relative; overflow: hidden; border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); padding: 20px 16px; }
.lp .plan > * { position: relative; }
.guides { display: grid; gap: 14px; margin-top: 44px; }
.guide { gap: 12px; padding-bottom: 24px; }
.guide h3 a { color: var(--ink); text-decoration: none; }
.guide h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.guide h3 a:focus-visible { outline: none; }
.guide:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-kind { justify-self: start; display: inline-flex; align-items: center; min-height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--ink-70); }
.guide-lead .guide-kind { border-color: var(--accent); color: var(--accent); }
.guide-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--accent); font-weight: 700; font-size: 15px; }
.arrow { transition: transform var(--motion-200) var(--ease-out); }
.guide:hover .arrow { transform: translateX(5px); }
.guide-lead h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.12; letter-spacing: -.02em; }

/* questions: a native disclosure, so it opens without JavaScript */
.faq-section { display: grid; gap: 28px; }
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding: 22px 2px; font-weight: 700; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.3; transition: opacity var(--motion-150) var(--ease-out); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { opacity: .8; }
.faq-icon { flex: none; position: relative; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink-70); }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: currentColor; transition: transform var(--motion-300) var(--ease-out); }
.faq-icon::after { transform: rotate(90deg); }
.faq details[open] .faq-icon { border-color: var(--accent); color: var(--accent); }
.faq details[open] .faq-icon::after { transform: rotate(0deg); }
.faq-a { padding: 0 60px 26px 2px; color: var(--ink-70); max-width: 46em; }
.faq details[open] .faq-a { animation: cs-rise var(--motion-300) var(--ease-out) both; }
@keyframes cs-rise { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.closer-wrap { padding-top: 24px; padding-bottom: 104px; }
.closer { position: relative; overflow: hidden; display: grid; gap: 16px; justify-items: start; padding: clamp(32px, 6vw, 72px); border: 1px solid var(--line-strong); border-radius: 24px; background: radial-gradient(70% 120% at 100% 0%, rgba(0, 85, 255, .42), transparent 62%), radial-gradient(50% 90% at 0% 100%, rgba(0, 240, 255, .14), transparent 70%), var(--panel); }
.closer h2 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -.03em; max-width: 14em; text-wrap: balance; }
.closer p { color: var(--ink-70); font-size: clamp(17px, 1.5vw, 19px); max-width: 34em; }
.closer > * { position: relative; }

/* sections below the fold ease in once (class added by script, so nothing is hidden without it) */
.rv { opacity: 0; transform: translateY(22px); }
.rv.in { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }

@media (min-width: 720px) {
  .topbar nav .nav-opt { display: inline-flex; align-items: center; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento > li { grid-column: span 3; }
  .bento > .bento-wide { grid-column: span 3; }
  .bento > .bento-full { grid-column: 1 / -1; }
  .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-lead { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .topbar-shell { position: sticky; top: 0; }
  .lp .hero h1 { grid-column: 1 / -1; }
  .lp .hero { row-gap: 44px; padding-top: 72px; }
  .hero-side { position: sticky; top: 104px; }
  .lp .section { padding-block: 112px; }
  .bento > li { grid-column: span 2; }
  .bento > .bento-wide { grid-column: span 4; }
  .guides { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .guide-lead { grid-column: span 2; grid-row: span 2; align-content: end; padding: 36px; background: linear-gradient(180deg, transparent 30%, #06080c 78%), radial-gradient(90% 80% at 100% 0%, rgba(0, 85, 255, .4), transparent 65%), radial-gradient(circle, rgba(255, 255, 255, .22) 1px, transparent 1.6px) 0 0 / 22px 22px, #06080c; }
  .faq-section { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .faq-head { position: sticky; top: 112px; }
}
@media (max-width: 480px) {
  .lp .section { padding-block: 64px; }
  .lp .section::before { left: 16px; right: 16px; }
  .card { padding: 22px; }
  .faq-a { padding-right: 8px; }
  .lp .report-form { padding: 18px; }
}
/* Where the browser can animate to an automatic height, the answer opens and closes smoothly. */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size var(--motion-300) var(--ease-out), content-visibility var(--motion-300) allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}

/* ---------- guides: /guides and /guides/<slug> (static pages, no script) ---------- */
.blog-more { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.blog-more h3 { font-size: 17px; color: var(--ink-70); font-weight: 400; }
.blog-more ul { display: grid; gap: 4px 32px; }
.blog-more li a, .linklist li > a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.blog-more li a:hover, .linklist li > a:hover { color: var(--accent); text-decoration: underline; }
.linklist { display: grid; margin-top: 28px; border-top: 1px solid var(--line); }
.linklist li { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.linklist li > a { font-weight: 700; font-size: 19px; }
.linklist li > span { color: var(--ink-70); max-width: 56em; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; color: var(--ink-55); }
.crumbs li + li::before { content: '/'; margin-right: 10px; color: var(--ink-55); }
.crumbs a { color: var(--ink-70); text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.article { padding-top: 40px; padding-bottom: 40px; }
.article-head { display: grid; gap: 18px; justify-items: start; padding-top: 28px; padding-bottom: 36px; }
.article-head h1, .guides-head h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -.032em; max-width: 17em; text-wrap: balance; }
.article-meta { color: var(--ink-55); font-size: 15px; }
.article-meta a { color: var(--ink-70); }
.guides-head { padding-top: 40px; padding-bottom: 24px; }
.guides-head .lede { color: var(--ink-70); font-size: clamp(17px, 1.5vw, 19px); max-width: 40em; }
.guides-plain { margin-top: 20px; }
.pricing-main { max-width: 980px; }
.pricing-main .table th[scope='row'] { white-space: nowrap; }
.guide-title { font-size: 21px; line-height: 1.2; letter-spacing: -.012em; }
.guide-title a { color: var(--ink); text-decoration: none; }
.guide-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.guide-title a:focus-visible { outline: none; }
.article-grid { display: grid; gap: 32px; }
.article-toc h2 { font-size: 14px; font-weight: 700; color: var(--ink-70); margin-bottom: 10px; }
.article-toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line-strong); }
.article-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-70); text-decoration: none; font-size: 15px; line-height: 1.35; }
.article-toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.article-main { min-width: 0; display: grid; gap: 28px; max-width: 760px; }
.answer-box { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; color: var(--ink); padding: 24px 26px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(0, 240, 255, .07), rgba(255, 255, 255, .012)); }
.keypoints { padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .025); }
.keypoints h2 { font-size: 17px; margin-bottom: 10px; }
.keypoints ul { display: grid; gap: 8px; }
.keypoints li { position: relative; padding-left: 20px; color: var(--ink-70); }
.keypoints li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.prose { display: grid; gap: 18px; font-size: 18px; line-height: 1.65; color: #d4d4d4; min-width: 0; }
.prose h2 { font-size: clamp(25px, 2.8vw, 34px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); margin-top: 28px; text-wrap: balance; }
.prose h3 { font-size: 21px; line-height: 1.25; color: var(--ink); margin-top: 10px; }
.prose strong, .prose th { color: var(--ink); }
.prose ul, .prose ol { display: grid; gap: 8px; padding-left: 24px; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li::marker { color: var(--accent); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--ink); overflow-wrap: anywhere; }
/* A paragraph that holds only code is a block to copy: line breaks are kept. */
.prose p > code:only-child, .prose li > code:only-child { display: block; white-space: pre-wrap; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #06080c; line-height: 1.6; }
.prose .table-scroll { border: 1px solid var(--line); border-radius: 12px; }
.prose .table { font-size: 15.5px; line-height: 1.5; min-width: 560px; }
.prose .table th, .prose .table td { padding: 12px 14px; white-space: normal; vertical-align: top; }
.prose .table th { background: rgba(255, 255, 255, .04); font-weight: 700; font-size: 14px; }
.prose .table tr:last-child td { border-bottom: 0; }
.prose td code, .prose th code { white-space: nowrap; overflow-wrap: normal; }
.article-faq h2, .sources h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.02em; margin-bottom: 16px; }
.article-faq, .sources { margin-top: 20px; }
.sources ol { list-style: decimal; padding-left: 24px; display: grid; gap: 8px; color: var(--ink-70); font-size: 16px; margin-bottom: 14px; }
.sources a { overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .blog-more ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guides-plain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .article-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 64px; align-items: start; }
  .article-toc { position: sticky; top: 104px; }
  .guides.guides-plain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 999px) { .article-toc { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); } }
@media (max-width: 480px) { .prose { font-size: 17px; } .answer-box, .keypoints { padding: 18px; } }
@media (pointer: coarse), (max-width: 820px) { .crumbs a, .blog-more li a, .linklist li > a { min-height: 44px; } .article-toc a { padding-top: 12px; padding-bottom: 12px; } }

/* Reduced motion: no translate or scale, no stagger, no pulsing; state is always also in text. */
@media (prefers-reduced-motion: reduce) {
  .sieve.is-playing .chip, .sieve.is-playing .sieve-out > div:nth-child(2) .chip, .sieve.is-playing .hit::after, .sieve.is-playing .mesh, .sieve.is-playing .sieve-answer, .view { animation: cs-fade var(--motion-100) linear both; animation-delay: 0ms; transform: none; }
  .progress li.is-on::before { animation: none; }
  .btn { transition: none; } .btn:active { transform: none; }
  .rv { opacity: 1; transform: none; }
  .faq details[open] .faq-a { animation: none; }
  .faq-icon::before, .faq-icon::after, .arrow, .spot::before, .spot::after, .lp .plan::before, .lp .plan::after, .btn-primary::after, .topbar-shell::before { transition: none; }
  .guide:hover .arrow { transform: none; }
  .faq details::details-content { transition: none; }
}

/* Touch: every control is at least 44 by 44 CSS px. (Everywhere else the floor is 24 px.) */
@media (pointer: coarse), (max-width: 820px) {
  .btn-small, .seg button, .side nav a, .footer-col a, .linkish, .credit-chip, .engine-pick .input, .footer-cta, .topbar nav a, .lockup { min-height: 44px; }
  .faq summary { min-height: 56px; }
  .btn-small, .seg button { min-width: 44px; }
  .footer-col a, .footer-cta, .topbar nav a, .lockup { display: inline-flex; align-items: center; }
  .engine-opt input[type='checkbox'] { width: 24px; height: 24px; }
  details.acc > summary { min-height: 44px; }
}
/* ---------- the interactive demo (section #demo, src/client/Demo.tsx) ----------
   Sample data only. No inline styles: a bar or marker carries data-v="0..100" and the rules at the end of this
   block turn that into --v. Motion: transform and opacity, 100/150/200/300 ms. The run is one sequence:
   the answer arrives word by word, the chips drop through the mesh, then the figures count and the bars grow. */
.demo-label { margin-top: 20px; padding-left: 12px; border-left: 2px solid var(--accent); font-size: 15px; color: var(--ink-70); }
.demo-grid { display: grid; gap: 14px; margin-top: 32px; }
.demo-pane { gap: 20px; min-width: 0; }
.demo-pane > * { min-width: 0; }
.demo-set { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.demo-set legend, .demo-legend { padding: 0; margin-bottom: 8px; font-size: 14px; color: var(--ink-70); }
.demo-set .demo-legend { margin-bottom: 0; }
.demo-q { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink-70); cursor: pointer; line-height: 1.3; }
.demo-q input { -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--ink-55); border-radius: 50%; cursor: pointer; }
.demo-q input:checked { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 4px, transparent 4.6px); }
.demo-q:has(input:checked) { border-color: var(--accent); background: rgba(0, 240, 255, .07); color: var(--ink); }
.demo-q:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.demo-q:has(input:focus-visible) input { outline: none; }
.demo-engines { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-eng { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink-70); font-size: 15px; }
.demo-eng::before { content: ''; flex: none; width: 8px; height: 8px; border: 1.5px solid var(--ink-55); border-radius: 50%; }
.demo-eng:hover { border-color: var(--ink-70); }
.demo-eng[aria-pressed='true'] { border-color: var(--accent); background: rgba(0, 240, 255, .08); color: var(--ink); }
.demo-eng[aria-pressed='true']::before { border-color: var(--accent); background: var(--accent); }
.demo-eng[aria-disabled='true'] { cursor: not-allowed; }

.demo-stage { min-width: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(0, 0, 0, .5); }
.demo-stage-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-55); }
.demo-pane .demo-prompt { padding: 16px 18px 0; font-weight: 700; color: var(--ink); }
.demo-pane .figure, .demo-pane .figure-2 { color: var(--ink); }
.demo-pane .demo-answer { padding: 8px 18px 18px; font-size: 16px; color: var(--ink-70); }
.demo-w, .demo .hit { transition: opacity var(--motion-150) var(--ease-out); }
.demo .hit::after { transition: transform var(--motion-300) var(--ease-out); }
.demo-answer [data-off] { opacity: 0; transition: none; }
.demo-answer .hit[data-off]::after { transform: scaleX(0); transition: none; }
.demo .mesh { transition: opacity var(--motion-300) var(--ease-out); }
.demo-out { display: grid; gap: 16px; padding: 18px; }
.demo h4 { margin: 0 0 8px; font-size: 14px; font-weight: 400; color: var(--ink-55); }

.demo-days { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; }
.demo-days label { font-size: 14px; color: var(--ink-70); }
.demo-days-value { font-size: 19px; font-weight: 700; }
.demo-range { -webkit-appearance: none; appearance: none; grid-column: 1 / -1; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; }
.demo-range::-webkit-slider-runnable-track { height: 2px; background: var(--line-field); }
.demo-range::-moz-range-track { height: 2px; background: var(--line-field); }
.demo-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border: 0; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(0, 240, 255, .28); }
.demo-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(0, 240, 255, .28); }
.demo-results { display: grid; gap: 14px; min-width: 0; transition: opacity var(--motion-200) var(--ease-out); }
.demo-sample { display: grid; gap: 10px; min-width: 0; }
.demo-dots { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px 3px; padding-inline: 3px; }
.demo-dots i { justify-self: center; width: 100%; max-width: 11px; aspect-ratio: 1; border: 1px solid var(--ink-55); border-radius: 50%; }
.demo-dots i.is-hit { border-color: var(--accent); background: var(--accent); }
.demo-dots i[data-off] { opacity: .28; }
.demo-n { color: var(--ink); }
.demo-block { min-width: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.demo-block > p + p { margin-top: 8px; }
.demo-pair { display: grid; gap: 16px 28px; }
.demo-ival { position: relative; height: 22px; margin: 12px 0 4px; overflow: hidden; }
.demo-ival::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 7px; background: var(--mesh-dim) 0 0 / 10px 7px; }
.demo-band, .demo-cap, .demo-point { position: absolute; inset: 0; transform: translateX(calc(var(--v) * 100%)); transition: transform var(--motion-200) var(--ease-out); }
.demo-band i { position: absolute; inset: 5px 0 6px; background: rgba(0, 240, 255, .22); transform: scaleX(var(--v)); transform-origin: left; transition: transform var(--motion-200) var(--ease-out); }
.demo-cap::before, .demo-point::before { content: ''; position: absolute; left: 0; top: 5px; width: 2px; height: 11px; background: var(--accent); }
.demo-cap.is-hi::before { left: -2px; }
.demo-point::before { left: -1px; top: 0; width: 3px; height: 22px; background: var(--ink); }
.demo-voice { display: grid; gap: 10px; margin-bottom: 10px; }
.demo-voice li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 15px; line-height: 1.3; }
.demo-voice .bar { grid-column: 1 / -1; }
.demo-voice .is-you .demo-voice-name { color: var(--accent); font-weight: 700; }
.demo .bar > i { transform: scaleX(var(--v)); transition: transform var(--motion-300) var(--ease-out); }
.demo-swap { animation: cs-fade var(--motion-150) var(--ease-out) both; }

/* the run: typing -> sieve -> count */
.demo[data-phase='typing'] .mesh { opacity: .3; }
.demo[data-phase='typing'] .demo-out .chip { opacity: 0; }
.demo[data-phase='sieve'] .demo-out .chip { animation: cs-drop var(--motion-300) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
.demo[data-phase='sieve'] .demo-out > div:nth-child(2) .chip { animation-delay: calc(360ms + var(--i, 0) * 90ms); }
.demo[data-phase='typing'] .demo-results, .demo[data-phase='sieve'] .demo-results { opacity: .4; transition: opacity var(--motion-150) var(--ease-in); }
.demo[data-phase='typing'] .bar > i, .demo[data-phase='sieve'] .bar > i, .demo[data-phase='typing'] .demo-band i, .demo[data-phase='sieve'] .demo-band i { transform: scaleX(0); transition: transform var(--motion-150) var(--ease-in); }
.demo[data-phase='count'] .demo-dots i:not([data-off]) { animation: cs-fade var(--motion-200) var(--ease-out) both; animation-delay: calc(var(--c, 0) * 18ms); }

@media (min-width: 600px) {
  .demo-out, .demo-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-pane { padding: 32px; }
  /* Both cards end on one line; the measurement spreads to fill its card. */
  .demo-read { grid-template-rows: auto auto 1fr; }
  .demo-read .demo-results { align-content: space-between; }
}
@media (max-width: 480px) {
  .demo-dots { gap: 3px 2px; padding-inline: 0; }
  .demo-stage-head, .demo-out { padding-inline: 14px; }
  .demo-pane .demo-prompt { padding-inline: 14px; }
  .demo-pane .demo-answer { padding-inline: 14px; }
}
/* Reduced motion: the script starts no sequence, and nothing here moves or fades. */
@media (prefers-reduced-motion: reduce) {
  .demo *, .demo *::before, .demo *::after { transition: none !important; animation: none !important; }
}
/* Touch: 44 px controls. */
@media (pointer: coarse), (max-width: 820px) {
  .demo-eng { min-height: 44px; }
  .demo-range { height: 44px; }
}
/* data-v (a whole number of per cent) to --v, and a dot's column to --c for the staggered fill. */
.demo [data-v] { --v: 0; }
.demo [data-v="1"] { --v: .01; } .demo [data-v="2"] { --v: .02; } .demo [data-v="3"] { --v: .03; } .demo [data-v="4"] { --v: .04; } .demo [data-v="5"] { --v: .05; } .demo [data-v="6"] { --v: .06; } .demo [data-v="7"] { --v: .07; } .demo [data-v="8"] { --v: .08; } .demo [data-v="9"] { --v: .09; } .demo [data-v="10"] { --v: .1; } .demo [data-v="11"] { --v: .11; } .demo [data-v="12"] { --v: .12; } .demo [data-v="13"] { --v: .13; } .demo [data-v="14"] { --v: .14; } .demo [data-v="15"] { --v: .15; } .demo [data-v="16"] { --v: .16; } .demo [data-v="17"] { --v: .17; } .demo [data-v="18"] { --v: .18; } .demo [data-v="19"] { --v: .19; } .demo [data-v="20"] { --v: .2; } .demo [data-v="21"] { --v: .21; } .demo [data-v="22"] { --v: .22; } .demo [data-v="23"] { --v: .23; } .demo [data-v="24"] { --v: .24; } .demo [data-v="25"] { --v: .25; } .demo [data-v="26"] { --v: .26; } .demo [data-v="27"] { --v: .27; } .demo [data-v="28"] { --v: .28; } .demo [data-v="29"] { --v: .29; } .demo [data-v="30"] { --v: .3; } .demo [data-v="31"] { --v: .31; } .demo [data-v="32"] { --v: .32; } .demo [data-v="33"] { --v: .33; } .demo [data-v="34"] { --v: .34; } .demo [data-v="35"] { --v: .35; } .demo [data-v="36"] { --v: .36; } .demo [data-v="37"] { --v: .37; } .demo [data-v="38"] { --v: .38; } .demo [data-v="39"] { --v: .39; } .demo [data-v="40"] { --v: .4; } .demo [data-v="41"] { --v: .41; } .demo [data-v="42"] { --v: .42; } .demo [data-v="43"] { --v: .43; } .demo [data-v="44"] { --v: .44; } .demo [data-v="45"] { --v: .45; } .demo [data-v="46"] { --v: .46; } .demo [data-v="47"] { --v: .47; } .demo [data-v="48"] { --v: .48; } .demo [data-v="49"] { --v: .49; } .demo [data-v="50"] { --v: .5; } .demo [data-v="51"] { --v: .51; } .demo [data-v="52"] { --v: .52; } .demo [data-v="53"] { --v: .53; } .demo [data-v="54"] { --v: .54; } .demo [data-v="55"] { --v: .55; } .demo [data-v="56"] { --v: .56; } .demo [data-v="57"] { --v: .57; } .demo [data-v="58"] { --v: .58; } .demo [data-v="59"] { --v: .59; } .demo [data-v="60"] { --v: .6; } .demo [data-v="61"] { --v: .61; } .demo [data-v="62"] { --v: .62; } .demo [data-v="63"] { --v: .63; } .demo [data-v="64"] { --v: .64; } .demo [data-v="65"] { --v: .65; } .demo [data-v="66"] { --v: .66; } .demo [data-v="67"] { --v: .67; } .demo [data-v="68"] { --v: .68; } .demo [data-v="69"] { --v: .69; } .demo [data-v="70"] { --v: .7; } .demo [data-v="71"] { --v: .71; } .demo [data-v="72"] { --v: .72; } .demo [data-v="73"] { --v: .73; } .demo [data-v="74"] { --v: .74; } .demo [data-v="75"] { --v: .75; } .demo [data-v="76"] { --v: .76; } .demo [data-v="77"] { --v: .77; } .demo [data-v="78"] { --v: .78; } .demo [data-v="79"] { --v: .79; } .demo [data-v="80"] { --v: .8; } .demo [data-v="81"] { --v: .81; } .demo [data-v="82"] { --v: .82; } .demo [data-v="83"] { --v: .83; } .demo [data-v="84"] { --v: .84; } .demo [data-v="85"] { --v: .85; } .demo [data-v="86"] { --v: .86; } .demo [data-v="87"] { --v: .87; } .demo [data-v="88"] { --v: .88; } .demo [data-v="89"] { --v: .89; } .demo [data-v="90"] { --v: .9; } .demo [data-v="91"] { --v: .91; } .demo [data-v="92"] { --v: .92; } .demo [data-v="93"] { --v: .93; } .demo [data-v="94"] { --v: .94; } .demo [data-v="95"] { --v: .95; } .demo [data-v="96"] { --v: .96; } .demo [data-v="97"] { --v: .97; } .demo [data-v="98"] { --v: .98; } .demo [data-v="99"] { --v: .99; } .demo [data-v="100"] { --v: 1; }
.demo-dots i:nth-child(30n+2) { --c: 1; } .demo-dots i:nth-child(30n+3) { --c: 2; } .demo-dots i:nth-child(30n+4) { --c: 3; } .demo-dots i:nth-child(30n+5) { --c: 4; } .demo-dots i:nth-child(30n+6) { --c: 5; } .demo-dots i:nth-child(30n+7) { --c: 6; } .demo-dots i:nth-child(30n+8) { --c: 7; } .demo-dots i:nth-child(30n+9) { --c: 8; } .demo-dots i:nth-child(30n+10) { --c: 9; } .demo-dots i:nth-child(30n+11) { --c: 10; } .demo-dots i:nth-child(30n+12) { --c: 11; } .demo-dots i:nth-child(30n+13) { --c: 12; } .demo-dots i:nth-child(30n+14) { --c: 13; } .demo-dots i:nth-child(30n+15) { --c: 14; } .demo-dots i:nth-child(30n+16) { --c: 15; } .demo-dots i:nth-child(30n+17) { --c: 16; } .demo-dots i:nth-child(30n+18) { --c: 17; } .demo-dots i:nth-child(30n+19) { --c: 18; } .demo-dots i:nth-child(30n+20) { --c: 19; } .demo-dots i:nth-child(30n+21) { --c: 20; } .demo-dots i:nth-child(30n+22) { --c: 21; } .demo-dots i:nth-child(30n+23) { --c: 22; } .demo-dots i:nth-child(30n+24) { --c: 23; } .demo-dots i:nth-child(30n+25) { --c: 24; } .demo-dots i:nth-child(30n+26) { --c: 25; } .demo-dots i:nth-child(30n+27) { --c: 26; } .demo-dots i:nth-child(30n+28) { --c: 27; } .demo-dots i:nth-child(30n+29) { --c: 28; } .demo-dots i:nth-child(30n+30) { --c: 29; }
