/* Askray: the category-standard analytics dashboard, at Peec AI / Linear / Stripe craft. */

/* Inter (variable), self-hosted from @fontsource-variable/inter (OFL). No third-party font requests. */
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f1f3f6;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-soft-2: #dbeafe;
  --other: #94a3b8;
  --local: #2563eb;
  --en: #0d9488;
  --neg: #b91c1c;
  --warn: #92400e;
  --warn-soft: #fef3c7;
  --heat-0: #f1f3f6;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 16px -4px rgba(16, 24, 40, 0.12), 0 1px 3px rgba(16, 24, 40, 0.06);
  --radius: 12px;
  /* 4px spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --sidebar: 248px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* Start-page globe: land dots, the Nordics a step nearer the accent, search arcs in the accent. */
  --globe-dot: #c2cad6; --globe-near: #7ea2ee; --globe-arc: #2563eb; --globe-rim: #e3e7ee;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0f1115; --surface: #16181d; --surface-2: #1b1e24; --surface-3: #23272e;
    --ink: #f3f4f6; --ink-2: #d1d5db; --muted: #9ca3af; --faint: #6b7280;
    --border: #2a2e36; --border-strong: #3a3f49;
    --accent: #3b82f6; --accent-ink: #93b4fb; --accent-soft: rgba(59, 130, 246, 0.1); --accent-soft-2: rgba(59, 130, 246, 0.22);
    --other: #64748b; --local: #3b82f6; --en: #0d9488; --neg: #f87171; --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, 0.12);
    --heat-0: #23272e; --shadow-sm: none; --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --globe-dot: #353c49; --globe-near: #3f6fd1; --globe-arc: #60a5fa; --globe-rim: #232832;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f1115; --surface: #16181d; --surface-2: #1b1e24; --surface-3: #23272e;
  --ink: #f3f4f6; --ink-2: #d1d5db; --muted: #9ca3af; --faint: #6b7280;
  --border: #2a2e36; --border-strong: #3a3f49;
  --accent: #3b82f6; --accent-ink: #93b4fb; --accent-soft: rgba(59, 130, 246, 0.1); --accent-soft-2: rgba(59, 130, 246, 0.22);
  --other: #64748b; --local: #3b82f6; --en: #0d9488; --neg: #f87171; --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, 0.12);
  --heat-0: #23272e; --shadow-sm: none; --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --globe-dot: #353c49; --globe-near: #3f6fd1; --globe-arc: #60a5fa; --globe-rim: #232832;
}

/* Wordmark face: Familjen Grotesk 700 (OFL, @fontsource/familjen-grotesk), used for the logo only. */
@font-face {
  font-family: "Familjen Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/familjen-grotesk-latin-700-normal.woff2) format("woff2");
}

/* Base and browser surfaces */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--border-strong) transparent; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 14px/1.5 var(--font); caret-color: var(--accent); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-soft-2); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 13px; font-weight: 600; }
h4 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.icon { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-row { display: flex; align-items: center; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.wordmark { font-family: "Familjen Grotesk", var(--font); font-weight: 700; font-size: 21px; letter-spacing: -0.035em; line-height: 1; padding-bottom: 2px; }
.wordmark-tld { color: var(--accent); letter-spacing: -0.02em; }
.logo-mark { flex: none; }
.topbar-end { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s-3); }
.mock-label { font-size: 12px; font-weight: 500; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 6px; padding: 2px 8px; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 9px; }
.segmented a { padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.segmented a:hover { color: var(--ink); }
.segmented a.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }

/* App shell: left rail + main filling the window */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--s-6); padding: var(--s-5) var(--s-4); background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
.sb-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 0 var(--s-2); }
.sb-top .mock-label { margin-left: 0; }
.sb-scan { padding: var(--s-3); border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.sb-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.sb-domain { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.sb-domain:hover { color: var(--ink); text-decoration: underline; }
.sb-market { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.sb-nav { display: grid; gap: 2px; }
.sb-item { display: flex; align-items: center; gap: var(--s-3); padding: 9px var(--s-3); border-radius: 8px; color: var(--ink-2); font-weight: 500; text-decoration: none; transition: background 0.15s, color 0.15s; }
.sb-item .icon { color: var(--muted); }
.sb-item:hover { background: var(--surface-3); color: var(--ink); }
.sb-item.is-on { background: var(--accent-soft); color: var(--accent-ink); }
.sb-item.is-on .icon { color: var(--accent); }
.sb-item.is-disabled { color: var(--faint); cursor: default; }
.sb-item.is-disabled:hover { background: none; }
.sb-item.is-disabled .icon { color: var(--faint); }
.sb-label { flex: 1; }
.sb-count { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-3); border-radius: 999px; padding: 0 8px; line-height: 20px; font-variant-numeric: tabular-nums; }
.sb-item.is-on .sb-count { background: var(--accent-soft-2); color: var(--accent-ink); }
.sb-foot { margin-top: auto; display: grid; gap: var(--s-3); }
.sb-new { display: flex; align-items: center; gap: var(--s-2); padding: 9px var(--s-3); border-radius: 8px; border: 1px solid var(--border); color: var(--ink-2); font-weight: 500; text-decoration: none; }
.sb-new:hover { border-color: var(--border-strong); color: var(--ink); background: var(--surface-2); }
.main { padding: var(--s-8) var(--s-10) var(--s-12); min-width: 0; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; margin-bottom: var(--s-8); }
.main-head h1 { font-size: 26px; }
.main-head .meta { margin-top: var(--s-1); font-size: 14px; color: var(--muted); }
.tabpanel > * + *, .stack > * + * { margin-top: var(--s-6); }
.stack { display: grid; gap: var(--s-6); align-content: start; }
.stack > * + * { margin-top: 0; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6); box-shadow: var(--shadow-sm); min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush > .panel-head { padding: var(--s-6) var(--s-6) 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-5); }
.sub { color: var(--muted); font-size: 13.5px; margin-top: var(--s-1); max-width: 70ch; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; white-space: nowrap; }
.link-more:hover { color: var(--accent-ink); text-decoration: underline; }
.grid-2-1, .grid-1-2, .grid-3-2 { display: grid; gap: var(--s-6); align-items: start; }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.grid-3-2 { grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); }
.stack-col { display: grid; gap: var(--s-6); }
/* Two panels side by side, rows matching in height */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); align-items: stretch; }
.grid-2 > * + * { margin-top: 0; }
.scroll-x { overflow-x: auto; }
.foot-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* KPIs */
.kpi-label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi-note { display: block; font-size: 13px; color: var(--muted); margin-top: var(--s-1); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-strip > div { padding: var(--s-5) var(--s-6); border-right: 1px solid var(--border); }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip b.tone-you { color: var(--accent); }
.stat-strip b.tone-neg { color: var(--neg); }
.stat-strip b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 4px 0 1px; }

/* Bars: square at the baseline, 4px round at the data end */
.bar-track { display: block; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; min-width: 40px; }
.bar-fill { display: block; height: 100%; background: var(--other); border-radius: 0 4px 4px 0; }
.bar-fill.is-you { background: var(--accent); }
.bar-track.has-mark { position: relative; overflow: visible; }
.bar-track.has-mark .bar-fill { border-radius: 4px; }
.bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink-2); border-radius: 1px; }
.key-tick { display: inline-block; width: 2px; height: 12px; background: var(--ink-2); border-radius: 1px; margin: 0 4px; }
/* Collapsed borders: solid beats dashed, so the dash goes on the row above the gap, not on the row after it. */
.table tr:has(+ tr.after-gap) td { border-bottom: 1px dashed var(--border-strong); }
.score-cell { display: grid; grid-template-columns: minmax(40px, 1fr) 30px; gap: 10px; align-items: center; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.key-you, .key-local { background: var(--accent); }
.key-other { background: var(--other); }
.key-en { background: var(--en); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: var(--s-2) var(--s-4) var(--s-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr.is-you td, .table tr.is-you:hover td { background: var(--accent-soft); }
.table th.num, .table td.num { text-align: right; }
.table.compact td { padding: 8px 10px; }
.table.compact th { padding: 6px 10px; }
.panel:not(.flush) .table th:first-child, .panel:not(.flush) .table td:first-child { padding-left: 0; }
.panel:not(.flush) .table th:last-child, .panel:not(.flush) .table td:last-child { padding-right: 0; }
.panel.flush .table th:first-child, .panel.flush .table td:first-child { padding-left: var(--s-6); }
.panel.flush .table th:last-child, .panel.flush .table td:last-child { padding-right: var(--s-6); }
.panel.flush .table { margin-top: 4px; }
.w-rank { width: 44px; }
.w-score { width: 190px; }
.table th button { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border-radius: 4px; }
.table th button:hover { color: var(--ink); }
.table th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table th button .icon { color: var(--faint); }
.table th[aria-sort] button { color: var(--ink); }
.table th[aria-sort] button .icon { color: var(--accent); }
.co-name { font-weight: 500; }
.co-domain { display: block; font-size: 12px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.page-cell .co-domain { white-space: normal; overflow-wrap: anywhere; }
.co-cell { min-width: 210px; }
.co-cell .co-name { white-space: nowrap; }
.co-domain.inline { display: inline; }
.reason-cell { color: var(--ink-2); font-size: 13px; min-width: 220px; }
.page-cell { color: var(--ink-2); font-size: 13px; min-width: 240px; }
.tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 11.5px; font-weight: 500; line-height: 18px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; vertical-align: 1px; }
.tag-you { background: var(--accent-soft-2); color: var(--accent-ink); }
.tag-gap { background: var(--warn-soft); color: var(--warn); }

/* Overview */
.model-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.model-bars li, .lang-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 30px; gap: 10px; align-items: center; }
.mb-label { font-size: 13px; color: var(--ink-2); }
.heatmap { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 13.5px; }
.heatmap thead th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 4px; }
.heatmap thead th.num { text-align: center; }
.heatmap tbody th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 4px 12px 4px 0; min-width: 220px; }
.heatmap td { width: 84px; }
.heat { display: block; text-align: center; padding: 8px 4px; border-radius: 6px; background: var(--heat); color: var(--ink); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.heat.on-dark { color: #fff; }
.mini-actions { list-style: none; padding: 0; margin: 0; }
.mini-actions li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--s-3); align-items: start; padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.mini-actions li:first-child { border-top: 0; padding-top: 0; }
.a-id { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-3); border-radius: 5px; padding: 0 5px; line-height: 18px; font-variant-numeric: tabular-nums; text-align: center; }
.a-title { font-weight: 500; font-size: 14px; line-height: 1.4; }
.a-ev { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.prio { font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.prio-high { background: var(--ink); color: var(--surface); }
.prio-medium { background: var(--surface-3); color: var(--ink); }
.prio-low { box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--muted); }

/* Competitors */

/* AI behaviour */
.topic-list { display: grid; gap: 1px; }
.topic > summary { display: grid; grid-template-columns: 16px minmax(0, 1.4fr) minmax(60px, 1fr) 40px; gap: var(--s-3); align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: 6px; cursor: pointer; list-style: none; }
.topic > summary::-webkit-details-marker, .disclosure > summary::-webkit-details-marker, .raw-run > summary::-webkit-details-marker { display: none; }
.topic > summary:hover { background: var(--surface-2); }
.topic-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.topic-label .tag { margin-left: 0; }
.chev { color: var(--faint); transition: transform 0.15s ease-out; }
details[open] > summary > .chev { transform: rotate(90deg); }
.query-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.topic .query-list { margin: 4px 0 12px 26px; }
.query-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.query-list.ranked { counter-reset: r; }
.query-list.ranked li { counter-increment: r; justify-content: flex-start; }
.query-list.ranked li::before { content: counter(r); width: 18px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.query-list.ranked li .muted { margin-left: auto; }
.query { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); color: var(--ink); border-radius: 6px; padding: 2px 8px; min-width: 0; overflow-wrap: anywhere; }
.query .icon { color: var(--muted); }
.legend { list-style: none; padding: 0; margin: 0 0 12px; display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.lang-row { grid-template-columns: 70px minmax(0, 1fr); margin-top: 10px; }
.lang-stack { display: flex; gap: 2px; height: 22px; border-radius: 4px; overflow: hidden; }
.lang-seg { display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 3px; }
.lang-seg.is-local { background: var(--local); color: #fff; }
.lang-seg.is-en { background: var(--en); color: #042f2e; }

/* Disclosures: raw runs */
.disclosure > summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.disclosure > summary .chev { align-self: center; }
.raw-list { margin-top: 14px; display: grid; gap: 6px; }
.raw-run { border: 1px solid var(--border); border-radius: 8px; }
.raw-run > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; font-size: 13px; cursor: pointer; list-style: none; }
.raw-run > summary .tag { margin-left: 0; }
.raw-run > summary:hover { background: var(--surface-2); }
.raw-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 4px 12px 12px; border-top: 1px solid var(--border); }
.raw-body ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.answer { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: 8px; margin: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Actions */
.action-list { list-style: none; padding: 4px 0 0; margin: 0; }
.action { display: grid; grid-template-columns: 36px minmax(0, 1fr) 220px; gap: var(--s-4); padding: var(--s-5) var(--s-6); border-top: 1px solid var(--border); align-items: start; }
.action-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-title-row .tag { margin-left: 0; }
.action h3 { font-size: 14px; font-weight: 600; margin-right: 4px; }
.action p { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; max-width: 72ch; }
.action-evidence { font-size: 13.5px; font-weight: 500; color: var(--ink-2); padding-top: 2px; }

/* Progress while scanning */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.steps li { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 2px solid var(--border); font-size: 13px; color: var(--muted); }
.steps .is-done { color: var(--ink-2); border-top-color: var(--accent); }
.steps .is-current { color: var(--ink); font-weight: 600; border-top-color: var(--accent); }
.step-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); font-size: 11px; font-weight: 600; flex: none; font-variant-numeric: tabular-nums; }
.is-done .step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.is-current .step-dot { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.progress-now { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.progress-now .muted { margin-left: auto; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { margin-top: 12px; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.live { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-8); align-items: start; }
.run-grid { border-collapse: collapse; font-size: 13px; width: 100%; }
.run-grid th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 5px 14px 5px 0; }
.run-grid thead th { font-size: 12px; font-weight: 500; color: var(--muted); }
.run-grid td { padding: 3px; }
.cell { display: block; width: 14px; height: 14px; border-radius: 4px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }
.cell.is-done { background: var(--accent); box-shadow: none; }
.cell.is-new { animation: pop 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pop { from { transform: scale(0.5); opacity: 0.4; } }
.feed { border-left: 1px solid var(--border); padding-left: 20px; min-height: 160px; }
.feed h3 { margin-bottom: 10px; }
.feed-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.feed-list li { display: flex; align-items: center; gap: 8px; animation: fadein 0.3s ease-out; }
.feed-model { font-size: 11.5px; color: var(--muted); width: 54px; flex: none; }
@keyframes fadein { from { opacity: 0; transform: translateY(-3px); } }
.error-panel { display: grid; gap: 12px; justify-items: start; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 500; border-radius: 8px; padding: 9px 16px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-primary:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Start screen */
.is-bare main { min-height: calc(100vh - 53px); display: grid; place-items: center; padding: 0 16px 16vh; }
.start { width: 100%; max-width: 680px; }
.start h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 600; letter-spacing: -0.025em; text-align: center; margin-bottom: 28px; text-wrap: balance; }
.start-stack { display: grid; gap: var(--s-4); }
.start-field { display: grid; gap: var(--s-2); }
.start-field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.start-field .optional { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
.start-field input { width: 100%; box-sizing: border-box; font: inherit; font-size: 18px; padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); transition: box-shadow 0.15s, border-color 0.15s; }
.start-field input::placeholder { color: var(--muted); }
.start-field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-soft-2); }
.start-field input[aria-invalid="true"] { border-color: var(--neg); }
.field-hint { font-size: 13px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--neg); }
.form-error { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); background: color-mix(in srgb, var(--neg) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--neg) 45%, transparent); border-radius: 10px; padding: 10px 14px; }
.form-error[hidden] { display: none; }
.form-error .link-btn { font-size: inherit; margin-top: 0; }
.form-error .err-code { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.turnstile-box:empty { display: none; }
.btn-scan[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.poll-note { margin-bottom: var(--s-4); }
.start-foot { margin-top: var(--s-6); font-size: 13px; text-align: center; }
.start-foot a { color: var(--muted); }
.start-foot a:hover { color: var(--ink-2); }
.plan-chip { margin-left: var(--s-2); font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 2px 9px; }
.plan-chip[hidden] { display: none; }
.btn-scan { justify-self: stretch; padding: 15px 24px; font-size: 16px; border-radius: 12px; margin-top: var(--s-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Paywall: locked assistants */
.segmented .is-locked { all: unset; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.segmented .is-locked:hover { color: var(--ink-2); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.segmented .is-locked:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bar-track.is-locked { background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, transparent 6px 10px); box-shadow: inset 0 0 0 1px var(--border); }
.is-locked-row .mb-label { color: var(--muted); }
.lock-btn, .icon-btn { all: unset; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--muted); cursor: pointer; justify-self: end; }
.lock-btn:hover, .icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.lock-btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); }
.upsell-inline { all: unset; display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-5); padding: 9px var(--s-3); width: 100%; box-sizing: border-box; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.upsell-inline .icon:last-child { margin-left: auto; }
.upsell-inline:hover { background: var(--accent-soft-2); }
.upsell-inline:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table th.th-locked button { color: var(--muted); }
.table th.th-locked button:hover { color: var(--ink-2); }
.table th.th-locked button .icon { color: inherit; }
.td-locked { width: 76px; }
.table tr.is-extra { display: none; }
.table.show-all tr.is-extra { display: table-row; }
.table-foot { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-6) var(--s-5); border-top: 1px solid var(--border); }
/* The reasons also show in the panel under the table; drop the column before the table needs to scroll. */
@media (max-width: 1599px) { .table .reason-col { display: none; } }
.td-locked .bar-track { min-width: 44px; height: 10px; }
.lang-locked { all: unset; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 4px; font-size: 12.5px; color: var(--muted); cursor: pointer; background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, transparent 6px 10px); box-shadow: inset 0 0 0 1px var(--border); }
.lang-locked:hover { color: var(--ink); }
.lang-locked:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Free preview */
.btn-sm-inline { padding: 7px 14px; font-size: 13px; flex: none; }
.lock-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.locked-panel { position: relative; }
/* Teaser: generated filler, blurred, unlock button centred on top */
.teaser { position: relative; overflow: hidden; }
.teaser-content { filter: blur(6px); opacity: 0.75; user-select: none; pointer-events: none; }
.panel.flush .teaser-content { padding: 0 var(--s-6) var(--s-4); }
.teaser-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--surface) 55%, transparent) 100%); }
.teaser-overlay .btn { box-shadow: var(--shadow-md); }
.teaser-bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) 40px; gap: var(--s-3); align-items: center; padding: 8px 0; font-size: 13.5px; }
.panel.flush > .teaser { margin-top: var(--s-2); }
@media (prefers-reduced-transparency: reduce) { .teaser-content { filter: none; opacity: 0.15; } }
.btn-unlock { padding: 9px 16px; font-size: 13.5px; }
.link-btn { all: unset; cursor: pointer; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; margin-top: var(--s-1); display: inline-block; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.btn-sm { padding: 6px 12px; font-size: 13px; width: 100%; box-sizing: border-box; }
.btn-ghost-strong { background: transparent; color: var(--ink-2); border-color: var(--border-strong); }
.btn-ghost-strong:hover { background: var(--surface-2); color: var(--ink); }

/* Upsell dialog */
.upsell { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px -16px rgba(16, 24, 40, 0.35); overflow: auto; }
.upsell::backdrop { background: rgba(15, 17, 21, 0.45); backdrop-filter: blur(2px); }
.upsell[open] { animation: dialog-in 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.upsell-close-row { position: absolute; top: var(--s-3); right: var(--s-3); margin: 0; }
.upsell-head { padding: var(--s-8) var(--s-8) var(--s-6); }
.upsell-head p { margin-top: var(--s-2); color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 60ch; }

/* Tooltip */
#tip { position: fixed; z-index: 50; pointer-events: none; max-width: 300px; background: var(--ink); color: var(--surface); font-size: 12.5px; line-height: 1.4; padding: 6px 9px; border-radius: 6px; box-shadow: var(--shadow-md); }

@media (max-width: 1280px) {
  .grid-3-2 { grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); }
  .main { padding: var(--s-8) var(--s-8) var(--s-12); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; z-index: 5; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4) 0; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .sb-top { flex: 1; padding: 0; }
  .sb-scan { display: none; }
  .sb-foot { margin-top: 0; order: 2; }
    .sb-new { padding: 5px 10px; font-size: 13px; }
  .sb-nav { order: 3; width: calc(100% + 2 * var(--s-4)); display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s-4)); padding: var(--s-1) var(--s-4) var(--s-2); scroll-padding-inline: 56px; }
  .sb-item { flex: none; padding: 7px 10px; }
  .main { padding: var(--s-6) var(--s-6) var(--s-10); }
}
@media (max-width: 1024px) {
  .grid-2-1, .grid-1-2, .grid-3-2, .grid-2, .live { grid-template-columns: minmax(0, 1fr); }
      .feed { border-left: 0; padding-left: 0; }
  .action { grid-template-columns: 36px minmax(0, 1fr); }
  .action-evidence { grid-column: 2; }
  .action-evidence.num { text-align: left; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .segmented { overflow-x: auto; max-width: 100%; }
  .main { padding: var(--s-5) var(--s-4) var(--s-10); }
  .main-head { flex-direction: column; align-items: stretch; margin-bottom: var(--s-6); gap: var(--s-4); }
  .main-head h1 { font-size: 22px; }
      .sb-nav { mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
  .sb-nav.is-scrolled { mask-image: linear-gradient(90deg, transparent 8px, #000 56px, #000 calc(100% - 48px), transparent); }
  .panel { padding: var(--s-4); }
  .panel.flush > .panel-head { padding: var(--s-4) var(--s-4) 0; }
  .panel.flush .table th:first-child, .panel.flush .table td:first-child { padding-left: 16px; }
  .panel.flush .table th:last-child, .panel.flush .table td:last-child { padding-right: 16px; }
    .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip > div:nth-child(2n) { border-right: 0; }
  .stat-strip > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .stat-strip > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .w-score { width: 140px; }
      .raw-body { grid-template-columns: 1fr; }
  .raw-run > summary { grid-template-columns: auto minmax(0, 1fr); }
  .raw-run > summary > .muted { grid-column: 1 / -1; }
  .steps li:not(.is-current) { font-size: 0; gap: 0; }
  .topic > summary { grid-template-columns: 16px minmax(0, 1fr) 40px; }
  .topic > summary .bar-track { display: none; }
  .start-field input { font-size: 16px; padding: 13px 14px; }
    .upsell-head { padding: var(--s-6) var(--s-5) var(--s-5); }
  .heatmap tbody th { min-width: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}

/* Privacy and other reading pages */
.prose { width: 100%; max-width: 680px; margin: 0 auto; padding: var(--s-10) var(--s-4) var(--s-12); line-height: 1.6; color: var(--ink-2); }
.prose h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-bottom: var(--s-2); }
.prose h2 { font-size: 17px; font-weight: 600; color: var(--ink); margin: var(--s-8) 0 var(--s-2); }
.prose p, .prose ul { margin: 0 0 var(--s-3); }
.prose ul { padding-left: var(--s-5); }
.prose li { margin-bottom: var(--s-2); }
.prose b { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); }
.prose code { font-size: 0.92em; background: var(--surface-3); border-radius: 4px; padding: 1px 5px; }

/* Admin */
.adm { padding-top: var(--s-8); padding-bottom: var(--s-12); display: grid; gap: var(--s-5); }
/* Admin uses the whole window: the tables are wide. */
.wrap.adm { max-width: none; padding-left: clamp(16px, 2.5vw, 32px); padding-right: clamp(16px, 2.5vw, 32px); }
.adm-table td.strong { font-weight: 600; }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.adm-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.adm-search input, .adm-signin input { font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 260px; box-sizing: border-box; }
.adm-search input:focus, .adm-signin input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.adm-table td { vertical-align: top; }
.adm-table .nowrap { white-space: nowrap; }
.adm-q { min-width: 220px; max-width: 420px; }
.adm-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.adm-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.adm-status.is-done::before { background: var(--accent); }
.adm-status.is-error { color: var(--neg); cursor: help; }
.adm-status.is-error::before { background: var(--neg); }
.adm-status.is-running::before { background: var(--warn); }
.adm-empty { padding: var(--s-6); margin: 0; }
.adm-more { margin: 0; }
.adm-signin { display: grid; gap: var(--s-3); width: 100%; max-width: 320px; }
.adm-signin h1 { font-size: 22px; font-weight: 600; margin: 0 0 var(--s-2); }
.adm-signin input { min-width: 0; width: 100%; }
@media (max-width: 640px) { .adm-search, .adm-search input { width: 100%; min-width: 0; } }

/* ---------------- Start page ---------------- */
/* One screen: the hero over a globe that rises from the bottom edge. The question field is where searches start. */
body.is-landing { min-height: 100svh; overflow-x: hidden; background: var(--page); }
.is-landing .topbar { position: relative; z-index: 2; background: transparent; border-bottom: 0; }
.landing { position: relative; min-height: calc(100svh - 52px); display: grid; grid-template-rows: 1fr auto; isolation: isolate; }
.globe { position: absolute; inset: -52px 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.globe canvas { display: block; }
.globe-chips { position: absolute; inset: 0; }
.globe-chip {
  position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 400 12.5px/1.5 var(--mono); color: var(--ink); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 9px 3px 7px; box-shadow: 0 6px 18px -8px rgba(16, 24, 40, 0.28), 0 1px 2px rgba(16, 24, 40, 0.06);
  opacity: 0; transition: opacity 0.35s ease-out; will-change: transform, opacity;
}
.globe-chip svg { color: var(--accent); flex: none; }

.hero { width: 100%; max-width: 1040px; margin: 0 auto; padding: clamp(20px, 6vh, 72px) 16px 0; box-sizing: border-box; text-align: center; }
.hero-copy { min-width: 0; }
/* A wide headline in two lines keeps the form high, leaving the globe room below. */
.hero h1 {
  font-size: clamp(34px, 4.6vw, 58px); line-height: 1.05; font-weight: 650; letter-spacing: -0.038em; color: var(--ink);
  margin: 0 auto; max-width: 24ch; text-wrap: balance;
}
.hero-sub { margin: clamp(14px, 2vh, 20px) auto 0; max-width: 62ch; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.hero-form { display: grid; gap: var(--s-3); margin: clamp(20px, 3.5vh, 32px) auto 0; max-width: 560px; min-width: 0; text-align: left; }
.hero-form .start-field input { font-size: 17px; padding: 15px 18px; border-radius: 14px; }
.hero-form .btn-scan { margin-top: var(--s-1); gap: 10px; font-weight: 600; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent); transition: background 0.15s, box-shadow 0.2s, transform 0.2s; }
.hero-form .btn-scan .icon { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.hero-form .btn-scan:hover .icon { transform: translateX(3px); }
.hero-form .btn-scan:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.landing-foot { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-6); font-size: 12.5px; color: var(--muted); }
.landing-foot a { color: var(--muted); text-underline-offset: 3px; }
.landing-foot a:hover { color: var(--ink); }
.globe-caption { margin: 0 auto 0 0; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--page) 80%, transparent); }

::selection { background: var(--accent-soft-2); color: var(--ink); }
.is-landing input { caret-color: var(--accent); }

@media (max-width: 640px) {
  .hero { padding-top: 20px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero-form .start-field input { font-size: 16px; padding: 14px 16px; }
  .landing-foot { flex-direction: column-reverse; gap: var(--s-2); padding: var(--s-3) var(--s-4) var(--s-4); text-align: center; }
  .globe-chip { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .globe-chip, .hero-form .btn-scan, .hero-form .btn-scan .icon { transition: none; }
}

/* ---------------- Scanning screen ---------------- */
/* The same ground and globe as the start page; one card says what is happening, in plain words. */
.scan-stage { width: 100%; max-width: 600px; margin: 0 auto; padding: clamp(28px, 10vh, 112px) 16px 0; box-sizing: border-box; }
.scan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 24px 48px -28px rgba(16, 24, 40, 0.28), 0 2px 6px rgba(16, 24, 40, 0.05); text-align: center;
}
.scan-subject { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; margin: 0 0 var(--s-5); font-size: 14px; color: var(--ink-2); }
.scan-question { font-weight: 500; color: var(--ink); }
.scan-domain { font: 400 12.5px/1.5 var(--mono); color: var(--muted); background: var(--surface-3); border-radius: 6px; padding: 1px 8px; }
.scan-title { display: inline-flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; font-weight: 650; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.scan-pulse { position: relative; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--accent); }
.scan-pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: scan-ping 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
@keyframes scan-ping { 0% { transform: scale(0.4); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }
.scan-sub { margin: var(--s-3) auto 0; max-width: 46ch; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

.scan-steps { list-style: none; display: flex; justify-content: center; gap: 6px; margin: var(--s-8) 0 0; padding: 0; flex-wrap: wrap; }
.scan-steps li { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--faint); padding: 5px 12px 5px 8px; border-radius: 999px; }
.scan-steps li + li::before { content: ""; width: 16px; height: 1px; background: var(--border-strong); margin: 0 6px 0 -8px; }
.scan-step-mark { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: inline-grid; place-items: center; box-sizing: border-box; }
.scan-steps li.is-done { color: var(--ink-2); }
.scan-steps li.is-done .scan-step-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.scan-steps li.is-current { color: var(--accent-ink); background: var(--accent-soft); }
.scan-steps li.is-current .scan-step-mark { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 3.5px, transparent 4px); }

.scan-progress { position: relative; margin: var(--s-6) auto 0; max-width: 380px; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress-fill.is-indeterminate { position: absolute; width: 32%; animation: scan-sweep 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes scan-sweep { from { left: -32%; } to { left: 100%; } }
.scan-count { margin: var(--s-3) 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scan-card .poll-note { margin: var(--s-5) 0 0; text-align: left; }

.scan-card.is-error .scan-sub { max-width: 52ch; }
.scan-card.is-error .btn-scan { display: inline-flex; margin-top: var(--s-6); width: auto; padding: 13px 22px; }

@media (max-width: 640px) {
  .scan-stage { padding-top: 20px; }
  .scan-steps li + li::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-pulse::after, .progress-fill.is-indeterminate { animation: none; }
  .progress-fill.is-indeterminate { left: 0; width: 100%; opacity: 0.35; }
}
.admin-badge { font-size: 12.5px; font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 4px 10px; text-decoration: none; white-space: nowrap; }
.admin-badge:hover { background: var(--accent-soft-2); }
@media (max-width: 640px) { .admin-badge { display: none; } }
.adm-title { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
/* Scans / Page views: a two-position switch; the thumb slides to the side that's on. */
.adm-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); isolation: isolate; }
.adm-switch::before { content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12), 0 0 0 1px var(--border); transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
.adm-switch[data-on="views"]::before { transform: translateX(100%); }
.adm-switch a { padding: 6px 16px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; text-align: center; border-radius: 999px; white-space: nowrap; }
.adm-switch a[aria-current="page"] { color: var(--ink); }
.adm-switch a:hover { color: var(--ink); }
.adm-switch a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-path { font: 400 12.5px/1.5 var(--mono); }
@media (prefers-reduced-motion: reduce) { .adm-switch::before { transition: none; } }

/* Admin only: Limited scan / Full scan, a two-position switch above the button. */
.plan-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 3px; border: 0; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); isolation: isolate; }
.plan-switch::before { content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12), 0 0 0 1px var(--border); transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
.plan-switch:has(input[value="full"]:checked)::before { transform: translateX(100%); }
.plan-switch label { display: block; padding: 8px 14px; font-size: 14px; font-weight: 500; text-align: center; color: var(--muted); border-radius: 999px; cursor: pointer; }
.plan-switch label:has(input:checked) { color: var(--ink); }
.plan-switch label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-switch input { position: absolute; opacity: 0; pointer-events: none; }
.plan-locked { all: unset; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--muted); border-radius: 999px; cursor: pointer; }
.plan-locked .icon { color: var(--faint); }
.plan-locked:hover { color: var(--ink-2); }
.plan-locked:hover .icon { color: var(--accent); }
.plan-locked:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .plan-switch::before { transition: none; } }

/* Where the answers send people: longer labels than the assistant bars. */
.dest-bars li { grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) 40px; }
@media (max-width: 640px) { .dest-bars li { grid-template-columns: minmax(0, 1fr) 40px; } .dest-bars .bar-track { grid-column: 1 / -1; grid-row: 2; } }

.adm-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.adm-alert { font-size: 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid; color: var(--ink); }
.adm-alert.is-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.adm-alert.is-error { background: color-mix(in srgb, var(--neg) 8%, var(--surface)); border-color: color-mix(in srgb, var(--neg) 45%, transparent); }

/* ---------------- Full scan offer ---------------- */
.buy-form { margin: 0; }
.btn-buy { gap: 8px; padding: 11px 18px; font-weight: 600; box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-buy .icon { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.btn-buy:hover .icon { transform: translateX(3px); }
.btn-buy:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-8); align-items: center; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.offer h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.offer-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); font-size: 14px; color: var(--ink-2); }
.offer-list li { display: flex; gap: 8px; align-items: flex-start; }
.offer-list .icon { color: var(--accent); flex: none; margin-top: 3px; }
.offer-buy { display: grid; justify-items: center; gap: var(--s-3); text-align: center; min-width: 240px; }
.offer-price { margin: 0; display: grid; gap: 2px; }
.offer-price b { font-size: 36px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.offer-price span { font-size: 13px; color: var(--muted); }
.offer-buy .link-btn { margin-top: 0; font-size: 13px; }
.checkout-note { margin-bottom: var(--s-5); }
@media (max-width: 760px) {
  .offer { grid-template-columns: 1fr; gap: var(--s-5); }
  .offer-buy { justify-items: stretch; min-width: 0; }
  .offer-buy .btn-buy { width: 100%; }
}

/* Upgrade dialog: a headline from the report, then the free preview beside the full report. */
.upsell { width: min(760px, calc(100vw - 32px)); }
.upsell-head h2.upsell-pitch { font-size: clamp(24px, 3.2vw, 30px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; margin-top: 0; text-wrap: balance; }
.upsell-head p { font-size: 15px; }
.upsell-body { padding: 0 var(--s-8) var(--s-8); display: grid; gap: var(--s-4); }
.upsell-body .proto-form { justify-self: center; margin: 0; }
.plans { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-4); align-items: stretch; }
.plan { border: 1px solid var(--border); border-radius: 14px; padding: var(--s-5) var(--s-5) var(--s-6); display: grid; align-content: start; gap: var(--s-3); }
.plan h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.plan ul { list-style: none; margin: var(--s-1) 0 0; padding: 0; display: grid; gap: var(--s-3); font-size: 14px; line-height: 1.45; }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li .icon { flex: none; margin-top: 2px; }
.plan.is-free { background: var(--surface-2); color: var(--muted); }
.plan.is-free h3 { color: var(--ink-2); }
.plan.is-free .icon { color: var(--faint); }
.plan-state { margin: -6px 0 0; font-size: 12.5px; color: var(--muted); }
.plan.is-full { border: 1.5px solid var(--accent); box-shadow: 0 16px 40px -24px color-mix(in srgb, var(--accent) 70%, transparent); background: var(--surface); }
.plan.is-full li { color: var(--ink-2); }
.plan.is-full li b { color: var(--ink); font-weight: 600; }
.plan.is-full .icon { color: var(--accent); }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; color: var(--ink); }
.plan-price span { font-size: 13px; color: var(--muted); }
.plan .buy-form { margin-top: var(--s-2); }
.plan .btn-buy { width: 100%; justify-content: center; padding: 13px 18px; font-size: 15px; }
.plan-note { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (max-width: 680px) {
  .upsell-body { padding: 0 var(--s-5) var(--s-6); }
  .plans { grid-template-columns: 1fr; }
  .plan.is-full { order: -1; }
}

/* ---------------- Checkout ---------------- */
body.is-checkout { background: var(--page); }
.checkout { max-width: 1040px; margin: 0 auto; padding: clamp(24px, 6vh, 64px) clamp(16px, 4vw, 40px) var(--s-12); display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: clamp(28px, 5vw, 64px); align-items: start; }
.checkout-for { margin: 0 0 var(--s-2); font-size: 13px; font-weight: 500; color: var(--muted); }
.checkout-summary h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; }
.checkout-sub { margin: var(--s-3) 0 0; font-size: 15.5px; color: var(--ink-2); max-width: 52ch; }
.checkout-item { margin-top: var(--s-8); display: flex; justify-content: space-between; gap: var(--s-6); padding: var(--s-6); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.checkout-item h2 { margin: 0 0 var(--s-3); font-size: 16px; font-weight: 650; }
.checkout-item ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); font-size: 14px; color: var(--ink-2); }
.checkout-item li { display: flex; gap: 8px; align-items: flex-start; }
.checkout-item .icon { color: var(--accent); flex: none; margin-top: 2px; }
.checkout-price { margin: 0; text-align: right; white-space: nowrap; }
.checkout-price b { display: block; font-size: 28px; font-weight: 650; letter-spacing: -0.03em; }
.checkout-price span { font-size: 13px; color: var(--muted); }
.checkout-note { margin: var(--s-3) 0 0; font-size: 13px; color: var(--muted); }
/* Stripe's form takes the page's theme (public/checkout.js), so its card does too. */
.checkout-form { background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 14px; padding: var(--s-6); min-height: 240px; box-shadow: var(--shadow-md); }
.checkout-loading { margin: 0; font-size: 14px; color: var(--muted); }
.checkout-pay .form-error { margin-top: var(--s-3); }
.checkout-secure { display: flex; gap: 6px; align-items: center; margin: var(--s-3) 0 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }

.setup { max-width: 560px; margin: 0 auto; padding: clamp(32px, 10vh, 96px) 16px var(--s-12); }
.setup h1 { margin: 0; font-size: clamp(28px, 3.6vw, 36px); font-weight: 650; letter-spacing: -0.03em; }
.setup .checkout-for { display: inline-flex; gap: 6px; align-items: center; color: var(--accent-ink); }
.setup-form { margin-top: var(--s-6); max-width: none; }
