/* ==========================================================================
   Document pages (/limitations, /evidence/*). The same paper, one column, no
   JavaScript. Hand-maintained rather than built, because these pages are
   generated straight into public/ and served as-is.
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-var.woff2') format('woff2-variations');
  font-weight: 400 700; font-style: normal; font-display: swap;
  size-adjust: 100%; ascent-override: 96%; descent-override: 24%;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono-var.woff2') format('woff2-variations');
  font-weight: 400 600; font-style: normal; font-display: swap;
  size-adjust: 97%; ascent-override: 96%; descent-override: 24%;
}

/* Same system as the landing page: substrate, copper, Geist and its mono. The
   documents are the record behind the claims, so they had better look like they
   come from the same place. */
:root {
  color-scheme: dark;
  --font-display: 'Geist', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: 'Geist', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --bg:      oklch(0.168 0.020 158);
  --bg-2:    oklch(0.212 0.022 158);
  --surface: oklch(0.252 0.023 158);
  --line:    oklch(0.272 0.018 158);
  --line-2:  oklch(0.352 0.020 158);
  --text:    oklch(0.950 0.008 150);
  --muted:   oklch(0.720 0.014 152);
  --accent:  oklch(0.700 0.145 48);

  --ink:     oklch(0.132 0.017 158);
  --ink-tx:  oklch(0.800 0.012 150);

  --step--2: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --step--1: clamp(0.83rem, 0.79rem + 0.20vw, 0.94rem);
  --step-0:  clamp(1rem, 0.95rem + 0.24vw, 1.06rem);
  --step-1:  clamp(1.12rem, 1.05rem + 0.34vw, 1.3rem);
  --step-2:  clamp(1.3rem, 1.18rem + 0.55vw, 1.7rem);
  --step-4:  clamp(1.9rem, 1.55rem + 1.6vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4rem; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.66;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.lnk, .doc__body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 50;
  padding: 0.6rem 0.9rem; background: var(--accent); color: var(--bg);
  font-family: var(--font-mono); font-size: var(--step--1);
  border-radius: 4px; transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* --- masthead ------------------------------------------------------------ */
.doc__top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem 1.5rem; flex-wrap: wrap;
  max-width: 62rem; margin-inline: auto;
  padding: 1.4rem clamp(1.1rem, 4vw, 2.5rem) 1.1rem;
  border-bottom: 1px solid var(--line);
}
.doc__home {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-mono); font-weight: 500;
  font-size: var(--step--1); letter-spacing: 0.17em; text-transform: uppercase;
}
.mark { width: 1.35rem; height: 1.35rem; color: var(--accent); flex: none; }
.doc__crumb {
  margin: 0;
  font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted);
}
/* These pages are shared and linked to directly, so the way onward is at the
   top of them rather than only at the foot. */
.doc__nav {
  flex-basis: 100%;
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.35rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
}
.doc__nav a {
  color: var(--muted); text-decoration: none;
  padding-block: 0.1rem;
  border-bottom: 1px solid transparent;
}
.doc__nav a:hover { color: var(--text); border-bottom-color: var(--line-2); }
.doc__nav a:first-child { color: var(--accent); font-weight: 600; }
.doc__nav a:first-child:hover { border-bottom-color: var(--accent); }

/* --- page --------------------------------------------------------------- */
.doc {
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 3.75rem) clamp(1.1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}
.doc__h {
  margin: 0 0 1rem;
  max-width: 30ch;
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--step-4); line-height: 1.03; letter-spacing: -0.022em;
}
.doc__prov {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  max-width: 68ch;
  padding-top: 1rem;
  border-top: 1px solid var(--line-2);
  font-size: var(--step--1); color: var(--muted);
}
.doc__prov code { font-family: var(--font-mono); font-size: 0.94em; }

.doc__body { max-width: 74ch; }
.doc__body > * { margin-block: 0 1.05em; }
.doc__body h2 {
  margin-block: clamp(2.25rem, 4vw, 3rem) 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-2);
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.018em;
}
.doc__body h3 {
  margin-block: 2rem 0.7rem;
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.doc__body h4 {
  margin-block: 1.5rem 0.5rem;
  font-size: var(--step-0); font-weight: 600;
}
.doc__body p { text-wrap: pretty; }
/* The source records cite bare URLs, and one of them is longer than a phone is
   wide. Without this the page itself scrolls sideways. */
.doc__body a { overflow-wrap: anywhere; }
.doc__body strong { font-weight: 600; color: var(--text); }
.doc__body ul, .doc__body ol { padding-left: 1.35rem; }
.doc__body li { margin-bottom: 0.5rem; }
.doc__body li > p { margin-bottom: 0.5em; }
.doc__body hr {
  border: 0; border-top: 1px solid var(--line); margin-block: 2rem;
}
.doc__body blockquote {
  margin-inline: 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}
.doc__body code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--surface); padding: 0.1em 0.32em; border-radius: 3px;
  overflow-wrap: anywhere;
}
.doc__body .ref {
  font-family: var(--font-mono); font-size: 0.9em; color: var(--muted);
  overflow-wrap: anywhere;
}
.doc__body pre {
  margin-block: 0 1.35em;
  padding: 1rem clamp(0.85rem, 2vw, 1.25rem);
  background: var(--ink); color: var(--ink-tx);
  border-radius: 6px;
  overflow-x: auto;
  font-size: clamp(0.7rem, 0.64rem + 0.3vw, 0.82rem);
  line-height: 1.7;
}
.doc__body pre code {
  background: none; padding: 0; font-size: inherit; white-space: pre;
}
/* A captured terminal, on the sample-report page. The tool's plain-language
   findings are single long lines, so these wrap the way a real terminal would
   rather than hiding two thirds of a sentence behind a sideways scroll. */
.doc__body pre.wrap { overflow-x: visible; }
.doc__body pre.wrap code { white-space: pre-wrap; overflow-wrap: break-word; }
.doc--wide .doc__body { max-width: 88ch; }
.doc__cmd {
  margin-block: 0 0.6em;
  font-family: var(--font-mono); font-size: var(--step--1);
  overflow-wrap: anywhere;
}
.doc__cmd::before { content: '$ '; color: var(--accent); }
.doc__cmd code { background: none; padding: 0; font-size: 1em; }

/* --- tables ------------------------------------------------------------- */
.doc__scroll { overflow-x: auto; margin-bottom: 1.5em; }
/* Six columns of sentences rather than two of values: it needs more room than
   the tables in the markdown, and scrolls inside its own box to get it. */
.doc__scroll--wide table { min-width: 56rem; }
.doc__scroll--wide th, .doc__scroll--wide td { padding-right: 1.1rem; font-size: var(--step--2); }
.doc__body table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  text-align: left;
  font-size: var(--step--1);
}
.doc__body th, .doc__body td {
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}
.doc__body thead th {
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono); font-weight: 500; font-size: var(--step--2);
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}

/* --- the ask, at the foot ------------------------------------------------- */
.doc__cta {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-2);
}
.doc__cta-t {
  margin: 0 0 0.9rem;
  font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1;
  letter-spacing: -0.018em;
}
.doc__cta-cmd {
  margin: 0 0 0.9rem;
  padding: 0.85rem clamp(0.85rem, 2vw, 1.25rem);
  background: var(--ink); color: var(--ink-tx);
  border-radius: 5px;
  overflow-x: auto;
  font-size: clamp(0.7rem, 0.64rem + 0.3vw, 0.82rem);
  line-height: 1.6;
}
.doc__cta-cmd code { white-space: pre; }
.doc__cta-n { margin: 0; max-width: 66ch; font-size: var(--step--1); color: var(--muted); }

@media (prefers-contrast: more) {
  :root { --muted: oklch(0.82 0.012 152); --line: oklch(0.44 0.020 158); }
}
