/* ResearchDart public site
   A quality-first routing layer for survey sample. The imagery is the product itself:
   session decisions, signals and outcome codes. One dark band per page at most. */

@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/schibsted-grotesk-variable.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --canvas: #f5f6f3;
  --canvas-deep: #eceee9;
  --surface: #ffffff;
  --ink: #101b1f;
  --ink-2: #44525a;
  --ink-3: #6f7c80;
  --line: #dde2de;
  --line-strong: #c5ccc7;

  --brand: #0b6b66;
  --brand-deep: #084f4b;
  --brand-tint: #e1efec;

  --night: #0f1a1e;
  --night-2: #16262b;
  --night-line: #26383d;
  --night-ink: #e4ecea;
  --night-ink-2: #9fb2ae;

  --pass: #1e7a4c;
  --flag: #a8660b;
  --block: #b3261e;
  --quota: #3558a8;
  --pass-tint: #e3f1e8;
  --flag-tint: #f8ecd9;
  --block-tint: #f8e2e0;
  --quota-tint: #e4e9f5;

  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: clamp(1.9rem, 1.4rem + 1.5vw, 2.5rem);
  --text-hero: clamp(2.4rem, 1.7rem + 2.4vw, 3.6rem);

  --gutter: clamp(20px, 4vw, 48px);
  --max: 1200px;
  --measure: 66ch;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-panel: 0 1px 0 rgba(16, 27, 31, 0.04), 0 12px 32px -12px rgba(16, 27, 31, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: var(--brand-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--text-hero); letter-spacing: -0.04em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.03em; }
h3 { font-size: var(--text-lg); letter-spacing: -0.015em; }
p { margin: 0 0 1em; text-wrap: pretty; }
code, kbd, pre { font-family: var(--font-mono); }
:not(pre) > code { font-size: 0.86em; background: var(--canvas-deep); padding: 0.12em 0.38em; border-radius: 4px; overflow-wrap: anywhere; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 60; }
.skip-link:focus { left: 8px; top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.lede { font-size: var(--text-lg); line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-size: 0.86em; }
.fine { font-size: var(--text-sm); color: var(--ink-3); }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(245, 246, 243, 0.92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 32px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.14rem; letter-spacing: -0.03em; }
.wordmark svg { width: 26px; height: 26px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.site-nav > a, .nav-trigger { font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--ink-2); text-decoration: none; background: none; border: 0; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; }
.site-nav > a:hover, .nav-trigger:hover, .nav-group:focus-within .nav-trigger { color: var(--ink); background: var(--canvas-deep); }
.site-nav > a[aria-current="page"], .nav-trigger[data-current] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-actions .signin { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 8px 10px; }
.nav-actions .signin:hover { color: var(--ink); }

.nav-group { position: relative; }
.nav-panel { position: absolute; top: calc(100% + 6px); left: -12px; width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-panel); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s, transform .16s, visibility 0s .16s; }
.nav-group:hover .nav-panel, .nav-group:focus-within .nav-panel, .nav-group.is-open .nav-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; }
.nav-panel a { display: block; padding: 12px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.nav-panel a:hover { background: var(--canvas); }
.nav-panel strong { display: block; font-size: 0.95rem; font-weight: 600; }
.nav-panel span { display: block; font-size: 0.85rem; color: var(--ink-3); line-height: 1.45; margin-top: 2px; }
.nav-toggle { display: none; }

@media (max-width: 1020px) {
  .site-header .wrap { gap: 12px; }
  .nav-toggle { display: inline-flex; margin-left: auto; font: inherit; font-weight: 500; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 14px; color: var(--ink); }
  .site-nav, .nav-actions { display: none; }
  .site-header.is-open .site-nav { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--canvas); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 12px; max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav-group { width: 100%; }
  .site-nav > a, .nav-trigger { width: 100%; padding: 14px 0; text-align: left; border-radius: 0; border-bottom: 1px solid var(--line); }
  .site-nav > a:hover, .nav-trigger:hover { background: none; }
  .nav-panel { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 8px; grid-template-columns: 1fr; opacity: 1; visibility: visible; transform: none; display: none; }
  .nav-group.is-open .nav-panel { display: grid; }
  .nav-panel a { padding: 10px 0 10px 12px; }
  .mobile-actions { display: flex; gap: 10px; padding-top: 14px; }
}
@media (min-width: 1021px) { .mobile-actions { display: none; } }

/* ------------------------------------------------------------------ buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 0.97rem; font-weight: 600; line-height: 1; padding: 13px 20px; border-radius: var(--r-sm); border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap; }
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: var(--brand-deep); color: #fff; }
.button-brand { background: var(--brand); color: #fff; }
.button-brand:hover { background: var(--brand-deep); color: #fff; }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.button-secondary:hover { border-color: var(--ink); color: var(--ink); }
.button-small { padding: 9px 14px; font-size: 0.9rem; }
.button-on-dark { background: transparent; color: var(--night-ink); border-color: var(--night-line); }
.button-on-dark:hover { border-color: var(--night-ink); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ------------------------------------------------------------------ sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.section-after-hero { padding-top: clamp(20px, 3vw, 36px); }
.section-surface { background: var(--surface); border-block: 1px solid var(--line); }
.section-night { background: var(--night); color: var(--night-ink); }
.section-night h2, .section-night h3 { color: #fff; }
.section-night .lede, .section-night p { color: var(--night-ink-2); }
.section-night a { color: #9fe0d6; }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { color: var(--ink-2); font-size: var(--text-lg); line-height: 1.55; }
.section-night .section-head p { color: var(--night-ink-2); }
.section-head.centered { margin-inline: auto; text-align: center; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split > * { min-width: 0; }
.split-center { align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 30px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 560px; }
.hero-facts dt { font-size: 0.93rem; font-weight: 600; }
.hero-facts dd { margin: 3px 0 0; font-size: 0.86rem; color: var(--ink-3); line-height: 1.45; }
@media (max-width: 1020px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .hero-facts { grid-template-columns: 1fr; gap: 14px; } }

.page-hero { padding-block: clamp(48px, 7vw, 96px) clamp(36px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3.4rem); max-width: 22ch; }
.page-hero .lede { max-width: 62ch; }
.page-hero .actions { margin-top: 28px; }
.breadcrumbs { font-size: var(--text-sm); color: var(--ink-3); margin-bottom: 20px; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs span[aria-hidden] { margin-inline: 8px; color: var(--line-strong); }

/* ------------------------------------------------------------------ product panel (console mock) */
.ui-panel { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-panel); overflow: hidden; font-size: 0.86rem; }
.ui-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfbfa; }
.ui-title { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ui-title code { background: none; padding: 0; color: var(--ink-3); font-size: 0.8rem; white-space: nowrap; }
.ui-live { display: inline-flex; align-items: center; gap: 6px; color: var(--pass); font-size: 0.78rem; font-weight: 600; }
.ui-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--pass-tint); }
.ui-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.ui-metrics div { padding: 12px 16px; border-right: 1px solid var(--line); }
.ui-metrics div:last-child { border-right: 0; }
.ui-metrics dt { color: var(--ink-3); font-size: 0.74rem; }
.ui-metrics dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ui-table { width: 100%; border-collapse: collapse; }
.ui-table th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 0.74rem; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ui-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.ui-table tr:last-child td { border-bottom: 0; }
.ui-table .mono { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-2); }
.ui-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.76rem; background: #fbfbfa; }
.ui-scroll { overflow-x: auto; }

/* Settings read-out inside a console panel (buyers page). */
.setting-list { margin: 0; }
.setting-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 24px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.setting-list > div:last-child { border-bottom: 0; }
.setting-list dt { font-size: 0.92rem; color: var(--ink-2); }
.setting-list dd { margin: 0; font-weight: 600; font-size: 0.95rem; text-align: right; }
.setting-list dd span { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-3); margin-top: 2px; }

/* Framed screenshot crop. */
.crop-shot { margin: 34px 0 0; }
.crop-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-panel); }
.crop-shot figcaption { font-size: var(--text-sm); color: var(--ink-3); margin-top: 12px; }
@media (max-width: 640px) { .ui-title code { display: none; } .ui-metrics { grid-template-columns: repeat(2, 1fr); } .ui-metrics div:nth-child(2) { border-right: 0; } .ui-metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .hide-narrow { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  .ui-row-new { animation: row-in 0.6s cubic-bezier(.2,.7,.2,1) 0.9s both; }
  .ui-row-new td { animation: row-flash 1.8s ease-out 0.9s both; }
  @keyframes row-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  @keyframes row-flash { from { background: var(--brand-tint); } to { background: transparent; } }
}

.chip { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1; padding: 4px 6px; border-radius: 4px; background: var(--canvas-deep); color: var(--ink-2); margin-right: 4px; }
.chip-risk { background: var(--flag-tint); color: #7a4a06; }
.chip-high { background: var(--block-tint); color: #8c1d17; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; line-height: 1; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-pass { background: var(--pass-tint); color: var(--pass); }
.pill-flag { background: var(--flag-tint); color: var(--flag); }
.pill-block { background: var(--block-tint); color: var(--block); }
.pill-quota { background: var(--quota-tint); color: var(--quota); }
.pill-neutral { background: var(--canvas-deep); color: var(--ink-2); }

/* ------------------------------------------------------------------ route diagram */
.route-figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.6vw, 30px); box-shadow: var(--shadow-panel); }
.route-figure svg { display: block; width: 100%; height: auto; }
.route-figure figcaption { font-size: var(--text-sm); color: var(--ink-3); margin-top: 14px; }
.route-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.route-branch { fill: none; stroke-width: 2.5; }
.route-node { fill: var(--canvas); stroke: var(--ink); stroke-width: 1.5; }
.route-label { font-family: var(--font-sans); font-size: 16px; font-weight: 600; fill: var(--ink); }
.route-url { font-family: var(--font-mono); font-size: 12.5px; fill: var(--ink-2); }
.route-code { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .route-draw { stroke-dasharray: 520; stroke-dashoffset: 520; animation: route-draw 1.1s cubic-bezier(.3,.7,.2,1) forwards; }
  .route-draw.is-branch { animation-delay: 0.9s; animation-duration: 0.9s; }
  .route-reveal { opacity: 0; animation: route-reveal 0.5s ease-out 1.5s forwards; }
  @keyframes route-draw { to { stroke-dashoffset: 0; } }
  @keyframes route-reveal { to { opacity: 1; } }
}

/* ------------------------------------------------------------------ compatibility strip */
.platform-strip { border-block: 1px solid var(--line); padding-block: 22px; }
.platform-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; }
.platform-strip p { margin: 0; font-size: var(--text-sm); color: var(--ink-3); }
.platform-strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 32px; }
.platform-strip li { font-weight: 600; color: var(--ink-2); letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ lifecycle */
.lifecycle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.stage { padding: clamp(24px, 3vw, 36px); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.stage:last-child { border-right: 0; }
.stage-index { font-size: 0.9rem; font-weight: 500; color: var(--brand-deep); margin-bottom: 14px; }
.stage h3 { font-size: 1.3rem; margin-bottom: 10px; }
.stage > p { color: var(--ink-2); font-size: 0.98rem; }
.stage .fragment { margin-top: auto; padding-top: 22px; }
.stage .more { margin-top: 18px; font-weight: 600; font-size: 0.95rem; }
@media (max-width: 960px) { .lifecycle { grid-template-columns: 1fr; } .stage { border-right: 0; border-bottom: 1px solid var(--line); } .stage:last-child { border-bottom: 0; } }

.fragment-box { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--canvas); padding: 14px; font-size: 0.84rem; }
.fragment-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.fragment-row:last-child { border-bottom: 0; }
.fragment-row span:first-child { color: var(--ink-2); }
.bar { height: 6px; border-radius: 3px; background: var(--canvas-deep); overflow: hidden; width: 96px; flex: none; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

/* ------------------------------------------------------------------ night section pieces */
.signal-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; margin-top: 36px; }
.signal-groups h3 { font-size: 1rem; margin-bottom: 8px; }
.signal-groups ul { list-style: none; margin: 0; padding: 0; }
.signal-groups li { padding: 7px 0; border-bottom: 1px solid var(--night-line); color: var(--night-ink-2); font-size: 0.95rem; }
@media (max-width: 560px) { .signal-groups { grid-template-columns: 1fr; } }

.decision-card { background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-lg); overflow: hidden; font-size: 0.86rem; }
.decision-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--night-line); }
.decision-card header strong { color: #fff; font-weight: 600; }
.decision-card header code { background: none; color: var(--night-ink-2); padding: 0; }
.decision-steps { list-style: none; margin: 0; padding: 6px 18px; }
.decision-steps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--night-line); }
.decision-steps li:last-child { border-bottom: 0; }
.decision-steps b { color: #fff; font-weight: 600; }
.decision-steps small { grid-column: 1 / -1; color: var(--night-ink-2); font-size: 0.8rem; }
.decision-card footer { padding: 14px 18px; background: rgba(179, 38, 30, 0.14); border-top: 1px solid var(--night-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.decision-card footer strong { color: #ffb4ab; }
.decision-card footer span { color: var(--night-ink-2); }
.section-night .pill-pass { background: rgba(30, 122, 76, 0.22); color: #7fd6a6; }
.section-night .pill-flag { background: rgba(168, 102, 11, 0.24); color: #f2c077; }
.section-night .pill-block { background: rgba(179, 38, 30, 0.26); color: #ffb4ab; }

/* ------------------------------------------------------------------ evidence */
.evidence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.evidence article { padding: 28px 28px 8px 0; margin-right: 28px; border-right: 1px solid var(--line); }
.evidence article:last-child { border-right: 0; margin-right: 0; }
.evidence p.figure { color: var(--ink); font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: 14px; }
.evidence p { color: var(--ink-2); font-size: 0.98rem; }
.evidence cite { display: block; font-style: normal; font-size: var(--text-sm); color: var(--ink-3); }
@media (max-width: 880px) { .evidence { grid-template-columns: 1fr; } .evidence article { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; } }

/* ------------------------------------------------------------------ spec lists (replaces icon checklists) */
.spec-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.spec-list > li, .spec-list > div { display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.6fr); gap: 6px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec-list dt, .spec-list strong { font-weight: 600; }
.spec-list dd, .spec-list span { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.spec-list.stacked > li, .spec-list.stacked > div { grid-template-columns: 1fr; gap: 2px; }
@media (max-width: 560px) { .spec-list > li, .spec-list > div { grid-template-columns: 1fr; gap: 2px; } }
.section-night .spec-list { border-color: var(--night-line); }
.section-night .spec-list > li, .section-night .spec-list > div { border-color: var(--night-line); }
.section-night .spec-list span, .section-night .spec-list dd { color: var(--night-ink-2); }

/* ------------------------------------------------------------------ steps (real sequences only) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: 1px solid var(--ink); counter-reset: step; }
.steps li { counter-increment: step; padding: 22px 28px 10px 0; }
.steps li::before { content: "Step " counter(step); display: block; font-size: var(--text-sm); color: var(--brand-deep); font-weight: 500; margin-bottom: 10px; }
.steps h3 { font-size: 1.05rem; margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 0.95rem; }

/* ------------------------------------------------------------------ audiences & ways to work */
.audience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.audience article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(26px, 3.4vw, 40px); display: flex; flex-direction: column; }
.audience h3 { font-size: 1.45rem; }
.audience p { color: var(--ink-2); }
.audience .spec-list { margin: 10px 0 26px; }
.audience .actions { margin-top: auto; }
@media (max-width: 880px) { .audience { grid-template-columns: 1fr; } }

.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ways div { padding: 24px 26px; border-right: 1px solid var(--line); }
.ways div:last-child { border-right: 0; }
.ways h3 { font-size: 1.05rem; margin-bottom: 6px; }
.ways p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } .ways div { border-right: 0; border-bottom: 1px solid var(--line); } .ways div:last-child { border-bottom: 0; } }

/* ------------------------------------------------------------------ code tabs */
.code-tabs { background: var(--night); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--night-line); }
.code-tabs [role="tablist"] { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--night-line); overflow-x: auto; }
.code-tabs [role="tab"] { font: inherit; font-size: 0.86rem; font-weight: 500; color: var(--night-ink-2); background: none; border: 0; padding: 10px 14px; border-radius: var(--r-sm) var(--r-sm) 0 0; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.code-tabs [role="tab"][aria-selected="true"] { color: #fff; border-bottom-color: #5fc4b6; }
.code-tabs [role="tabpanel"] { margin: 0; padding: 20px 22px; overflow-x: auto; color: #d6e2df; font-size: 0.84rem; line-height: 1.7; }
.code-tabs [role="tabpanel"][hidden] { display: none; }
.code-tabs .c { color: #7f9793; }
.code-tabs .s { color: #9fe0d6; }
.code-tabs .k { color: #f2c077; }

/* ------------------------------------------------------------------ resources */
.resource-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.resource-list a { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; text-decoration: none; color: var(--ink); min-height: 220px; transition: border-color .15s; }
.resource-list a:hover { border-color: var(--line-strong); }
.resource-list a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.resource-list .kind { font-size: var(--text-sm); color: var(--brand-deep); font-weight: 500; margin-bottom: 14px; }
.resource-list h3 { font-size: 1.12rem; line-height: 1.3; }
.resource-list p { color: var(--ink-2); font-size: 0.93rem; }
.resource-list time { margin-top: auto; font-size: var(--text-sm); color: var(--ink-3); }
@media (max-width: 900px) { .resource-list { grid-template-columns: 1fr; } .resource-list a { min-height: 0; } }

/* ------------------------------------------------------------------ tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th, .data-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td, .data-table tr:last-child th { border-bottom: 0; }
.data-table thead th { font-weight: 600; font-size: 0.85rem; color: var(--ink-2); background: #fafbf9; white-space: nowrap; }
.data-table tbody th { font-weight: 600; white-space: nowrap; }
.data-table td code, .data-table th code { white-space: nowrap; }
.data-table .num { font-family: var(--font-mono); font-size: 0.86rem; color: var(--ink-2); white-space: nowrap; }

/* ------------------------------------------------------------------ prose & docs */
.prose { max-width: var(--measure); }
.prose > :first-child, .prose section > h2:first-child { margin-top: 0; }
.prose h2 { font-size: var(--text-xl); margin-top: 2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--ink-3); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: 0.94rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--canvas-deep); font-weight: 600; }
.prose pre { background: var(--night); color: #d6e2df; padding: 18px 20px; border-radius: var(--r-md); overflow-x: auto; font-size: 0.84rem; line-height: 1.65; margin: 0 0 1.5em; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote { margin: 0 0 1.4em; padding: 14px 18px; border-left: 3px solid var(--brand); background: var(--surface); color: var(--ink-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose input[type="checkbox"] { margin-right: 8px; accent-color: var(--brand); }

.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.docs-toc { position: sticky; top: 96px; font-size: 0.92rem; }
.docs-toc p { font-weight: 600; margin-bottom: 8px; }
.docs-toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.docs-toc a { display: block; padding: 6px 0 6px 14px; color: var(--ink-2); text-decoration: none; margin-left: -1px; border-left: 1px solid transparent; }
.docs-toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.docs section { scroll-margin-top: 96px; padding-bottom: 40px; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .docs-toc { position: static; } }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0 0 1.5em; }
.callout p:last-child { margin: 0; }

/* ------------------------------------------------------------------ lists of content */
.entry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.entry-list li { border-bottom: 1px solid var(--line); }
.entry-list a { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 8px 40px; padding: 26px 0; text-decoration: none; color: var(--ink); }
.entry-list h2, .entry-list h3 { font-size: var(--text-lg); margin: 0 0 6px; }
.entry-list a:hover h2, .entry-list a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.entry-list p { margin: 0; color: var(--ink-2); font-size: 0.97rem; max-width: 70ch; }
.entry-list .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: var(--text-sm); color: var(--ink-3); }
.entry-list .meta-category { color: var(--brand-deep); }
@media (max-width: 640px) { .entry-list a { grid-template-columns: 1fr; } .entry-list .meta { flex-direction: row; gap: 14px; align-items: flex-start; } }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.link-grid a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.link-grid a:hover { border-color: var(--line-strong); }
.link-grid strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.link-grid span { color: var(--ink-2); font-size: 0.93rem; line-height: 1.5; display: block; }

.category-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.category-filter a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 0.92rem; background: var(--surface); }
.category-filter a:hover { border-color: var(--line-strong); color: var(--ink); }
.category-filter a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.article-title { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem); max-width: 26ch; }
.article-hero { padding-bottom: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.article-meta { color: var(--ink-3); font-size: var(--text-sm); display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 20px; }
.article-meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }
.article-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-block: clamp(40px, 6vw, 72px); align-items: start; }
.article-layout .article-body:only-child { grid-column: 1 / -1; max-width: var(--measure); }
.article-toc { position: sticky; top: 96px; font-size: 0.9rem; }
.article-toc p { font-weight: 600; margin-bottom: 10px; }
.article-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.article-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.article-toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.article-body { min-width: 0; }
.article-body .prose h2, .article-body .prose h3 { scroll-margin-top: 96px; }
.article-faq { margin-top: 56px; max-width: var(--measure); }
.article-faq h2 { font-size: var(--text-xl); margin-bottom: 16px; }
.author-box { margin-top: 56px; max-width: var(--measure); padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.author-box p { margin-bottom: 6px; color: var(--ink-2); }
.author-box .author-name { font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.author-box .author-name a { color: var(--ink); text-decoration: none; }
.pillar-link { display: block; margin-top: 16px; max-width: var(--measure); padding: 18px 24px; border-radius: var(--r-md); background: var(--night); color: var(--night-ink); text-decoration: none; }
.pillar-link strong { display: block; color: #fff; }
.pillar-link span { color: var(--night-ink-2); font-size: 0.93rem; }
.pillar-link:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } .article-toc { position: static; } }

.pagination-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 36px; }

.faq { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 1.5px; background: var(--ink-3); transition: transform .2s; }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details > div { padding: 0 40px 20px 0; color: var(--ink-2); }

.glossary { margin: 0; max-width: 860px; border-top: 1px solid var(--line); }
.glossary > div { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 4px 28px; padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .glossary > div { grid-template-columns: 1fr; } }

.code-block { background: var(--night); color: #d6e2df; border-radius: var(--r-md); padding: 18px 20px; overflow-x: auto; font-size: 0.84rem; line-height: 1.7; margin: 0 0 1.4em; }
.code-block code { background: none; padding: 0; font-size: inherit; color: inherit; }
.code-block .c { color: #7f9793; }

/* ------------------------------------------------------------------ CTA */
.cta { background: var(--night); color: var(--night-ink); border-radius: var(--r-lg); padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 28px 48px; align-items: end; }
.cta h2 { color: #fff; max-width: 20ch; margin-bottom: 12px; }
.cta p { color: var(--night-ink-2); max-width: 52ch; margin: 0; }
.cta .button-primary { background: #fff; color: var(--ink); }
.cta .button-primary:hover { background: #d7ece8; color: var(--ink); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: 18px; max-width: 560px; }
.form label, .field-label { display: block; font-weight: 600; font-size: 0.94rem; margin-bottom: 6px; }
.form input, .form textarea, .select { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.form input:hover, .form textarea:hover, .select:hover { border-color: var(--ink-3); }
.form input:focus, .form textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.form textarea { min-height: 150px; resize: vertical; }
/* Native select with a quiet up-down indicator in muted ink instead of the browser's arrow. */
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M2 5.2 5 2.2l3 3M2 8.8l3 3 3-3' fill='none' stroke='%236f7c80' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 10px 14px; background-position: right 15px center; background-repeat: no-repeat; }
.form .error { color: var(--block); font-size: 0.9rem; margin-top: 6px; }
.form .hint { color: var(--ink-3); font-size: 0.88rem; margin-top: 6px; }
.hp-field { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: var(--r-sm); background: var(--pass-tint); border: 1px solid #bcdcc8; margin-bottom: 24px; }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 36px; font-size: 0.93rem; color: var(--ink-2); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-grid h2 { font-size: 0.93rem; letter-spacing: 0; color: var(--ink); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-about p { max-width: 34ch; margin-top: 14px; }
.footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--text-sm); color: var(--ink-3); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-main-after-cta + .site-footer { margin-top: 0; }

/* ------------------------------------------------------------------ analytics consent */
.consent-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; width: min(760px, calc(100% - 32px)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-panel); }
.consent-bar p { margin: 0; font-size: 0.92rem; color: var(--ink-2); max-width: 62ch; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 560px) { .consent-bar { bottom: 8px; } .consent-actions { margin-left: 0; width: 100%; } .consent-actions .button { flex: 1; } }

/* ------------------------------------------------------------------ respondent pages */
.respondent-body { min-height: 100vh; display: flex; flex-direction: column; }
.respondent-header { position: static; background: var(--canvas); border-bottom: 1px solid var(--line); }
.respondent-help { margin-left: auto; color: var(--ink-2); font-size: 0.95rem; }
.respondent-main { flex: 1; display: flex; align-items: center; padding-block: 40px; }
.respondent-wrap { width: 100%; }
.respondent-footer { border-top: 1px solid var(--line); padding-block: 20px; font-size: var(--text-sm); color: var(--ink-3); }
.respondent-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.respondent-footer a { color: var(--ink-2); margin-left: 14px; }
.outcome { width: 100%; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--status, var(--ink)); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 44px); box-shadow: var(--shadow-panel); }
.outcome h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.35rem); margin-bottom: 14px; }
.outcome p { color: var(--ink-2); }
.outcome-code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-3); margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.outcome-progress, .screening-meter { height: 4px; background: var(--canvas-deep); border-radius: 2px; overflow: hidden; margin: 22px 0 12px; }
.outcome-progress span { display: block; height: 100%; width: 100%; background: var(--status); transform-origin: left; }
.screening-meter span { display: block; height: 100%; width: 35%; background: var(--brand); border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .outcome-progress span { animation: outcome-countdown var(--delay, 4s) linear forwards; }
  .screening-meter span { animation: screening-sweep 1.3s ease-in-out infinite; }
  @keyframes outcome-countdown { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes screening-sweep { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
}
.outcome-pending { --status: var(--brand); }
.status-complete { --status: var(--pass); }
.status-terminate { --status: var(--flag); }
.status-overquota { --status: var(--quota); }
.status-quality { --status: var(--block); }
.status-in_progress { --status: var(--ink-3); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--status); margin-right: 8px; }
.status-text { color: var(--status); font-weight: 600; }
.sandbox-flag { background: var(--flag-tint); border: 1px solid #e8cf9e; color: #6b4705; padding: 10px 14px; border-radius: var(--r-sm); font-size: 0.92rem; margin-bottom: 20px; }
