/* ============================================================
   vgwalter.com — "working paper" treatment

   Governing idea: the page presents itself as evidence rather than
   as marketing. Title block, abstract, numbered sections, specimen
   tables, margin glosses.

   Layout rhythm — the point is that width varies by section:
     §1  narrow measure + margin gloss   (reading)
     §2  two tracks: narrative | findings (working)
     §3  full-width registers + tables    (reference)
     §4  short, two tracks                (closing)

   Rules and tint carry structure. No cards, no shadows, no radius.
   ============================================================ */

:root {
  --ink: #1a1a18;
  --ink-soft: #45443f;
  --ink-muted: #86847c;
  --canvas: #f7f5f0;
  --canvas-deep: #e2e8ee;
  --accent: #1f3f5c;
  --accent-light: #e2e8ee;
  --rule: rgba(26, 26, 24, 0.15);
  --rule-mid: rgba(26, 26, 24, 0.3);
  --rule-heavy: rgba(26, 26, 24, 0.75);

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --sheet: 74rem;
  --measure: 33rem;
  --margin-col: 12rem;
  --gutter: 3rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: var(--serif);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ---------- running head ---------- */

.runner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--canvas);
  border-bottom: 1px solid var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.7rem 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.runner a { color: inherit; text-decoration: none; }
.runner a:hover { color: var(--accent); }
.runner nav { display: flex; gap: 1.6rem; }

/* ---------- page frame ---------- */

.sheet {
  max-width: var(--sheet);
  margin: 0 auto;
  padding: 6rem 2.5rem 5rem;
}

/* ---------- masthead: uses the full width immediately ---------- */

.masthead {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--gutter);
  align-items: end;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2rem;
  margin-bottom: 1rem;
}

.masthead h1 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.standfirst {
  font-size: clamp(1.1rem, 1.7vw, 1.34rem);
  line-height: 1.38;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 30rem;
}

/* figures table sits beside the title, not under it */
.figures { width: 100%; border-collapse: collapse; }

.figures caption {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
  padding-bottom: 0.5rem;
}

.figures td {
  border-top: 0.5px solid var(--rule);
  padding: 0.5rem 0;
  vertical-align: baseline;
}
.figures tr:first-child td { border-top: 1px solid var(--rule-mid); }

.figures td.n {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  width: 4.6rem;
  white-space: nowrap;
  padding-right: 1rem;
}

.figures td.d {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.byline {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.055em;
  color: var(--ink-muted);
  text-transform: uppercase;
  border-bottom: 0.5px solid var(--rule);
  padding-bottom: 0.9rem;
  margin-bottom: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}
.byline a { color: var(--accent); text-decoration: none; }
.byline a:hover { text-decoration: underline; }

/* ---------- abstract ---------- */

.abstract {
  background: var(--canvas-deep);
  border-left: 3px solid var(--accent);
  padding: 1.6rem 1.9rem 1.8rem;
  margin-bottom: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--gutter);
}

.abstract .label {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.abstract p { font-size: 0.99rem; line-height: 1.62; }

/* ---------- section scaffolding ---------- */

.section { margin-bottom: 5rem; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.55rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink);
}

.section-head .no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.section-head .rule { flex: 1; }

.section-head .aside {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Two tracks: text and margin gloss. Used by §1 and §4. */
.band {
  display: grid;
  grid-template-columns: var(--measure) var(--margin-col);
  column-gap: var(--gutter);
  align-items: start;
}

.prose p { margin-bottom: 1.05rem; hyphens: auto; }
.prose p + p { text-indent: 1.4rem; margin-bottom: 1.05rem; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- margin glosses ---------- */

.gloss {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule-mid);
  padding-top: 0.5rem;
}

.gloss + .gloss { margin-top: 1.5rem; }

.gloss b {
  display: block;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 9px;
  margin-bottom: 0.4rem;
}

/* ---------- §2 entries: narrative | findings ---------- */

.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0 var(--gutter);
  padding: 2rem 0 2.4rem;
  border-top: 0.5px solid var(--rule-mid);
}
.entry:first-of-type { border-top: 1px solid var(--rule-mid); }

.entry-head { grid-column: 1 / -1; margin-bottom: 1.4rem; }

.entry-head .kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.45rem;
}

.entry-head h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  max-width: 44rem;
}

.entry p { font-size: 0.95rem; margin-bottom: 0.95rem; }
.entry p:last-of-type { margin-bottom: 0; }

/* commercial gloss, sitting under the narrative it annotates */
.translation {
  background: var(--canvas-deep);
  border-left: 2px solid var(--accent);
  padding: 0.85rem 1.1rem;
  margin-top: 1.2rem;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.translation b {
  font-family: var(--mono);
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* specification table */
.spec {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  border-top: 0.5px solid var(--rule);
  border-bottom: 0.5px solid var(--rule);
  padding: 0.55rem 0;
  margin: 1.2rem 0 0;
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  row-gap: 0.3rem;
  column-gap: 0.9rem;
}
.spec dt { text-transform: uppercase; color: var(--accent); }
.spec dd { color: var(--ink-soft); }
.spec dd a { color: var(--accent); }

.findings { list-style: none; }

.findings li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.6rem;
  font-size: 0.89rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.findings li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink-muted);
}

.subhead {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 0.5px solid rgba(138,58,46,0.3);
  padding-bottom: 0.35rem;
  margin: 0 0 0.75rem;
}
.subhead + .findings { margin-bottom: 1.5rem; }

/* ---------- §3 reference: full width ---------- */

.registers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem var(--gutter);
  margin-bottom: 3rem;
}

.register h4 {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 0.5px solid var(--rule-mid);
  padding-bottom: 0.35rem;
  margin-bottom: 0.55rem;
}

.register p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.62;
}

.reference-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--gutter);
  align-items: start;
}

.schedule { width: 100%; border-collapse: collapse; }

.schedule td {
  border-bottom: 0.5px solid var(--rule);
  padding: 0.7rem 0;
  vertical-align: baseline;
  font-size: 0.9rem;
}
.schedule tr:first-child td { border-top: 1px solid var(--rule-mid); }

.schedule td.when {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  white-space: nowrap;
  width: 7.5rem;
  padding-right: 1rem;
}
.schedule td.what { color: var(--ink-soft); line-height: 1.45; }
.schedule td.what b { font-weight: 500; color: var(--ink); display: block; }

.honours {
  background: var(--canvas-deep);
  border-left: 2px solid var(--accent);
  padding: 1.1rem 1.3rem;
}
.honours .findings li { font-size: 0.85rem; margin-bottom: 0.5rem; }
.honours .findings li:last-child { margin-bottom: 0; }

/* ---------- links, footer ---------- */

a { color: var(--accent); }
.prose a, .entry a { text-decoration-thickness: 0.5px; text-underline-offset: 2px; }

.colophon {
  border-top: 2px solid var(--rule-heavy);
  padding-top: 1rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

/* ---------- accessibility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.1rem;
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  z-index: 200;
}
.skip-link:focus { left: 0; top: 0; }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-light); color: var(--accent); }

/* ---------- narrow viewports ---------- */

@media (max-width: 1080px) {
  :root { --measure: 100%; }
  .masthead { grid-template-columns: 1fr; align-items: start; gap: 2rem; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .band > .gloss { max-width: 34rem; margin-top: 1.4rem; }
  .gloss + .gloss { margin-top: 1.2rem; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .registers { grid-template-columns: repeat(2, 1fr); }
  .reference-split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  html { font-size: 16px; }
  .sheet { padding: 5.5rem 1.25rem 3.5rem; }
  .runner { padding: 0.6rem 1.25rem; font-size: 9px; }
  .runner nav { gap: 0.9rem; }
  .abstract { grid-template-columns: 1fr; padding: 1.25rem 1.35rem 1.5rem; }
  .abstract p + p { margin-top: 0.9rem; }
  .registers { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; row-gap: 0.1rem; }
  .spec dt { margin-top: 0.35rem; }
  .prose p + p { text-indent: 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .runner, .skip-link { display: none; }
  body { background: #fff; font-size: 10pt; }
  .sheet { max-width: none; padding: 0; }
  .entry { break-inside: avoid; }
}



/* ============================================================
   COLOUR

   One accent, used with conviction. Forest green carries the
   page's structure — major rules, every small label, every
   figure — while body text stays ink. Ochre appears exactly
   once, on Recognition, so it registers as a deliberate
   exception rather than a second system.
   ============================================================ */

.entry-head {
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
  margin-left: -0.9rem;
}

/* Key figures set inline: monospace, accented, so the eye finds
   the numbers without the prose raising its voice. */
.fig {
  font-family: var(--mono);
  font-size: 0.86em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* A finding worth stopping on. Three on the page, no more. */
.findings li.key { color: var(--ink); }
.findings li.key::before { content: '▸'; color: var(--accent); }

.gloss { border-top-color: var(--accent); }
