/* Layout: a single reading column (max 72rem) with a timeline motif — records arrive as fragments, the page assembles them into one journey. Amber is reserved for gaps. */
:root {
  --bg: #f5f8f8;
  --surface: #ffffff;
  --ink: #13252d;
  --muted: #4d6169;
  --line: #d3dde0;
  --accent: #1b4a78;
  --brand: #16365a;
  --brand-dot: #2bb5a5;
  --accent-ink: #ffffff;
  --gap: #9a5b00;
  --gap-bg: #fff0d4;
  --ok: #2b6647;
  --ok-bg: #e2f0e7;
  --ph: #8a4b00;
  --ph-bg: #fff6e3;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.3rem, 5vw, 3.4rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e191e; --surface: #15232a; --ink: #e5eef0; --muted: #9cb0b7; --line: #2a3c43;
    --accent: #8ec2ee; --accent-ink: #0e191e; --gap: #f0b44c; --gap-bg: #382810;
    --ok: #7fcfa2; --ok-bg: #132e1f; --ph: #f0b44c; --ph-bg: #2c2210;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e191e; --surface: #15232a; --ink: #e5eef0; --muted: #9cb0b7; --line: #2a3c43;
  --accent: #8ec2ee; --accent-ink: #0e191e; --gap: #f0b44c; --gap-bg: #382810;
  --ok: #7fcfa2; --ok-bg: #132e1f; --ph: #f0b44c; --ph-bg: #2c2210;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
.wrap { max-width: 72rem; margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); letter-spacing: 0; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; max-width: 65ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 4px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: var(--step-1); color: var(--muted); }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.75rem; }

/* Draft strip and placeholders */
.draft-note { background: var(--ph-bg); color: var(--ph); font-size: var(--step--1); padding-block: 8px; border-bottom: 1px solid var(--line); }
.ph { background: var(--ph-bg); color: var(--ph); border: 1px dashed var(--ph); border-radius: 4px; padding: 0 4px; font-style: normal; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Lato", var(--font-body); font-weight: 700; font-size: 1.4rem; letter-spacing: 0.005em; }
.logo { width: 34px; height: 34px; flex: none; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Sections */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
section + section { border-top: 1px solid var(--line); }
.hero { padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.hero-copy { display: grid; gap: 1.25rem; min-width: 0; }
.tagline { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 0.5rem; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 0.98rem; border: 1px solid var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-quiet { color: var(--accent); background: transparent; }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); }
.btn-quiet:hover { background: var(--surface); }
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1rem; display: grid; gap: 1rem; }
.page-head + section { border-top: none; padding-top: 1.5rem; }

/* Journey panel */
.journey { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.journey-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.journey-head strong { font-family: var(--font-display); font-size: 1.1rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 14px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); margin-top: 5px; position: relative; z-index: 1; }
.timeline li.is-gap .dot { border-color: var(--gap); background: var(--gap-bg); }
.timeline li.is-found .dot { border-color: var(--ok); background: var(--ok-bg); }
.entry { display: grid; gap: 3px; min-width: 0; }
.entry-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.02em; }
.entry p { font-size: 0.95rem; }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.chip-gap { color: var(--gap); background: var(--gap-bg); }
.chip-ok { color: var(--ok); background: var(--ok-bg); }
.chip-info { color: var(--accent); }
.cell > .chip, .layer-name > .chip { justify-self: start; }
.limits { border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem); }
.cell { display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.cell p { color: var(--muted); }
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.sources span { font-family: var(--font-mono); font-size: 0.8rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }

/* Layers */
.layer { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); padding-block: 1.75rem; border-top: 1px solid var(--line); }
.layer:first-of-type { border-top: none; }
.layer-name { display: grid; gap: 6px; align-content: start; }
.layer ul, .list { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; max-width: 65ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 12px; counter-increment: step; }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--accent); line-height: 1.2; }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); }

.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 0.9rem; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.email-address { font-family: var(--font-mono); font-size: 1.05rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); user-select: all; overflow-wrap: anywhere; }
.copy { font: inherit; font-size: 0.9rem; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.sample-note { border-left: 4px solid var(--accent); padding-left: 1rem; color: var(--muted); }
.report-finding { border-left: 4px solid var(--gap); padding-left: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem 2.5rem; font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: grid; gap: 0.6rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); }

@media (max-width: 860px) {
  .hero-grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .layer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .site-header .wrap { align-items: flex-start; }
  .nav { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .nav a { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}
