/* =========================================================================
   Supervisor design system: "Run log"
   One object everywhere, the run card. Petrol canvas, paper cards.
   Cyan marks actions and what the agent did. Red is only the 3-second limit and failures.
   Used by the marketing site and the app alike.
   ========================================================================= */

/* ---------- Tokens: canvas context ---------- */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --t-sm: 0.875rem; --t-base: 1rem; --t-md: 1.0625rem; --t-lg: 1.25rem; --t-xl: 1.5rem; --t-2xl: 2rem; --t-3xl: 2.5rem;
  --font: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  --canvas: #10242E; --canvas-2: #173341; --canvas-deep: #0B1A22; --paper: #F4F6F3;
  --bg: var(--canvas); --bg-alt: var(--canvas-2); --surface: var(--paper);
  --ink: #EDF3F0; --muted: #A9BFC2; --line: #35525D; --card-line: #35525D;
  --primary: #7DE3D4; --primary-hover: #A8EFE4; --on-primary: #0C1A21;
  --accent: #7DE3D4; --on-accent: #0C1A21;
  --ok: #86E3AE; --warn: #F3CC7A; --bad: #FFA394; --focus: #7DE3D4;
  --field-bg: #F4F6F3; --field-ink: #0C1A21; --field-line: #7DE3D4;
  --mid: #9A6A00;
  --r: 8px; --bw: 1.5px;
  --chart-avg: #10242E; --chart-worst: #5F7C83; --chart-limit: #C13A2A; --chart-ok: #1C744A; --chart-grid: #D3DCD8;
}
/* Paper context: every card resets to dark ink on paper */
:where(.panel, .runcard, .stat, .codebox, .chart, .sheet-light) {
  --bg: #F4F6F3; --bg-alt: #E3E9E5; --ink: #0C1A21; --muted: #44565C; --line: #C3CFCA; --card-line: #B4C2BC;
  --primary: #10242E; --primary-hover: #1F4252; --on-primary: #F4F6F3; --accent: #10242E; --on-accent: #F4F6F3;
  --ok: #1C744A; --warn: #7A5200; --bad: #B5301F; --focus: #10242E;
  --field-bg: #FFFFFF; --field-ink: #0C1A21; --field-line: #44565C;
  color: var(--ink);
}
/* Deep context: docked chrome (transport bar, sheets) */
:where(.transport) {
  --bg: #0B1A22; --bg-alt: #173341; --ink: #EDF3F0; --muted: #A9BFC2; --line: #35525D; --card-line: #4A6B77;
  --primary: #7DE3D4; --primary-hover: #A8EFE4; --on-primary: #0C1A21; --focus: #7DE3D4;
  --field-bg: #F4F6F3; --field-ink: #0C1A21; --field-line: #7DE3D4;
  color: var(--ink);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--t-md); line-height: 1.55; text-wrap: pretty; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: 1.375rem; line-height: 1.2; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; transition: color .2s ease, text-decoration-thickness .2s ease; }
a:hover { text-decoration-thickness: 3px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; padding: var(--s3) var(--s4); background: var(--paper); color: #0C1A21; }
.skip:focus { top: var(--s4); outline: 3px solid #0C1A21; outline-offset: 0; box-shadow: 0 0 0 6px var(--paper); }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--s5), 1200px); margin-inline: auto; }
.col { width: min(100% - 2 * var(--s5), 48rem); margin-inline: auto; }
.section { padding: var(--s9) 0; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding: var(--s8) 0; }
.section-body { margin-top: var(--s7); }
.lede { max-width: 38em; font-size: var(--t-lg); color: var(--muted); }
h2 + .lede, h1 + .lede { margin-top: var(--s4); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.split-wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s5); }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.mt-6 { margin-top: var(--s6); }
.mt-5 { margin-top: var(--s5); }
.prose > * + * { margin-top: var(--s4); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose ul { display: grid; gap: var(--s2); padding-left: var(--s5); list-style: disc; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; min-width: 44px; padding: 0 var(--s5); font: inherit; font-weight: 600; line-height: 1.1; text-decoration: none; white-space: nowrap; border: var(--bw) solid transparent; border-radius: var(--r); cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--muted); border-color: var(--muted); color: var(--bg); cursor: progress; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }
.btn-danger { background: #CC4030; border-color: #CC4030; color: #FFFFFF; }
.btn-danger:hover { background: #EDF3F0; border-color: #EDF3F0; color: #10242E; }
.btn-small { min-height: 44px; padding: 0 var(--s4); font-size: var(--t-base); }
.btn .icon { width: 1.25em; height: 1.25em; }
.actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------- Header: the same bar on the site and in the app ---------- */
.site-header { border-bottom: var(--bw) solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s3) var(--s5); min-height: 72px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.logo-mark { width: 9px; height: 22px; flex: none; border-radius: 2px; background: var(--accent); }
.header-menu { display: contents; }
.nav-toggle { display: none; margin-left: auto; }
.site-nav { margin-right: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); }
.site-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-weight: 500; text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: currentColor; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s2); font-weight: 500; }
.credits { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.credits:hover { text-decoration: underline; }
.org { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); font: inherit; font-weight: 600; color: inherit; background: transparent; border: var(--bw) solid currentColor; border-radius: var(--r); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.org:hover { background: var(--ink); color: var(--bg); }

/* ---------- Status: icon + word, never colour alone ---------- */
.st { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; }
.st.ok { color: var(--ok); } .st.warn { color: var(--warn); } .st.bad { color: var(--bad); } .st.idle { color: var(--muted); }

/* ---------- Forms ---------- */
.cta-form > label { display: block; margin-bottom: var(--s2); font-weight: 600; }
.cta-row { display: flex; gap: var(--s3); flex-wrap: wrap; }
.cta-row input { flex: 1 1 260px; min-width: 0; min-height: 52px; padding: 0 var(--s4); font: inherit; color: var(--field-ink); background: var(--field-bg); border: var(--bw) solid var(--field-line); border-radius: var(--r); transition: box-shadow .2s ease; }
.cta-row input::placeholder { color: #5A6B70; opacity: 1; }
.cta-row input:hover { box-shadow: 0 0 0 2px var(--field-line); }
.cta-row .btn { min-height: 52px; }
.cta-help { margin-top: var(--s3); font-size: var(--t-base); color: var(--muted); }
.field-error { display: none; margin-top: var(--s3); font-weight: 600; }
.field-error .icon { vertical-align: -0.2em; margin-right: var(--s1); }
.cta-form:has(input:user-invalid) .field-error { display: block; }
.cta-form:has(input:user-invalid) .cta-row input { border-style: dashed; }
.form-status { margin-top: var(--s3); font-weight: 600; }
.form-status:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); padding: 0; border: 0; }
.chips legend { float: left; width: 100%; margin-bottom: var(--s2); padding: 0; font-weight: 600; }
.chips label { display: inline-flex; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); font-weight: 500; border: var(--bw) solid var(--muted); border-radius: 999px; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; }
.chips input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.fld label { display: block; margin-bottom: var(--s1); font-size: var(--t-base); font-weight: 600; }
.fld input, .fld select, .fld textarea { width: 100%; min-height: 44px; padding: 0 var(--s3); font: inherit; color: var(--field-ink); background: var(--field-bg); border: var(--bw) solid var(--field-line); border-radius: var(--r); transition: box-shadow .2s ease; }
.fld textarea { min-height: 120px; padding: var(--s3); }
.fld input:hover, .fld select:hover, .fld textarea:hover { box-shadow: 0 0 0 2px var(--field-line); }
.fld .hint { margin-top: var(--s1); font-size: var(--t-sm); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); align-items: end; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: var(--s3); min-height: 44px; font-weight: 500; cursor: pointer; }
/* The page is colour-scheme dark; without this an unchecked box on paper is drawn dark and reads as checked */
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--primary); color-scheme: light; cursor: pointer; }
.seg { display: inline-flex; border: var(--bw) solid var(--field-line); border-radius: var(--r); overflow: hidden; }
.seg button { min-height: 44px; padding: 0 var(--s4); font: inherit; font-weight: 600; color: var(--ink); background: transparent; border: 0; border-left: var(--bw) solid var(--field-line); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--bg-alt); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button:focus-visible { outline-offset: -5px; }
.seg button[aria-pressed="true"]:focus-visible { outline-color: var(--bg); }
.slider { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s4); }
.slider label { display: flex; gap: var(--s2); min-width: 6.5rem; font-weight: 600; }
.slider output { font-variant-numeric: tabular-nums; }
.slider input { display: block; width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 10px; border: 1.5px solid var(--field-line); border-radius: 999px; background: linear-gradient(to right, var(--primary) var(--p, 40%), transparent var(--p, 40%)); }
.slider input::-moz-range-track { height: 8px; border: 1.5px solid var(--field-line); border-radius: 999px; background: linear-gradient(to right, var(--primary) var(--p, 40%), transparent var(--p, 40%)); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10.5px; border-radius: 50%; background: var(--primary); border: 3px solid var(--paper); box-shadow: 0 0 0 1.5px var(--field-line); }
.slider input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); border: 3px solid var(--paper); box-shadow: 0 0 0 1.5px var(--field-line); }

/* ---------- The log: time runs down a rail, entries hang off it ---------- */
.log-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; font-size: var(--t-base); color: var(--muted); }
.log-title { font-size: var(--t-xl); color: var(--ink); }
.log { display: grid; gap: var(--s5); }
.log-head + .log, .log + .log { margin-top: var(--s5); }
.le { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: var(--s6); align-items: start; transition: opacity .3s ease, transform .3s ease; }
.le.pending { opacity: 0; transform: translateY(8px); }
.le > time, .le > .le-when { padding-top: 2px; font-family: var(--mono); font-size: var(--t-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.le-body { position: relative; min-width: 0; }
.le-body::before { content: ""; position: absolute; left: -21px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--canvas); border: 1.5px solid #A9BFC2; }
.le-tool .le-body::before { background: #7DE3D4; border-color: #7DE3D4; }
.le:not(:last-child) .le-body::after { content: ""; position: absolute; left: -16.75px; top: 21px; bottom: calc(-1 * var(--s5) - 8px); width: 1.5px; background: #638793; }
.le-gap .le-body { font-size: var(--t-sm); color: var(--muted); }
.le-gap .le-body::before { left: -19px; top: 10px; width: 6px; height: 6px; border: 0; background: #638793; }
.who { display: block; font-size: var(--t-sm); font-weight: 700; color: var(--muted); }
.le-tool .le-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); }
.le-tool code { color: var(--accent); font-weight: 600; }
.le-tool .le-body > span:not(.sr-only) { color: var(--muted); }
.log-wide .le { grid-template-columns: 7.5rem minmax(0, 1fr); }

/* ---------- Run card: what Supervisor produces ---------- */
.runcard { padding: var(--s5); background: var(--surface); border-radius: var(--r); }
.runcard-title { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--t-xl); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.runcard-title .icon { width: 1.1em; height: 1.1em; margin-top: 0.05em; }
.runcard-meta { font-size: var(--t-sm); color: var(--muted); }
.runcard > p + p { margin-top: var(--s2); color: var(--muted); }
.runcard svg.plot { --chart-fs: 15px; display: block; width: 100%; max-width: 460px; height: auto; margin-top: var(--s3); }
.runcard .chart-legend { max-width: 460px; }
.runcard ul.rows { display: grid; margin-top: var(--s3); border-top: 1px solid var(--line); }
.runcard ul.rows li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.runcard ul.rows li span:last-child { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.runcard .actions { margin-top: var(--s4); }
.clip { display: grid; place-items: center; max-width: 320px; aspect-ratio: 16 / 9; margin-top: var(--s3); background: repeating-linear-gradient(45deg, var(--bg-alt) 0 10px, var(--surface) 10px 20px); font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }

/* ---------- Panels, stats, code ---------- */
.panel { padding: var(--s5); background: var(--surface); border-radius: var(--r); }
.panel > h2, .panel > h3, .panel-head h2, .panel-head h3 { font-size: var(--t-lg); letter-spacing: -0.01em; line-height: 1.3; }
.panel > h2 + *, .panel > h3 + *, .panel-head + * { margin-top: var(--s4); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.panel-note { font-size: var(--t-base); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.stat { padding: var(--s4) var(--s5); background: var(--surface); border-radius: var(--r); }
.stat dt { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.stat dd { margin-top: var(--s1); font-size: var(--t-sm); color: var(--muted); }
.stat .big { display: block; white-space: nowrap; color: var(--ink); font-size: var(--t-3xl); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.balance { display: block; color: var(--ink); font-size: var(--t-3xl); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.statline { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); }
.statline div { display: flex; align-items: baseline; gap: var(--s2); }
.statline dt { font-size: var(--t-base); color: var(--muted); }
.statline dd { font-size: var(--t-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.codebox { padding: var(--s5); background: var(--surface); border-radius: var(--r); }
.codebox + .codebox { margin-top: var(--s4); }
.codebox-label { font-size: var(--t-base); font-weight: 600; }
.codebox-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s2); }
.codebox-row code { flex: 1 1 20rem; min-width: min(20rem, 100%); padding: var(--s3); overflow-wrap: anywhere; font-size: 0.9375rem; background: var(--bg-alt); border-radius: var(--r); }
.codebox-row .btn { min-width: 7.25rem; }
.codebox-row-stack code { flex-basis: 100%; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.data th, .data td { padding: var(--s3) var(--s4) var(--s3) 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data thead th { font-size: var(--t-sm); font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: var(--bw) solid var(--card-line); }
.data .n { padding-right: 0; padding-left: var(--s4); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data tbody tr:last-child th, .data tbody tr:last-child td { border-bottom: 0; }
.data tbody th { font-weight: 600; overflow-wrap: break-word; }
.data tbody tr { transition: background-color .2s ease; }
.data tbody tr:hover { background: var(--bg-alt); }
.data small { display: block; font-size: var(--t-sm); font-weight: 400; color: var(--muted); }
.data a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.data a:focus-visible { outline-offset: -1px; }
/* Tables whose rows end in a button */
.data-actions tbody th, .data-actions tbody td { vertical-align: middle; }
.panel-flush .data th:first-child, .panel-flush .data td:first-child { padding-left: var(--s5); }
.panel-flush .data th:last-child, .panel-flush .data td:last-child { padding-right: var(--s5); }
/* On the canvas (pricing tables) */
.data-canvas thead th { border-bottom-color: var(--ink); }

/* ---------- Charts and distributions ---------- */
.chart { --chart-fs: 12px; }
.chart-title { font-weight: 700; line-height: 1.3; }
.chart-sub { margin-top: var(--s1); font-size: var(--t-sm); color: var(--muted); }
.chart svg { display: block; width: 100%; height: auto; margin-top: var(--s3); }
.chart-legend, .legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s3); font-size: var(--t-sm); color: var(--muted); }
.chart-legend span, .legend span { display: inline-flex; align-items: center; gap: var(--s2); }
.chart-legend i { width: 26px; height: 0; border-top: 3px solid var(--chart-avg); }
.chart-legend .k-worst i { border-top: 2px dashed var(--chart-worst); }
.chart-legend .k-limit i { border-top: 2px dashed var(--chart-limit); }
.chart-legend .k-ok i { border-top: 2px dotted var(--chart-ok); }
.legend i { width: 14px; height: 14px; flex: none; border-radius: 2px; }
.hbars { display: grid; gap: var(--s2); }
.hbars li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.25rem; gap: var(--s3); align-items: center; font-size: var(--t-base); }
.hbars .b { height: 16px; overflow: hidden; background: var(--bg-alt); border-radius: 2px; }
.hbars .b i { display: block; width: calc(var(--h) * 1%); height: 100%; }
.hbars .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Load-time classes: each has its own texture as well as its own colour */
.c-fast { background: var(--ok); }
.c-mid { background: radial-gradient(circle, var(--surface) 1px, transparent 1.4px) 0 0 / 4px 4px var(--mid); }
.c-slow { background: repeating-linear-gradient(90deg, var(--bad) 0 3px, var(--surface) 3px 4px); }
.c-fail { background: repeating-linear-gradient(135deg, var(--ink) 0 3px, var(--surface) 3px 6px); }
.placeholder { display: grid; place-items: center; min-height: 240px; padding: var(--s5); text-align: center; background: repeating-linear-gradient(45deg, var(--bg-alt) 0 10px, var(--surface) 10px 20px); font-family: var(--mono); font-size: 0.875rem; color: var(--muted); }

/* ---------- App: page title, site tabs ---------- */
.app-main { padding: var(--s7) 0 var(--s9); }
.app-title { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.app-title h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.page-sub { display: flex; align-items: center; gap: var(--s2) var(--s5); flex-wrap: wrap; margin-top: var(--s2); color: var(--muted); }
.page-sub strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.crumb { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; font-size: var(--t-base); color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 0 var(--s5); margin-top: var(--s4); border-bottom: var(--bw) solid var(--line); }
.tabs a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 48px; margin-bottom: calc(-1 * var(--bw)); font-weight: 500; text-decoration: none; border-bottom: 4px solid transparent; }
.tabs a:hover { border-bottom-color: var(--muted); }
.tabs a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--accent); }
.app-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s5); align-items: start; }
.app-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.app-body { margin-top: var(--s6); }
.sitelog { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "cal side" "pages side"; gap: var(--s5); align-items: start; }
.sitelog > .a-cal { grid-area: cal; } .sitelog > .a-side { grid-area: side; } .sitelog > .a-pages { grid-area: pages; }
.score { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.score-bar { flex: 0 1 320px; height: 14px; overflow: hidden; background: var(--paper); border: 1.5px solid var(--field-line); border-radius: 999px; }
.score-bar i { display: block; width: var(--v, 50%); height: 100%; background: var(--mid); }

/* ---------- App: live browser tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s4); }
.tile { overflow: hidden; background: var(--surface); border: var(--bw) solid var(--card-line); border-radius: var(--r); }
.tile-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); font-size: var(--t-sm); font-weight: 600; border-bottom: var(--bw) solid var(--card-line); }
.tile-view { display: grid; place-items: center; aspect-ratio: 16 / 10; background: repeating-linear-gradient(45deg, var(--bg-alt) 0 10px, var(--surface) 10px 20px); font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.tile-foot { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); font-size: var(--t-sm); border-top: 1px solid var(--line); }
.tile-foot span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.tile-foot span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile.errored { border-style: dashed; }
.tile.errored .tile-foot { color: var(--bad); font-weight: 600; }
.tile.errored .tile-foot span:first-child { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.app-grid .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.app-grid .tile-bar .st { font-size: 0; gap: 0; }
.app-grid .tile-bar .st .icon { font-size: 1rem; }
.app-grid .tile-foot { flex-direction: column; gap: 0; }
.app-grid .tile-foot span:first-child { white-space: normal; overflow-wrap: anywhere; }

/* ---------- App: calendar, the log zoomed out ---------- */
.cal-nav { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.cal-grid { container-type: inline-size; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@container (max-width: 715px) { .cal-err .w, .cal-avg .u { display: none; } }
.cal-dow { padding: var(--s2); font-size: var(--t-sm); font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 96px; padding: var(--s2); font: inherit; color: inherit; text-align: left; background: var(--surface); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
button.cal-day { cursor: pointer; transition: background-color .2s ease, box-shadow .2s ease; }
button.cal-day:hover { background: var(--bg-alt); }
button.cal-day[aria-pressed="true"] { background: var(--bg-alt); box-shadow: inset 0 0 0 3px var(--ink); }
button.cal-day:focus-visible { outline-offset: -5px; }
.cal-day.out { background: var(--bg-alt); }
.cal-day.future .cal-num { font-weight: 500; color: var(--muted); }
.cal-num { font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-num { padding: 0 8px; background: var(--ink); color: var(--surface); border-radius: 999px; }
.cal-avg { font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.cal-err { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-sm); font-weight: 600; color: var(--bad); }
.cal-bar { display: flex; gap: 1px; width: 100%; height: 10px; margin-top: auto; overflow: hidden; border-radius: 2px; }
.cal-bar i { display: block; height: 100%; }

/* ---------- App: transport bar for a live test, with a settings sheet ---------- */
.transport { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(100% - 2 * var(--s5), 1200px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s5); padding: var(--s3) var(--s5); background: var(--canvas-deep); border: var(--bw) solid #638793; border-radius: var(--r); box-shadow: 0 12px 40px rgba(4, 12, 16, .6); }
.transport summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
.transport summary:hover { text-decoration-thickness: 3px; }
.sheet { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); max-height: calc(100dvh - 140px); overflow-y: auto; overscroll-behavior: contain; padding: var(--s5); background: var(--canvas-deep); border: var(--bw) solid #4A6B77; border-radius: var(--r); box-shadow: 0 12px 40px rgba(4, 12, 16, .6); }
.sheet .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.has-transport { padding-bottom: 160px; }
:root:has(.transport) { scroll-padding-bottom: 140px; }

/* ---------- Marketing: hero, steps, questions, quote, pricing, footer ---------- */
.hero { padding: var(--s7) 0 var(--s9); }
.hero .col > * + *, .page-hero .col > * + * { margin-top: var(--s5); }
.hero .lede { color: var(--ink); }
.hero-log { margin-top: var(--s7); }
.page-hero { padding: var(--s7) 0 var(--s8); }
.page-hero .lede { color: var(--ink); }
.steps { display: grid; max-width: 44rem; counter-reset: step; }
.steps li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: var(--s5); padding-bottom: var(--s5); counter-increment: step; }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: var(--on-accent); font-weight: 800; border-radius: 50%; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17.25px; top: 42px; bottom: 6px; width: 1.5px; background: #638793; }
.panel .steps li:not(:last-child)::after { background: var(--card-line); }
.steps h3, .steps h4 { margin: 0; font-size: var(--t-lg); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.steps p { margin-top: var(--s1); color: var(--muted); }
.panel .steps h3, .panel .steps h4 { font-size: var(--t-md); }
/* A question and the answer that comes back */
.qa { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s7); align-items: start; padding: var(--s7) 0; border-top: var(--bw) solid var(--line); }
.qa:last-child { padding-bottom: 0; }
.qa h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.qa-text > * + * { margin-top: var(--s4); }
.points { display: grid; gap: var(--s3); }
.points li { position: relative; padding-left: var(--s5); }
.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--accent); }
.note { font-size: var(--t-base); color: var(--muted); }
.quote { max-width: 52rem; }
.quote p { font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
.quote footer { margin-top: var(--s5); color: var(--muted); }
.quote footer strong { color: var(--ink); }
.final { padding: var(--s9) 0; border-top: var(--bw) solid var(--line); }
.final .col > * + * { margin-top: var(--s5); }
.toolgroups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.toolgroups ul { display: grid; gap: var(--s2); margin-top: var(--s3); }
.toolgroups li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: var(--s3); align-items: baseline; font-size: var(--t-base); }
.toolgroups code { font-weight: 600; overflow-wrap: anywhere; }
.toolgroups li span { color: var(--muted); }
.site-footer { padding: var(--s8) 0 var(--s7); background: var(--canvas-deep); font-size: var(--t-base); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.site-footer h2 { margin-bottom: var(--s2); font-size: var(--t-base); font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.site-footer li a:hover { color: var(--ink); text-decoration: underline; }
.footer-about { margin-top: var(--s3); max-width: 22em; color: var(--muted); }
.site-footer .fine { margin-top: var(--s7); font-size: var(--t-sm); color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1260px) {
  .site-header:not(.is-app) .site-nav { margin-right: 0; width: 100%; }
  .site-header:not(.is-app) .nav-toggle { display: inline-flex; }
  .site-header:not(.is-app) .header-menu { display: none; width: 100%; padding-bottom: var(--s4); }
  .site-header:not(.is-app).open .header-menu { display: grid; gap: var(--s3); }
  .site-header:not(.is-app) .site-nav ul { flex-direction: column; gap: 0; }
  .site-header:not(.is-app) .site-nav a { width: 100%; justify-content: flex-start; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .site-header.is-app .site-nav { margin-right: 0; width: 100%; }
  .site-header.is-app .nav-toggle { display: inline-flex; }
  .site-header.is-app .header-menu { display: none; width: 100%; padding-bottom: var(--s4); }
  .site-header.is-app.open .header-menu { display: grid; gap: var(--s3); }
  .site-header.is-app .site-nav ul { flex-direction: column; gap: 0; }
  .site-header.is-app .site-nav a { width: 100%; justify-content: flex-start; border-bottom: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .chart { --chart-fs: 16px; }
  .app-grid, .app-grid.even, .split-wide { grid-template-columns: minmax(0, 1fr); }
  /* Transport bar: slider drops to its own row before it gets too short to use */
  .transport { grid-template-columns: minmax(0, 1fr) auto; }
  .transport .slider { grid-column: 1 / -1; grid-row: 2; }
  .has-transport { padding-bottom: 220px; }
  :root:has(.transport) { scroll-padding-bottom: 164px; }
  .app-grid .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .sitelog { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cal" "side" "pages"; }
  .toolgroups li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 800px) {
  .transport { grid-template-columns: minmax(0, 1fr); }
  .transport .slider { grid-row: auto; }
  .has-transport { padding-bottom: 280px; }
  :root:has(.transport) { scroll-padding-bottom: 208px; }
}
@media (max-width: 960px) {
  .split, .qa, .cols-3 { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
  .toolgroups { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section, .final { padding: var(--s8) 0; }
  .sheet .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  :root { --t-sm: 1rem; }
  .wrap, .col { width: calc(100% - 2 * var(--s4)); }
  .chart { --chart-fs: 22px; }
  .runcard svg.plot { --chart-fs: 22px; }
  .cta-row .btn { flex: 1 1 100%; }
  .le, .log-wide .le { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .le-body::before, .le-body::after { display: none; }
  .panel, .runcard { padding: var(--s4); }
  .panel-flush { padding: 0; }
  .panel-flush .data th:first-child, .panel-flush .data td:first-child { padding-left: var(--s4); }
  .stat { padding: var(--s3) var(--s4); }
  .stat .big { font-size: 2rem; }
  .form-grid, .sheet .form-grid { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .tile-bar .st { font-size: 0; gap: 0; }
  .tile-bar .st .icon { font-size: 1rem; }
  .tile-foot { flex-direction: column; gap: 0; }
  .tile-foot span:first-child { white-space: normal; overflow-wrap: anywhere; }
  .cal-day { min-height: 76px; padding: 4px; overflow: hidden; }
  .cal-dow { padding: 4px; }
  .cal-avg, .cal-err, .cal-dow { font-size: 0.8125rem; }
  .hbars li { grid-template-columns: 5.5rem minmax(0, 1fr) 3rem; gap: var(--s2); }
  .toolgroups li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  /* Tables marked .rows stack into blocks; keep row/cell roles in the markup for screen readers */
  .data.rows thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data.rows, .data.rows tbody, .data.rows tr, .data.rows th, .data.rows td { display: block; }
  .data.rows tr { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
  .data.rows tbody tr:last-child { border-bottom: 0; }
  .data.rows th, .data.rows td { padding: 2px 0; border: 0; }
  .data.rows .n { padding-left: 0; text-align: left; }
  .data-actions.rows td:last-child { padding-top: var(--s2); }
  .data.rows td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  .panel-flush .data.rows tr { padding: var(--s3) var(--s4); }
  .panel-flush .data.rows th:first-child, .panel-flush .data.rows td:first-child, .panel-flush .data.rows th:last-child, .panel-flush .data.rows td:last-child { padding-left: 0; padding-right: 0; }
  .transport { bottom: 8px; width: calc(100% - 16px); padding: var(--s3); }
  .transport .actions > span { flex: 1 1 0; min-width: 0; line-height: 1.2; }
  .sheet { max-height: calc(100dvh - 240px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   Start funnel: three steps to a first result, with an agent or in the web app
   ========================================================================= */
.ml-auto { margin-left: auto; }
.start-cta > * + * { margin-top: var(--s3); }
.wizard h1 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); }
.wizard .col > * + * { margin-top: var(--s5); }
.wizard-top { display: grid; justify-items: start; gap: var(--s2); }
.path-switch { color: var(--muted); }
.path-switch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); }
.wsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); counter-reset: w; }
.wsteps li { display: flex; align-items: center; gap: var(--s3); padding-top: var(--s3); font-weight: 600; color: var(--muted); border-top: 3px solid var(--line); counter-increment: w; }
.wsteps li::before { content: counter(w); display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: var(--bw) solid var(--muted); border-radius: 50%; font-variant-numeric: tabular-nums; }
.wsteps li[aria-current="step"] { color: var(--ink); border-top-color: var(--accent); }
.wsteps li[aria-current="step"]::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wsteps li.done { color: var(--ink); border-top-color: var(--muted); }
.wsteps li.done::before { content: "\2713"; border-color: var(--ink); }
.wpanel > h2 { font-size: var(--t-xl); letter-spacing: -0.01em; line-height: 1.2; }
.wpanel > * + * { margin-top: var(--s4); }
.wpanel form > * + * { margin-top: var(--s4); }
.wpanel .actions { margin-top: var(--s5); }
.wpanel .fld { max-width: 28rem; }
.fld input[aria-invalid="true"] { border-style: dashed; border-color: var(--bad); }
.fld-error { display: flex; align-items: flex-start; gap: var(--s2); margin-top: var(--s1); font-size: var(--t-base); font-weight: 600; color: var(--bad); }
.fld-error .icon { margin-top: 0.15em; }
.prompt { padding: var(--s4); font-family: var(--mono); font-size: var(--t-base); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-alt); border-radius: var(--r); }
.prompt-row { display: flex; align-items: flex-start; gap: var(--s3); flex-wrap: wrap; }
.prompt-row .prompt { flex: 1 1 20rem; }
.prompt-row .btn { min-width: 7.25rem; }

/* Statement landing: demo report and the statement preview */
.demo > * + * { margin-top: var(--s5); }
.preview-flag { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); font-size: var(--t-sm); font-weight: 700; background: var(--bg-alt); border-radius: 999px; }

@media (max-width: 560px) {
  .wsteps li:not([aria-current="step"]) .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .wsteps { grid-template-columns: auto minmax(0, 1fr) auto; }
  .wsteps li[aria-current="step"] { grid-column: auto; }
  /* Four client tabs do not fit one row on a phone */
  .wpanel .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .wpanel .seg button:nth-child(odd) { border-left: 0; }
  .wpanel .seg button:nth-child(n+3) { border-top: var(--bw) solid var(--field-line); }
}

/* =========================================================================
   Accessibility plans: two plans, options that change the price, a running total
   ========================================================================= */
.plan-form > * + * { margin-top: var(--s5); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); margin: 0; padding: 0; border: 0; }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--s4); cursor: pointer; transition: box-shadow .2s ease; }
.plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan:hover { box-shadow: 0 0 0 2px #A9BFC2; }
.plan:has(input:checked) { box-shadow: 0 0 0 4px #7DE3D4; }
.plan:has(input:focus-visible) { outline: 3px solid #EDF3F0; outline-offset: 7px; }
.plan-name { font-size: var(--t-lg); font-weight: 700; line-height: 1.25; }
.plan-price { font-size: var(--t-3xl); font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: var(--t-base); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plan .points { flex: 1; }
.plan-pick { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 700; }
.plan-pick .on { display: none; align-items: center; gap: var(--s2); color: var(--ok); }
.plan:has(input:checked) .plan-pick .on { display: inline-flex; }
.plan:has(input:checked) .plan-pick .off { display: none; }
.opt { margin: 0; padding: 0; border: 0; }
.opt + .opt { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.opt > legend, .opt-label { display: block; padding: 0; margin-bottom: var(--s2); font-weight: 600; }
.opt .hint { margin-top: var(--s1); font-size: var(--t-sm); color: var(--muted); }
.opt .chips { margin: 0; }
.opt input[type="number"] { width: 6rem; min-height: 44px; padding: 0 var(--s3); font: inherit; color: var(--field-ink); background: var(--field-bg); border: var(--bw) solid var(--field-line); border-radius: var(--r); }
.plan-total { font-size: var(--t-3xl); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-summary > * + * { margin-top: var(--s3); }
.plan-summary ul { display: grid; gap: var(--s1); padding-left: var(--s5); list-style: disc; }
@media (max-width: 960px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* Demo report details */
.issue-full { margin-top: var(--s2); font-weight: 400; }
.issue-full summary { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-sm); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.issue-full > * + * { margin-top: var(--s2); }
.issue-full code { overflow-wrap: anywhere; }
.rows-plain { display: grid; margin-top: var(--s2); border-top: 1px solid var(--line); }
.rows-plain li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.rows-plain li > span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.panel h4 { font-size: var(--t-md); }

/* The statement preview and an issue's screenshot are pictures from the app */
.statement-img { display: block; width: 100%; max-width: 800px; height: auto; background: #FFFFFF; border-radius: var(--r); }
.issue-full img { display: block; max-width: 100%; height: auto; border-radius: var(--r); }
.wizard .fld + .actions, form.panel .fld { max-width: 28rem; }

/* =========================================================================
   Articles (Markdown from src/content/insights)
   ========================================================================= */
.article-body { padding-bottom: var(--s9); }
.article { padding: var(--s6); font-size: var(--t-md); line-height: 1.65; }
.article > h2 { margin-top: var(--s7); font-size: var(--t-xl); line-height: 1.2; }
.article > h3 { margin-top: var(--s6); font-size: var(--t-lg); line-height: 1.25; }
.article > h4 { margin-top: var(--s5); font-size: var(--t-md); }
.article > :first-child { margin-top: 0; }
.article ol { display: grid; gap: var(--s2); padding-left: var(--s5); list-style: decimal; }
.article li > ul, .article li > ol { margin-top: var(--s2); }
.article a { font-weight: 600; overflow-wrap: anywhere; }
.article img { max-width: 100%; height: auto; }
.article blockquote { padding-left: var(--s4); border-left: 4px solid var(--line); color: var(--muted); }
.article table { width: 100%; border-collapse: collapse; }
.article th, .article td { padding: var(--s2) var(--s3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 560px) {
  /* Article tables stack on phones: each row becomes a block, the first cell its heading */
  .article table, .article tbody, .article tr, .article td { display: block; }
  .article thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .article td { padding: var(--s1) 0; border-bottom: 0; }
  .article tr { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
}
.article-list li { padding: var(--s5) 0; border-top: var(--bw) solid var(--line); }
.article-list h2 { font-size: var(--t-xl); line-height: 1.25; }
.article-list p { margin-top: var(--s2); max-width: 38em; color: var(--muted); }
@media (max-width: 560px) { .article { padding: var(--s4); } }

/* =========================================================================
   Finnish pages: words are longer, so the header sits tighter, long words may break,
   and the wizard's three choices stack on phones. Headings carry soft hyphens in the text.
   ========================================================================= */
html:lang(fi) { overflow-wrap: break-word; }
:lang(fi) .site-header:not(.is-app) .wrap { gap: var(--s3) var(--s4); }
:lang(fi) .site-nav ul { gap: var(--s1) var(--s4); }
@media (max-width: 560px) {
  :lang(fi) .wizard-top .seg { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  :lang(fi) .wizard-top .seg button { border-left: 0; }
  :lang(fi) .wizard-top .seg button + button { border-top: var(--bw) solid var(--field-line); }
}

/* Very narrow screens (320 px, the WCAG reflow width): a long button label wraps instead of pushing the page wide */
@media (max-width: 400px) {
  .btn { white-space: normal; text-align: center; padding-block: var(--s2); }
}

/* =========================================================================
   Who has to comply: two lists of tick boxes and a result that follows them.
   Also the plain facts list on the about and contact pages.
   ========================================================================= */
.comply fieldset { margin: 0; padding: 0; border: 0; }
.comply fieldset + fieldset { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.comply legend { padding: 0; font-size: var(--t-lg); font-weight: 700; line-height: 1.25; }
.comply .hint { margin-top: var(--s1); color: var(--muted); }
.checklist { display: grid; gap: var(--s1); margin-top: var(--s3); padding: 0; list-style: none; }
.checklist .check { display: flex; align-items: flex-start; padding: var(--s2) 0; }
.checklist .check input { flex: none; margin-top: 1px; }
.checklist .issue-full { margin: 0 0 var(--s2) calc(22px + var(--s3)); }
.comply-result > * + * { margin-top: var(--s4); }
.facts { display: grid; gap: var(--s3); }
.facts div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--s3); }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) { .facts div { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* A figure that is words and a number ("about 400") may wrap; plain numbers stay on one line */
.stat .big.words { white-space: normal; font-size: var(--t-2xl); line-height: 1.1; }

/* ---------- Cookie consent (assets/consent.js) ---------- */
.consent { position: fixed; z-index: 60; left: var(--s4); right: var(--s4); bottom: var(--s4); max-width: 44rem; margin-inline: auto; background: var(--canvas-deep); border: var(--bw) solid var(--line); border-radius: var(--r); box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.consent-in { padding: var(--s5); max-height: calc(100vh - 2 * var(--s4)); overflow-y: auto; }
.consent h2 { font-size: var(--t-lg); letter-spacing: -0.01em; line-height: 1.3; }
.consent h2:focus { outline: none; }
.consent-in > * + * { margin-top: var(--s3); }
.consent p { color: var(--ink); }
.consent-choices { display: grid; }
.consent .actions { margin-top: var(--s4); }
.fine-button { margin-left: var(--s4); min-height: 44px; padding: 0; background: none; border: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.fine-button:hover { color: var(--ink); }
@media (max-width: 560px) { .consent .actions .btn { flex: 1 1 100%; } }


/* ---- Forms sent to the app: the trap field no person sees, the Turnstile check, a failed send ---- */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { margin-bottom: var(--s4); min-height: 65px; }
.form-status.is-bad { color: var(--bad); }

/* ---- Video (components/Video.astro): a picture until play is pressed, then the Vimeo player ---- */
.video { max-width: 48rem; }
.video-play, .video iframe { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r); overflow: hidden; background: var(--canvas-deep); }
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.video-button { position: absolute; left: var(--s4); bottom: var(--s4); display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s5); background: var(--primary); color: var(--on-primary); font-weight: 600; border-radius: var(--r); }
.video-button .icon { width: 1.25em; height: 1.25em; }
.video-play:hover .video-button { background: var(--primary-hover); }
.video figcaption { margin-top: var(--s3); color: var(--muted); }

/* ---- Customer logos (components/Customers.astro): the customers' own artwork, on paper ---- */
.customers-h { font-size: var(--t-base); font-weight: 600; letter-spacing: 0; color: var(--muted); }
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: var(--s5) var(--s7); margin-top: var(--s4); padding: var(--s5) var(--s6); background: var(--paper); border-radius: var(--r); list-style: none; }
.logos li { display: flex; }
.logos img { width: auto; height: 56px; max-width: 150px; object-fit: contain; }
@media (max-width: 560px) { .logos { gap: var(--s4) var(--s5); padding: var(--s4); } .logos img { height: 40px; max-width: 110px; } }

/* The demo's "email me the link" box once the address is in: one line that says so */
[data-demo-notify].is-sent { padding-block: var(--s3); }
[data-demo-notify].is-sent > :not(.form-status) { display: none; }
[data-demo-notify].is-sent .form-status { margin-top: 0; }

