/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--wp-paper); color: var(--wp-ink); font: 400 var(--wp-text-body)/1.6 var(--wp-font-body); -webkit-text-size-adjust: 100%; }
body { margin: 0; }
a { color: var(--wp-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--wp-focus); outline-offset: 3px; }
.wrap { max-width: var(--wp-page); margin: 0 auto; padding: 0 var(--wp-gutter); }
.mono { font-family: var(--wp-font-mono); font-feature-settings: "zero" 1; }
h1, h2 { font-family: var(--wp-font-display); font-weight: 600; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--wp-text-hero); line-height: 1.02; }
h2 { font-size: var(--wp-text-title); line-height: 1.08; }
h3 { font: 600 var(--wp-text-h3)/1.3 var(--wp-font-body); margin: 0; }
p { margin: 0; }

/* the label: mono, small caps feel, one line, never a sentence */
.label { font: 500 var(--wp-text-cite)/1.2 var(--wp-font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp-muted); }
.label b { color: var(--wp-ink); font-weight: 500; }

/* the signature: highlighter marks tie a claim to its source */
mark { background: var(--wp-cited); color: inherit; padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.flag { background: var(--wp-flag); }
h1 mark { padding: 0 .08em; background: linear-gradient(to bottom, transparent 34%, var(--wp-cited) 34%, var(--wp-cited) 92%, transparent 92%); } /* highlighter stroke: clears the descenders above it */
.cite { display: inline-flex; align-items: center; min-height: var(--wp-tap); font: 500 var(--wp-text-cite)/1 var(--wp-font-mono); color: var(--wp-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap; }
.cite.flag { color: var(--wp-rust); }

/* ---------- header ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: var(--wp-tap); padding: 0 var(--wp-6); border-radius: var(--wp-radius); font: 600 1rem/1 var(--wp-font-body); text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--wp-bio); color: var(--wp-ink); border: var(--wp-rule-strong) solid var(--wp-ink); }
.btn-primary:hover { background: var(--wp-bio); }
.more { font-weight: 600; color: var(--wp-ink); text-decoration: none; border-bottom: 2px solid var(--wp-ink); padding-bottom: 2px; min-height: var(--wp-tap); display: inline-flex; align-items: center; }
.more::after { content: "→"; margin-left: .4em; }

/* ---------- hero ---------- */
.hero { padding: var(--wp-16) 0 var(--wp-24); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--wp-16); align-items: start; }
.hero-copy { display: grid; gap: var(--wp-6); padding-top: var(--wp-4); }
.hero-copy h1 { max-width: 13ch; }
.lede { font-size: var(--wp-text-lede); line-height: 1.5; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wp-4) var(--wp-8); margin-top: var(--wp-2); }
.terms { display: flex; flex-wrap: wrap; gap: var(--wp-2) var(--wp-6); margin: var(--wp-2) 0 0; padding: var(--wp-4) 0 0; border-top: var(--wp-rule) solid var(--wp-hair); list-style: none; color: var(--wp-muted); font-size: var(--wp-text-meta); font-weight: 500; }
.terms b { color: var(--wp-ink); font-weight: 600; }

/* the receipt: source lines on top, the row they became below */
.receipt { background: var(--wp-panel); border: var(--wp-rule-strong) solid var(--wp-ink); margin: 0; }
.receipt-head { display: flex; justify-content: space-between; gap: var(--wp-4); padding: var(--wp-3) var(--wp-4); border-bottom: var(--wp-rule) solid var(--wp-ink); }
.src { margin: 0; padding: var(--wp-3) 0; list-style: none; counter-reset: none; }
.src li { display: grid; grid-template-columns: 3.25rem 1fr auto; align-items: baseline; gap: var(--wp-3); padding: 3px var(--wp-4); font-size: .9375rem; line-height: 1.5; }
.src li .n { font: 500 var(--wp-text-cite)/1.5 var(--wp-font-mono); color: var(--wp-muted); text-align: right; }
.src li.k { color: var(--wp-muted); }
.src li.hit { font-weight: 600; }
.src li .tag { font: 600 var(--wp-text-cite)/1 var(--wp-font-mono); color: var(--wp-ink); }
.row-head { display: flex; justify-content: space-between; padding: var(--wp-3) var(--wp-4); border-top: var(--wp-rule-strong) solid var(--wp-ink); border-bottom: var(--wp-rule) solid var(--wp-ink); background: var(--wp-paper); }
.row { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.row th, .row td { text-align: left; padding: 0 var(--wp-4); height: var(--wp-tap); border-bottom: var(--wp-rule) solid var(--wp-hair); vertical-align: middle; }
.row tr:last-child th, .row tr:last-child td { border-bottom: 0; }
.row th { font-weight: 500; color: var(--wp-muted); width: 34%; }
@media (min-width: 1100px) { .row td:nth-child(2) { white-space: nowrap; } }
.row td:last-child { text-align: right; width: 1%; }
.figcap { padding: var(--wp-3) var(--wp-4); border-top: var(--wp-rule) solid var(--wp-ink); color: var(--wp-muted); font-size: var(--wp-text-meta); line-height: 1.45; }

/* ---------- sections ---------- */
.section { border-top: var(--wp-rule-strong) solid var(--wp-ink); padding: var(--wp-16) 0 var(--wp-24); }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--wp-16); align-items: end; margin-bottom: var(--wp-12); }
.section-head .label { grid-column: 1 / -1; margin-bottom: calc(-1 * var(--wp-8)); }
.section-head p { color: var(--wp-muted); max-width: 32em; }

/* 100-cell ledger: the reference job, one square per cell */
.ledger { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--wp-16); align-items: start; }
.grid100 { margin: 0; }
.grid100 table { width: 100%; border-collapse: collapse; }
.grid100 th { text-align: left; font: 500 .9375rem/1.3 var(--wp-font-mono); padding: 6px var(--wp-3) 6px 0; white-space: nowrap; }
.grid100 td.cells { padding: 6px 0; width: 100%; }
.grid100 .strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.grid100 .strip span { height: 22px; background: var(--wp-cited); border: var(--wp-rule) solid var(--wp-ink); }
.grid100 .strip span.b { background: var(--wp-flag); border-style: dashed; border-color: var(--wp-rust); }
.grid100 td.count { font: 500 .9375rem/1.3 var(--wp-font-mono); padding-left: var(--wp-3); white-space: nowrap; text-align: right; }
.grid100 figcaption { margin-top: var(--wp-6); padding-top: var(--wp-4); border-top: var(--wp-rule) solid var(--wp-ink); color: var(--wp-muted); font-size: var(--wp-text-meta); line-height: 1.5; }
.big { font: 600 clamp(4rem, 9vw, 7.5rem)/0.9 var(--wp-font-display); letter-spacing: -0.03em; }
.big small { font-size: .35em; letter-spacing: 0; color: var(--wp-muted); }
.aside { display: grid; gap: var(--wp-6); }
.aside > .more { justify-self: start; width: max-content; }
.limit { border-left: var(--wp-rule-strong) solid var(--wp-rust); padding: var(--wp-1) 0 var(--wp-1) var(--wp-4); }
.limit .label { color: var(--wp-rust); display: block; margin-bottom: var(--wp-2); }
.legend { display: flex; flex-wrap: wrap; gap: var(--wp-2) var(--wp-6); font-size: var(--wp-text-meta); color: var(--wp-muted); }
.legend i { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; background: var(--wp-cited); border: 1px solid var(--wp-ink); }
.legend i.b { background: var(--wp-flag); border: 1px dashed var(--wp-rust); }

/* index of work: ruled rows, not cards */
.index { list-style: none; margin: 0; padding: 0; border-top: var(--wp-rule) solid var(--wp-ink); }
.index li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.2fr) 7rem; gap: var(--wp-8); align-items: baseline; padding: var(--wp-6) 0; border-bottom: var(--wp-rule) solid var(--wp-ink); }
.index h3 a { color: var(--wp-ink); text-decoration: none; }
.index h3 a:hover { text-decoration: underline; }
.index p { color: var(--wp-muted); }
.index .num { font: 500 1rem/1.3 var(--wp-font-mono); color: var(--wp-ink); white-space: nowrap; text-align: right; }

/* closing field: the one Deep block on the page */
.closing { background: var(--wp-deep); color: var(--wp-paper); }
.closing .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--wp-16); align-items: center; padding-top: var(--wp-16); padding-bottom: var(--wp-16); }
.closing p { font-size: var(--wp-text-lede); line-height: 1.5; margin-bottom: var(--wp-6); }
.closing .label { color: var(--wp-paper); }


/* ---------- narrow ---------- */
@media (max-width: 900px) {
  .hero .wrap, .section-head, .ledger, .closing .wrap { grid-template-columns: 1fr; gap: var(--wp-8); }
  .section-head .label { margin-bottom: 0; }
  .index li { grid-template-columns: minmax(0, 1fr) auto; gap: var(--wp-2) var(--wp-6); }
  .index li .label { grid-column: 1 / -1; }
  .index li p { grid-column: 1 / -1; }
  .index li .num { grid-row: 2; grid-column: 2; }
}
@media (max-width: 600px) {
  .site-header .btn { margin-left: auto; padding: 0 var(--wp-4); }
  .hero { padding: var(--wp-8) 0 var(--wp-16); }
  .section { padding: var(--wp-12) 0 var(--wp-16); }
  .src li { grid-template-columns: 2.25rem 1fr auto; padding: 3px var(--wp-3); }
  .row th, .row td { padding: 0 var(--wp-3); }
  .actions .btn { width: 100%; }
  .grid100 .strip { gap: 3px; }
  .grid100 .strip span { height: 18px; }
  .grid100 th { font-size: .8125rem; }
}
