/* Every Map, All at Once: a long-form post with a contents column, margin notes and figures. */
@font-face { font-family: "Crimson Pro"; src: url("/fonts/crimson-pro-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("/fonts/crimson-pro-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Apfel Grotezk"; src: url("/fonts/apfel-grotezk-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Apfel Grotezk"; src: url("/fonts/apfel-grotezk-mittel.woff2") format("woff2"); font-weight: 500; font-display: swap; }


:root {
  --ink: #1b1b1d; --soft: #5f6066; --faint: #9a9ba1; --rule: #e6e6e9; --wash: #f4f4f6;
  --blue: #2d55c4; --blue-l: #8fa6e2; --plum: #7d4a72; --plum-l: #c5a1bb; --grey-l: #c9c9ce;
  --serif: "Iowan Old Style", "Crimson Pro", Georgia, serif;
  --sans: "Apfel Grotezk", -apple-system, "Helvetica Neue", sans-serif;
  --body: 640px; --toc: 220px; --notes: 260px; --gap: 56px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--serif); font-size: 20px; line-height: 1.62;
  font-optical-sizing: auto; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: underline; text-decoration-color: #b9b9bf; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

/* the site's own header (style.css), so the post sits inside mccomb.ca; no top wash on this page */
body > * { position: relative; z-index: 1; }
.site-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px;
  max-width: 760px; margin: 0 auto; padding: 24px; font: 400 16px/24px var(--sans); color: #171717; -webkit-font-smoothing: antialiased; }
.site-header p { margin: 0; }
.crumb a, .editorial__crumb a { color: #171717; text-decoration: none; }
.crumb .here, .editorial__crumb .here { font-weight: 600; }
.site-header p { margin: 0; }
.topnav { display: flex; gap: 8px; align-items: baseline; }
.topnav a { color: #0864c7; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: currentColor; }
.topnav span { color: #767676; }

.head { text-align: center; padding: 64px 20px 18px; }
.giant { font-size: clamp(42px, 5.8vw, 82px); line-height: 1.04; font-weight: 700; letter-spacing: -.01em; margin: 0 auto 22px; }
.giant.left { text-align: left; margin: 0 0 22px; font-size: clamp(42px, 5vw, 74px); }
.byline { font-family: var(--sans); font-size: 17px; color: var(--soft); margin: 0; }
.byline .sep { margin: 0 6px; color: var(--faint); }

.hero { margin: 26px auto 0; padding: 0 20px; max-width: 1280px; }
.hero canvas { display: block; width: 100%; height: auto; }
.hero figcaption { max-width: 760px; margin: 14px auto 0; text-align: center; }

.page { display: grid; grid-template-columns: var(--toc) var(--body) var(--notes); gap: var(--gap); justify-content: center;
  margin: 72px auto 120px; padding: 0 24px; }
.toc { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 12px; font-family: var(--sans); font-size: 15.5px; }
.toc a { color: var(--soft); text-decoration: none; line-height: 1.35; position: relative; }
.toc a.on { color: var(--ink); }
.toc a.on::before { content: ""; position: absolute; left: -14px; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.body { grid-column: 2; min-width: 0; }
.body section { scroll-margin-top: 90px; }
.body h2 { font-size: 30px; line-height: 1.25; font-weight: 700; margin: 64px 0 18px; }
.body section:first-child p:first-child { margin-top: 0; }
.body p { margin: 0 0 24px; }

/* margin notes: floated into the right column on wide screens, inline below on narrow ones */
.ref { font-size: .62em; line-height: 0; vertical-align: super; margin-left: 1px; font-feature-settings: "lnum"; }
.sn { float: right; clear: right; width: var(--notes); margin-right: calc(-1 * (var(--notes) + var(--gap))); margin-top: -.1em;
  font-size: 15.5px; line-height: 1.5; color: #333; }
.sn b { font-weight: 400; font-size: .75em; vertical-align: super; margin-right: 3px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; }

figure { margin: 40px 0 28px; }
.fig.wide { margin-right: 0; }   /* every figure stays in the text column; the margin is for notes */
figcaption { font-family: var(--sans); font-size: 14.5px; line-height: 1.5; color: var(--soft); margin-top: 14px; }
figcaption b { color: #333; font-weight: 500; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
.controls { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-family: var(--sans); font-size: 14.5px; }
.controls button { font: inherit; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--wash); color: var(--ink); cursor: pointer; }
.controls button:hover { background: #eaeaee; }
.status { color: var(--soft); }

.tree-wrap { background: #fbfaf7; border-radius: 6px; padding: 18px; }
.tree-wrap canvas { display: block; width: 100%; height: auto; }
.carve { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 18px; }
.carve canvas { width: 100%; height: auto; display: block; }
.waffle { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.eq { margin: 30px 0 34px; text-align: center; }
.eq math { font-size: 1.25em; }
.eq-note { font-family: var(--sans); font-size: 14.5px; color: var(--soft); margin: 10px 0 0 !important; }

table.cmp { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15.5px; margin: 8px 0 6px; font-feature-settings: "tnum"; }
.cmp th { font-weight: 500; text-align: center; padding: 12px 8px; vertical-align: bottom; }
.cmp th span, .cmp td span { color: var(--faint); font-size: 13.5px; font-weight: 400; }
.cmp td { text-align: center; padding: 14px 8px; border-top: 1px solid var(--rule); }
.cmp td:first-child { text-align: left; line-height: 1.35; }
.cmp .hl { background: #f2f5fd; color: var(--blue); font-weight: 500; }
.cmp tbody tr:last-child td { border-bottom: 1px solid var(--rule); }
.table-note { font-family: var(--sans); font-size: 14.5px; color: var(--soft); }

pre.cite { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; line-height: 1.55; background: var(--wash);
  padding: 16px 18px; border-radius: 6px; white-space: pre-wrap; margin: 0 0 16px; }

@media (max-width: 1240px) {
  :root { --toc: 0px; --gap: 40px; }
  .toc { display: none; }
  .page { grid-template-columns: var(--body) var(--notes); }
  .body { grid-column: 1; }
}
@media (max-width: 1000px) {
  .page { grid-template-columns: minmax(0, var(--body)); }
  .sn { float: none; display: block; width: auto; margin: 10px 0 18px; padding-left: 14px; border-left: 2px solid var(--rule); }
  .fig.wide { margin-right: 0; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .top { padding: 14px 16px; }
  .top nav a { margin-left: 16px; }
  .page { padding: 0 16px; margin-top: 48px; }
  .carve { grid-template-columns: repeat(2, 1fr); }
  .waffle { grid-template-columns: 1fr; gap: 28px; }
  .cmp { font-size: 13.5px; }
}

/* opening B: the title on the map */
.overlay-stage { position: relative; max-width: 1480px; margin: 10px auto 0; padding: 0 20px; }
.overlay-stage canvas { display: block; width: 100%; height: auto; opacity: .85; }
.overlay-title { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; pointer-events: none; }
.overlay-title .giant { margin-bottom: 22px; text-shadow: 0 0 22px #fff, 0 0 44px #fff, 0 0 4px #fff; }
.overlay-title .byline { background: rgba(255,255,255,.82); padding: 4px 12px; border-radius: 999px; }
.overlay-cap { font-family: var(--sans); font-size: 14.5px; color: var(--soft); text-align: center; margin: 10px 20px 0; }

/* opening C: title left, a wall of tiny maps right */
.wall-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1320px; margin: 40px auto 0; padding: 0 32px; }
.wall-dek { font-size: 24px; line-height: 1.4; color: #333; margin: 22px 0 0; max-width: 480px; }
.wall-maps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 12px; }
.wall-maps canvas { width: 100%; height: auto; display: block; }

/* figure 1: maps falling into a pile */
.galton { display: grid; grid-template-columns: 1fr; gap: 6px; }
.galton canvas { width: 100%; height: auto; display: block; }

/* figure 4: the race */
.race { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; font-family: var(--sans); }
.race .legend { grid-column: 1 / -1; }
.lane-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 14px; white-space: nowrap; }
.lane-head b { font-weight: 500; font-size: 15.5px; }
.lane-head .num { font-feature-settings: "tnum"; color: var(--soft); }
.lane canvas { width: 100%; height: auto; display: block; }

/* figure 6: a hundred ensembles */
.ens { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; font-family: var(--sans); align-items: start; }
.ens-side { font-size: 15px; line-height: 1.45; }
.ens-side b { display: block; font-weight: 500; font-size: 17px; margin-bottom: 6px; }
.ens-one { width: 100%; height: auto; display: block; margin-top: 10px; }

.ens-grid canvas { width: 100%; height: auto; display: block; }

.thanks { color: #444; }

/* draft-only picker for the opening variations */
.picker { position: fixed; left: 16px; bottom: 16px; z-index: 20; display: flex; gap: 4px; align-items: center; font-family: var(--sans); font-size: 13.5px;
  background: rgba(27,27,29,.9); color: #fff; padding: 6px 8px 6px 12px; border-radius: 999px; }
.picker span { margin-right: 6px; opacity: .7; }
.picker button { font: inherit; border: 0; border-radius: 999px; padding: 4px 11px; background: transparent; color: #fff; cursor: pointer; }
.picker button.on { background: #fff; color: #1b1b1d; }

@media (max-width: 900px) {
  .wall-grid { grid-template-columns: 1fr; gap: 28px; }
  .galton { grid-template-columns: 1fr; gap: 18px; }
  .ens { grid-template-columns: 1fr; }
  .ens-grid { grid-template-columns: repeat(8, 1fr); }
}

/* openings D to F: full-width canvases under the title */
.stage { max-width: 1280px; margin: 26px auto 0; padding: 0 20px; }
.stage canvas { display: block; width: 100%; height: auto; }
.stage figcaption { max-width: 760px; margin: 14px auto 0; text-align: center; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 12px; font-family: var(--sans); font-size: 13.5px; color: var(--soft); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* figure 5: one cut against every cut */
.obk { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.obk canvas { width: 100%; height: auto; display: block; background: #fbfaf7; border-radius: 6px; }
.obk-title { font-family: var(--sans); font-size: 15px; font-weight: 500; margin: 0 0 10px !important; color: #1b1b1d; }
.lane-head .sub { color: var(--faint); }
.race .legend { justify-content: flex-start; margin-top: 0; }
.tablefig table { margin: 0; }
@media (max-width: 700px) { .obk { grid-template-columns: 1fr; gap: 20px; } }

.controls button { white-space: nowrap; flex: none; }

/* subtitle under the title */
.dek { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2vw, 25px); color: #4a4b50; margin: -6px 0 20px; }

/* margin notes placed by script (post.js notes()): level with their reference, colliding notes centred as a group */
.body { position: relative; }
.body.notes-js .sn { position: absolute; float: none; margin: 0; left: calc(100% + var(--gap)); width: var(--notes); }
.overlay-title .dek { text-shadow: 0 0 14px #fff, 0 0 28px #fff, 0 0 3px #fff; }
.giant.left { font-size: clamp(40px, 4.2vw, 62px); }

/* the opening counter: a fixed-width, tabular number so the caption never shifts as it counts */
.hero-num { display: inline-block; min-width: 5.4ch; text-align: right; font-variant-numeric: tabular-nums; }

/* opening spacing (2026-10-03): more air between title, subtitle and byline, more side padding, a smaller state */
.opening .head { padding: 76px 64px 30px; }
.opening .giant { font-size: clamp(40px, 5.1vw, 76px); margin-bottom: 30px; }
.opening .dek { margin: 0 0 30px; }
.opening .hero { max-width: 1060px; margin-top: 40px; }

/* the equation's symbol key */
.eq-note { max-width: 560px; margin-left: auto !important; margin-right: auto !important; line-height: 1.9; }
.eq-key { font-family: var(--serif); font-size: 1.12em; color: #1b1b1d; margin-right: 6px; }
.eq-sep { margin: 0 10px; color: var(--faint); }

.sn math { font-size: 1.05em; margin: 8px 0 2px; }

/* on load: the header is simply there; the title fades up, then the subtitle and byline, then the map and the text */
@keyframes post-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.opening .giant, .opening .dek, .opening .byline, .opening .hero, .page { animation: post-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.opening .giant { animation-delay: .08s; }
.opening .dek { animation-delay: .32s; }
.opening .byline { animation-delay: .44s; }
.opening .hero { animation-delay: .62s; animation-duration: 1.2s; }
.page { animation-delay: .85s; animation-duration: 1.1s; }
@media (prefers-reduced-motion: reduce) { .opening .giant, .opening .dek, .opening .byline, .opening .hero, .page { animation: none; } }

/* the splash holds: the header scrolls away, then the title and map stay full-screen for a moment before the text */
.opening { height: 138vh; }
.opening .hold { position: sticky; top: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0 40px; }
.opening .head { padding-top: 0; }
.opening .hero { width: 100%; box-sizing: border-box; max-width: min(1060px, calc((100vh - 440px) * 2.6)); margin: 28px auto 0; }
.opening + .page { margin-top: 24px; }
@media (max-width: 700px), (max-height: 560px) {
  .opening { height: auto; }
  .opening .hold { position: static; min-height: 0; padding: 0; }
  .opening .head { padding-top: 40px; }
}

/* the epigraph at the top of the article */
.epigraph { margin: 0 0 44px; padding: 0; }
.epigraph p { font-style: italic; font-size: 23px; line-height: 1.45; margin: 0 0 10px; color: #2a2a2e; }
.epigraph footer { font-family: var(--sans); font-size: 15px; color: var(--soft); }
.epigraph footer::before { content: ""; display: inline-block; width: 22px; height: 1px; background: var(--faint); vertical-align: middle; margin-right: 10px; }
.epigraph cite { font-style: italic; }

/* this page only: the header is out of the way on load, so the splash has the whole screen; it drifts back in slowly */
@keyframes header-return { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }
body > .site-header { position: absolute; top: 0; left: 50%; width: 100%; z-index: 5; transform: translateX(-50%);
  animation: header-return 1.8s cubic-bezier(.2, .7, .2, 1) 2.6s both; }
@media (prefers-reduced-motion: reduce) { body > .site-header { animation: none; } }
.opening .hold { padding-top: 72px; }
.opening .hero { max-width: min(1060px, calc((100vh - 500px) * 2.6)); }

/* citation block at the end */
#cite h2 { margin-top: 72px; }
.cite-text { font-size: 18px; }
.cite-label { font-family: var(--sans); font-size: 14.5px; color: var(--soft); margin-bottom: 8px !important; }
.bib { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; line-height: 1.6; color: #444; background: #f3f3f3; border-radius: 10px;
  padding: 20px 24px; margin: 0 0 28px; overflow-x: auto; white-space: pre; }
.cite-actions { display: flex; align-items: center; gap: 14px; font-family: var(--sans); font-size: 14.5px; }
.cite-actions button, .cite-actions .pdf { font: inherit; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); background: #f4f4f6; color: var(--ink); cursor: pointer; text-decoration: none; }
.cite-actions button:hover, .cite-actions .pdf:hover { background: #eaeaee; }

/* hover a section heading to reveal its # link, for sending someone to a specific part */
.body h2 { position: relative; }
.body h2 .hash { position: absolute; left: -.9em; color: var(--faint); font-weight: 400; text-decoration: none; opacity: 0; transition: opacity .15s; }
.body h2:hover .hash, .body h2 .hash:focus { opacity: 1; }
@media (hover: none) { .body h2 .hash { display: none; } }
.opening .hero { max-width: min(1180px, calc((100vh - 450px) * 2.8)); }
.opening .hero { max-width: min(1380px, calc((100vh - 450px) * 3.28)); }
.opening .hold { padding-top: 54px; padding-bottom: 24px; }
.opening .head { padding-bottom: 12px; }
.opening .hold { padding-top: 80px; }
.opening .giant { margin-bottom: 16px; }
.opening .dek { margin-bottom: 16px; }
.opening .hero { margin-top: 14px; }

/* header: hidden on load and while reading; it slides in only after an extra upward scroll once already at the top (post.js) */
body > .site-header { position: fixed; top: 0; left: 50%; width: 100%; z-index: 20; animation: none;
  transform: translate(-50%, -110%); opacity: 0; transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .45s ease;
  background: rgba(255, 255, 255, .94); box-shadow: 0 0 0 100vmax rgba(255, 255, 255, .94); clip-path: inset(0 -100vmax); }
body > .site-header.show { transform: translate(-50%, 0); opacity: 1; }
body > .site-header { background: #fff; box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax #ececf0; }
