/* EvalGlass whitepaper — a print-first reading surface.
   A sibling of the marketing (evalglass-v2.css) and docs (evalglass.css) surfaces:
   same warm paper, prism, Fraunces/Newsreader/mono, blue accent, green selection —
   but tuned for a long, single-column, journal-grade read that also renders to PDF.
   Self-contained (its own tokens + font import) so print fidelity never depends on
   the marketing chrome. Screen = branded reading sheet on peach; print = clean paper,
   page furniture supplied by scripts/whitepaper-pdf.mjs. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

:root {
  --peach:#f1e9e7; --panel:#fffdfb; --paper:#faf5f1;
  --ink:#1a1714; --ink-strong:#000; --muted:#5c5650; --faint:#8a837b;
  --line:#e3d8d2; --line-strong:#d3c5bd; --dark:#17140f;
  --blue:#0058fe; --blue-dark:#0042c4; --blue-soft:#e4ecff; --blue-line:#c4d4ff;
  --green:#00e600;
  --amber:#8a5b00; --amber-soft:#fff0d8; --amber-line:#f0dcae;
  --violet:#8e63d6; --violet-soft:#efe7fb; --violet-line:#ddccf3;
  --rose:#c62f44; --rose-soft:#fbe6e9; --rose-line:#f3ccd2;
  /* prism facet hues — used only as a hairline signature, sparingly */
  --f1:#8e63d6; --f2:#2f6bf0; --f3:#12a08a; --f4:#cf8a2e; --f5:#d8556a; --f6:#b257ad;
  --display:"Fraunces","Hoefler Text",Georgia,"Times New Roman",serif;
  --serif:"Newsreader","Iowan Old Style",Georgia,"Times New Roman",serif;
  --mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --measure:38rem;
  --shadow:0 1px 2px rgba(40,25,15,.04), 0 18px 44px -24px rgba(60,35,20,.22);
}

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  margin:0; background:var(--peach); color:var(--ink);
  font-family:var(--serif); font-size:18px; line-height:1.62;
  font-optical-sizing:auto; -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
::selection { background:var(--green); color:#04210a; }
a { color:var(--blue); text-decoration-thickness:.06em; text-underline-offset:.16em; }
a:hover { color:var(--blue-dark); }

/* back-to-site link (screen only) */
.wp-tosite {
  display:inline-block; font-family:var(--mono); font-size:12.5px; letter-spacing:.04em;
  color:var(--muted); text-decoration:none; padding:20px 0 0 max(20px, 4vw);
}
.wp-tosite:hover { color:var(--blue); }

/* the reading sheet */
.wp-doc {
  max-width:760px; margin:26px auto 80px; padding:clamp(28px, 5vw, 72px);
  background:var(--panel); border:1px solid var(--line);
  border-radius:16px; box-shadow:var(--shadow); position:relative; overflow:hidden;
}
/* the iridescent prism rule signing the top edge */
.wp-doc::before {
  content:""; position:absolute; inset:0 0 auto 0; height:3px;
  background:linear-gradient(90deg,var(--f1),var(--f2),var(--f3),var(--f4),var(--f5),var(--f6));
  opacity:.9;
}

/* ── cover ─────────────────────────────────────────────────────────── */
.wp-cover { padding:14px 0 30px; border-bottom:1px solid var(--line); margin-bottom:34px; }
.wp-cover__mark { width:40px; height:40px; display:block; margin-bottom:22px; }
.wp-eyebrow {
  font-family:var(--mono); font-size:12px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--blue); margin:0 0 18px;
}
.wp-title {
  font-family:var(--display); font-weight:500; color:var(--ink-strong);
  font-size:clamp(2.3rem, 1.5rem + 3vw, 3.5rem); line-height:1.04;
  letter-spacing:-.012em; margin:0 0 .5em;
}
.wp-deck {
  font-family:var(--display); font-weight:400; font-style:italic; color:var(--muted);
  font-size:clamp(1.2rem, 1rem + .8vw, 1.5rem); line-height:1.34; margin:0 0 1.4em; max-width:34em;
}
.wp-meta {
  font-family:var(--mono); font-size:11.5px; letter-spacing:.05em; color:var(--faint);
  margin:0; text-transform:none;
}
.wp-actions { margin-top:26px; }
.wp-btn {
  display:inline-flex; align-items:center; gap:9px; background:var(--dark); color:#f3ece3;
  font-family:var(--serif); font-weight:600; font-size:16px; text-decoration:none;
  padding:11px 22px; border-radius:11px; border:1px solid #000;
}
.wp-btn:hover { color:#fff; background:#000; }
.wp-btn--ghost { background:transparent; color:var(--ink); border-color:var(--line-strong); }

/* ── table of contents ─────────────────────────────────────────────── */
.wp-toc { margin:0 0 40px; padding:22px 26px; background:var(--paper); border:1px solid var(--line); border-radius:12px; }
.wp-toc__h { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); margin:0 0 14px; }
.wp-toc ol { margin:0; padding:0; list-style:none; counter-reset:toc; }
.wp-toc li { margin:0; padding:6px 0; border-top:1px solid var(--line); display:flex; gap:12px; align-items:baseline; }
.wp-toc li:first-child { border-top:0; }
.wp-toc a { text-decoration:none; color:var(--ink); font-family:var(--display); font-size:17px; }
.wp-toc a:hover { color:var(--blue); }
.wp-toc__n { font-family:var(--mono); font-size:12px; color:var(--faint); flex:0 0 1.4em; }

/* ── sections + prose ──────────────────────────────────────────────── */
.wp-section, .wp-abstract, .wp-refs { margin:0 0 40px; }
.wp-abstract {
  padding:24px 28px; background:var(--paper); border:1px solid var(--line);
  border-left:3px solid var(--blue); border-radius:12px;
}
.wp-h2 {
  font-family:var(--display); font-weight:500; color:var(--ink-strong);
  font-size:clamp(1.55rem, 1.2rem + 1.3vw, 2.15rem); line-height:1.12; letter-spacing:-.01em;
  margin:0 0 .7em; display:flex; gap:.55em; align-items:baseline;
}
.wp-h2__n {
  font-family:var(--mono); font-weight:500; font-size:.5em; letter-spacing:.02em;
  color:var(--blue); flex:0 0 auto; transform:translateY(-.15em);
}
.wp-abstract .wp-h2 { font-size:1.25rem; }
.wp-doc h3 {
  font-family:var(--display); font-weight:600; color:var(--ink-strong);
  font-size:1.16rem; line-height:1.25; margin:1.9em 0 .5em;
}
.wp-doc p { margin:0 0 1.05em; max-width:var(--measure); }
.wp-lead { font-size:1.1em; color:var(--ink); }
.wp-abstract p { max-width:none; }
.wp-doc strong { font-weight:600; color:var(--ink-strong); }
.wp-doc ul, .wp-doc ol { margin:0 0 1.15em; padding-left:1.3em; max-width:var(--measure); }
.wp-doc li { margin:0 0 .5em; padding-left:.2em; }
.wp-doc li::marker { color:var(--faint); }

/* pull-quote */
.wp-pull {
  margin:1.6em 0; padding:2px 0 2px 22px; border-left:3px solid var(--blue);
  font-family:var(--display); font-weight:500; font-style:italic;
  font-size:1.34rem; line-height:1.3; color:var(--ink-strong); max-width:none;
}
.wp-pull p { font:inherit; margin:0; max-width:none; }

/* callout / note */
.wp-note {
  display:block; margin:1.5em 0; padding:16px 20px; background:var(--blue-soft);
  border:1px solid var(--blue-line); border-radius:11px; font-size:.96em; color:var(--ink);
}
.wp-note strong:first-child { color:var(--blue-dark); }
.wp-note--warn { background:var(--amber-soft); border-color:var(--amber-line); }
.wp-note--warn strong:first-child { color:var(--amber); }

/* figures */
.wp-fig { margin:1.7em 0; padding:0; }
.wp-fig figcaption {
  font-family:var(--mono); font-size:11.5px; letter-spacing:.02em; color:var(--faint);
  margin-top:10px; line-height:1.5;
}

/* concept diagrams (SVG) — legible on the peach reading sheet and in the printed paper */
.wp-diagram { margin:2em auto; text-align:center; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.wp-diagram svg { display:block; width:100%; max-width:560px; height:auto; margin:0 auto; }
.wp-diagram text { font-family:var(--serif); }
.wp-diagram .mono { font-family:var(--mono); }
.wp-diagram .disp { font-family:var(--display); }

/* tables */
.wp-table { width:100%; border-collapse:collapse; margin:1.5em 0; font-size:.92em; }
.wp-table th, .wp-table td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.wp-table thead th {
  font-family:var(--mono); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--faint); border-bottom:1px solid var(--line-strong); font-weight:500;
}
.wp-table tbody tr:last-child td { border-bottom:0; }

/* inline code */
.wp-doc code {
  font-family:var(--mono); font-size:.85em; background:var(--paper);
  border:1px solid var(--line); border-radius:5px; padding:.06em .34em; color:var(--ink);
}

/* maturity badges (used sparingly, when the paper states a capability's status) */
.wp-badge {
  display:inline-block; font-family:var(--mono); font-size:10.5px; font-weight:500;
  letter-spacing:.04em; padding:.14em .5em; border-radius:999px; border:1px solid;
  vertical-align:.08em; margin-left:.1em;
}
.wp-badge--now { color:var(--blue); background:var(--blue-soft); border-color:var(--blue-line); }
.wp-badge--next { color:var(--amber); background:var(--amber-soft); border-color:var(--amber-line); }
.wp-badge--experimental { color:var(--violet); background:var(--violet-soft); border-color:var(--violet-line); }
.wp-badge--preview { color:var(--muted); background:var(--paper); border-color:var(--line-strong); }

/* illustrative-artifact label — the honesty stamp on any shown scorecard/figure */
.wp-illus {
  display:inline-block; font-family:var(--mono); font-size:10.5px; letter-spacing:.04em;
  color:var(--amber); background:var(--amber-soft); border:1px dashed var(--amber-line);
  border-radius:6px; padding:.2em .6em; margin:.4em 0;
}

/* a small honest scorecard block for the worked example */
.wp-card {
  margin:1.5em 0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--panel);
}
.wp-card__head {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:11px 16px; background:var(--paper); border-bottom:1px solid var(--line);
  font-family:var(--mono); font-size:11px; letter-spacing:.04em; color:var(--muted);
}
.wp-card__row { display:flex; justify-content:space-between; gap:14px; padding:9px 16px; border-bottom:1px solid var(--line); font-size:.92em; }
.wp-card__row:last-child { border-bottom:0; }
.wp-card__v { font-family:var(--mono); font-size:.92em; color:var(--muted); }
.wp-verdict { font-family:var(--mono); font-size:10.5px; font-weight:500; letter-spacing:.05em; padding:.16em .55em; border-radius:999px; border:1px solid; }
.wp-verdict--info { color:var(--blue); background:var(--blue-soft); border-color:var(--blue-line); }

/* references */
.wp-refs ol { font-size:.94em; color:var(--muted); }
.wp-refs li { margin-bottom:.7em; }

/* citation / colophon */
.wp-cite {
  margin-top:44px; padding-top:26px; border-top:1px solid var(--line);
  font-family:var(--mono); font-size:12px; line-height:1.7; color:var(--faint);
}
.wp-cite strong { color:var(--muted); }
.wp-cite__block { background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin:12px 0 0; white-space:pre-wrap; }

/* ── print / PDF — a plain research-paper surface (LaTeX/NeurIPS register) ──
   The screen stays an editorial reading sheet; print re-sets the same HTML as a
   quiet academic paper: centred title page (prism mark + one iridescent rule the
   only brand flourishes), justified serif body, bold numbered sections, numbered
   figures/tables, footnote-scale notes. Page furniture (centred page number) is
   supplied by scripts/whitepaper-pdf.mjs, which renders with print media. */
@page { size:A4; margin:24mm 22mm; }
@media print {
  html, body {
    background:#fff; color:#141210;
    font-family:var(--serif); font-size:10.4pt; line-height:1.52;
  }
  /* screen chrome + the on-screen table of contents (a research paper has none) */
  .wp-tosite, .wp-actions, .wp-toc__skip, .wp-toc { display:none !important; }
  .wp-doc { max-width:none; margin:0; padding:0; border:0; border-radius:0; box-shadow:none; background:#fff; }
  .wp-doc::before { display:none; }
  :root { --measure:none; }
  .wp-doc p, .wp-doc ul, .wp-doc ol { max-width:none; }
  .wp-doc p { text-align:justify; -webkit-hyphens:auto; hyphens:auto; }
  body { counter-reset:fig tbl; }

  /* ---- title page ---- */
  .wp-cover {
    min-height:246mm; margin:0; padding:0; border-bottom:0;
    display:flex; flex-direction:column; align-items:center; text-align:center;
    page-break-after:always;
  }
  .wp-cover__mark { width:46px; height:46px; margin:44mm auto 22px; }
  .wp-eyebrow {
    font-family:var(--mono); font-size:9.5pt; letter-spacing:.26em; text-transform:uppercase;
    color:var(--muted); margin:0 0 28mm;
  }
  .wp-title {
    font-family:var(--display); font-weight:600; color:#000; max-width:none;
    font-size:25pt; line-height:1.12; letter-spacing:-.008em; margin:0 0 14px;
  }
  .wp-deck {
    font-family:var(--display); font-style:italic; font-weight:400; color:#2c2620;
    font-size:13.5pt; line-height:1.42; margin:0 auto 32mm; max-width:30em;
  }
  .wp-meta { font-family:var(--serif); font-size:11pt; letter-spacing:0; color:#141210; margin:0; }
  .wp-cover::after {
    content:""; display:block; order:9; height:2.5px; width:52mm; margin:14px auto 0;
    background:linear-gradient(90deg,var(--f1),var(--f2),var(--f3),var(--f4),var(--f5),var(--f6));
    -webkit-print-color-adjust:exact; print-color-adjust:exact;
  }

  /* ---- abstract (plain, narrower measure, centred heading) ---- */
  .wp-abstract { background:none; border:0; border-radius:0; padding:0; margin:0 auto 18pt; }
  .wp-abstract .wp-h2 { justify-content:center; text-align:center; font-size:12pt; margin:0 0 8pt; display:block; }
  .wp-abstract p, .wp-abstract .wp-lead { font-size:9.6pt; line-height:1.5; margin:0 auto .7em; max-width:150mm; text-align:justify; }

  /* ---- numbered section + subsection headings ---- */
  .wp-h2 {
    font-family:var(--display); font-weight:600; color:#000; display:block;
    font-size:14.5pt; line-height:1.22; letter-spacing:-.004em; margin:1.5em 0 .5em; break-after:avoid;
  }
  .wp-h2__n { font-family:var(--display); font-weight:600; color:#000; font-size:1em; transform:none; margin-right:.45em; }
  .wp-doc h3 { font-family:var(--display); font-weight:600; color:#000; font-size:11.5pt; margin:1.4em 0 .4em; break-after:avoid; }
  .wp-lead { font-size:1em; color:#141210; }

  /* ---- pull-quotes → centred displayed statements ---- */
  .wp-pull {
    border:0; padding:0; margin:1.5em auto; max-width:130mm; text-align:center;
    font-family:var(--display); font-style:italic; font-weight:500; font-size:11.5pt; line-height:1.36; color:#000;
  }
  .wp-pull p { text-align:center; }

  /* ---- notes → footnote-scale set-off notes ---- */
  .wp-note {
    background:#f5f0ea; border:0; border-left:2px solid #b9a89e; border-radius:0;
    padding:8px 12px; margin:1.1em 0; font-size:9pt; line-height:1.46; color:#2c2620;
    break-inside:avoid; -webkit-print-color-adjust:exact; print-color-adjust:exact;
  }
  .wp-note--warn { background:#fbf3e4; border-left-color:#e0b869; }
  .wp-note strong:first-child { color:#141210; }

  /* ---- figures + academic numbering ---- */
  .wp-fig { margin:1.5em auto; padding:0; text-align:center; break-inside:avoid; }
  .wp-fig figcaption {
    font-family:var(--serif); font-size:8.9pt; letter-spacing:0; color:#3a342e;
    line-height:1.46; margin:9px auto 0; max-width:150mm; text-align:left;
  }
  .wp-fig:not(.wp-diagram) figcaption::before { counter-increment:tbl; content:"Table " counter(tbl) ". "; font-weight:600; color:#141210; }
  .wp-diagram figcaption::before { counter-increment:fig; content:"Figure " counter(fig) ". "; font-weight:600; color:#141210; }
  .wp-diagram svg { max-width:150mm; }

  /* ---- tables (booktabs register: horizontal rules only) ---- */
  .wp-table { width:100%; font-size:8.9pt; margin:1em auto; border-top:1px solid #141210; }
  .wp-table th, .wp-table td { padding:6px 10px; border-bottom:1px solid #d3c5bd; }
  .wp-table thead th {
    font-family:var(--serif); text-transform:none; letter-spacing:0; font-size:8.9pt;
    font-weight:600; color:#141210; border-bottom:1px solid #141210;
  }
  .wp-table tbody tr:last-child td { border-bottom:1px solid #141210; }

  /* ---- inline code (unboxed in print) ---- */
  .wp-doc code { background:none; border:0; padding:0; font-size:.9em; color:#141210; }

  /* ---- worked-example card ---- */
  .wp-card { border:1px solid #cbb; border-radius:0; break-inside:avoid; }
  .wp-card__head { background:#f5f0ea; -webkit-print-color-adjust:exact; print-color-adjust:exact; }

  /* ---- references + colophon ---- */
  .wp-refs .wp-h2 { font-size:13pt; }
  .wp-refs h3 { font-size:10.5pt; }
  .wp-refs ol { font-size:8.9pt; line-height:1.42; color:#2c2620; padding-left:1.5em; }
  .wp-refs li { margin-bottom:.4em; }
  .wp-cite { border-top:1px solid #cbb; font-family:var(--mono); font-size:8pt; line-height:1.6; color:#5c5650; margin-top:22pt; }
  .wp-cite__block { background:#f5f0ea; border:0; -webkit-print-color-adjust:exact; print-color-adjust:exact; }

  /* ---- break control + colour fidelity ---- */
  .wp-h2, h3 { break-after:avoid; }
  .wp-pull, .wp-note, .wp-fig, .wp-table, .wp-card, figure, blockquote { break-inside:avoid; }
  .wp-section { break-inside:auto; }
  p, li { orphans:3; widows:3; }
  a { color:#0042c4; text-decoration:none; }
  .wp-badge, .wp-illus, .wp-verdict, .wp-diagram { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
