/* Research notes site. Plain CSS, no build step, no external resources.
   Visual idea: claims are set like inference rules (premises over a bar,
   conclusion under it). Status marks keep one shape each (filled dot proved,
   ring assumed, bullseye reviewed by AI, half dot under review, diamond open, square cited, dotted ring in progress),
   so colour is never the only signal.

   Palette: Solarized (Ethan Schoonover). Solarized Light is the site theme
   (Diana, 29 Nov 2026); the dark values below are overridden for every reader.
   Text in an accent hue uses a "-t" variant, nudged in lightness until it
   reaches at least 4.5:1 on both the background and the panel colour; the
   status marks draw their shapes in that same colour. Pure accents (yellow
   focus and nav marks, red limits border) are kept for strokes and reach at
   least 3:1; Solarized Light darkens yellow and green slightly for that. */

:root {
  color-scheme: light;

  /* surfaces */
  --paper: #002b36;     /* base03 */
  --paper-2: #073642;   /* base02, panels */
  /* text */
  --ink-strong: #eee8d5; /* base2, headings */
  --ink: #93a1a1;        /* base1, body: 5.6:1 on base03, 4.9:1 on base02 */
  --ink-2: #8e9d9d;      /* base0 nudged: 5.3:1 on base03, 4.6:1 on base02 */
  --rule: #164552;       /* hairlines, between base02 and base01 */
  --bar: #93a1a1;        /* the inference bar */
  /* accent strokes (pure Solarized) */
  --blue: #268bd2;
  --green: #859900;
  --yellow: #b58900;
  --red: #dc322f;
  --grey: #657b83;       /* base00: 3.4:1 as a graphic on base03 */
  /* accent text */
  --link: #53a1d6;       /* blue nudged */
  --green-t: #92a319;
  --yellow-t: #bd9519;
  --red-t: #e87b72;
  --grey-t: #8e9d9d;
  --violet-t: #9596cd;   /* rule labels only */
  /* figures sit on a light plate in both themes */
  --plate: #fdf6e3;      /* base3 */
  --plate-edge: #586e75; /* base01 */
  --selection: #0f4a57;

  --serif: Charter, "Bitstream Charter", "Sitka Text", "Iowan Old Style", Cambria, "Noto Serif", "Droid Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;

  /* type scale: a 1.25 ratio on an 18px body */
  --t-small: 0.84rem;
  --t-body: 1.125rem;
  --t-h3: 1.3rem;
  --t-h2: 1.62rem;
  --t-h1: 2.7rem;
  --measure: 38rem;
  --rail: 10.5rem;
  --gap: 2.75rem;
  --section: 3rem;      /* one vertical gap between sections */
}

@media all { /* Solarized Light for every reader */
  :root {
    --paper: #fdf6e3;      /* base3 */
    --paper-2: #eee8d5;    /* base2, panels */
    --ink-strong: #002b36; /* base03 */
    --ink: #073642;        /* base02: 12:1 on base3, 10.6:1 on base2 */
    --ink-2: #546b72;      /* base01 nudged: 5.2:1 on base3, 4.6:1 on base2 */
    --rule: #ddd6c1;
    --bar: #073642;
    --grey: #657b83;       /* base00: 4.1:1 as a graphic on base3 */
    --green: #7a8c00;      /* green darkened slightly: 3.5:1 as a graphic on base3 */
    --yellow: #a37a00;     /* yellow darkened slightly: graphic contrast >= 3:1 on base3 */
    --link: #1a6ca0;
    --green-t: #5e6d00;
    --yellow-t: #816100;
    --red-t: #bf3130;
    --grey-t: #546b72;
    --violet-t: #5562a6;
    --plate: #fdf6e3;
    --plate-edge: #ddd6c1;
    --selection: #eee8d5;
  }
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.62;
  font-kerning: normal;
  hyphens: manual;
}

/* ---------- links and focus ---------- */

a { color: var(--link); text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.12em; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}
/* a link that is a block (figure plates) keeps its outline outside the plate edge */
.plate:focus-visible { outline-offset: 4px; border-radius: 6px; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink-strong); color: var(--paper);
  padding: 0.5rem 0.8rem; font-family: var(--sans); z-index: 10;
}
.skip:focus { top: 1rem; }

code, .folder {
  font-family: var(--mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

/* inline mathematics: exponents set as superscripts, kept on one line */
.m { white-space: nowrap; font-variant-numeric: lining-nums; }
.m sup { font-size: 0.72em; line-height: 0; vertical-align: 0.55em; }
.m sup sup { font-size: 0.85em; vertical-align: 0.45em; }
var { font-style: italic; }
sub, sup { line-height: 0; }

/* ---------- page frame: a reading column with a left rail ---------- */

.frame {
  max-width: calc(var(--rail) + var(--gap) + var(--measure) + 14rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.4rem 2rem;
  padding: 1.4rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.masthead .name {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 700;
  color: var(--ink-strong); text-decoration: none;
}
.masthead nav ul {
  display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem;
  list-style: none; margin: 0; padding: 0;
  font-size: 0.95rem;
}
.masthead nav a { color: var(--ink-2); text-decoration: none; padding: 0.2rem 0; }
.masthead nav a:hover { color: var(--ink-strong); text-decoration: underline; }
.masthead nav a[aria-current="page"] { color: var(--ink-strong); box-shadow: inset 0 -2px 0 var(--yellow); }

/* A section: heading in the rail, text in the column. */
.sec {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--measure)) minmax(0, 1fr);
  column-gap: var(--gap);
  padding: var(--section) 0 0;
}
.sec > * { grid-column: 2; }
.sec > :last-child { margin-bottom: 0; }
.sec > .rail { grid-column: 1; grid-row: 1 / span 40; }
.sec > .wide { grid-column: 2 / 4; }

/* The rail heading's first line shares its line box with the first line of
   body text beside it, so the two baselines align. */
.rail h2 {
  margin: 0;
  font-size: var(--t-h3);
  line-height: calc(var(--t-body) * 1.62);
  font-weight: 700;
}
.rail p {
  margin: 0.5rem 0 0;
  font-family: var(--sans); font-size: var(--t-small); line-height: 1.45;
  color: var(--ink-2);
}

h1, h2, h3 { text-wrap: balance; color: var(--ink-strong); }
::selection { background: var(--selection); color: var(--ink-strong); }
h3 { font-size: var(--t-h3); line-height: 1.3; margin: 2rem 0 0.4rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin: 0 0 0.45rem; }
li::marker { color: var(--ink-2); }
strong { font-weight: 700; }

/* ---------- hero ----------
   The page title is the conclusion of a rule whose premises are the two
   claims the work began from. A key to the marks sits beside it. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  column-gap: 3.5rem;
  padding-top: var(--section);
}
.hero-rule, .hero-text { grid-column: 1; }
.hero > .key { grid-column: 2; grid-row: 1 / span 2; align-self: start; }

.hero-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  align-items: center;
}
.hero-rule .premises {
  grid-column: 1 / 3; grid-row: 1;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2.2rem;
  list-style: none; margin: 0; padding: 0 0 0.8rem;
  font-size: 1.02rem; line-height: 1.45;
}
.hero-rule .premises li { margin: 0; flex: 1 1 15rem; }
.hero-rule .bar { grid-column: 1; grid-row: 2; border-top: 3px solid var(--bar); }
.hero-rule .label { grid-column: 2; grid-row: 2; font-size: 1.05rem; }
.hero-rule h1 {
  grid-column: 1 / 3; grid-row: 3;
  font-size: var(--t-h1);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 0; padding-top: 0.75rem;
  max-width: 22ch;
}
.hero-text { margin-top: 1.4rem; }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 40rem; }
.hero .byline {
  font-family: var(--sans); font-size: var(--t-small); color: var(--ink-2);
  margin-top: 0.6rem; line-height: 1.5; max-width: 40rem;
}

/* the key to the status marks */
.key {
  background: var(--paper-2);
  border-radius: 4px;
  padding: 1rem 1.1rem 0.6rem;
  font-family: var(--sans); font-size: 0.86rem; line-height: 1.45;
}
.key h2 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 0.4rem; }
.key p { margin: 0 0 0.7rem; color: var(--ink-2); }
.key ul { list-style: none; padding: 0; margin: 0; }
.key li { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem; align-items: baseline; margin: 0 0 0.5rem; }
.key li .st { justify-self: start; }

/* A question: the topic in the rail, the question as a heading,
   its answering rules beneath. */
.q .topic {
  margin: 0.5rem 0 0;
  font-family: var(--serif); font-size: 1.02rem; font-style: normal; font-weight: 700;
  color: var(--ink-strong); line-height: 1.3;
}
.question {
  font-size: var(--t-h2);
  line-height: 1.22;
  font-style: italic;
  font-weight: 400;
  margin: 0 0 1.4rem;
  max-width: 30ch;
}
.sec > .rules { grid-column: 2 / 4; }
.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 3rem;
  align-items: start;
}
.rules .rule { margin: 0; }
.rules-q2 > .rule:first-child:nth-last-child(3) { grid-row: span 2; }
.rule-col > .stops { margin-top: 1.8rem; }
.stops h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.stops p { font-size: 1rem; }
.q .more { font-family: var(--sans); font-size: 0.95rem; margin: 1.2rem 0 0; }

/* ---------- inference rule ----------
   premises
   ───────────────────── label
   conclusion                              */

.rule {
  margin: 0.4rem 0 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.9rem;
  align-items: center;
}
.rule .premises {
  grid-column: 1 / 3; grid-row: 1;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem;
  list-style: none; margin: 0; padding: 0 0 0.55rem;
}
.rule .premises li { margin: 0; line-height: 1.4; }
.rule .bar {
  grid-column: 1; grid-row: 2;
  height: 0; border-top: 2px solid var(--bar);
}
.rule .label {
  grid-column: 2; grid-row: 2;
  font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--violet-t);
  white-space: nowrap;
}
.rule .conclusion {
  grid-column: 1 / 3; grid-row: 3;
  margin: 0; padding-top: 0.55rem;
  font-size: 1.12rem; line-height: 1.45; color: var(--ink-strong);
}
.rule .caveat {
  grid-column: 1 / 3; grid-row: 4;
  margin: 0.55rem 0 0;
  font-family: var(--sans); font-size: 0.9rem; line-height: 1.5; color: var(--ink-2);
}
.rule .caveat + .caveat { grid-row: 5; } /* a second caveat must not share row 4 */
.rule .caveat + .caveat + .caveat { grid-row: 6; }

/* status marks, shape plus word, never colour alone */
.st {
  display: inline-flex; align-items: baseline; gap: 0.35em;
  font-family: var(--sans); font-size: 0.78rem; line-height: 1.2;
  padding: 0.12em 0.5em 0.14em; border-radius: 0.25rem;
  white-space: nowrap; vertical-align: 0.1em;
}
.st::before {
  content: ""; width: 0.55em; height: 0.55em; border-radius: 50%;
  display: inline-block; flex: none; transform: translateY(-0.02em);
}
.st { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.st-proved  { color: var(--green-t); }
.st-proved::before  { background: currentColor; }
.st-assumed { color: var(--yellow-t); }
.st-assumed::before { border: 0.13em solid currentColor; }
.st-open    { color: var(--red-t); }
.st-open::before    { border: 0.13em solid currentColor; border-radius: 0; transform: rotate(45deg) scale(0.85); }
.st-soon    { color: var(--grey-t); }
.st-soon::before    { width: 0.62em; height: 0.62em; border: 0.14em dotted currentColor; transform: translateY(0.02em); }
.st-review  { color: var(--yellow-t); }
.st-review::before  { background: linear-gradient(90deg, currentColor 50%, transparent 50%); border: 0.1em solid currentColor; }
.st-reviewed { color: var(--violet-t); }
.st-reviewed::before { border: 0.13em solid currentColor; background: radial-gradient(circle, currentColor 0 28%, transparent 34%); }
.st-cited   { color: var(--link); }
.st-cited::before   { background: currentColor; border-radius: 1px; }

/* Status marks draw their shape in the text colour, so the shape has the
   same contrast as the word (at least 4.5:1 on background and panels). */
.premises .st { margin-left: 0.25rem; }

/* ---------- new papers ----------
   The one bold use of the rule: each new paper is set as a rule. The
   subtitle's assumptions sit above a heavy bar, the paper's title (its
   result) below it, the folder name at the end of the bar. Status, authors,
   abstract and links follow underneath in the quiet styles used elsewhere. */

.sec > .paper-rules { grid-column: 2 / 4; padding-top: 0.3rem; }
.paper-rules {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 3rem;
  align-items: start;
}
.paper-rules > li { margin: 0; }
.paper .rule { margin: 0; }
.paper .rule .premises { font-size: 1.02rem; padding-bottom: 0.6rem; }
.paper .rule .bar { border-top-width: 3px; }
.paper .rule .label { font-size: 1rem; }
.paper .rule h3.conclusion {
  margin: 0; padding-top: 0.65rem;
  font-size: var(--t-h3); line-height: 1.3; font-weight: 700;
}
.paper .rule h3.conclusion a {
  color: var(--ink-strong);
  text-decoration-color: var(--rule); text-decoration-thickness: 2px;
}
.paper .rule h3.conclusion a:hover { text-decoration-color: currentColor; }
.paper .links { gap: 0.35rem 1rem; }
.paper-status { margin: 0.75rem 0 0.15rem; line-height: 1.9; }
.paper-status .st + .st { margin-left: 0.3rem; }
.paper-by {
  margin: 0 0 0.6rem;
  font-family: var(--sans); font-size: var(--t-small); line-height: 1.5; color: var(--ink-2);
}
.paper-abstract { font-size: 1rem; line-height: 1.55; margin: 0; }

/* ---------- figures ---------- */

figure { margin: 1.4rem 0 1.8rem; }
.plate {
  display: block;
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: 6px;
  padding: 0.6rem;
}
.plate img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.plate.narrow { max-width: 26rem; }
.plate.mid { max-width: var(--measure); }
figcaption {
  margin-top: 0.6rem;
  font-family: var(--sans); font-size: var(--t-small); line-height: 1.5; color: var(--ink-2);
  max-width: var(--measure);
}

/* ---------- project index (home page) ---------- */

.plist { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.plist > li {
  padding: 1.1rem 0 1.15rem;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.plist > li:last-child { border-bottom: 1px solid var(--rule); }
.plist h3, .plist h4 { margin: 0 0 0.25rem; font-size: 1.15rem; line-height: 1.3; color: var(--ink-strong); }
.plist h3 a, .plist h4 a { color: var(--ink-strong); text-decoration: none; }
.plist h3 a:hover, .plist h4 a:hover { text-decoration: underline; }
.plist .where .st { margin-left: 0.5rem; }

/* project groups on the overview: named by the question they answer */
h3.group {
  margin: 1.6rem 0 0.5rem;
  font-size: 1rem; font-style: italic; font-weight: 400;
  color: var(--ink-2);
}
h3.group:first-of-type { margin-top: 0.3rem; }
h3.group + .plist > li:first-child { border-top: 0; padding-top: 0.3rem; }
/* small offsets so the rail's first baseline meets the first line beside it */
.rail + .plist > li:first-child { border-top: 0; padding-top: 0; margin-top: -0.2rem; }
.rail + h3.group { margin-top: 0.375rem; }
.rail + .limits { margin-top: 0.15rem; }
.sec:has(> .rail + .steps) > .rail { padding-top: 0.56rem; }
.project > .rail { padding-top: 0.32rem; }
.sec:has(> .rail + .disclosure-box) > .rail { padding-top: 1.34rem; }

.findings > li { margin-bottom: 0.8rem; }
.plist p { margin: 0.3rem 0 0.45rem; }
.plist .where { font-family: var(--sans); font-size: var(--t-small); color: var(--ink-2); margin: 0; }

.links {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.2rem;
  list-style: none; padding: 0; margin: 0.6rem 0 0;
  font-family: var(--sans); font-size: 0.95rem;
}
.links li { margin: 0; }
.links .pages { color: var(--ink-2); font-size: 0.85em; }

/* ---------- project entries (projects page) ---------- */

.project {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--measure)) minmax(0, 1fr);
  column-gap: var(--gap);
  padding: var(--section) 0 calc(var(--section) - 0.6rem);
  border-top: 1px solid var(--rule);
}
.project > :last-child { margin-bottom: 0; }
.project:first-of-type { border-top: 0; }
.project > * { grid-column: 2; }
.project > .rail { grid-column: 1; grid-row: 1 / span 40; }
.project > .wide, .project > .ledger { grid-column: 2 / 4; max-width: 50rem; }
.project h2 { font-size: var(--t-h2); line-height: 1.2; margin: 0 0 0.3rem; }
.project .folder-line { font-family: var(--sans); font-size: var(--t-small); color: var(--ink-2); margin: 0 0 1.1rem; }
.project .rail .st { margin-top: 0.35rem; }
.project .rail .rail-note { margin-top: 0.55rem; }

.ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 1.2rem 0 0.6rem;
}
.ledger h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.ledger ul, .ledger p { font-size: 1rem; }
.ledger .new h3 { color: var(--green-t); }
.ledger .notnew h3 { color: var(--ink-2); }

.limits {
  border-left: 3px solid var(--red);
  padding: 0.1rem 0 0.1rem 1rem;
  margin: 0.8rem 0 1rem;
}
.limits h3 { margin: 0 0 0.35rem; font-size: 1.05rem; color: var(--red-t); }
.limits ul { margin-bottom: 0.2rem; font-size: 1rem; }

details { margin: 0.4rem 0 1rem; }
summary {
  cursor: pointer;
  font-family: var(--sans); font-size: 0.95rem; color: var(--link);
  padding: 0.25rem 0;
}
details[open] summary { margin-bottom: 0.6rem; }
details > figure { margin: 0 0 0.4rem; }

/* how the work is done: the same words, set tighter */
#how h3.group { margin: 1.4rem 0 0.35rem; }
#how .findings { margin-bottom: 0.4rem; }
#how .findings > li { margin-bottom: 0.4rem; line-height: 1.55; }
#how .how-figure { margin: 0.2rem 0 0.6rem; }
/* this figure is drawn on the paper colour already; multiplying it onto the
   plate would darken it to a different shade from the other plates */
#how .plate img { mix-blend-mode: normal; }


/* pages with a plain title (projects, checking) */
.hero-plain { display: block; }
.hero-plain h1 {
  font-size: var(--t-h1); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.012em; margin: 0 0 1rem; max-width: 24ch;
}

/* ---------- contents (projects page) ---------- */

.toc {
  margin: 2rem 0 1rem;
  padding: 1.2rem 0 0.4rem;
  border-top: 3px solid var(--bar);
  display: grid;
  grid-template-columns: var(--rail) repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
}
.toc > h2 { margin: 0; font-size: var(--t-h3); }
.toc h3 {
  margin: 0 0 0.5rem; font-size: 1rem; font-style: italic; font-weight: 400; color: var(--ink-2);
}
.toc ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.toc li { margin: 0 0 0.75rem; line-height: 1.35; }
.toc li a { color: var(--ink-strong); text-decoration-color: var(--rule); }
.toc li a:hover { text-decoration-color: currentColor; }
.toc li .st { margin-top: 0.3rem; display: flex; width: max-content; }

.project .rail .topic-note { font-style: italic; }
.links .top { margin-left: auto; }
.links .top a { color: var(--ink-2); }

/* comparison of factoring bounds */
table.compare .num { text-align: right; padding-right: 1.4rem; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
table.compare tr.this th, table.compare tr.this td { color: var(--ink-strong); font-weight: 700; }
table.compare tr.this td:last-child { font-weight: 400; }
table.compare tr.this { box-shadow: inset 3px 0 0 var(--green); }
table.compare tr.this th { padding-left: 0.7rem; }
/* progress-log tables: the long header wraps, so the review status and the
   full SHA-256 (which may break anywhere) fit the column */
table.compare.log thead .num { white-space: normal; }
table.compare.log td:nth-child(3) { width: 34%; }

.checked { margin: 0.4rem 0 0.6rem; }
.project h3.part { margin: 1.8rem 0 0.6rem; font-size: 1.15rem; }
.project h4.earlier { margin: 1.4rem 0 0.4rem; font-size: 1.02rem; font-style: italic; font-weight: 400; color: var(--ink-2); }
.limits > p { margin: 0 0 0.6rem; font-size: 1rem; }
.project h3.part .st { margin-left: 0.5rem; vertical-align: 0.15em; }
.checked h3 { margin: 0.8rem 0 0.35rem; font-size: 1.05rem; }
.checked p { font-size: 1rem; }
.followup { font-size: 1rem; }
.credits { font-family: var(--sans); font-size: var(--t-small); color: var(--ink-2); line-height: 1.5; }

/* ---------- what's next: open goals ----------
   Each goal sits under a dashed bar: the rule is not closed yet. */

.sec > .goals { grid-column: 2 / 4; }
.goals {
  list-style: none; padding: 0; margin: 0.2rem 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 3rem;
}
.goals > li {
  margin: 0; padding-top: 0.75rem;
  border-top: 2px dashed var(--bar);
  display: flex; flex-direction: column;
}
.goals h3 { margin: 0 0 0.3rem; font-size: 1.08rem; line-height: 1.3; }
.goals p { margin: 0 0 0.4rem; font-size: 1rem; line-height: 1.5; }
.goals .goal-status { margin: auto 0 0; padding-top: 0.2rem; }
.sec:has(> .rail + .goals) > .rail { padding-top: 0.76rem; }
.rail .asof { font-family: var(--serif); font-style: italic; font-size: 0.98rem; color: var(--ink-strong); margin-top: 0.35rem; }

/* ---------- process (checking page) ---------- */

.steps { list-style: none; padding: 0; margin: 0.6rem 0 1rem; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.2rem 3rem;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.05rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--yellow); color: var(--ink-strong);
  font-family: var(--sans); font-weight: 700; font-size: 0.95rem;
  display: grid; place-items: center;
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1rem - 1px); top: 2.3rem; bottom: 0.2rem;
  border-left: 2px solid var(--rule);
}
.steps h3 { margin: 0.15rem 0 0.35rem; font-size: 1.15rem; }
.steps ul { font-size: 1rem; }

.labels { list-style: none; padding: 0; }
.labels li { margin-bottom: 0.5rem; }
.labels .st { min-width: 6.8rem; margin-right: 0.5rem; }

.tablewrap { overflow-x: auto; margin: 0.6rem 0 1.4rem; }
table {
  border-collapse: collapse; width: 100%;
  font-size: 0.95rem; line-height: 1.45;
}
caption {
  text-align: left; font-family: var(--sans); font-size: var(--t-small); color: var(--ink-2);
  padding-bottom: 0.5rem;
}
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.9rem 0.55rem 0; border-top: 1px solid var(--rule); }
thead th { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--ink-2); border-top: 0; }
tbody th { font-weight: 700; }

/* ---------- disclosure ---------- */

.disclosure-box {
  background: var(--paper-2);
  border-radius: 6px;
  padding: 1.2rem 1.3rem 0.4rem;
  margin: 0.2rem 0 1rem;
}

/* ---------- footer ---------- */

.foot {
  margin-top: var(--section);
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 2.6rem;
  font-family: var(--sans); font-size: var(--t-small); line-height: 1.6; color: var(--ink-2);
}
.foot p { margin: 0 0 0.5rem; max-width: 46rem; }
.foot a { color: var(--ink-2); }

/* ---------- narrow screens ---------- */

@media (max-width: 60rem) {
  :root { --gap: 2rem; --rail: 8.5rem; }
  .sec, .project { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .sec > .wide, .project > .wide, .project > .ledger { grid-column: 2; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero > .key { grid-column: 1; grid-row: auto; margin-top: 1.6rem; max-width: 30rem; }
  .sec > .rules { grid-column: 2; }
  .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc > h2 { grid-column: 1 / -1; margin-bottom: 0.8rem; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .sec > .goals { grid-column: 2; }
  .sec > .paper-rules { grid-column: 2; }
  .paper-rules { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 44rem) {
  :root {
    --t-body: 1.06rem;
    --t-h1: 1.95rem;
    --t-h2: 1.38rem;
    --t-h3: 1.18rem;
  }
  :root { --section: 2.25rem; }
  .frame { padding: 0 1.1rem; }
  .sec, .project { display: block; }
  .sec:has(> .rail + .goals) > .rail, .sec:has(> .rail + .steps) > .rail,
  .sec:has(> .rail + .disclosure-box) > .rail, .project > .rail { padding-top: 0; }
  .sec > .paper-rules { padding-top: 0; }
  .rail { margin-bottom: 0.9rem; }
  .rail p { margin-top: 0.3rem; }
  /* on a phone the title leads, then the folder line, then the status */
  .project { display: flex; flex-direction: column; }
  .project > * { min-width: 0; }
  .project > h2 { order: -2; }
  .project > .folder-line { order: -1; }
  .project .rail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin-bottom: 1.1rem; }
  .project .folder-line { margin-bottom: 0.7rem; }
  .project .rail .rail-note { margin: 0; flex-basis: 100%; }
  .hero { padding-top: 2rem; }
  .question { margin-bottom: 1.1rem; }
  .q .topic { font-family: var(--sans); font-size: var(--t-small); font-weight: 600; color: var(--ink-2); }
  .q .rail { margin-bottom: 0.3rem; }
  .hero-rule .premises { font-size: 0.98rem; gap: 0.6rem; }
  .hero-rule .label { font-size: 0.9rem; }
  .hero .lede { font-size: 1.1rem; }
  .ledger { grid-template-columns: 1fr; }
  .toc { grid-template-columns: 1fr; }
  .goals { grid-template-columns: 1fr; gap: 1.3rem; }
  /* comparison table: one block per method on a phone */
  table.compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.compare tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; border-top: 1px solid var(--rule); padding: 0.55rem 0; }
  table.compare th, table.compare td { border-top: 0; padding: 0; }
  table.compare td:last-child { grid-column: 1 / -1; padding-top: 0.2rem; font-size: 0.92rem; }
  table.compare .num { padding-right: 0; }
  table.compare tr.this { padding-left: 0.7rem; }
  table.compare tr.this th { padding-left: 0; }
  /* progress-log tables: coefficient, then status, then hash, stacked */
  table.compare.log tr { grid-template-columns: minmax(0, 1fr); }
  table.compare.log .num { text-align: left; }
  table.compare.log td, table.compare.log td:nth-child(3) { padding-top: 0.2rem; width: auto; }
  .links .top { margin-left: 0; flex-basis: 100%; }
  /* the site navigation wraps onto further lines, so every item stays
     visible; each label stays on one line */
  .masthead { display: block; padding: 1rem 0 0.5rem; }
  .masthead nav { margin: 0.25rem 0 0 -0.4rem; }
  .masthead nav ul {
    flex-wrap: wrap; gap: 0.15rem 1rem; font-size: 0.92rem;
    padding: 0.4rem 0 0.45rem 0.4rem; /* room for the focus outline */
  }
  .masthead nav li { flex: none; margin: 0; white-space: nowrap; }
  .rule .label { font-size: 0.72rem; }
  .plate { padding: 0.35rem; }
}

/* The site has no motion. If any is added later, it stops here. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .masthead nav, .skip { display: none; }
  a { color: #000; }
}

.m sub { font-size: 0.72em; line-height: 0; vertical-align: -0.25em; }
