/* larprober.github.io
   Editorial letterpress. Deliberate constraints:
   no gradients, no box shadows, no frosted glass, no blur, no neon,
   no radius above 2px, no card triptychs, hover only on real controls. */

:root {
  /* Black and white. Neutral greys, no hue anywhere, so emphasis has to come
     from value, weight and space rather than from colour. */
  --paper:      #0F0F0F;
  --paper-deep: #080808;
  --paper-lift: #191919;
  --ink:        #F4F4F4;
  --ink-soft:   #B5B5B5;
  --ink-faint:  #878787;
  --rule:       #292929;
  --rule-firm:  #666666;   /* 3.4:1 on the ground: form borders, diagram strokes
                              and the index numerals are meaningful, not decoration */
  --accent:     #FFFFFF;
  --accent-ink: #FFFFFF;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', Consolas, 'Courier New', monospace;

  --shell: 74rem;
  --gutter: clamp(1.25rem, 4.2vw, 3.25rem);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0125rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  hanging-punctuation: first last;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--paper); }

/* Thin, quiet scrollbar. The default light one cuts a bright stripe down a
   dark page. */
* { scrollbar-width: thin; scrollbar-color: var(--rule-firm) var(--paper); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule); border: 3px solid var(--paper); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--rule-firm); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.014em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }
p, li { text-wrap: pretty; }

a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; text-decoration-color: var(--rule-firm); transition: text-decoration-color 0.15s linear, color 0.15s linear; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- structure ---------- */

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.shell.narrow { max-width: 58rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1rem; font-family: var(--mono); font-size: 0.82rem; z-index: 50;
}
.skip:focus { left: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.9rem;
}
.eyebrow .num { color: var(--accent); }

.lede { font-size: clamp(1.06rem, 1.6vw, 1.22rem); color: var(--ink-soft); max-width: 46ch; }

/* ---------- masthead ---------- */

/* A double rule under the masthead: thick then thin, the way a printed title
   page separates the masthead from the text block. */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: relative;
}
.masthead::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  border-bottom: 1px solid var(--rule);
}
.masthead-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1.1rem; flex-wrap: wrap;
}
.wordmark { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.wordmark:hover { color: var(--accent); }
.wordmark .name { font-family: var(--serif); font-size: 1.42rem; letter-spacing: -0.01em; line-height: 1; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2rem); }
.nav a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); }

/* ---------- breadcrumbs ---------- */

.crumbs { border-bottom: 1px solid var(--rule); }
.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem;
  margin: 0; padding: 0.75rem 0;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-faint);
}
.crumbs li::after { content: '/'; margin-left: 0.55rem; color: var(--rule-firm); }
.crumbs li:last-child::after { content: ''; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.4rem); line-height: 1.03; max-width: 17ch; margin-bottom: 1.6rem; }
.hero .lede { max-width: 52ch; font-size: clamp(1.08rem, 1.7vw, 1.28rem); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; margin-top: 2.1rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; padding: 0.9rem 1.35rem; border-radius: 2px;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  transition: background-color 0.12s linear, border-color 0.12s linear, color 0.12s linear;
  cursor: pointer;
}
.btn:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn .ico { width: 17px; height: 17px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-firm); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Deliberately not a flex row: an inline link inside a flex container becomes
   its own item, which puts a gap between the link and the punctuation after it. */
.promise {
  margin-top: 1.5rem; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint);
  letter-spacing: 0.02em; line-height: 1.6;
}
.promise .ico {
  width: 18px; height: 18px; color: var(--accent);
  display: inline-block; vertical-align: -0.28em; margin-right: 0.4rem;
}

/* ---------- bands ---------- */

.band { padding: clamp(2.75rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule); }
.band-head { margin-bottom: 2.25rem; }
.band-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); max-width: 20ch; }
.band-head p { margin-top: 1rem; }

.rail { display: grid; gap: 2rem; }
@media (min-width: 62em) {
  /* The hairline between the rail and the text block is the column rule of a
     printed page. It is the cheapest thing on this site and does the most. */
  .rail { grid-template-columns: 15rem minmax(0, 1fr); gap: 0; align-items: start; }
  .rail > .band-head { margin-bottom: 0; position: sticky; top: 2.5rem; padding-right: 2.5rem; }
  .rail > .band-head h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); }
  .rail > :last-child { border-left: 1px solid var(--rule); padding-left: 3.25rem; }
}

/* ---------- ruled rows ---------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1px solid var(--rule); padding: 1.5rem 0; display: grid; gap: 0.35rem 1.4rem; }
.rows > li:last-child { border-bottom: 1px solid var(--rule); }
.rows .n { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.08em; padding-top: 0.3rem; }
.rows h3 { font-size: 1.32rem; }
.rows p { margin: 0.4rem 0 0; color: var(--ink-soft); max-width: 46ch; }
.rows .tail { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint); letter-spacing: 0.04em; }
.rows .ico { color: var(--ink-faint); width: 22px; height: 22px; }
@media (min-width: 48em) {
  .rows > li { grid-template-columns: 3rem minmax(0, 1fr) 11rem; align-items: start; }
  .rows .tail { text-align: right; padding-top: 0.35rem; }
}

/* ---------- work index ---------- */

.works { list-style: none; margin: 0; padding: 0; }
.works > li { border-top: 1px solid var(--rule); }
.works > li:last-child { border-bottom: 1px solid var(--rule); }
.works a.entry {
  display: grid; gap: 0.5rem 2rem; padding: 1.9rem 0; text-decoration: none;
  transition: background-color 0.12s linear;
}
.works a.entry:hover { background: var(--paper-lift); }
.works a.entry:hover h3 { color: var(--accent); }
.works .idx { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.08em; padding-top: 0.35rem; }
.works h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.works .sum { color: var(--ink-soft); margin: 0.55rem 0 0; max-width: 46ch; }
.works .facts {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem;
}
.works .go { display: none; }
@media (min-width: 52em) {
  .works a.entry { grid-template-columns: 3rem minmax(0, 1fr) 2.5rem; padding-inline: 0.75rem; margin-inline: -0.75rem; }
  .works .go { display: block; align-self: center; color: var(--rule-firm); }
  .works a.entry:hover .go { color: var(--accent); }
}

/* ---------- prose and case studies ---------- */

.page-head { padding-block: clamp(2.5rem, 5.5vw, 4rem) 2rem; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 18ch; }
.page-head .lede { margin-top: 1.4rem; }

.prose { max-width: 50ch; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin: 2.6rem 0 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin: 1.9rem 0 0.6rem; }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.15rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 700; }
.prose code {
  font-family: var(--mono); font-size: 0.86em; background: var(--paper-deep);
  padding: 0.1em 0.35em; border-radius: 2px;
}
/* A printed sidebar, ruled top and bottom. Not the coloured left strip that
   every generated page reaches for. */
.prose .note {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 1.1rem 0; margin: 2rem 0; color: var(--ink-soft);
  font-family: var(--serif); font-size: 1.1rem; font-style: italic; line-height: 1.5;
}

.facts-rail { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.4rem 0; margin: 0 0 2.5rem; }
.facts-rail dl { margin: 0; display: grid; gap: 1rem 2.5rem; }
@media (min-width: 40em) { .facts-rail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .facts-rail dl { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts-rail dt {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.3rem;
}
.facts-rail dd { margin: 0; font-size: 0.98rem; }

.plate {
  border: 1px solid var(--rule); background: var(--paper-lift);
  padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 2px;
}
.plate + .plate { margin-top: 1.25rem; }

figure { margin: 2rem 0; }
figure img { border: 1px solid var(--rule); border-radius: 2px; }
figcaption {
  font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint);
  margin-top: 0.65rem; letter-spacing: 0.03em;
}

.about-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 58em) { .about-grid { grid-template-columns: 17rem minmax(0, 1fr); gap: 3.5rem; } }
.portrait { border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-lift); }
.portrait-plate {
  border: 1px solid var(--rule); background: var(--paper-lift);
  display: grid; place-items: center; aspect-ratio: 4 / 5; color: var(--ink-faint); border-radius: 2px;
}

/* ---------- faq ---------- */

.faq { border-bottom: 1px solid var(--rule); max-width: 68ch; }
.faq details { border-top: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0; top: 1.1rem;
  font-family: var(--mono); font-size: 1.1rem; color: var(--accent);
}
.faq details[open] summary::after { content: '\2212'; }
.faq summary:hover { color: var(--accent); }
.faq .answer { padding: 0 2.5rem 1.35rem 0; color: var(--ink-soft); max-width: 50ch; }

/* ---------- forms ---------- */

.form { max-width: 40rem; }
.field { margin-bottom: 1.35rem; }
.field label {
  display: block; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.45rem;
}
.field .hint { text-transform: none; letter-spacing: 0.02em; color: var(--ink-faint); font-size: 0.74rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper-lift); border: 1px solid var(--rule-firm); border-radius: 2px;
  padding: 0.75rem 0.85rem;
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- closing call to action ---------- */

.closer { border-top: 1px solid var(--rule); background: var(--paper-deep); }
.closer .inner { padding-block: clamp(2.75rem, 6vw, 4.25rem); }
.closer h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); max-width: 18ch; }
.closer p { margin-top: 1.1rem; max-width: 48ch; color: var(--ink-soft); }

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

.foot { border-top: 1px solid var(--rule); padding: 2.75rem 0 3.25rem; }
.foot-cols { display: grid; gap: 2rem; }
@media (min-width: 44em) { .foot-cols { grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); gap: 2.5rem; } }
.foot h2 {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.9rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.5rem; }
.foot a { text-decoration: none; font-size: 0.95rem; }
.foot a:hover { text-decoration: underline; }
.foot .blurb { color: var(--ink-soft); font-size: 0.95rem; max-width: 34ch; margin-top: 0.9rem; }
.foot .base {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between;
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.04em;
}

/* ---------- sticky mobile call to action ---------- */

.mobile-cta { display: none; }
@media (max-width: 46em) {
  body { padding-bottom: 4.6rem; }
  .mobile-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--paper); border-top: 1px solid var(--rule-firm);
    padding: 0.7rem var(--gutter); padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
  }
  .mobile-cta .status {
    font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink-faint); line-height: 1.3;
  }
  .mobile-cta .status b { display: block; color: var(--ink); font-weight: 400; }
  .mobile-cta .btn { padding: 0.72rem 1.05rem; }
}

/* ---------- 404 ---------- */

.lost { padding-block: clamp(3.5rem, 9vw, 7rem); }
.lost .code { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.2em; color: var(--accent); }
.lost h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin: 1rem 0 1.3rem; }
.lost .links { margin-top: 2rem; }

/* ============================================================
   Second pass: the parts that make it feel made rather than
   assembled. Diagrams, margin notes, a figures system, a stat
   band, a colophon, and a stylesheet for paper.
   ============================================================ */

/* ---------- display numerals ---------- */

.page-head .studynum {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.8;
  color: var(--rule-firm);
  display: block;
  margin-bottom: 1.1rem;
  letter-spacing: -0.03em;
}

/* ---------- stat band ---------- */

.statband { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.statband dl {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.statband div {
  padding: 1.6rem 1.25rem 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.statband div:nth-child(-n + 2) { border-top: 0; }
.statband dt {
  font-family: var(--serif); font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1; letter-spacing: -0.02em; color: var(--ink);
  font-variant-numeric: lining-nums;
}
.statband dd {
  margin: 0.6rem 0 0; font-family: var(--mono); font-size: 0.71rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint);
  line-height: 1.5; max-width: 22ch;
}
@media (min-width: 52em) {
  .statband dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .statband div { border-top: 0; border-left: 1px solid var(--rule); padding: 1.9rem 1.5rem 1.8rem; }
  .statband div:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- figures and diagrams ---------- */

.figure { margin: 2.6rem 0; }
.figure .frame {
  border: 1px solid var(--rule);
  background: var(--paper-lift);
  padding: clamp(1rem, 3vw, 1.9rem);
  border-radius: 2px;
  overflow-x: auto;
}
.figure svg { display: block; width: 100%; height: auto; min-width: 30rem; }
.figure figcaption {
  font-family: var(--mono); font-size: 0.73rem; line-height: 1.6;
  color: var(--ink-faint); margin-top: 0.8rem; letter-spacing: 0.02em;
  max-width: 60ch;
}
.figure figcaption b { color: var(--ink-soft); font-weight: 400; }

/* the shared vocabulary every diagram is drawn from */
.dg-box { fill: var(--paper); stroke: var(--rule-firm); stroke-width: 1; }
.dg-box-live { fill: var(--paper); stroke: var(--accent); stroke-width: 1.4; }
.dg-line { stroke: var(--rule-firm); stroke-width: 1.2; fill: none; }
.dg-line-live { stroke: var(--accent); stroke-width: 1.4; fill: none; }
.dg-line-dead { stroke: var(--rule-firm); stroke-width: 1.2; fill: none; stroke-dasharray: 4 4; }
.dg-fill { fill: var(--rule); }
.dg-fill-live { fill: var(--accent); }
.dg-t {
  font-family: var(--mono); font-size: 12px; fill: var(--ink);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.dg-s { font-family: var(--mono); font-size: 11px; fill: var(--ink-faint); letter-spacing: 0.02em; }
.dg-n { font-family: var(--mono); font-size: 11px; fill: var(--accent); letter-spacing: 0.08em; }
.dg-serif { font-family: var(--serif); font-size: 17px; fill: var(--ink); }

/* ---------- colophon ---------- */

.colophon {
  margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--rule);
  max-width: 58ch;
}
.colophon h2 {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.7rem;
}
.colophon p {
  font-family: var(--serif); font-style: italic; font-size: 1.02rem;
  line-height: 1.6; color: var(--ink-soft); margin: 0;
}

/* ---------- paper ---------- */

@media print {
  :root {
    --paper: #fff; --paper-deep: #fff; --paper-lift: #fff;
    --ink: #000; --ink-soft: #222; --ink-faint: #444;
    --rule: #bbb; --rule-firm: #888; --accent: #000;
  }
  .masthead .nav, .mobile-cta, .crumbs, .closer, .cta-row { display: none; }
  body { padding-bottom: 0; font-size: 11pt; }
  .band, .page-head { padding: 1.2rem 0; break-inside: avoid; }
  .rail { display: block; }
  .rail > :last-child { border-left: 0; padding-left: 0; }
  a { text-decoration: none; }
  .prose a::after, .foot a::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #555; }
  .figure, .statband, .works > li, .rows > li { break-inside: avoid; }
}

/* A figure is allowed to break the text measure. The prose column stays at a
   readable 68 characters; the diagram beside it does not have to. */
@media (min-width: 62em) {
  .prose .figure { width: 46rem; max-width: calc(100vw - 2 * var(--gutter) - 14px); }
}

/* The real profile picture, used as the brand mark. */
.markimg { border-radius: 2px; display: block; }
.portrait-plate .markimg { width: 104px; height: 104px; border-radius: 3px; }
