/* Apter Assurance design system. One file, no build step.
   Own palette and type: ink on warm paper, one indigo accent, and three verdict
   colours that are never used for decoration. Works from 360 px up. */

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

:root {
  --ink: #0f1419;
  --ink-2: #3b4650;
  --ink-3: #68737e;
  --paper: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --line: #e4e1da;
  --line-2: #cfcbc1;
  --night: #0f1419;
  --night-2: #19212a;
  --night-line: #2b3640;
  --on-night: #f7f5f0;
  --on-night-2: #a9b2bb;

  --accent: #2b3be0;
  --accent-ink: #1d29a6;
  --accent-soft: #eceeff;

  --pass: #146c41;
  --pass-soft: #e2f2e8;
  --pass-line: #a9d6ba;
  --amber: #8f5300;
  --amber-soft: #fff0cf;
  --amber-line: #ecc97a;
  --fail: #b0251d;
  --fail-soft: #fbe8e6;
  --fail-line: #eeb1ab;
  --idle: #68737e;
  --idle-soft: #eeede8;
  --idle-line: #d5d2c9;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-s: 6px;
  --r: 10px;
  --r-l: 16px;
  --shadow: 0 1px 2px rgba(15, 20, 25, .05), 0 6px 20px rgba(15, 20, 25, .05);
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
h3 { font-size: 1.08rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin: .25em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kicker: small mono label above headings and on pillar tags */
.kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; line-height: 1.04; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 62ch; }

/* ---------- Brand lockup ---------- */
.lockup { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.lockup .wordmark { height: 22px; width: auto; display: block; color: currentColor; }
.lockup .product { font-size: .95rem; font-weight: 500; padding-left: 12px; border-left: 1px solid currentColor; line-height: 1.2; opacity: .92; }
.lockup .stage { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 99px; padding: 2px 7px; opacity: .7; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 99px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 500; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .05s; }
.btn:hover { background: #26303a; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn.danger { background: var(--fail); border-color: var(--fail); }
.btn.small { min-height: 34px; padding: 5px 13px; font-size: .86rem; }
.btn[disabled], .btn.disabled { background: var(--idle-soft); border-color: var(--idle-line); color: var(--ink-3); cursor: not-allowed; }
.on-night .btn { background: var(--on-night); color: var(--ink); border-color: var(--on-night); }
.on-night .btn:hover { background: #fff; }
.on-night .btn.ghost { background: transparent; color: var(--on-night); border-color: var(--night-line); }
.on-night .btn.ghost:hover { border-color: var(--on-night); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Site header and footer ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 240, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: .93rem; padding: 8px 11px; border-radius: 99px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: rgba(15, 20, 25, .06); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: 99px; min-height: 40px; padding: 6px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 18px; margin: 0; gap: 2px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; font-size: 1rem; }
  .site-nav .btn { margin-top: 8px; }
}
.site-footer { background: var(--night); color: var(--on-night-2); padding: 48px 0 40px; margin-top: 80px; font-size: .9rem; }
.site-footer a { color: var(--on-night); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--on-night); font-size: .8rem; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer .lockup { color: var(--on-night); }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- Site sections ---------- */
.band { padding: clamp(48px, 8vw, 96px) 0; }
.band.tight { padding: clamp(32px, 5vw, 56px) 0; }
.band.white { background: var(--surface); border-block: 1px solid var(--line); }
.band.night, .on-night { background: var(--night); color: var(--on-night); }
.band.night .kicker, .on-night .kicker { color: var(--on-night-2); }
.band.night .lede, .on-night .lede, .band.night .muted { color: var(--on-night-2); }
.band.night a { color: var(--on-night); }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1; letter-spacing: -.02em; max-width: 16ch; margin-bottom: 22px; }
.hero h1 em { font-style: italic; }
.section-head { max-width: 720px; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.05; letter-spacing: -.015em; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: minmax(0, 1fr); } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.numbered { counter-reset: n; list-style: none; padding: 0; margin: 0; }
.numbered > li { counter-increment: n; position: relative; padding: 18px 0 18px 54px; border-top: 1px solid var(--line); margin: 0; }
.numbered > li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 20px; font-family: var(--mono); font-size: .8rem; color: var(--ink-3); }
.numbered > li h3 { margin-bottom: 4px; }
.numbered > li p { margin: 0; color: var(--ink-2); }
.band.night .numbered > li { border-color: var(--night-line); }
.band.night .numbered > li p { color: var(--on-night-2); }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--ink-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); max-width: 70ch; }
.refs { list-style: none; padding: 0; }
.refs li { padding: 14px 0; border-top: 1px solid var(--line); }
.refs .ref { font-size: .9rem; color: var(--ink-2); }
.refs .plain { margin: 4px 0 0; }

/* ---------- Cards and panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(18px, 2.4vw, 26px); }
.card.flat { background: var(--surface-2); }
.card.pad0 { padding: 0; overflow: hidden; }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 6px; }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.band.night .card { background: var(--night-2); border-color: var(--night-line); color: var(--on-night); }
.band.night .card p { color: var(--on-night-2); }
.panel-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; }
.panel-body { padding: 18px 20px; }
.note { border-left: 3px solid var(--line-2); padding: 2px 0 2px 14px; color: var(--ink-2); font-size: .92rem; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r); font-size: .88rem; background: var(--idle-soft); border: 1px solid var(--idle-line); color: var(--ink-2); }
.banner.example::before { content: "Example data"; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: #fff; border-radius: 4px; padding: 2px 6px; white-space: nowrap; margin-top: 1px; }
.banner.pass { background: var(--pass-soft); border-color: var(--pass-line); color: var(--pass); }
.banner.amber { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); }
.banner.fail { background: var(--fail-soft); border-color: var(--fail-line); color: var(--fail); }
.banner.info { background: var(--accent-soft); border-color: #c9cdfa; color: var(--accent-ink); }

/* ---------- Verdicts, chips, pillars ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 99px; font-size: .8rem; font-weight: 500; line-height: 1.6; border: 1px solid var(--idle-line); background: var(--idle-soft); color: var(--idle); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip.pass { background: var(--pass-soft); border-color: var(--pass-line); color: var(--pass); }
.chip.amber, .chip.pending, .chip.concern { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); }
.chip.fail { background: var(--fail-soft); border-color: var(--fail-line); color: var(--fail); }
.chip.amber::before, .chip.concern::before { border-radius: 2px; transform: rotate(45deg); width: 7px; height: 7px; }
.chip.pending::before { background: transparent; border: 2px solid currentColor; }
.chip.fail::before { border-radius: 1px; }
.chip.plain::before { display: none; }
.chip.plain { padding-left: 10px; }
.verdict { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--r-l); border: 1px solid var(--idle-line); background: var(--idle-soft); }
.verdict .word { font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; }
.verdict .why { color: var(--ink-2); font-size: .95rem; max-width: 60ch; }
.verdict.pass { background: var(--pass-soft); border-color: var(--pass-line); }
.verdict.pass .word { color: var(--pass); }
.verdict.pending { background: var(--amber-soft); border-color: var(--amber-line); }
.verdict.pending .word { color: var(--amber); }
.verdict.fail { background: var(--fail-soft); border-color: var(--fail-line); }
.verdict.fail .word { color: var(--fail); }
@media (max-width: 560px) { .verdict { flex-direction: column; align-items: flex-start; gap: 8px; } }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .pillars { grid-template-columns: minmax(0, 1fr); } }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.pillar > header { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.pillar > header .q { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; margin: 0; }
.pillar > header .count { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.band.night .pillar { background: var(--night-2); border-color: var(--night-line); }
.band.night .pillar > header { border-color: var(--night-line); }

/* Check rows: one line each, details on demand */
.checks { list-style: none; margin: 0; padding: 0; }
.checks > li { margin: 0; border-top: 1px solid var(--line); }
.checks > li:first-child { border-top: 0; }
.check { display: block; }
.check > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 11px 18px; cursor: pointer; list-style: none; }
.check > summary::-webkit-details-marker { display: none; }
.check > summary .t { font-size: .92rem; }
.check > summary .m { display: block; font-size: .84rem; color: var(--ink-2); margin-top: 2px; }
.check > .more { padding: 0 18px 14px 18px; font-size: .86rem; color: var(--ink-2); }
.check.fail > summary { background: var(--fail-soft); }
.check.amber > summary { background: var(--amber-soft); }
.mark { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--idle); flex: none; margin-top: 1px; }
.mark.pass { background: var(--pass); }
.mark.fail { background: var(--fail); border-radius: 5px; }
.mark.amber { background: #c98a12; border-radius: 5px; transform: rotate(45deg); }
.mark.amber > span { transform: rotate(-45deg); display: block; }
.mark.na, .mark.not_run { background: transparent; border: 1.5px dashed var(--idle); color: var(--idle); }
.evidence { margin: 8px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: .78rem; }
.evidence li { padding: 3px 0; border-top: 1px dashed var(--line); overflow-wrap: anywhere; }

/* ---------- The hand-off strip: steps joined by a line, a gate at each hold point ---------- */
.flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: thin; }
.flow-step { flex: 1 1 0; min-width: 112px; position: relative; padding: 12px 12px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.flow-step .n { font-family: var(--mono); font-size: .7rem; color: var(--ink-3); letter-spacing: .06em; }
.flow-step .name { font-weight: 600; font-size: .95rem; line-height: 1.25; margin: 4px 0 2px; }
.flow-step .tool { font-size: .8rem; color: var(--ink-3); }
.flow-link { flex: 0 1 22px; min-width: 8px; align-self: center; height: 2px; background: var(--line-2); }
.flow-gate { flex: 0 0 auto; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 2px; text-decoration: none; color: var(--ink-2); }
.flow-gate .dia { width: 30px; height: 30px; transform: rotate(45deg); border-radius: 6px; border: 2px solid var(--idle-line); background: var(--surface); display: grid; place-items: center; }
.flow-gate .dia > span { transform: rotate(-45deg); font-family: var(--mono); font-size: .62rem; font-weight: 600; }
.flow-gate .lbl { font-family: var(--mono); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; margin-top: 4px; }
.flow-gate.pass .dia { background: var(--pass); border-color: var(--pass); color: #fff; }
.flow-gate.pending .dia { background: var(--amber-soft); border-color: #c98a12; color: var(--amber); }
.flow-gate.fail .dia { background: var(--fail); border-color: var(--fail); color: #fff; }
.band.night .flow-step { background: var(--night-2); border-color: var(--night-line); }
.band.night .flow-step .tool, .band.night .flow-step .n { color: var(--on-night-2); }
.band.night .flow-link { background: var(--night-line); }
.band.night .flow-gate { color: var(--on-night-2); }
.band.night .flow-gate .dia { background: var(--night); border-color: var(--night-line); }
.band.night .flow-gate.pass .dia { background: #2f9e68; border-color: #2f9e68; }
@media (max-width: 640px) {
  .flow.stack-sm { flex-direction: column; overflow: visible; }
  .flow.stack-sm .flow-step { flex: 0 0 auto; min-width: 0; }
  .flow.stack-sm .flow-link { width: 2px; height: 16px; flex: 0 0 16px; align-self: center; }
  .flow.stack-sm .flow-gate { flex-direction: row; gap: 12px; padding: 4px 0; }
}

/* ---------- App shell ---------- */
.app-header { background: var(--night); color: var(--on-night); position: sticky; top: 0; z-index: 30; }
.app-header .bar { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.app-header .lockup .wordmark { height: 19px; }
.app-header .ws { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--on-night-2); min-width: 0; }
.app-header .ws a { color: var(--on-night); text-decoration: none; border: 1px solid var(--night-line); border-radius: 99px; padding: 5px 12px; white-space: nowrap; }
.app-header .ws a:hover { border-color: var(--on-night); }
.app-header .ws .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .app-header .lockup .stage, .app-header .ws .who { display: none; } }
.app-nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 56px; z-index: 25; }
.app-nav .tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.app-nav .tabs::-webkit-scrollbar { display: none; }
.app-nav a { flex: none; padding: 13px 12px 11px; font-size: .9rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.app-nav a:hover { color: var(--ink); }
.app-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.app-main { padding: clamp(20px, 3vw, 36px) 0 72px; }
.page-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-2); margin: 6px 0 0; max-width: 70ch; }
.crumbs { font-size: .84rem; color: var(--ink-3); margin-bottom: 8px; }
.crumbs a { color: var(--ink-3); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat .v { font-family: var(--serif); font-size: 2.1rem; line-height: 1; }
.stat .k { font-size: .82rem; color: var(--ink-3); margin-top: 6px; }
.stat .x { font-size: .78rem; color: var(--ink-3); margin-top: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: var(--surface-2); }
@media (max-width: 640px) {
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.cards tr:last-child { border-bottom: 0; }
  table.cards td { border: 0; padding: 3px 14px; }
  table.cards td[data-label]::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
  table.cards td.num { text-align: left; }
}

/* ---------- Forms ---------- */
form { margin: 0; }
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 5px; }
.field .hint { font-size: .82rem; color: var(--ink-3); margin: 4px 0 0; }
.field .eg { font-size: .82rem; color: var(--ink-3); font-style: italic; }
input[type="text"], input[type="number"], input[type="email"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.check-line { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.check-line label { font-weight: 400; font-size: .95rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .fields, .fields.three { grid-template-columns: minmax(0, 1fr); } }
.rowcard { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 2px; background: var(--surface); margin-bottom: 12px; position: relative; }
.rowcard .remove { position: absolute; top: 8px; right: 8px; }
.error { color: var(--fail); font-size: .85rem; margin-top: 4px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--fail); }
.origin { font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px; padding: 1px 6px; background: var(--accent-soft); color: var(--accent-ink); display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.origin.person { background: var(--idle-soft); color: var(--ink-2); }
.quote { font-size: .82rem; color: var(--ink-2); border-left: 2px solid var(--accent); padding-left: 10px; margin: 6px 0 12px; }
.choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .choice { grid-template-columns: minmax(0, 1fr); } }
.choice .card { display: flex; flex-direction: column; gap: 8px; }
.choice .card .btn { margin-top: auto; align-self: flex-start; }

/* Wizard stepper */
.stepper { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; counter-reset: st; list-style: none; padding-left: 0; }
.stepper li { counter-increment: st; flex: none; display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-3); padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); margin: 0; }
.stepper li::before { content: counter(st); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .72rem; background: var(--idle-soft); color: var(--ink-2); }
.stepper li.done::before { content: "✓"; background: var(--pass); color: #fff; }
.stepper li.current { color: var(--ink); border-color: var(--ink); font-weight: 500; }
.stepper li.current::before { background: var(--ink); color: #fff; }
.stepper a { color: inherit; text-decoration: none; }

/* ---------- Record chain ---------- */
.chain { list-style: none; margin: 0; padding: 0; position: relative; }
.chain::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); }
.chain > li { position: relative; padding: 0 0 18px 38px; margin: 0; }
.chain > li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.chain > li.broken::before { border-color: var(--fail); background: var(--fail); }
.chain .ev { font-weight: 500; font-size: .95rem; }
.chain .meta { font-size: .8rem; color: var(--ink-3); }
.hash { font-family: var(--mono); font-size: .74rem; color: var(--ink-3); overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .kv dd { margin-bottom: 8px; } }
pre { background: var(--night); color: #e6e9ec; padding: 14px 16px; border-radius: var(--r); overflow-x: auto; font-family: var(--mono); font-size: .8rem; line-height: 1.5; margin: 0 0 1em; }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
.bar-meter { height: 8px; background: var(--idle-soft); border-radius: 99px; overflow: hidden; }
.bar-meter > span { display: block; height: 100%; background: var(--pass); border-radius: 99px; }

/* ---------- The report: a document to hand on. Prints clean. ---------- */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(22px, 5vw, 56px); max-width: 880px; margin: 0 auto; }
.report header.rh { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); margin-bottom: 26px; }
.report h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.05; }
.report h2 { font-size: 1.05rem; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }
.report .lockup .wordmark { height: 20px; }
@media print {
  @page { margin: 16mm; }
  body { background: #fff; font-size: 11pt; }
  .app-header, .app-nav, .site-header, .site-footer, .no-print, .btn { display: none !important; }
  .app-main { padding: 0; }
  .report { border: 0; padding: 0; max-width: none; }
  .card, .pillar, .verdict { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  details > .more { display: block; }
}

/* Reveal on first paint: one small motion, off when the reader asks for less */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s ease both; }
  .rise.d1 { animation-delay: .06s; } .rise.d2 { animation-delay: .12s; } .rise.d3 { animation-delay: .18s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .run-in > li { animation: rise .35s ease both; animation-delay: calc(var(--i, 0) * 45ms); }
}

/* ---- product pages ---- */
/* Verdict: what stopped it, and the collapsed "N checks passed" line under each question */
.stopped { margin-top: 16px; border: 1px solid var(--fail-line); border-left: 4px solid var(--fail); border-radius: var(--r); background: var(--surface); padding: 14px 18px; }
.stopped h2 { font-size: 1.05rem; margin: 0 0 8px; color: var(--fail); }
.stopped ul { margin: 0 0 10px; padding-left: 1.1em; font-size: .92rem; }
.stopped li { overflow-wrap: anywhere; }
.stopped p { margin: 0; }
.passed-group { border-top: 1px solid var(--line); }
.passed-group > summary { list-style: none; cursor: pointer; padding: 11px 18px; font-size: .9rem; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.passed-group > summary::-webkit-details-marker { display: none; }
.passed-group > summary .mark-pass { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--pass); flex: none; }
.passed-group[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.passed-group .checks > li:first-child { border-top: 0; }
.pillar-quiet { padding: 11px 18px 0; margin: 0; }
.pillars.compact .pillar { align-self: start; }

/* Planted-error test */
.planted-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 6px; }
.planted-head .headline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 22px; }
.planted-head .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 640px) { .planted-head .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.display.big { font-family: var(--serif); font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.02; margin: 0; }
.planted-table td { overflow-wrap: anywhere; }
@media (min-width: 641px) { .planted-table td:first-child { width: 30%; } .planted-table td:nth-child(3) { width: 1%; } }
@media (prefers-reduced-motion: no-preference) {
  tbody.run-in > tr { animation: rise .35s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
}

/* Packages: the agent's outbox grouped by hold point */
.outbox-group { margin-top: 12px; }
.outbox-group + .outbox-group { margin-top: 18px; }
.outbox-head { padding: 6px 0; }
.outbox-group.closed .outbox-list { opacity: .78; }
.outbox-list { list-style: none; padding: 0; margin: 0; }
.outbox-item { padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.outbox-item .pkg-id { font-weight: 600; font-size: .9rem; }
.outbox-item.just-refused { background: var(--fail-soft); border-radius: var(--r-s); padding-inline: 8px; }
.refused { color: var(--fail); margin-top: 3px; overflow-wrap: anywhere; }

/* Checks on the checking */
.obligations { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.obligations > li { margin: 0; }
.obligations .card { height: 100%; }
.obligation.pass { border-top: 3px solid var(--pass); }
.obligation.fail { border-top: 3px solid var(--fail); }
.obligation h4 { margin-top: 12px; }
@media (max-width: 860px) { .obligations { grid-template-columns: minmax(0, 1fr); } }
td.zero { color: var(--fail); font-weight: 600; }

/* Sign-off: summary first, the full package after */
.sign-summary .kv { font-size: .92rem; }
details.part > summary { list-style: none; }
details.part > summary::-webkit-details-marker { display: none; }
details.part > summary::before { content: "+"; font-family: var(--mono); color: var(--ink-3); display: inline-block; width: 1.2em; }
details.part[open] > summary::before { content: "–"; }

/* Report */
.report .r-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 7px 0; }
.report .r-rest { color: var(--ink-2); margin: 6px 0 0; }
.report .r-pillar h3 { margin-top: 16px; }
.report .r-entries { margin: 10px 0; }
.report .r-entries td, .report .r-entries th { padding: 5px 8px; font-size: .8rem; }
.fail-text { color: var(--fail); }
@media print {
  @page { size: A4; margin: 14mm; }
  html { font-size: 10pt; }
  body { font-size: 10pt; line-height: 1.4; }
  .crumbs, .banner.example::before { display: none; }
  .report h1 { font-size: 22pt; margin-top: 8px !important; }
  .report header.rh { padding-bottom: 10px; margin-bottom: 12px; }
  .report h2 { font-size: 11pt; margin-top: 12px; padding-top: 8px; break-after: avoid; }
  .report h3 { font-size: 10pt; break-after: avoid; }
  .report p, .report li { orphans: 3; widows: 3; }
  .report .verdict { padding: 10px 14px; }
  .report .verdict .word { font-size: 26pt; }
  .report .r-row { padding: 3px 0; }
  .report .checks > li { break-inside: avoid; }
  .report .r-entries { break-inside: avoid; border: 0; }
  .report .banner { padding: 6px 10px; }
}

/* ---- lead: Markdown in memos, hold point blocks, phone tab hints ---- */
.doc.md { white-space: normal; }
.doc.md p { margin: 0 0 .6em; }
.doc.md ul { margin: 0 0 .6em; }
.doc.md .md-h { font-weight: 600; margin: .9em 0 .3em; }
.doc.md .md-h1 { font-size: 1.05rem; margin-top: 0; }
.doc.md .md-h2 { font-size: .98rem; }
.hp-block { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 0 18px 4px; }
.hp-block > summary { cursor: pointer; list-style: none; display: grid; gap: 2px; padding: 16px 0; }
.hp-block > summary::-webkit-details-marker { display: none; }
.hp-block > summary .hp-name { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.hp-block > summary .kicker { margin: 0; }
.hp-block > summary::after { content: "Show"; font-family: var(--mono); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); }
.hp-block[open] > summary::after { content: "Hide"; }
.hp-block[open] { padding-bottom: 18px; }
@media (max-width: 640px) {
  .app-nav .wrap, .stepper { -webkit-mask-image: linear-gradient(to right, #000 86%, transparent); mask-image: linear-gradient(to right, #000 86%, transparent); }
}
