/* matterdesk site. Dark, modern product pages in one typeface (Geist).
   Periwinkle is the product; coral, amber and green mean late, due and done,
   as they do in the app. Product panels sit in an app "window" so every
   page shows the thing itself. Motion: the home hero plays once; everything
   else moves only when someone clicks. */

:root {
  color-scheme: dark;
  --bg: #070a17;
  --panel: #0e1326;
  --panel-2: #161c36;
  --panel-3: #1e2545;
  --line: rgba(160, 175, 255, 0.13);
  --line-2: rgba(160, 175, 255, 0.24);
  --ink: #f1f3fc;
  --muted: #9da6c4;
  --accent: #8291ff;
  --accent-ink: #0a0e22;
  --late: #ff8572;
  --due: #f3bd55;
  --ok: #55d6a0;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --r: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
small { font-size: inherit; }
em { font-style: normal; }
[hidden] { display: none !important; }
.late { color: var(--late); } .due { color: var(--due); } .ok { color: var(--ok); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--panel-2); padding: 8px 12px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 12px; }

/* ---- top bar ---- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: 14px var(--gutter);
  background: rgba(7, 10, 23, 0.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.wordmark svg { width: 24px; height: 24px; }
.wordmark rect { fill: var(--accent); }
.wordmark path { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.top-nav ul { list-style: none; display: flex; gap: 6px; }
.top-nav a { display: block; font-size: 15px; color: var(--muted); padding: 7px 14px; border-radius: 999px; transition: color 0.15s, background 0.15s; }
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current] { color: var(--ink); background: var(--panel-2); }
.menu-btn { display: none; font-size: 15px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; }

/* ---- type ---- */
h1 { font-weight: 600; font-size: clamp(44px, 6.4vw, 84px); line-height: 0.98; letter-spacing: -0.045em; text-wrap: balance; }
h2 { font-weight: 600; font-size: clamp(30px, 3.8vw, 48px); line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
h3 { font-weight: 600; font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; }
.lede { margin-top: 26px; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34em; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: clamp(72px, 9vw, 128px); }
.head { max-width: 46rem; margin-bottom: 44px; }
.head p { margin-top: 18px; font-size: 19px; color: var(--muted); }

/* ---- buttons ---- */
.cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.button { display: inline-block; background: var(--ink); color: var(--accent-ink); font-weight: 600; font-size: 16px; padding: 13px 22px; border-radius: 999px; transition: background 0.15s; }
.button:hover { background: #fff; }
.button.small { font-size: 14px; padding: 8px 16px; }
.button.tint { background: var(--accent); }
.button.tint:hover { background: #97a4ff; }
.link { font-size: 16px; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.link:hover { border-color: var(--ink); }

/* ---- home hero ---- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(24px, 4vw, 48px); }
.hero::before, .page-hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(110, 126, 255, 0.30), rgba(110, 126, 255, 0) 72%);
}
.hero::before { right: -10%; top: 4%; width: 70%; height: 92%; }

/* ---- inner page hero ---- */
.page-hero { position: relative; padding-top: clamp(56px, 8vw, 112px); }
.page-hero::before { left: 20%; top: -30%; width: 80%; height: 130%; opacity: 0.7; }
.page-hero h1 { font-size: clamp(40px, 5.6vw, 72px); max-width: 13em; }

/* ---- the assistant panel ---- */
.agent { background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05); overflow: hidden; }
.agent-bar, .window-bar { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(85, 214, 160, 0.16); }
.bar-note { margin-left: auto; color: var(--muted); font-weight: 400; }
.agent-body { padding: 20px; display: grid; gap: 16px; }
.ask { justify-self: end; max-width: 85%; background: var(--accent); color: var(--accent-ink); font-weight: 500; padding: 10px 16px; border-radius: 16px 16px 4px 16px; font-size: 16px; }
.steps { list-style: none; display: grid; gap: 9px; font-size: 15px; }
.steps li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; color: var(--muted); }
.steps em { color: var(--ink); font-size: 14px; white-space: nowrap; }
.tick { width: 18px; height: 18px; border-radius: 50%; background: rgba(85, 214, 160, 0.14); position: relative; flex: none; }
.tick::after { content: ""; position: absolute; left: 6px; top: 4px; width: 4px; height: 8px; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.answer { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 15px; }
.answer > p:first-child { font-weight: 600; font-size: 16px; margin-bottom: 10px; }
.answer ul { list-style: none; display: grid; gap: 8px; color: var(--muted); }
.answer li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.answer b { font-weight: 600; font-size: 14px; white-space: nowrap; }
.answer-foot { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; font-size: 13px; font-weight: 500; padding: 4px 11px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.chip.ghost { background: none; color: var(--muted); border: 1px solid var(--line-2); }
.chip.kind { background: none; color: var(--accent); border: 1px solid var(--line-2); }
.chip.c-ok { background: rgba(85, 214, 160, 0.14); color: var(--ok); }
.chip.c-late { background: rgba(255, 133, 114, 0.14); color: var(--late); }
.chip.c-due { background: rgba(243, 189, 85, 0.14); color: var(--due); }
.agent.play .ask, .agent.play .steps li, .agent.play .answer { opacity: 0; transform: translateY(8px); transition: opacity 0.45s ease, transform 0.45s ease; }
.agent.play .on, .agent.play .steps li.on { opacity: 1; transform: none; }

/* ---- "works with" strip ---- */
.with { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 28px; color: var(--muted); font-size: 15px; }
.with span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink); background: var(--panel); }

/* ---- app window: the product frame used on every page ---- */
.window { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.window-main { display: grid; grid-template-columns: 148px minmax(0, 1fr); }
.window-nav { list-style: none; padding: 14px 10px; border-right: 1px solid var(--line); display: grid; gap: 2px; align-content: start; font-size: 14px; color: var(--muted); }
.window-nav li { padding: 7px 10px; border-radius: 8px; }
.window-nav .cur { background: var(--panel-3); color: var(--ink); font-weight: 500; }
.window-nav .off { opacity: 0.28; text-decoration: line-through; }
.window-content { padding: 18px; min-width: 0; }
.window-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.window-title b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.window-title .spacer { flex: 1; }
.ui { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; overflow: hidden; }
.ui small, .window small { display: block; color: var(--muted); font-size: 13px; }

/* ---- workflow: seven steps, each swaps the panel ---- */
.flow { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.flow-steps { list-style: none; counter-reset: s; display: grid; gap: 4px; }
.flow-steps button { counter-increment: s; width: 100%; text-align: left; display: grid; grid-template-columns: 30px 1fr; gap: 2px 14px; padding: 13px 16px; border-radius: 14px; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s; }
.flow-steps button::before { content: counter(s); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--accent); border: 1px solid var(--line-2); margin-top: 1px; }
.flow-steps b { font-weight: 600; font-size: 18px; letter-spacing: -0.015em; }
.flow-steps span { font-size: 15px; color: var(--muted); display: none; }
.flow-steps button:hover { background: var(--panel); }
.flow-steps button[aria-selected="true"] { background: var(--panel); border-color: var(--line-2); }
.flow-steps button[aria-selected="true"]::before { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.flow-steps button[aria-selected="true"] span { display: block; }
.flow-panel { position: sticky; top: 92px; }
.flow-panel .window-content { min-height: 340px; }

/* generic rows inside panels */
.rows > div, .rows > details > summary { display: grid; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.rows > :first-child, .rows > details:first-child > summary { border-top: 0; }
.rows.c3 > div { grid-template-columns: 28px minmax(0, 1fr) auto; }
.rows.c2 > div { grid-template-columns: minmax(0, 1fr) auto; }
.rows b { font-weight: 500; }
.badge { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--panel-3); color: var(--accent); font-size: 13px; font-weight: 600; }
.mark { width: 8px; height: 8px; border-radius: 50%; justify-self: center; background: var(--line-2); }
.mark.ok { background: var(--ok); } .mark.bad { background: var(--late); } .mark.wait { background: var(--due); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stats b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.stats span { font-size: 13.5px; color: var(--muted); }
.note { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* a page of a draft, on numbered pleading lines */
.paper { background: #f6f5f1; color: #23262f; border-radius: 10px; padding: 18px 18px 18px 0; font-size: 13.5px; line-height: 24px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.paper ol { list-style: none; counter-reset: l; text-align: right; color: #8b8e99; border-right: 2px solid #b9bccb; padding-right: 7px; font-size: 11.5px; }
.paper ol li { counter-increment: l; height: 24px; }
.paper ol li::before { content: counter(l); }
.paper p + p { margin-top: 24px; }
.paper .ctr { text-align: center; font-weight: 600; }
.paper mark { background: rgba(130, 145, 255, 0.28); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---- board (tracking) ---- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters button, .seg button { font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); transition: background 0.15s, color 0.15s; }
.filters button:hover, .seg button:hover { color: var(--ink); }
.filters button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.board details { border-top: 1px solid var(--line); }
.board details:first-of-type { border-top: 0; }
.board summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 84px minmax(0, 1fr) 128px 88px 16px; gap: 14px; align-items: center; padding: 13px 16px; }
.board summary::-webkit-details-marker { display: none; }
.board summary::after { content: ""; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform 0.15s; }
.board details[open] summary::after { transform: rotate(-135deg); }
.board summary:hover { background: rgba(160, 175, 255, 0.05); }
.board .what { font-weight: 500; }
.board .who { color: var(--muted); }
.board .clock { font-weight: 600; text-align: right; }
.board .clock small { font-weight: 400; }
.board .more { padding: 4px 16px 18px 114px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; font-size: 13.5px; }
.board .more h4 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.board .more ul { list-style: none; display: grid; gap: 6px; }
.slot { display: flex; align-items: center; gap: 8px; }
.slot::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px dashed var(--line-2); flex: none; }
.slot.in::before { border: 0; background: var(--ok); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* ---- split: copy beside a visual ---- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.split.flip > :first-child { order: 2; }
.split h2 { font-size: clamp(28px, 3.2vw, 40px); }
.split > div:not(.agent):not(.window) > p { margin-top: 16px; color: var(--muted); }
.split ul.points { list-style: none; margin-top: 20px; display: grid; gap: 10px; color: var(--muted); font-size: 16px; }
.split ul.points li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; }
.split ul.points .tick { margin-top: 4px; }

/* ---- cards ---- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.card p { color: var(--muted); font-size: 16px; }
a.card { transition: border-color 0.15s, transform 0.15s, background 0.15s; }
a.card:hover { border-color: var(--line-2); background: var(--panel-2); transform: translateY(-2px); }
a.card h3 { font-size: 24px; letter-spacing: -0.025em; }
a.card .go { margin-top: auto; padding-top: 14px; font-size: 15px; font-weight: 500; color: var(--accent); }
.card .ui { margin-top: 10px; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 14px 22px; border-top: 1px solid var(--line); }
thead th { border-top: 0; font-weight: 500; font-size: 14px; color: var(--muted); }
tbody th { font-weight: 600; white-space: nowrap; }
tbody td { color: var(--muted); }
tbody td.strong { color: var(--ink); }

/* ---- role switch (control) ---- */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.role-note { margin: 16px 0 0; color: var(--muted); font-size: 16px; min-height: 3.2em; max-width: 44em; }

/* ---- citation check (drafting) ---- */
.cites > div { grid-template-columns: 14px minmax(0, 1fr) auto; }
.cites em { font-size: 13px; font-weight: 600; color: var(--muted); }
.cites .checking .mark { background: var(--due); animation: pulse 0.7s infinite alternate; }
@keyframes pulse { from { opacity: 0.35; } to { opacity: 1; } }

/* ---- architecture diagram ---- */
.diagram { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px, 3vw, 36px); overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--font); }
.diagram .box { fill: var(--panel-2); stroke: var(--line-2); }
.diagram .core { fill: rgba(130, 145, 255, 0.10); stroke: var(--accent); }
.diagram .you { fill: var(--accent); stroke: none; }
.diagram text { fill: var(--ink); font-size: 15px; font-weight: 500; }
.diagram text.sub { fill: var(--muted); font-size: 12.5px; font-weight: 400; }
.diagram text.dark { fill: var(--accent-ink); }
.diagram text.zone { fill: var(--accent); font-size: 13px; }
.diagram path { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.diagram path.live { stroke: var(--accent); }

/* ---- facts ---- */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; }
.facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts div { border-top: 2px solid var(--accent); padding-top: 18px; }
.facts dt { font-weight: 600; font-size: 18px; }
.facts dd { margin-top: 8px; color: var(--muted); font-size: 15.5px; max-width: 32em; }

/* ---- next page ---- */
.next { margin-top: clamp(72px, 9vw, 128px); }
.next a { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: clamp(28px, 4vw, 48px); border-radius: 24px; border: 1px solid var(--line-2); background: linear-gradient(120deg, rgba(130, 145, 255, 0.16), rgba(130, 145, 255, 0.02) 60%), var(--panel); transition: border-color 0.15s; }
.next a:hover { border-color: var(--accent); }
.next small { color: var(--muted); font-size: 15px; }
.next b { font-size: clamp(26px, 3.4vw, 44px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }

/* ---- footer ---- */
.foot { width: 100%; max-width: var(--max); margin: clamp(72px, 10vw, 128px) auto 0; padding: 36px var(--gutter) 64px; border-top: 1px solid var(--line); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 8px; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--muted); }
.foot ul a:hover { color: var(--ink); }
.foot p { margin-top: 14px; max-width: 46rem; color: var(--muted); font-size: 14.5px; }

/* ---- trace a sentence (drafting) ---- */
.trace { position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.trace-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trace-line path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.trace-line circle { fill: var(--accent); }
.paper.big { font-size: 15px; line-height: 28px; padding: 26px 26px 26px 0; grid-template-columns: 40px minmax(0, 1fr); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.paper.big ol li { height: 28px; }
.paper.big p + p { margin-top: 28px; }
.paper .src { cursor: pointer; background: rgba(130, 145, 255, 0.16); border-radius: 3px; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; text-decoration: underline; text-decoration-color: rgba(70, 84, 200, 0.5); text-underline-offset: 3px; transition: background 0.15s; }
.paper .src:focus-visible { outline: 2px solid #4654c8; outline-offset: 2px; }
.paper .src:hover { background: rgba(130, 145, 255, 0.32); }
.paper .src[aria-pressed="true"] { background: #8291ff; color: #0a0e22; text-decoration-color: transparent; }
.sources { display: grid; gap: 12px; position: sticky; top: 92px; }
.sources > p { color: var(--muted); font-size: 15px; }
.source { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; font-size: 14.5px; display: grid; gap: 8px; }
.source header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.source header b { font-weight: 600; font-size: 15.5px; }
.source blockquote { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 12px; }
.source footer { color: var(--muted); font-size: 13.5px; }

/* ---- receipt ---- */
.receipt { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.receipt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.receipt-head b { font-size: 17px; font-weight: 600; }
.receipt-head .spacer { flex: 1; }
.receipt details { border-top: 1px solid var(--line); }
.receipt details:first-of-type { border-top: 0; }
.receipt summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 16px; gap: 14px; align-items: center; padding: 14px 20px; font-size: 15.5px; }
.receipt summary::-webkit-details-marker { display: none; }
.receipt summary::after { content: ""; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform 0.15s; }
.receipt details[open] summary::after { transform: rotate(-135deg); }
.receipt summary:hover { background: rgba(160, 175, 255, 0.05); }
.receipt summary b { font-weight: 600; white-space: nowrap; }
.receipt ul { list-style: none; padding: 0 20px 16px 52px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.tick.warn { background: rgba(255, 133, 114, 0.14); }
.tick.warn::after { left: 8px; top: 4px; width: 0; height: 6px; border-width: 0 2px 0 0; border-color: var(--late); transform: none; box-shadow: 0 9px 0 -0.5px var(--late); }

/* ---- search (discovery) ---- */
.search-box { display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px 6px 4px 16px; }
.search-box:focus-within { border-color: var(--accent); }
.search-box input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: none; border: 0; outline: 0; padding: 10px 0; }
.search-box input::placeholder { color: var(--muted); }
.search-count { font-size: 13.5px; color: var(--muted); white-space: nowrap; padding-right: 10px; }
.tries { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 14px; font-size: 14px; color: var(--muted); }
.tries button { font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); }
.tries button:hover { border-color: var(--accent); }
.results > div { grid-template-columns: 92px minmax(0, 1fr) auto; }
.results .chip { justify-self: start; }
.results mark { background: rgba(130, 145, 255, 0.3); color: var(--ink); border-radius: 3px; padding: 0 2px; }

/* ---- two paths (home) ---- */
.paths { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.path { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 34px); }
.path.fast { border-color: var(--accent); background: linear-gradient(160deg, rgba(130, 145, 255, 0.14), rgba(130, 145, 255, 0) 55%), var(--panel); }
.path h3 { font-size: 24px; letter-spacing: -0.025em; }
.path > p { color: var(--muted); margin-top: 6px; font-size: 16px; }
.path ol { list-style: none; counter-reset: p; margin-top: 22px; display: grid; }
.path li { counter-increment: p; position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding-bottom: 16px; font-size: 15.5px; }
.path li::before { content: counter(p); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); background: var(--panel); position: relative; z-index: 1; }
.path li::after { content: ""; position: absolute; left: 12.5px; top: 26px; bottom: 0; width: 1px; background: var(--line-2); }
.path li:last-child { padding-bottom: 0; }
.path li:last-child::after { display: none; }
.path li small { color: var(--muted); font-size: 13.5px; white-space: nowrap; padding-top: 2px; }
.path.fast li::before { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.path.fast li::after { background: var(--accent); }
.path .done { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.path .done b { color: var(--ink); font-weight: 600; }

/* ---- smaller screens ---- */
@media (max-width: 1020px) {
  .hero, .split, .flow, .trace { grid-template-columns: minmax(0, 1fr); }
  .trace-line { display: none; }
  .sources { position: static; }
  .split.flip > :first-child { order: 0; }
  .hero::before { right: 0; top: 40%; width: 100%; height: 60%; }
  .flow-panel { position: static; }
  .flow-steps { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .flow-steps button { grid-template-columns: 1fr; justify-items: center; padding: 10px 4px; gap: 6px; }
  .flow-steps button::before { grid-row: auto; }
  .flow-steps b { font-size: 13px; }
  .flow-steps button[aria-selected="true"] span { display: none; }
  .cards, .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .top-nav ul { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .top-nav.open ul { display: flex; }
  .top-nav a { padding: 12px 14px; font-size: 17px; }
  .cards, .cards.two, .cards.four, .facts, .facts.two, .stats, .paths { grid-template-columns: minmax(0, 1fr); }
  .results > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .path li { grid-template-columns: 26px minmax(0, 1fr); }
  .path li small { grid-column: 2; }
  .receipt ul { padding-left: 20px; }
  .window-main { grid-template-columns: minmax(0, 1fr); }
  .window-nav { display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .window-content { padding: 14px; }
  .board summary { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 4px 12px; }
  .board summary .chip, .board .who { display: none; }
  .board .more { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 18px; }
  .answer li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps em { display: none; }
  .flow-steps b { font-size: 0; }
  th, td { padding: 12px 16px; }
}
