/* OpenRepro — evidence pages (/evidence/<attempt>.html).
   Loaded after /style.css, both after the engine's inline <style>, so these rules come last in the
   cascade. They restyle the engine's report into the site's language: paper background, ink, Newsreader
   headings, Public Sans body, Plex Mono for numbers and hashes, hairline rules instead of cards, text
   stamps instead of pills. Presentation only. Light theme only. */

/* ---------- tokens ----------
   The engine's stylesheet reads --paper, --sheet, --ink, --muted, --rule, --accent, --ok/--ok-bg,
   --bad/--bad-bg, --mid/--mid-bg, --na/--na-bg, --band, --serif, --sans, --mono. style.css already
   redefines the ones it shares; the rest are mapped to the site's tokens here. The values mirror
   style.css. The build removes the engine's dark-mode rules from every evidence page (light only, by
   CEO decision), so these declarations on :root, later in the cascade, are the only tokens in force. */
:root {
  --paper: #f6f3ec; --sheet: #fdfcf8; --ink: #1b1a17; --ink-2: #57534a; --ink-3: #6b675e;
  --rule: #d9d3c6; --rule-2: #e9e4d9; --accent: #28456a;
  --muted: var(--ink-2);
  --ok: #37704d;    --ok-bg: #dde9df;
  --early: #7f5f14; --mid: #7f5f14; --mid-bg: #efe5c8;
  --bad: #a04a30;   --bad-bg: #f0dcd3;
  --na: #6b675f;    --na-bg: #e6e1d6;
  --band: rgba(27, 26, 23, 0.07);
  --serif: "Newsreader", "Iowan Old Style", Charter, Georgia, serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* ---------- page ---------- */
body { margin: 0; padding: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--s-1); line-height: 1.55; }
main.wrap { display: grid; gap: 2.4rem; padding-top: 1.6rem; padding-bottom: 1rem; }
main.wrap > * { max-width: 46rem; min-width: 0; }
main.wrap p { margin: 0; max-width: var(--measure); }
main.wrap > section { border-top: 1px solid var(--rule); padding-top: 1.5rem; }

/* site chrome around the report */
.ev-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.3rem 1.5rem; }
.ev-back { font-family: var(--sans); font-size: var(--s-1); color: var(--ink-2); margin: 0; padding-top: 1.3rem; }
.ev-back a { text-decoration: none; color: var(--ink-2); }
.ev-back a:hover { color: var(--ink); text-decoration: underline; }
.ev-foot-back .ev-back { padding-top: 2.4rem; }
.colophon { margin-top: 2rem; }
.colophon .oneliner { font-family: var(--serif); }

/* ---------- report header ---------- */
main.wrap > header { padding-top: 0.4rem; }
main.wrap .eyebrow { font-family: var(--sans); font-size: var(--s-2); font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-2); margin: 0 0 0.9rem; line-height: 1.4; }
main.wrap h1 { font-family: var(--serif); font-size: var(--s3); font-weight: 500; line-height: 1.12;
  letter-spacing: -0.012em; margin: 0 0 0.7rem; max-width: 24ch; }
.byline { font-family: var(--sans); font-size: var(--s-1); color: var(--ink-2); }
main.wrap h2 { font-family: var(--serif); font-size: var(--s2); font-weight: 500; line-height: 1.18;
  letter-spacing: -0.012em; margin: 0 0 1rem; }

/* ---------- outcome ---------- */
/* style.css has a `.verdict` badge (inline-flex, uppercase, nowrap, with a ::before dot) for the paper
   pages; the engine's `.verdict` is the outcome section. Undo the badge rules here. */
section.verdict { display: grid; background: none; border: 0; border-top: 1px solid var(--ink); border-radius: 0;
  padding: 1.5rem 0 0; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.8rem; align-items: baseline;
  font-family: var(--sans); font-size: var(--s-1); font-weight: 400; letter-spacing: 0; text-transform: none;
  white-space: normal; color: var(--ink); }
section.verdict::before { content: none; }
.stamp { display: inline-flex; align-items: center; gap: 0.5em; padding: 0; border: 0; border-radius: 0; background: none;
  font-family: var(--sans); font-size: var(--s-1); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  line-height: 1.3; white-space: normal; }
.stamp::before { content: ""; display: inline-block; width: 1.4em; height: 1px; background: currentColor; flex: none; }
section.verdict .stamp { justify-self: start; align-self: start; }
/* the engine colors these with a two-class selector, so the tints are removed at the same specificity */
.stamp.ok, .stamp.mid, .stamp.bad, .stamp.na, .pill.ok, .pill.mid, .pill.bad, .pill.na,
.impact.minor, .impact.material { background: none; }
.stamp.ok { color: var(--ok); } .stamp.mid { color: var(--ink); } .stamp.mid.early { color: var(--early); }
.stamp.bad { color: var(--bad); } .stamp.na { color: var(--na); }
.verdict .lead { font-family: var(--serif); font-size: var(--s1); font-weight: 400; line-height: 1.4; max-width: 52ch; }
.verdict .facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem var(--gap); border-top: 0; padding-top: 0.4rem; margin: 0; }
.facts > div { display: grid; gap: 0.3rem; border-top: 1px solid var(--rule); padding-top: 0.6rem; min-width: 0; }
.facts dt { font-family: var(--sans); font-size: var(--s-2); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2); line-height: 1.3; }
.facts dd { margin: 0; font-family: var(--sans); font-size: var(--s-1); font-weight: 400; line-height: 1.45;
  overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.facts dd a { text-decoration-color: var(--rule); }

/* ---------- claims ---------- */
.claims { display: grid; gap: 0; }
.claim { background: none; border: 0; border-top: 1px solid var(--rule-2); border-radius: 0; padding: 1.1rem 0 1.2rem;
  display: grid; gap: 0.8rem; }
.claim:first-child { border-top: 0; padding-top: 0.2rem; }
.claim header { align-items: baseline; gap: 0.5rem 1.2rem; }
.claim h3 { font-family: var(--serif); font-size: var(--s0); font-weight: 500; line-height: 1.3; letter-spacing: -0.012em;
  max-width: 52ch; margin: 0; }
.tag { display: inline-block; font-family: var(--sans); font-size: var(--s-2); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 2px; padding: 0 0.4em;
  margin-left: 0.5em; vertical-align: 0.15em; line-height: 1.5; }
.pill { display: inline-block; padding: 0; border-radius: 0; background: none; font-family: var(--sans);
  font-size: var(--s-2); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
  white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.mid { color: var(--early); } .pill.bad { color: var(--bad); } .pill.na { color: var(--na); }

/* the claim strip: geometry is the engine's; only colors and type change */
.track { border-top-color: var(--rule); }
.band { background: var(--band); border-radius: 0; }
.tick { background: var(--ink); }
.dot { border-color: var(--paper); background: var(--na); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.mid { background: var(--early); }
.lbl { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; line-height: 1; color: var(--ink-2); }
.lbl.mid { color: var(--ink-2); } .lbl.ok { color: var(--ok); } .lbl.bad { color: var(--bad); }

.nums { font-family: var(--sans); font-size: var(--s-1); color: var(--ink-2); gap: 0.3rem 1.4rem; }
.nums b { font-family: var(--mono); font-weight: 500; font-size: 0.95em; color: var(--ink); }
main.wrap blockquote { font-family: var(--serif); font-style: italic; font-size: var(--s0); line-height: 1.5;
  color: var(--ink-2); border-left: 2px solid var(--rule); padding: 0.1rem 0 0.1rem 0.9rem; margin: 0; max-width: var(--measure); }
.small { font-family: var(--sans); font-size: var(--s-1); line-height: 1.5; color: var(--ink-2); }
.small b { color: var(--ink); font-weight: 600; }
details { border-top: 1px solid var(--rule-2); padding-top: 0.6rem; }
summary { font-family: var(--sans); font-size: var(--s-1); font-weight: 500; color: var(--ink-2); cursor: pointer; }
summary:hover { color: var(--ink); }

/* ---------- deviations and notes ----------
   The engine's `.list li { grid-template-columns: auto 1fr }` lets an unbreakable token in a deviation
   (e.g. a long unbroken code call in a method string) set the 1fr column's
   minimum width, which widened the list, the section and the page's single grid track to 410px at a
   375px viewport. minmax(0, 1fr) lets the column shrink and overflow-wrap breaks the token instead. */
.list { gap: 0; max-width: var(--measure); min-width: 0; }
.list li { grid-template-columns: 5.2rem minmax(0, 1fr); gap: 0.8rem; padding: 0.7rem 0; border-top: 1px solid var(--rule-2);
  align-items: baseline; margin: 0; }
.list li > div, .list li > p, .list li p { min-width: 0; overflow-wrap: anywhere; }
.list li:first-child { border-top: 0; padding-top: 0; }
.impact { font-family: var(--sans); font-size: var(--s-2); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); background: none; padding: 0; border-radius: 0; line-height: 1.4; }
.impact.minor { color: var(--ink-2); } .impact.material { color: var(--bad); }
.ev { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--ink-2); }

/* ---------- provenance ---------- */
.prov { gap: 0.55rem 1.4rem; max-width: var(--measure); }
.prov dt { font-family: var(--sans); font-size: var(--s-2); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); padding-top: 0.2em; line-height: 1.4; }
.prov dd { font-family: var(--sans); font-size: var(--s-1); line-height: 1.5; }
.hash { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; line-height: 1.5; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: 0.9em; }

/* ---------- phones ----------
   At 375px the engine page overflowed by ~35px: body kept its 20px side padding on top of the site's
   gutter, and the claim strip's outer labels are nowrap text anchored at up to 100% of the strip. The
   padding is reset above; here the strip gets room on both sides for its edge labels, and nothing with
   nowrap is allowed to push the page wider than the viewport. */
@media (max-width: 520px) {
  section.verdict { grid-template-columns: 1fr; }
  .strip { margin: 0 2.4rem; }
  .prov { grid-template-columns: 1fr; gap: 0.2rem 0; }
  .prov dt { margin-top: 0.8rem; }
  .prov dt:first-child { margin-top: 0; }
  .list li { grid-template-columns: 4.4rem minmax(0, 1fr); }
  .claim header { display: grid; }
  .facts dd .mono, .ev { white-space: normal; overflow-wrap: anywhere; }
}
@media print { .ev-bar, .ev-foot-back { display: none; } }
