/* Grove's benchmark report, /releases/grove/benchmark/ (paper.mjs), 16 Nov 2026. The report sits in the article
   structure releases and field notes share (v5-pages.css: .p5-read, .p5-toc, .p5-tbl, .p5-code); this sheet adds the
   parts a research report has and the other articles do not: section numbers, the abstract, display equations,
   tables with captions and figures, citations, references and the appendices' code. Loaded by this page only, and
   built from the tokens: hairlines, the two faces, the four inks and the one accent. */

/* ── the hero: the cover's fields under the dates, the author and the dataset on one mono line in the date's ink, a
   pair to a part of it ── */
.pp-hero .p5-hero-x .p5-date:first-child { margin-bottom: 0; }
.pp-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 12px; line-height: 1.35; }

/* ── headings: the report's own numbers, in mono and quiet, ahead of the words; the space after a number is
   the report's own where it writes one (2.1, Appendix A), else the same width ── */
.pp-n { margin-right: 1.2em; font: 500 13px/1 var(--mono); letter-spacing: 0; color: var(--ink3); }
.pp-n.sp { margin-right: 0; }
.pp h3 { margin-top: 36px !important; font: 500 17px/1.4 var(--head); letter-spacing: -.012em; }
.pp h3 + * { margin-top: 10px !important; }
.pp h2 + h3 { margin-top: 18px !important; }   /* a section's first subsection sits under it as its text would */
.pp h4 { margin-top: 26px !important; font: 500 15px/1.45 var(--head); letter-spacing: -.01em; color: var(--ink); }
.pp h4 + * { margin-top: 6px !important; }

/* ── the abstract: the article's opening, at the lead's size, under its mono label; the revision under its own ── */
.pp .pp-lbl { font: 500 12px/1.4 var(--mono); letter-spacing: 0; color: var(--ink3); text-transform: lowercase; }
.pp .pp-lbl + * { margin-top: 12px !important; }
.pp-abs h3.pp-lbl { margin-top: 32px !important; }
.pp-abs p { font-size: 17px; line-height: 1.62; letter-spacing: -.008em; color: var(--ink2); }

/* ── inline: subscripts and superscripts keep the line's height; a citation is a small mono link to its entry ── */
.pp sub, .pp sup { font-size: .75em; line-height: 0; }
.pp .pp-cite { font: 500 11px/0 var(--mono); letter-spacing: 0; }
.pp .pp-cite a { margin-left: 1px; color: var(--ink3); text-decoration: none; transition: color .2s; }
.pp .pp-cite a:hover { color: var(--m); }
.pp code.w { white-space: normal; }
.pp .pp-tab code, .pp .pp-refs code { font-size: 12px; }   /* code in the smaller type keeps 12px */

/* ── a display equation: centred on its own line in the text face, its number at the right edge; on a narrow
   column it breaks before the sum (paper.mjs), and never runs out of the column ── */
.pp-eq { position: relative; margin: 28px 0 !important; padding: 6px 56px; overflow-x: auto; overflow-y: hidden; text-align: center; font: 400 17px/1.7 var(--sans); letter-spacing: 0; color: var(--ink); scrollbar-width: thin; }
.pp-eq-g { white-space: nowrap; }
.pp-eq i { font-style: italic; }
.pp-eq .pp-op { font-style: normal; }
.pp-eq-n { position: absolute; top: 50%; right: 0; translate: 0 -50%; font: 500 13px/1 var(--mono); color: var(--ink3); }

/* ── tables: the caption above (its label in mono), the site's table frame, figures on the right in tabular
   figures, the head in mono as the report writes it (its R@5 and Δ keep their case) ── */
.pp-tab { margin: 36px 0 !important; }
.pp-tab figcaption { font-size: 14px; line-height: 1.6; color: var(--ink3); text-wrap: pretty; }
.pp-tl { display: block; margin-bottom: 6px; font: 500 12px/1.4 var(--mono); letter-spacing: 0; color: var(--ink2); text-transform: lowercase; }
.pp-tab .p5-tbl { margin: 18px 0 0 !important; }
.pp-tab table { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.pp-tab th, .pp-tab td { padding: 12px 0 12px 24px; }
.pp-tab th:first-child, .pp-tab td:first-child { padding-left: 0; }
.pp-tab th { vertical-align: bottom; text-transform: none; letter-spacing: 0; }
.pp-tab .fg { text-align: right; white-space: nowrap; }
.pp-tab .w1 { white-space: nowrap; }
.pp-tab td.nm { color: var(--ink); }
.pp-src { display: block; margin-top: 2px; font: 500 12px/1.4 var(--mono); letter-spacing: 0; color: var(--ink3); }
/* a summary row, ruled off as the report rules it; Grove's own row carries its figures in mint */
.pp-tab tr:has(+ tr.sum) td { border-bottom-color: var(--ln3); }
.pp-tab tr.sum td { color: var(--ink); font-weight: 500; }
.pp-tab tr.g td.fg { color: var(--m); }

/* ── the appendices' code: the site's code block, long lines scroll inside it; comments in the quieter ink ── */
.pp .pp-code { white-space: pre; tab-size: 4; }
.pp-c { color: var(--ink3); }

/* ── the references: numbered as the report numbers them, in smaller type with their links ── */
.pp .pp-refs { padding-left: 0; list-style: none; counter-reset: ref; font-size: 14px; line-height: 1.6; }
.pp-refs li { padding-left: 44px !important; text-indent: -44px; counter-increment: ref; }
.pp-refs li + li { margin-top: 12px; }
.pp-refs li::before { content: "[" counter(ref) "]"; display: inline-block; width: 44px; text-indent: 0; font: 500 12px/1 var(--mono); color: var(--ink3); }
.pp-refs li:target { color: var(--ink); }
.pp-refs li:target::before { color: var(--m); }

@media (max-width: 640px) {
  .pp { font-size: 16px; }
  .pp-abs p { font-size: 17px; }
  .pp-eq { padding-inline: 34px; font-size: 16px; }
  .pp-eq-n { font-size: 12px; }
  .pp .pp-code { padding: 16px; font-size: 12px; }
  .pp .pp-cite { font-size: 12px; }
  /* tables: closer columns, and a head over figures or a name in code may wrap, so a table fits the column where it
     can; one with several columns of running words cannot, so its words keep a reading width and it scrolls inside
     its frame instead of squeezing them; the first column stays put */
  .pp-tab table { font-size: 13px; }
  .pp-tab th, .pp-tab td { padding: 10px 0 10px 14px; }
  .pp-tab th.fg, .pp .pp-tab code, .pp-tab td.nm.w1 { white-space: normal; }
  .pp-tab.wide td:not(.fg):not(.w1) { min-width: 8.5em; }
  .pp-tab th:first-child, .pp-tab td:first-child { position: sticky; left: 0; z-index: 1; padding-right: 12px; background: var(--bg); }
  .pp-tab.wide th:first-child, .pp-tab.wide td:first-child { box-shadow: inset -1px 0 var(--ln); }   /* where the rest scrolls past it */
}
@media (max-width: 374px) {
  .pp-tab th, .pp-tab td { padding-left: 10px; }
}

/* ── print: the report's PDF is printed from this page (tools/paper-pdf.cjs), and a reader's own print gives the
   same. A4, the paper theme whatever the screen's, one column at a reading measure with the text at 10pt; the
   site's header, contents list, contact section and footer stay on screen. The first page is the cover (.pp-cover,
   the hero's words, shown only here); every other page carries its number and, opposite it, the report's title (a
   string here, which the build checks against the report, paper.mjs). Only lines and type print: no fills. ── */
.pp-cover { display: none; }
@page {
  size: A4;
  margin: 20mm 28mm 22mm;
  @bottom-left { content: "Grove on LongMemEval"; font: 400 7.5pt "Geist Mono", ui-monospace, monospace; color: #5a6561; }
  @bottom-right { content: counter(page); font: 400 7.5pt "Geist Mono", ui-monospace, monospace; color: #5a6561; }
}
@page :first {
  margin: 20mm 24mm;
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}
@media print {
  :root, html[data-theme] {
    color-scheme: light;
    --bg: #fff; --bg1: #fff; --bg2: #f2f0eb; --ink: #101615; --ink2: #3b4542; --ink3: #5a6561; --ink4: #828b87;
    --ln: rgba(16, 22, 21, .12); --ln2: rgba(16, 22, 21, .2); --ln3: rgba(16, 22, 21, .36);
    --m: #0c7556; --m-rgb: 12, 117, 86; --fg-rgb: 16, 22, 21; --bg-rgb: 255, 255, 255; --ma: #4fd0a5; --ma-rgb: 79, 208, 165;
  }
  html, body.v5 { background: #fff; }
  body.v5 { overflow: visible; }
  .skip, .nav5, .vl5, .mob5, .p5-hero, .p5-toc-w, #contact, .ft5 { display: none !important; }
  .s5, .fr5 { border: 0 !important; }
  .s5.p5-art-s > .fr5 { display: block; max-width: none; padding: 0; }
  .js .up { opacity: 1 !important; transform: none !important; transition: none !important; }

  /* the cover */
  .pp-cover { display: flex; flex-direction: column; justify-content: space-between; height: 250mm; break-after: page; color: var(--ink); }
  .pp-cv-top, .pp-cv-bot { display: flex; align-items: center; justify-content: space-between; font: 500 8pt/1 var(--mono); color: var(--ink3); }
  .pp-cv-top { padding-bottom: 7mm; border-bottom: .6pt solid var(--ln2); }
  .pp-cv-bot { padding-top: 7mm; border-top: .6pt solid var(--ln2); }
  .pp-cv-lk { display: flex; align-items: center; gap: 3mm; }
  .pp-cv-lk .mk5 { display: block; width: 5.6mm; height: auto; fill: var(--ink); }
  .pp-cv-lk .wm5 { display: block; width: 19mm; height: auto; fill: var(--ink); }
  .pp-cv-mid .ln5 { width: 12mm; height: 0; border-top: 1pt solid var(--ma); background: none; }
  /* the PDF's text keeps a word space only where the gap is at least the font's own (Chrome writes no space
     characters; readers infer them): no tracking on the cover, except the title's tight letters, whose word spaces
     are widened to make up for it */
  .pp-cover, .pp-cover * { letter-spacing: 0; }
  .pp-cover .pp-cv-t { margin-top: 9mm; font: 500 34pt/1.04 var(--head); letter-spacing: -.035em; word-spacing: .07em; }
  .pp-cv-s { max-width: 118mm; margin-top: 6mm; font-size: 13pt; line-height: 1.45; color: var(--ink2); }
  .pp-cv-f { margin: 14mm 0 0; font: 500 8.5pt/2 var(--mono); }
  .pp-cv-f div { display: flex; }
  .pp-cv-f dt { width: 22mm; color: var(--ink3); }
  .pp-cv-f dd { margin: 0; color: var(--ink2); }

  /* the reading column; letters at their own spacing, so the PDF's text keeps its spaces (tracked text loses them) */
  .pp { max-width: none; font-size: 10pt; line-height: 1.55; color: var(--ink2); }
  .pp, .pp * { letter-spacing: 0 !important; }
  .pp p, .pp li, .pp .pp-code { orphans: 3; widows: 3; hyphens: manual; }
  .pp p, .pp li { text-wrap: pretty; }
  .pp > div > * + * { margin-top: 2.8mm; }
  .pp a { color: inherit; text-decoration: none; }
  .pp .p5-part { margin-top: 0; padding-top: 0; border-top: 0; }
  .pp .p5-part h2 { margin-top: 9mm; padding-top: 5mm; border-top: .6pt solid var(--ln2); }
  .pp .p5-part.pb { break-before: page; }
  .pp .p5-part.pb h2 { margin-top: 0; padding-top: 0; border-top: 0; }
  /* never split over two pages: a heading with the block it opens (pp-k, paper.mjs), a short paragraph, a list
     item, an equation, a table, a short code block; a heading never ends a page */
  .pp .pp-k, .pp p.s, .pp li, .pp .pp-code.s { break-inside: avoid; }
  .pp h2, .pp h3, .pp h4, .pp .pp-lbl { break-after: avoid; break-inside: avoid; }
  .pp h2 { font-size: 14pt; line-height: 1.25; letter-spacing: -.015em; }
  .pp h2 + * { margin-top: 3.5mm !important; }
  .pp h3 { margin-top: 6mm !important; font-size: 11pt; }
  .pp h2 + h3 { margin-top: 3.5mm !important; }
  .pp h3 + * { margin-top: 1.8mm !important; }
  .pp h4 { margin-top: 4.5mm !important; font-size: 10pt; }
  .pp h4 + * { margin-top: 1.2mm !important; }
  .pp-n { font-size: 8pt; }
  .pp .pp-lbl { font-size: 7.5pt; }
  .pp .pp-lbl + * { margin-top: 2mm !important; }
  .pp-abs h3.pp-lbl { margin-top: 6mm !important; }
  .pp-abs p { font-size: 10.5pt; line-height: 1.55; }
  .pp ul { padding-left: 1.2em; }
  .pp li + li { margin-top: 1.5mm; }
  .pp .pp-cite { font-size: 6.5pt; }
  .pp code { padding: 0; background: none; font-size: .9em; }
  .pp .pp-tab code, .pp .pp-refs code { font-size: .92em; }
  /* equations, tables and code stay whole on a page; a table's head would repeat on the next one */
  /* nothing in the column is positioned in print, so the PDF draws its text in reading order (Chrome draws positioned
     boxes last): the headings are static and an equation is a grid, the formula centred and its number at the edge */
  .pp h2 { position: static; }
  .pp-eq { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; margin: 5mm 0 !important; padding: 1mm 0; overflow: visible; font-size: 11pt; break-inside: avoid; }
  .pp-eq-f { grid-column: 2; }
  .pp-eq-n { position: static; grid-column: 3; justify-self: end; translate: none; font-size: 8pt; }
  .pp-tab { margin: 6mm 0 !important; break-inside: avoid; }
  .pp-tab figcaption { font-size: 8.5pt; line-height: 1.5; }
  .pp-tl { margin-bottom: 1mm; font-size: 7.5pt; }
  .pp-tab .p5-tbl { margin-top: 3mm !important; overflow: visible; border-top-width: .6pt; }
  .pp-tab table { font-size: 8.5pt; line-height: 1.45; }
  .pp-tab thead { display: table-header-group; }
  .pp-tab tr { break-inside: avoid; }
  .pp-tab th, .pp-tab td { padding: 2mm 0 2mm 4mm; border-bottom-width: .6pt; }
  .pp-tab th:first-child, .pp-tab td:first-child { padding-left: 0; }
  .pp-tab th { font-size: 7.5pt; }
  .pp-src { font-size: 7.5pt; }
  .pp .pp-code { padding: 3.5mm 4mm; border: .6pt solid var(--ln2); border-radius: 1.5mm; background: none; font-size: 8pt; line-height: 1.5; white-space: pre-wrap; overflow: visible; overflow-wrap: anywhere; }
  .pp .pp-refs { font-size: 8.5pt; line-height: 1.5; }
  .pp-refs li { padding-left: 9mm !important; text-indent: -9mm; break-inside: avoid; }
  .pp-refs li + li { margin-top: 2mm; }
  .pp-refs li::before { width: 9mm; font-size: 7.5pt; }
}
