/* AEO Agent — design system v5 (dark by default; print and PDF switch to light tokens) */

@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #08090a;
  --bg-2: #0c0d0f;
  --panel: #0d0e10;
  --surface: #111214;
  --surface-2: #17181b;
  --surface-3: #1e2024;
  --raise: #1a1b1f;
  --ink: #f7f8f8;
  --ink-2: #d0d3d9;
  --muted: #8a8f98;
  --subtle: #7d828b;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);
  --hover: rgba(255, 255, 255, 0.04);
  --accent: #6d5dfc;
  --accent-hover: #5e4ef0;
  --accent-ink: #a99fff;
  --accent-soft: rgba(124, 108, 255, 0.13);
  --accent-soft-2: rgba(124, 108, 255, 0.3);
  --accent-row: #15142a;
  --good: #4cc38a;
  --good-ink: #5fd39b;
  --good-soft: rgba(76, 195, 138, 0.12);
  --good-line: rgba(76, 195, 138, 0.3);
  --fair: #f1a43c;
  --fair-ink: #f5b75a;
  --fair-soft: rgba(241, 164, 60, 0.12);
  --fair-line: rgba(241, 164, 60, 0.3);
  --poor: #f06a6a;
  --poor-ink: #ff8a8a;
  --poor-soft: rgba(240, 106, 106, 0.12);
  --poor-line: rgba(240, 106, 106, 0.3);
  --code-bg: #0a0b0c;
  /* Charts: categorical slots validated for CVD separation on the dark card surface (#111214);
     sequential ramps are one hue, brighter = more. */
  --viz-1: #8b80ff;
  --viz-2: #e0702e;
  --viz-3: #22a6bd;
  --viz-muted: #62676f;
  --viz-grid: rgba(255, 255, 255, 0.07);
  --viz-track: rgba(255, 255, 255, 0.045);
  --hs-1: #5d4fe3; --hs-1-ink: #ffffff;
  --hs-2: #8073fb; --hs-2-ink: #0b0b12;
  --hs-3: #a9a1ff; --hs-3-ink: #0b0b12;
  --hs-4: #cfcaff; --hs-4-ink: #0b0b12;
  --hc-n: #5d4fe3; --hc-n-ink: #ffffff;
  --hc-3: #8073fb; --hc-3-ink: #0b0b12;
  --hc-1: #a9a1ff; --hc-1-ink: #0b0b12;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 40px 100px -30px rgba(0, 0, 0, 0.85);
  --glow: 0 0 0 1px rgba(124, 108, 255, 0.5), 0 24px 70px -24px rgba(109, 93, 252, 0.55);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 60px;
}

/* Light tokens: print, the PDF report page, and anything rendered on paper. */
.is-print,
.theme-light {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f7f7f8;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f7;
  --surface-3: #ececee;
  --raise: #ffffff;
  --ink: #0d0e12;
  --ink-2: #2b2d34;
  --muted: #5d616b;
  --subtle: #6f737c;
  --line: #e6e6e9;
  --line-2: #d9d9de;
  --line-3: #c3c4ca;
  --hover: #f6f6f7;
  --accent: #4b3bf5;
  --accent-hover: #3524d6;
  --accent-ink: #3524d6;
  --accent-soft: #f0eeff;
  --accent-soft-2: #e1dcff;
  --accent-row: #f5f3ff;
  --good: #0a8f63; --good-ink: #076c4b; --good-soft: #e5f6ee; --good-line: #c5ebd9;
  --fair: #b86e00; --fair-ink: #8a5300; --fair-soft: #fdf2d8; --fair-line: #f4dfaa;
  --poor: #d23a3a; --poor-ink: #a92626; --poor-soft: #fdeceb; --poor-line: #f6cfcd;
  --code-bg: #f6f6f7;
  --viz-1: #4b3bf5;
  --viz-2: #d9541c;
  --viz-3: #0e8ea3;
  --viz-muted: #a3a7b0;
  --viz-grid: #ececee;
  --viz-track: #f1f1f3;
  --hs-1: #a59cff; --hs-1-ink: #0d0e12;
  --hs-2: #7c6ff8; --hs-2-ink: #0d0e12;
  --hs-3: #5544e6; --hs-3-ink: #ffffff;
  --hs-4: #3524c0; --hs-4-ink: #ffffff;
  --hc-n: #8b80ff; --hc-n-ink: #0d0e12;
  --hc-3: #5a4bf4; --hc-3-ink: #ffffff;
  --hc-1: #3524d6; --hc-1-ink: #ffffff;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.022em; line-height: 1.15; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.92em; }
::selection { background: rgba(124, 108, 255, 0.4); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 840px; }
.container--wide { max-width: 1320px; }
.section { padding: clamp(72px, 10vw, 136px) 0; position: relative; }
.section--tight { padding: clamp(36px, 6vw, 72px) 0; }
.section--line { border-top: 1px solid var(--line); }
.section--dark { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.section--dark::before { content: ""; position: absolute; inset: -40% 20% auto 20%; height: 520px; background: radial-gradient(closest-side, rgba(109, 93, 252, 0.16), transparent); pointer-events: none; }
.section--dark > * { position: relative; }
.section--tint { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 740px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.grid { display: grid; gap: clamp(16px, 2.4vw, 24px); }
.grid-2 { display: grid; gap: clamp(16px, 2.4vw, 24px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: clamp(14px, 2vw, 20px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 32px; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 14px; }
.xsmall { font-size: 12.5px; }
.mono { font-family: var(--mono); font-feature-settings: normal; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; box-shadow: 0 0 12px currentColor; }
.display { font-size: clamp(44px, 7vw, 84px); line-height: 1.0; letter-spacing: -0.045em; font-weight: 600; }
.h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.04em; }
.h2 { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.08; letter-spacing: -0.035em; }
.h3 { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.25; letter-spacing: -0.02em; }
.h4 { font-size: 16px; line-height: 1.35; letter-spacing: -0.01em; }
.h5 { font-size: 13px; line-height: 1.4; letter-spacing: 0; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.display, .h1 { background: linear-gradient(180deg, #ffffff 0%, #ffffff 45%, rgba(255, 255, 255, 0.62) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.display .serif, .h1 .serif, .h2 .serif { font-size: 1.08em; line-height: 0.9; padding: 0.04em 0.08em 0.16em 0.12em; margin: 0 -0.04em 0 -0.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: linear-gradient(100deg, #d9d4ff 0%, #a99fff 55%, #8475ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--muted); max-width: 660px; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px;
  border-radius: 9px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 550; letter-spacing: -0.005em; line-height: 1;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--primary, .btn--light { background: #f4f5f6; color: #08090a; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 1px 2px rgba(0, 0, 0, 0.4); }
.btn--primary:hover, .btn--light:hover { background: #ffffff; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 24px -8px rgba(109, 93, 252, 0.7); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--secondary { background: rgba(255, 255, 255, 0.04); color: var(--ink); border-color: var(--line-2); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
.btn--secondary:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line-3); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--hover); color: var(--ink); }
.btn--outline-light { background: transparent; color: var(--ink); border-color: var(--line-3); }
.btn--outline-light:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.03); }
.btn--sm { --h: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn--sm svg { width: 15px; height: 15px; }
.btn--lg { --h: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 11px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.link { color: var(--accent-ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent-soft-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-color: var(--accent-ink); }
button.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; cursor: pointer; }
button.link[aria-busy="true"] { opacity: .6; cursor: progress; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; color: var(--ink); }
.arrow-link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.arrow-link:hover svg { transform: translateX(3px); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-nav.is-scrolled { border-bottom-color: var(--line); background: rgba(8, 9, 10, 0.86); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15.5px; letter-spacing: -0.02em; color: var(--ink); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand small { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; color: var(--subtle); padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a { display: inline-block; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .15s ease, background-color .15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--hover); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 18px; height: 18px; }
.nav-mobile { display: none; }

/* ---------- Forms ---------- */
.field { display: block; }
.label { display: block; font-size: 13px; font-weight: 550; color: var(--ink); margin-bottom: 7px; }
.label .opt { color: var(--subtle); font-weight: 400; }
.input, .textarea {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 14.5px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #5f646d; }
.input:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.22); background: var(--surface); }
.input[aria-invalid="true"] { border-color: var(--poor); }
.hint { font-size: 12.5px; color: var(--subtle); margin: 7px 0 0; }
.form-error { display: none; margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: var(--poor-soft); border: 1px solid var(--poor-line); color: var(--poor-ink); font-size: 14px; }
.form-error.is-visible { display: block; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; margin: 3px 0 0; flex: none; }

.url-form {
  display: flex; align-items: center; gap: 6px;
  max-width: 560px; padding: 6px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); border-radius: 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -24px rgba(0, 0, 0, 0.8);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.url-form:focus-within { border-color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.22), 0 20px 50px -24px rgba(0, 0, 0, 0.8); }
.url-form .url-icon { width: 18px; height: 18px; margin-left: 10px; color: var(--subtle); flex: none; }
.url-form input { flex: 1; min-width: 0; height: 42px; border: 0; background: transparent; padding: 0 6px; font-size: 16px; color: var(--ink); }
.url-form input::placeholder { color: #5f646d; }
.url-form input:focus { outline: none; }
.url-form .btn { --h: 42px; }
.form-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.form-meta span { display: inline-flex; align-items: center; gap: 6px; }
.form-meta svg { width: 15px; height: 15px; color: var(--good-ink); }

/* ---------- Cards, chips, notices ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card--pad { padding: clamp(20px, 3vw, 30px); }
.card--flat { box-shadow: none; }
.card--hover { transition: transform .2s ease, border-color .2s ease, background-color .2s ease; }
.card--hover:hover { transform: translateY(-2px); border-color: var(--line-2); background: #131417; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 550; line-height: 1; white-space: nowrap;
  background: rgba(255, 255, 255, 0.045); color: var(--ink-2); border: 1px solid var(--line-2);
}
.chip svg { width: 12px; height: 12px; }
.chip--good { background: var(--good-soft); color: var(--good-ink); border-color: var(--good-line); }
.chip--fair { background: var(--fair-soft); color: var(--fair-ink); border-color: var(--fair-line); }
.chip--poor { background: var(--poor-soft); color: var(--poor-ink); border-color: var(--poor-line); }
.chip--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-soft-2); }
.chip--dark { background: rgba(255, 255, 255, 0.05); color: var(--ink-2); border-color: var(--line-2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.notice strong { color: var(--ink); }
.notice--success { background: var(--good-soft); border-color: var(--good-line); }
.notice--success > svg { color: var(--good-ink); }
.notice--warn { background: var(--fair-soft); border-color: var(--fair-line); }
.notice--warn > svg { color: var(--fair-ink); }
.notice--error { background: var(--poor-soft); border-color: var(--poor-line); }
.notice--error > svg { color: var(--poor-ink); }
.notice--accent { background: var(--accent-soft); border-color: var(--accent-soft-2); }
.notice--accent > svg { color: var(--accent-ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 9vw, 120px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 900px; z-index: -1;
  background:
    radial-gradient(640px 360px at 72% 22%, rgba(109, 93, 252, 0.24), transparent 70%),
    radial-gradient(520px 300px at 18% 0%, rgba(34, 166, 189, 0.10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 25%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { margin-bottom: 34px; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); margin-bottom: 28px; transition: border-color .15s ease; }
.hero-badge:hover { border-color: var(--line-3); }
.hero-badge b { font-weight: 600; color: var(--ink); }
.hero-badge .chip { height: 20px; border-radius: 999px; }
.hero-badge svg { color: var(--subtle); }

/* AI answer mock */
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 10% -6% -10% 6%; z-index: -1; background: radial-gradient(closest-side, rgba(109, 93, 252, 0.28), transparent); filter: blur(10px); }
.answer-card { position: relative; background: linear-gradient(180deg, #141518, #0f1012); border: 1px solid var(--line-2); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.answer-card__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.answer-card__dots { display: flex; gap: 6px; }
.answer-card__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); display: block; }
.answer-card__title { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.answer-card__q { padding: 18px 20px 6px; }
.answer-card__q p { margin: 0; font-size: 15px; color: var(--ink); font-weight: 500; }
.answer-card__q small { display: block; font-family: var(--mono); font-size: 11px; color: var(--subtle); margin-bottom: 6px; letter-spacing: .06em; text-transform: uppercase; }
.answer-rows { padding: 8px 12px 12px; }
.answer-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; }
.answer-row + .answer-row { border-top: 1px solid var(--line); }
.answer-row__name { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.answer-row__text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.answer-row__text mark { background: var(--accent-soft-2); color: #e4e0ff; border-radius: 4px; padding: 0 3px; }
.answer-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.answer-card__foot .meter { flex: 1; }
.float-score { position: absolute; z-index: 2; right: -14px; top: -22px; display: flex; align-items: center; gap: 12px; padding: 11px 16px 11px 12px; background: #f4f5f6; color: #08090a; border-radius: 14px; box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.8); }
.float-score svg { color: var(--accent); }
.float-score b { display: block; font-size: 22px; line-height: 1; letter-spacing: -0.02em; }
.float-score small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #5d616b; margin-top: 4px; }

/* Assistant avatars */
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: #fff; flex: none; letter-spacing: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
.avatar--sm { width: 26px; height: 26px; border-radius: 7px; font-size: 10px; }
.avatar--xs { width: 22px; height: 22px; border-radius: 6px; font-size: 8.5px; }
.avatar--openai, .avatar--chatgpt { background: #10a37f; }
.avatar--meta { background: #0866ff; }
.avatar--google { background: #e8710a; }
.avatar--mistral { background: linear-gradient(135deg, #ffb000, #fa520f 60%, #e10500); }
.avatar--deepseek { background: #4d6bfe; }
.avatar--claude { background: #d97757; }
.avatar--gemini { background: linear-gradient(135deg, #4285f4, #9b72cb 70%, #d96570); }
.avatar--glm { background: #2f3fd1; }
.avatar--kimi { background: #2a2b33; }
.avatar--chatgpt, .avatar--glm { letter-spacing: -0.03em; }

/* Panel strip */
.panel-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.panel-strip__item { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); border-radius: 999px; font-size: 13.5px; color: var(--ink); font-weight: 550; }
.panel-strip__item .avatar { border-radius: 999px; }
.panel-strip__item > span:not(.avatar) { color: var(--subtle); font-weight: 400; }
.panel-strip__label { width: 100%; text-align: center; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 10px; }

/* ---------- Marketing sections ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.problem { background: var(--bg); padding: clamp(24px, 3vw, 36px); }
.problem__num { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); letter-spacing: .06em; margin-bottom: 30px; display: block; }
.problem h3 { margin-bottom: 10px; }
.problem p { margin: 0; color: var(--muted); font-size: 15px; }

.pillar { padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column; gap: 14px; }
.pillar__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft-2); }
.pillar__icon svg { width: 20px; height: 20px; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; }
.pillar ul { list-style: none; display: grid; gap: 8px; margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
.pillar li { display: flex; gap: 10px; align-items: flex-start; }
.pillar li svg { width: 15px; height: 15px; color: var(--accent-ink); margin-top: 4px; flex: none; }
.pillar__weight { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--subtle); letter-spacing: .04em; text-transform: uppercase; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.step { position: relative; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step__n { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); letter-spacing: .08em; margin-bottom: 44px; display: block; }
.step h3 { font-size: 17px; margin-bottom: 8px; color: var(--ink); }
.step p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- Pricing ---------- */
.pricing-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: start; }
.plan { position: relative; padding: clamp(24px, 3.5vw, 40px); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); }
.plan__name { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan__price { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 6px; }
.plan__price b { font-size: clamp(46px, 6vw, 60px); line-height: 1; letter-spacing: -0.045em; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.plan__price span { color: var(--muted); font-size: 15px; }
.plan__features { list-style: none; display: grid; gap: 12px; margin: 26px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.plan__features li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: 14.5px; color: var(--muted); }
.plan__features li svg { width: 17px; height: 17px; margin-top: 3px; color: var(--accent-ink); }
.plan__features li b { color: var(--ink); font-weight: 600; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); }
.plan-card--popular { border-color: transparent; box-shadow: var(--glow); background: linear-gradient(180deg, #16152a 0%, var(--surface) 42%); }
.plan-card .plan__price { margin: 18px 0 4px; }
.plan-card .plan__price b { font-size: clamp(40px, 4.4vw, 50px); }
.plan-card__list { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; flex: 1; align-content: start; }
.plan-card__list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 14px; color: var(--muted); }
.plan-card__list li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--accent-ink); }
.plan-card__list li b { color: var(--ink); font-weight: 600; }
.plan-card [aria-pressed="true"] { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.checkout-card { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-md); color: var(--muted); position: sticky; top: calc(var(--nav-h) + 20px); }
.checkout-card h3 { color: var(--ink); }
.checkout-card .hint { color: var(--subtle); }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; margin: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.checkout-total b { font-size: 22px; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-picker { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-picker legend { margin-bottom: 8px; padding: 0; }
.plan-picker__opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s; }
.plan-picker__opt:hover { border-color: var(--line-3); }
.plan-picker__opt input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.plan-picker__opt span { display: flex; flex-direction: column; line-height: 1.3; }
.plan-picker__opt b { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.plan-picker__opt small { color: var(--muted); font-size: 12.5px; }
.plan-picker__opt:has(input:checked) { border-color: var(--accent-ink); background: var(--accent-row); }
.trust { display: grid; gap: 10px; margin-top: 18px; font-size: 13.5px; }
.trust div { display: flex; gap: 10px; align-items: flex-start; }
.trust svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; margin-top: 2px; }
.mini-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini-plan { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); transition: border-color .15s, transform .15s; }
.mini-plan:hover { border-color: var(--line-3); transform: translateY(-1px); }
.mini-plan.is-popular { border-color: var(--accent-soft-2); box-shadow: 0 0 0 1px var(--accent-soft-2); }
.mini-plan > span { font-size: 13px; color: var(--muted); font-weight: 550; }
.mini-plan b { font-size: 22px; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-plan b small { font-size: 13px; color: var(--muted); font-weight: 400; }
.mini-plan > small { font-size: 12.5px; color: var(--subtle); }
.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.compare th, .compare td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: 13px; color: var(--muted); font-weight: 550; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 22%; }
.compare td:first-child { color: var(--ink); }
.compare td { color: var(--ink-2); }
.compare svg { width: 17px; height: 17px; margin: 0 auto; }
.compare .yes { color: var(--good-ink); } .compare .no { color: var(--line-3); }
.compare--5 td:not(:first-child), .compare--5 th:not(:first-child) { width: 15%; }
.compare--5 { min-width: 640px; }
.currency-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, 0.03); }
.currency-switch a { padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 550; color: var(--muted); }
.currency-switch a[aria-current="true"] { background: #f4f5f6; color: #08090a; }

/* ---------- FAQ & CTA ---------- */
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .2s ease; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; font-weight: 550; color: var(--ink); font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; color: var(--subtle); flex: none; transition: transform .2s ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 20px; color: var(--muted); font-size: 15px; }
.faq details > div p:last-child { margin-bottom: 0; }

.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: clamp(36px, 6vw, 72px); background: linear-gradient(180deg, #111216, #0c0d0f); border: 1px solid var(--line-2); color: var(--muted); isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: auto -10% -70% 25%; height: 460px; background: radial-gradient(closest-side, rgba(109, 93, 252, 0.35), transparent); pointer-events: none; z-index: -1; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.cta-band h2 { color: var(--ink); max-width: 700px; }
.cta-band .lead { margin-top: 14px; }
.cta-band .url-form { margin-top: 28px; }

.preview-frame { border-radius: var(--radius-xl); padding: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)); border: 1px solid var(--line); }
.preview-fade { position: relative; max-height: 640px; overflow: hidden; border-radius: var(--radius-lg); }
.preview-fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }

/* ---------- Progress ---------- */
.progress-card { max-width: 640px; margin: 0 auto; padding: clamp(24px, 4vw, 40px); }
.pbar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 22px 0 26px; }
.pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--viz-1)); box-shadow: 0 0 12px rgba(124, 108, 255, 0.6); transition: width .6s ease; }
.psteps { list-style: none; display: grid; gap: 2px; }
.pstep { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--subtle); transition: background-color .2s ease, color .2s ease; }
.pstep__icon { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; }
.pstep__icon svg { width: 11px; height: 11px; opacity: 0; }
.pstep__time { font-family: var(--mono); font-size: 12px; }
.pstep.is-active { background: var(--accent-soft); color: var(--ink); }
.pstep.is-active .pstep__icon { border-color: var(--accent-ink); border-right-color: transparent; animation: spin .8s linear infinite; }
.pstep.is-done { color: var(--ink-2); }
.pstep.is-done .pstep__icon { background: var(--good); border-color: var(--good); color: #06150e; }
.pstep.is-done .pstep__icon svg { opacity: 1; }

/* ---------- Meters & score ring ---------- */
.meter { --v: 50; --c: var(--accent-ink); height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--c); border-radius: inherit; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.meter--good { --c: var(--good); } .meter--fair { --c: var(--fair); } .meter--poor { --c: var(--poor); }
.score-ring { position: relative; width: var(--size, 148px); height: var(--size, 148px); flex: none; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 8; }
.score-ring .track { stroke: var(--surface-3); }
.score-ring .val { stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.score-ring--good .val { stroke: var(--good); } .score-ring--fair .val { stroke: var(--fair); } .score-ring--poor .val { stroke: var(--poor); }
.score-ring__label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring__label b { display: block; font-size: calc(var(--size, 148px) * .3); line-height: 1; letter-spacing: -0.045em; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.score-ring__label small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); margin-top: 6px; }

/* ---------- Report ---------- */
.report { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.report-hero { overflow: hidden; position: relative; }
.report-hero::before { content: ""; position: absolute; inset: -60% 40% auto -10%; height: 420px; background: radial-gradient(closest-side, rgba(109, 93, 252, 0.14), transparent); pointer-events: none; }
.report-hero > * { position: relative; }
.report-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: center; }
.report-head__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.report-head h2 { font-size: clamp(22px, 2.8vw, 30px); letter-spacing: -0.03em; }
.report-head p { margin: 8px 0 0; color: var(--muted); max-width: 640px; font-size: 15px; }
.report-section { padding: clamp(18px, 2.6vw, 24px); }
.report-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.report-section__head > div:first-child { min-width: 0; flex: 1 1 320px; }
.report-section__head h3 { font-size: 16px; letter-spacing: -0.015em; }
.report-section__head p { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); max-width: 680px; line-height: 1.55; }
.summary { list-style: none; display: grid; gap: 10px; }
.summary li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.summary li svg { color: var(--accent-ink); margin-top: 3px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; }
.src-mix { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.src-mix span { padding: 5px 10px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.src-mix b { color: var(--ink); font-weight: 600; margin-right: 3px; font-variant-numeric: tabular-nums; }
.ready-head { display: flex; align-items: center; gap: 20px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 14px; }
.ready-score { display: flex; align-items: baseline; gap: 2px; }
.ready-score b { font-size: 40px; line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ready-score span { color: var(--subtle); font-size: 14px; }
.empty-chart { display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; min-height: 220px; color: var(--subtle); border: 1px dashed var(--line-2); border-radius: 10px; padding: 24px; }
.empty-chart svg { width: 22px; height: 22px; }
.empty-chart p { margin: 0; font-size: 13.5px; color: var(--muted); }
.model-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.model-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.model-item summary { list-style: none; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; padding: 11px 14px; cursor: pointer; }
.model-item summary:hover { background: var(--hover); }
.model-item summary::-webkit-details-marker { display: none; }
.model-item summary .caret { width: 18px; height: 18px; color: var(--subtle); transition: transform .2s ease; }
.model-item[open] summary .caret { transform: rotate(180deg); }
.model-item summary > span:not(.avatar):not(.chip) { min-width: 0; }
.model-item__name { display: block; font-weight: 600; color: var(--ink); font-size: 14px; line-height: 1.25; }
.model-item__note { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-item__body { padding: 0 14px 14px 58px; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; line-height: 1.6; }
.model-item__body .answer { padding: 12px 14px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); max-height: 340px; overflow: auto; }
.model-item__body .answer strong { color: var(--ink); font-weight: 600; }
.answer .cite { display: inline-block; padding: 0 6px; margin: 0 1px; border-radius: 5px; background: var(--surface-3); color: var(--muted); font-size: 11.5px; line-height: 1.6; vertical-align: 1px; }
.answer .cite:hover { color: var(--accent-ink); background: var(--accent-soft); }
.answer-sources { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; font-size: 12.5px; color: var(--subtle); white-space: normal; }
.answer-sources svg { flex: none; }
.tag-web { display: inline-block; padding: 1px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft-2); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .03em; line-height: 1.4; vertical-align: 1px; }
.answers-btn { display: flex; align-items: center; gap: 4px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; }
.answers-btn:hover { color: var(--ink); }
.answers-btn svg { transition: transform .15s; }
.answers-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Tables */
/* Scroll containers are positioned so absolutely positioned children (e.g. .sr-only) stay inside them. */
.table-wrap { position: relative; overflow-x: auto; }
.dtable, .admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dtable { min-width: 560px; }
.dtable th, .admin-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable td, .admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.admin-table td { vertical-align: top; }
.dtable tbody tr:last-child td, .admin-table tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
.dtable .num, .dtable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dtable td b { color: var(--ink); font-weight: 600; }
.dtable tr.is-current td { background: var(--accent-row); }
.dtable .chip + .chip { margin-left: 4px; }
.who { display: inline-flex; gap: 10px; align-items: center; }
.who b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.who small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.share-cell { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 550; }
.share-cell + small { display: block; font-size: 12px; margin-top: 3px; }

/* Question matrix and heatmaps */
.matrix-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 640px; }
.matrix th, .matrix td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.matrix thead th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-2); }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix td.q { color: var(--ink); font-weight: 500; min-width: 240px; max-width: 440px; line-height: 1.45; }
.matrix th.eng { text-align: center; font-size: 12px; font-weight: 550; color: var(--ink-2); padding: 10px 6px; min-width: 78px; }
.matrix th.eng .mh { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; }
.matrix th.eng .tag-web { font-size: 9px; }
.matrix tbody td:not(.q) { text-align: center; }
.matrix td.q, .matrix thead th:first-child { position: sticky; left: 0; z-index: 1; }
.matrix td.q { background: var(--surface); }
.matrix tr.mgroup th { background: var(--bg-2); font-size: 12px; font-weight: 600; color: var(--ink); padding: 9px 12px; text-align: left; }
.matrix tr.mgroup th span { margin-left: 10px; font-weight: 400; color: var(--muted); }
.matrix tr.answers-row td { background: var(--bg-2); padding: 14px; position: static; text-align: left; }
.matrix--h2h td.q { min-width: 180px; }
.matrix--h2h tr.is-you td { background: var(--accent-row); }
.hc { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 6px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; font-style: normal; font-variant-numeric: tabular-nums; cursor: default; }
.hc svg { width: 13px; height: 13px; }
.hc--1 { background: var(--hc-1); color: var(--hc-1-ink); }
.hc--3 { background: var(--hc-3); color: var(--hc-3-ink); }
.hc--n { background: var(--hc-n); color: var(--hc-n-ink); }
.hc--0 { background: rgba(255, 255, 255, 0.045); color: var(--subtle); }
.hc--x { background: transparent; color: var(--subtle); box-shadow: 0 0 0 1px var(--line-2) inset; }
.hc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.hc-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.hc-legend .hc { min-width: 28px; height: 20px; font-size: 10.5px; }
.hs { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 28px; padding: 0 6px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; font-style: normal; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, 0.045); color: var(--subtle); cursor: default; }
.hs--1 { background: var(--hs-1); color: var(--hs-1-ink); }
.hs--2 { background: var(--hs-2); color: var(--hs-2-ink); }
.hs--3 { background: var(--hs-3); color: var(--hs-3-ink); }
.hs--4 { background: var(--hs-4); color: var(--hs-4-ink); }
.hs-legend { display: flex; align-items: center; gap: 3px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.hs-legend .hs { min-width: 24px; height: 10px; padding: 0; border-radius: 3px; }
.hs-legend span:first-child { margin-right: 5px; }
.hs-legend span:last-child { margin-left: 5px; }

/* Readiness checks */
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.check__icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.check__icon svg { width: 12px; height: 12px; }
.check--pass .check__icon { background: var(--good-soft); color: var(--good-ink); }
.check--warn .check__icon { background: var(--fair-soft); color: var(--fair-ink); }
.check--fail .check__icon { background: var(--poor-soft); color: var(--poor-ink); }
.check__label { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.check__detail { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; word-break: break-word; }
.check__pts { font-family: var(--mono); font-size: 12px; color: var(--subtle); white-space: nowrap; }
.bots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Fixes */
.recs { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; counter-reset: rec; }
.rec { position: relative; padding: 16px 18px 16px 54px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); transition: border-color .15s ease, opacity .15s ease; }
.rec::before { counter-increment: rec; content: counter(rec, decimal-leading-zero); position: absolute; left: 18px; top: 18px; font-family: var(--mono); font-size: 12.5px; color: var(--subtle); }
.rec__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rec h4 { font-size: 15px; line-height: 1.4; color: var(--ink); width: 100%; margin-top: 2px; }
.rec p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.rec--doing { border-color: var(--accent-soft-2); box-shadow: 3px 0 0 var(--accent-ink) inset; }
.rec--done { opacity: .7; }
.rec--done::before { content: "✓"; color: var(--good-ink); font-size: 14px; }
.rec--done h4 { text-decoration: line-through; text-decoration-color: var(--subtle); text-decoration-thickness: 1px; }
.fix-status { margin-left: auto; }
.fix-status select {
  height: 28px; padding: 0 28px 0 10px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: var(--ink); font-size: 12.5px; font-weight: 550; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.fix-status select:hover { border-color: var(--line-3); }
.fix-status.is-saving select { opacity: .6; }
.snippet { margin-top: 12px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--code-bg); }
.snippet__bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.snippet__bar button { height: 26px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.snippet__bar button:hover { background: rgba(255, 255, 255, 0.1); }
.snippet pre { margin: 0; padding: 14px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #d7dae0; white-space: pre; }
.locked { position: relative; padding: 24px; border-radius: 12px; border: 1px dashed var(--line-3); background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015) 8px, transparent 8px, transparent 16px); text-align: center; }
.locked p { max-width: 480px; margin: 6px auto 16px; color: var(--muted); font-size: 14px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Charts ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; display: flex; flex-direction: column; min-height: 128px; padding: 15px 16px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.report-hero .kpi { background: var(--surface-2); box-shadow: none; }
.kpi__label { font-size: 12.5px; font-weight: 500; color: var(--muted); line-height: 1.3; }
.kpi__value { margin-top: 8px; font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi__suffix { margin-left: 3px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--subtle); }
.kpi__foot { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; margin: 10px 0 10px; font-size: 12.5px; line-height: 1.3; }
.kpi__sub { color: var(--muted); }
.kpi .spark { margin-top: auto; }
.delta { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta svg { width: 12px; height: 12px; }
.delta--good { color: var(--good-ink); background: var(--good-soft); }
.delta--bad { color: var(--poor-ink); background: var(--poor-soft); }
.delta--flat { color: var(--muted); background: rgba(255, 255, 255, 0.05); }
.spark { position: relative; height: 26px; }
.spark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spark path { fill: none; stroke: var(--viz-muted); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--viz-1); box-shadow: 0 0 0 2px var(--surface); transform: translate(-50%, -50%); }
.report-hero .spark i { box-shadow: 0 0 0 2px var(--surface-2); }

.viz { margin: 0; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; font-size: 12.5px; color: var(--ink-2); }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lk { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--viz-muted); }
.lk.s1 { background: var(--viz-1); } .lk.s2 { background: var(--viz-2); } .lk.s3 { background: var(--viz-3); }
.viz-plot { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto 24px; }
.viz--line.has-ends .viz-plot { grid-template-columns: 34px minmax(0, 1fr) 118px; }
.viz-y { position: relative; grid-row: 1; grid-column: 1; }
.viz-y span { position: absolute; right: 10px; transform: translateY(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--subtle); font-variant-numeric: tabular-nums; }
.viz-area-box { position: relative; grid-row: 1; grid-column: 2; height: 220px; }
.viz-area-box > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.viz-grid line { stroke: var(--viz-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.viz-grid line:last-child { stroke: var(--line-2); }
.viz-line { fill: none; stroke: var(--viz-muted); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.viz-line.s1 { stroke: var(--viz-1); } .viz-line.s2 { stroke: var(--viz-2); } .viz-line.s3 { stroke: var(--viz-3); }
.viz-area { stroke: none; fill: var(--viz-1); opacity: .12; }
.viz-area.s2 { fill: var(--viz-2); } .viz-area.s3 { fill: var(--viz-3); }
.viz-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--viz-muted); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; z-index: 1; }
.viz-dot.s1 { background: var(--viz-1); } .viz-dot.s2 { background: var(--viz-2); } .viz-dot.s3 { background: var(--viz-3); }
.viz-end { position: absolute; left: calc(100% + 12px); transform: translateY(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; line-height: 1.2; pointer-events: none; }
.viz-end b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-x { position: relative; grid-row: 2; grid-column: 2; height: 24px; }
.viz-x span { position: absolute; top: 8px; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--subtle); white-space: nowrap; }
.viz-x span.is-first { transform: none; }
.viz-x span.is-last { transform: translateX(-100%); }
.viz-hit { position: absolute; top: 0; bottom: 0; z-index: 2; cursor: crosshair; border-radius: 4px; }
.viz-hit:focus-visible { outline: 1px solid var(--accent-ink); outline-offset: -1px; }
.viz-cross { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; background: var(--line-3); opacity: 0; pointer-events: none; transition: opacity .1s ease; }
.viz-area-box.is-hover .viz-cross { opacity: 1; }
.viz figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.viz-table { margin-top: 12px; font-size: 13px; }
.viz-table summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; }
.viz-table summary::-webkit-details-marker { display: none; }
.viz-table summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px; }
.viz-table[open] summary::before { transform: rotate(45deg); }
.viz-table summary:hover { color: var(--ink); }
.viz-table__wrap { position: relative; overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; max-height: 320px; }
.viz-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.viz-table th, .viz-table td { padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.viz-table th { font-weight: 500; font-size: 12px; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
.viz-table td { color: var(--ink-2); }
.viz-table tr:last-child td { border-bottom: 0; }

.hbars { display: grid; gap: 2px; }
.hbar { display: grid; grid-template-columns: minmax(96px, 32%) minmax(0, 1fr) 54px; align-items: center; gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: 7px; font-size: 13.5px; cursor: default; }
.hbar:hover, .hbar:focus-visible { background: var(--hover); }
.hbar__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar.is-hl .hbar__label { color: var(--ink); font-weight: 600; }
.hbar__tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted); line-height: 1.5; vertical-align: 1px; }
.is-hl .hbar__tag, .is-you .hbar__tag { color: var(--accent-ink); border-color: var(--accent-soft-2); background: var(--accent-soft); }
.hbar__track { position: relative; height: 10px; border-radius: 0 4px 4px 0; background: var(--viz-track); }
.hbar__track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--viz-muted); }
.hbar.is-hl .hbar__track i, .hbar.is-solid .hbar__track i { background: var(--viz-1); }
.hbar__value { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.split .hbar { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 36px; }
.split .hbar__label { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.hbar.is-hl .hbar__value { color: var(--ink); font-weight: 600; }
.ibar { display: inline-block; width: 56px; height: 6px; border-radius: 0 3px 3px 0; background: var(--viz-track); overflow: hidden; vertical-align: middle; }
.ibar i { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--viz-1); }

/* Tooltip (built by public/app.js from data-tip) */
.viz-tip { position: fixed; z-index: 200; min-width: 150px; max-width: 300px; padding: 9px 11px; border-radius: 9px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8); font-size: 12.5px; color: var(--ink-2); pointer-events: none; opacity: 0; transform: translateY(2px); transition: opacity .08s ease, transform .08s ease; }
.viz-tip.is-visible { opacity: 1; transform: none; }
.viz-tip__t { margin-bottom: 5px; font-size: 12px; font-weight: 600; color: var(--ink); }
.viz-tip__r { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.viz-tip__r span { flex: 1; color: var(--muted); }
.viz-tip__r b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.viz-tip__sw { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--viz-muted); }
.viz-tip__sw.s1 { background: var(--viz-1); } .viz-tip__sw.s2 { background: var(--viz-2); } .viz-tip__sw.s3 { background: var(--viz-3); }

/* ---------- Dashboard ---------- */
body.is-dash { background: var(--bg); }
.dash { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.dash-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 14px 10px 12px 12px; }
.dash-brand { display: inline-flex; align-items: center; gap: 9px; padding: 6px 8px 14px; font-weight: 600; font-size: 14.5px; letter-spacing: -0.015em; color: var(--ink); }
.dash-brand .brand-mark { width: 22px; height: 22px; }
.dash-site { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.dash-site__mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-weight: 650; font-size: 13px; color: #fff; background: linear-gradient(135deg, #8b80ff, #4b3bf5); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset; }
.dash-site__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dash-site__text b { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-site__text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-site__meta { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 2px 12px; }
.dash-nav { display: grid; gap: 1px; }
.dash-nav__item { position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: background-color .12s ease, color .12s ease; }
.dash-nav__item svg { width: 16px; height: 16px; flex: none; opacity: .9; }
.dash-nav__item:hover { background: var(--hover); color: var(--ink); }
.dash-nav__item.is-active { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.dash-nav__item.is-active svg { color: var(--accent-ink); opacity: 1; }
.dash-side__foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 1px; }
.dash-main { min-width: 0; margin: 8px 8px 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: 80px; }
.dash-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(13, 14, 16, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.dash-top__title { min-width: 0; }
.dash-top__title h1 { font-size: 18px; letter-spacing: -0.02em; }
.dash-top__title p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.dash-top__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-body { padding: 24px 28px 72px; max-width: 1360px; }
.dash-body > .stack > * + *, .dash-body.stack > * + * { margin-top: 14px; }
.dash-grid { display: grid; gap: 14px; }
.dash-grid--2-1 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.dash-grid--2-1 > :only-child { grid-column: 1 / -1; }
.dash .report-section__head h3 { font-size: 15px; }
.dash .empty { padding: clamp(40px, 6vw, 72px) 24px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.settings-grid > .stack > * + * { margin-top: 14px; }
.grid-2-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* ---------- Account, saved audits, admin ---------- */
.app-top { padding: 32px 0 8px; }
.app-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app-title h1 { font-size: clamp(26px, 3.4vw, 36px); }
.app-title .row { gap: 8px; }
.history-list { list-style: none; display: grid; }
.history-list li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.history-list li:last-child a { border-bottom: 0; }
.history-list li a:hover { color: var(--accent-ink); }
.history-list li a.is-current { color: var(--accent-ink); font-weight: 600; }
.copy-field { display: flex; gap: 6px; }
.copy-field input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); color: var(--ink-2); }
.empty { text-align: center; padding: clamp(32px, 5vw, 56px) 24px; }
.empty__icon { width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft-2); }
.empty__icon svg { width: 22px; height: 22px; }

/* ---------- Prose / legal ---------- */
.page-head { position: relative; overflow: hidden; isolation: isolate; padding: clamp(56px, 8vw, 104px) 0 clamp(32px, 5vw, 48px); border-bottom: 1px solid var(--line); }
.page-head::before { content: ""; position: absolute; inset: -60% -10% auto 30%; height: 640px; z-index: -1; background: radial-gradient(closest-side, rgba(109, 93, 252, 0.18), transparent); }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 60% 80% at 70% 0%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 60% 80% at 70% 0%, #000 20%, transparent 70%); }
.page-head .lead { margin-top: 16px; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); padding: clamp(40px, 6vw, 64px) var(--gutter) clamp(64px, 8vw, 104px); }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; font-size: 13.5px; }
.toc p { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); margin-bottom: 12px; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line-2); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.prose { max-width: 740px; color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.prose h2 { font-size: 22px; margin: 48px 0 12px; letter-spacing: -0.02em; scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16.5px; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--subtle); }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-soft-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 20px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); background: var(--surface); }
.prose .callout { padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); font-size: 15px; color: var(--ink-2); }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- Footer & 404 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding: 64px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid h4 { font-size: 12px; font-family: var(--mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); margin-bottom: 14px; }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); transition: color .15s ease; }
.footer-grid a:hover { color: var(--ink); }
.footer-about p { color: var(--muted); max-width: 340px; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12.5px; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.nf { position: relative; min-height: 66vh; display: grid; place-items: center; text-align: center; padding: 80px 0; overflow: hidden; isolation: isolate; }
.nf::before { content: ""; position: absolute; inset: -30% 10% auto 10%; height: 600px; z-index: -1; background: radial-gradient(closest-side, rgba(109, 93, 252, 0.16), transparent); }
.nf__code { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; color: var(--accent-ink); margin-bottom: 14px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print report (PDF) ---------- */
.print-report { max-width: 980px; margin: 0 auto; padding: 32px 28px 48px; display: grid; gap: 14px; }
.print-cover { padding: 8px 0 24px; margin-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.print-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; color: var(--ink); }
.print-brand .brand-mark { width: 26px; height: 26px; }
.print-cover h1 { margin-top: 40px; font-size: 34px; letter-spacing: -0.035em; color: var(--ink); background: none; }
.print-cover__company { margin: 10px 0 0; font-size: 18px; color: var(--ink-2); font-weight: 550; }
.print-cover__date { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.is-print .card { box-shadow: none; }
.is-print .kpi { background: var(--surface-2); box-shadow: none; }
.is-print .spark i { box-shadow: 0 0 0 2px var(--surface-2); }
.is-print .viz-dot { box-shadow: 0 0 0 2px var(--surface); }
.is-print .model-item__body .answer { background: var(--surface-2); }
.is-print .snippet pre { color: var(--ink-2); white-space: pre-wrap; }
.is-print .snippet__bar button, .is-print .viz-table, .is-print .viz-hit, .is-print .viz-cross { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid--2-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-layout { grid-template-columns: 1fr; }
  .checkout-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  /* Dashboard: the sidebar becomes a top bar with scrolling tabs; the page scrolls normally. */
  .dash { display: block; }
  .dash-side { position: sticky; top: 0; z-index: 20; height: auto; overflow: visible; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 10px var(--gutter) 0; background: rgba(8, 9, 10, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .dash-brand { padding: 4px 0; }
  .dash-brand span { display: none; }
  .dash-site { border: 0; background: none; padding: 0; min-width: 0; }
  .dash-site__mark { width: 26px; height: 26px; font-size: 12px; }
  .dash-site__meta { display: none; }
  .dash-nav { grid-column: 1 / -1; display: flex; gap: 2px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scrollbar-width: none; }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav__item { flex: none; height: 30px; }
  .dash-nav__item svg { display: none; }
  .dash-side__foot { grid-row: 1; grid-column: 3; display: flex; gap: 2px; margin: 0; padding: 0; border: 0; }
  .dash-side__foot .dash-nav__item { width: 32px; padding: 0; justify-content: center; }
  .dash-side__foot .dash-nav__item svg { display: block; }
  .dash-side__foot .dash-nav__item span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dash-main { margin: 0; border: 0; border-radius: 0; height: auto; overflow: visible; background: var(--bg); }
  .dash-top { position: static; padding: 18px var(--gutter) 6px; border-bottom: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .dash-body { padding: 14px var(--gutter) 56px; }
}
@media (max-width: 860px) {
  .nav-links, .nav-actions .btn--ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav.is-open { background: var(--bg); }
  .site-nav.is-open .nav-mobile { display: block; }
  .nav-mobile { border-top: 1px solid var(--line); background: var(--bg); padding: 12px var(--gutter) 20px; }
  .nav-mobile ul { list-style: none; display: grid; gap: 2px; }
  .nav-mobile a { display: block; padding: 12px 6px; font-size: 16px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav-mobile .btn { margin-top: 14px; width: 100%; padding: 0 16px; color: #08090a; border-bottom: 0; }
  .grid-3, .problem-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checks { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .report-head { grid-template-columns: 1fr; justify-items: start; }
  .float-score { right: 10px; top: -18px; }
  .plan-grid, .mini-plans { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 116px; padding: 13px 14px 12px; }
  .kpi__value { font-size: 26px; }
  .viz--line.has-ends .viz-plot { grid-template-columns: 30px minmax(0, 1fr); }
  .viz-end { display: none; }
  .viz-area-box { height: 190px; }
  .grid-2-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .url-form { flex-wrap: wrap; padding: 8px; }
  .url-form .url-icon { display: none; }
  .url-form input { width: 100%; flex-basis: 100%; height: 44px; padding: 0 8px; }
  .url-form .btn { width: 100%; }
  .hbar, .split .hbar { grid-template-columns: minmax(0, 1fr) 48px; gap: 4px 10px; }
  .hbar__track { grid-column: 1 / -1; grid-row: 2; }
  .model-item summary { grid-template-columns: 28px minmax(0, 1fr) 18px; }
  .model-item summary .chip { grid-column: 2; justify-self: start; }
  .model-item summary .caret { grid-row: 1; grid-column: 3; }
  .model-item__body { padding-left: 14px; }
  .answer-row { grid-template-columns: 30px minmax(0, 1fr); }
  .answer-row .chip { grid-column: 2; justify-self: start; }
  .rec { padding-left: 16px; }
  .rec::before { position: static; display: block; margin-bottom: 6px; }
  .fix-status { margin-left: 0; }
  .compare th, .compare td { padding: 11px 8px; font-size: 13.5px; }
  .ready-head { flex-wrap: wrap; }
  .dash-top__actions .btn--ghost { display: none; }
}

/* ---------- Print ---------- */
@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff; --bg-2: #f7f7f8; --panel: #ffffff; --surface: #ffffff; --surface-2: #f6f6f7; --surface-3: #ececee; --raise: #ffffff;
    --ink: #0d0e12; --ink-2: #2b2d34; --muted: #5d616b; --subtle: #6f737c;
    --line: #e6e6e9; --line-2: #d9d9de; --line-3: #c3c4ca; --hover: transparent;
    --accent: #4b3bf5; --accent-hover: #3524d6; --accent-ink: #3524d6; --accent-soft: #f0eeff; --accent-soft-2: #e1dcff; --accent-row: #f5f3ff;
    --good: #0a8f63; --good-ink: #076c4b; --good-soft: #e5f6ee; --good-line: #c5ebd9;
    --fair: #b86e00; --fair-ink: #8a5300; --fair-soft: #fdf2d8; --fair-line: #f4dfaa;
    --poor: #d23a3a; --poor-ink: #a92626; --poor-soft: #fdeceb; --poor-line: #f6cfcd;
    --code-bg: #f6f6f7;
    --viz-1: #4b3bf5; --viz-2: #d9541c; --viz-3: #0e8ea3; --viz-muted: #a3a7b0; --viz-grid: #ececee; --viz-track: #f1f1f3;
    --hs-1: #a59cff; --hs-1-ink: #0d0e12; --hs-2: #7c6ff8; --hs-2-ink: #0d0e12; --hs-3: #5544e6; --hs-3-ink: #ffffff; --hs-4: #3524c0; --hs-4-ink: #ffffff;
    --hc-n: #8b80ff; --hc-n-ink: #0d0e12; --hc-3: #5a4bf4; --hc-3-ink: #ffffff; --hc-1: #3524d6; --hc-1-ink: #ffffff;
    --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
  }
  @page { margin: 14mm; }
  html, body { background: #fff; }
  body { font-size: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-nav, .site-footer, .dash-side, .dash-top__actions, .no-print, .skip-link, .viz-table, .viz-hit, .viz-cross, .viz-tip, .snippet__bar button { display: none !important; }
  .dash { display: block; }
  .dash-main { margin: 0; border: 0; height: auto; overflow: visible; background: #fff; }
  .dash-top { position: static; background: none; backdrop-filter: none; }
  .display, .h1, .display .serif, .h1 .serif, .h2 .serif { background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
  .card, .kpi, .model-item, .rec, .check, .notice { box-shadow: none !important; break-inside: avoid; }
  .report-section { break-inside: auto; }
  .report-section__head, .viz, .hbar, .matrix tr, .dtable tr { break-inside: avoid; }
  .report-section__head, .h5, .hc-legend { break-after: avoid; }
  .split, .hbars { display: block; }
  .split > div + div { margin-top: 22px; }
  .report-hero::before, .hero::before, .hero::after, .page-head::before, .page-head::after, .cta-band::before, .cta-band::after { display: none; }
  .model-item:not([open]) .model-item__body { display: block; }
  .matrix-wrap, .table-wrap { overflow: visible; }
  .matrix, .dtable { min-width: 0; }
  .matrix td.q { position: static; }
  .snippet pre { color: #111; white-space: pre-wrap; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .kpi { min-height: 0; padding: 10px 11px; }
  .kpi__value { font-size: 22px; }
  .dash-grid--2-1, .split { grid-template-columns: minmax(0, 1fr); }
  .viz--line.has-ends .viz-plot { grid-template-columns: 34px minmax(0, 1fr) 118px; }
  .viz-end { display: block; }
  .viz-area-box { height: 190px; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: inherit; text-decoration: none; }
  .print-report { padding: 0; max-width: none; }
}
