/* mikehearfield.com — draft 2
   Palette: black and white. Orange appears only as the full stop in the MH. mark and at the end of each page's title,
   the chosen line in the sixty-four futures drawing, and the kept path on the Approach diagram.
   Type: Georgia for headings and long-form stories, the system sans-serif for everything else. */

/* Georgia is on Mac, iOS and Windows. Gelasio (metric-compatible with Georgia) covers Android and Linux. */
/* Hosted here (SIL Open Font License, see fonts/OFL.txt). Variable font: one file covers 400 to 700.
   Browsers only download it where Georgia is missing. */
@font-face { font-family: Gelasio; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/gelasio-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Gelasio; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/gelasio-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Gelasio; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("fonts/gelasio-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Gelasio; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("fonts/gelasio-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #F3F3F0;
  --paper-deep: #E6E6E2;
  --ink: #000000;
  --graphite: #5E5E5A;
  --rule: #D0D0CB;
  --orange: #FF5000;
  --highlight: #DCDCD6;
  --sweep: #DCDCD6; /* the hover highlighter: pale grey; the orange is saved for the full stop */
  --field: #FFFFFF;        /* form fields */
  --orange-text: #B83C00;  /* orange for small text: the brand orange is too light to read on paper */
  --band-muted: #A3A39E;   /* secondary text on the inverted bands */
  --band-text: #D8D8D3;
  color-scheme: light;

  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, Gelasio, "Times New Roman", serif;

  /* Modular scale, ratio 1.25 from 18px body */
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.4rem;
  --step-2: 1.75rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.4rem, 4.6vw, 3.4rem);
  --step-5: clamp(2.9rem, 7.4vw, 6.4rem);
  --step-6: clamp(3.1rem, 8.6vw, 8.8rem);

  --margin: clamp(1.25rem, 4vw, 3.5rem);
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --measure: 36rem;
}

/* Dark mode follows the visitor's system setting. Ink and paper swap, so the black bands become paper ones. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0A0A0A;
    --paper-deep: #1C1C1A;
    --ink: #F3F3F0;
    --graphite: #A3A39E;
    --rule: #3A3A36;
    --highlight: #2E2E2B;
    --sweep: #2E2E2B;
    --field: #141413;
    --orange-text: #FF5000;
    --band-muted: #5E5E5A;
    --band-text: #2E2E2B;
    color-scheme: dark;
  }
}

/* Text size, set by the control in the masthead (and remembered). Everything is in rem, so it all scales. */
html[data-text="-1"] { font-size: 90%; }
html[data-text="1"]  { font-size: 112.5%; }
html[data-text="2"]  { font-size: 125%; }
html[data-text="3"]  { font-size: 140%; }

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

html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--highlight); color: var(--ink); }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; display: block; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; font-family: var(--sans); z-index: 10; }
.skip:focus { left: var(--margin); }

/* ---------- Page frame: a notebook with a margin ---------- */

.frame {
  display: grid;
  grid-template-columns: minmax(7rem, 13rem) minmax(0, 1fr);
  column-gap: var(--gutter);
  padding-inline: var(--margin);
  max-width: 88rem;
  margin-inline: auto;
}
.frame > * { grid-column: 2; }
.frame > .margin, .frame > .note { grid-column: 1; }
.frame > .wide { grid-column: 1 / -1; }

.margin {
  font-family: var(--sans);
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--graphite);
  padding-top: .45rem;
}

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem 2rem;
  padding: 1.6rem var(--margin) 0;
  max-width: 88rem;
  margin-inline: auto;
  font-family: var(--sans);
}
.masthead .name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--step-2);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.masthead nav { margin-left: auto; }
.masthead nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.masthead nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step--1);
  padding-block: .2rem;
  border-bottom: 2px solid transparent;
}
.masthead nav a:hover { border-bottom-color: var(--rule); }
.masthead nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.draft-flag {
  font-family: var(--sans);
  font-size: .8rem;
  background: var(--ink);
  color: var(--paper);
  padding: .45rem var(--margin);
  text-align: left;
}
.draft-flag b { color: var(--highlight); font-weight: 600; }

/* ---------- Type ---------- */

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); font-weight: 400; letter-spacing: -0.05em; line-height: .95; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.015em; line-height: 1.15; }

p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: var(--step-1); line-height: 1.5; max-width: 36rem; font-weight: 400; letter-spacing: -0.015em; }
.quiet { color: var(--graphite); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(4rem, 10vw, 8rem) 0; }
.section-head { margin-bottom: 2.4rem; }
.section-head h2 { max-width: 18ch; }
.section-head p { margin-top: 1rem; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(1.5rem, 3.5vw, 3rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.hero h1 { font-size: clamp(5rem, 13.5vw, 12.5rem); line-height: .82; letter-spacing: -0.06em; max-width: 6ch; margin-top: .6rem; margin-left: -.04em; }
.hero .lede { margin-top: 1.8rem; font-size: var(--step-2); line-height: 1.35; letter-spacing: -0.02em; max-width: 40rem; }
.hero .lede + p { margin-top: 1rem; }
.hero .role { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); }
.hero .hero-more { margin-top: 1.4rem; color: var(--graphite); max-width: 30rem; }
.hero-diagram { align-self: center; }
.hero-diagram svg { max-width: 26rem; margin-inline: auto; }
.hero-diagram .path { stroke-width: 1.6; }
.hero-diagram .path.kept { stroke-width: 3.6; }
.hero-diagram .label { font-size: 21px; }
.hero-diagram .label.small { font-size: 17px; }
.hero-diagram figcaption { max-width: 30rem; margin-inline: auto; }
.field { position: relative; height: clamp(11rem, 24vw, 20rem); }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-head { padding-top: clamp(1.5rem, 4vw, 3rem); }
.about-head .field { margin-bottom: .4rem; }
.about-head .field-caption { color: var(--ink); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 1.8rem; font-family: var(--sans); }

.button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step--1);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: .85rem 1.3rem;
  border-radius: 3px;
}
.button:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.textlink { font-family: var(--sans); font-size: var(--step--1); font-weight: 600; align-self: center; }

/* ---------- The ledger: thirty years of real problems ---------- */

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger li {
  display: grid;
  grid-template-columns: minmax(7rem, 13rem) 5.5rem minmax(0, 1fr) minmax(9rem, 15rem);
  column-gap: var(--gutter);
  align-items: center;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.ledger .when { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); font-variant-numeric: tabular-nums; }
.ledger .q {
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.ledger .q span {
  background-image: linear-gradient(var(--sweep), var(--sweep));
  background-repeat: no-repeat;
  background-size: 0% 38%;
  background-position: 0 88%;
  transition: background-size .45s cubic-bezier(.2,.7,.2,1);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ledger li:hover .q span, .ledger li:focus-within .q span { background-size: 100% 38%; }
.ledger .who { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); line-height: 1.4; }
.ledger .now .when { color: var(--ink); font-weight: 600; }
.ledger .now .when::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--ink); margin-right: .45em; }

/* ---------- Thinker / Maker / Leader ---------- */

.modes { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  column-gap: var(--gutter);
  padding-block: 2rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.mode h3 { font-size: var(--step-5); font-weight: 400; letter-spacing: -0.05em; line-height: .95; }
.mode:nth-child(2) h3 { font-style: italic; }
.mode:nth-child(3) h3 { font-weight: 700; }
.mode p { margin: 0; }

/* ---------- Pull essay ---------- */

.essay-callout {
  background: var(--ink);
  color: var(--paper);
  margin-top: clamp(4rem, 10vw, 8rem);
  padding-block: clamp(3rem, 8vw, 6rem);
}
.essay-callout .frame { row-gap: 1.2rem; }
.essay-callout blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 400;
  max-width: 22ch;
}
.essay-callout .margin { color: var(--band-muted); }
.essay-callout a { color: var(--paper); }
.essay-callout .kicker { color: var(--band-muted); }
.essay-callout h2 { color: var(--paper); }
.essay-callout :focus-visible { outline-color: var(--paper); }
.essay-callout.closing-note { margin-bottom: clamp(3rem, 8vw, 6rem); }
.essay-callout.closing-note h2::after { content: "."; color: var(--orange); }
.essay-callout.band { margin-top: clamp(4rem, 10vw, 8rem); }
.essay-callout.band .section-head { margin-bottom: 1.6rem; }
.essay-callout.band .prose p { color: var(--band-text); }
.essay-callout .actions-row a + a { margin-left: 1.6rem; }

/* ---------- Now ---------- */

.now-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem var(--gutter); }
.now-list h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.now-list p { font-size: 1rem; }
.now-list .what { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); display: block; margin-bottom: .6rem; }

/* ---------- Closing invitation ---------- */

.invite { padding-block: clamp(5rem, 12vw, 9rem); }
.invite h2 { font-size: var(--step-5); font-weight: 400; letter-spacing: -0.05em; max-width: 12ch; }
.invite p { margin-top: 1.4rem; }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--rule);
  padding: 2.2rem var(--margin) 2.6rem;
  max-width: 88rem;
  margin-inline: auto;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--graphite);
}
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .8rem 2rem; }
.foot-row p { margin: 0; }
.foot-small { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-size: .8rem; }
.foot-mark { color: var(--ink); }
.foot-brand { font-family: var(--serif); font-weight: 700; font-size: var(--step-2); text-decoration: none; letter-spacing: -0.02em; margin-right: .8rem; }
.foot-brand .dot { color: var(--orange); }
.foot-links { display: flex; gap: 1.6rem; font-weight: 600; }
.foot a { color: var(--ink); }

/* ---------- Long-form pages ---------- */

.page-head { padding-block: clamp(4rem, 10vw, 7rem) clamp(2rem, 5vw, 3.5rem); row-gap: 1.4rem; }
.page-head h1 { font-size: clamp(3.2rem, 8vw, 7.2rem); line-height: .9; letter-spacing: -0.055em; max-width: 13ch; }
h1 .dot, .masthead .name .dot { color: var(--orange); }
.prose h2 { font-size: var(--step-3); margin: 3rem 0 1rem; max-width: 22ch; }
.prose h3 { font-size: var(--step-1); margin: 2rem 0 .6rem; }
.prose p, .prose li { max-width: var(--measure); }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: .4rem; }

.row { padding-block: 1.2rem; }

/* Timeline (About): a real sequence, so dates lead */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.timeline li {
  display: grid;
  grid-template-columns: minmax(7rem, 13rem) minmax(0, 1fr);
  column-gap: var(--gutter);
  padding-block: 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.timeline .when { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); font-variant-numeric: tabular-nums; padding-top: .3rem; }
.timeline h3 { font-size: var(--step-1); margin-bottom: .35rem; }
.timeline p { margin: 0; font-size: 1rem; }

/* Portrait placeholder */
.portrait {
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--graphite);
  max-width: 13rem;
  text-align: center;
  padding: 1rem;
}

/* Principles (Approach): not a sequence, so no numbers */
.principles { border-top: 1px solid var(--ink); }
.principle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--gutter);
  padding-block: 1.8rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.principle h3 { font-size: var(--step-2); }
.principle p { margin: 0; }

/* The uncertainty diagram */
.diagram { margin: 0; }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.diagram figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); max-width: 40rem; margin-top: 1rem; }
.diagram .path { fill: none; stroke: var(--graphite); stroke-width: 1.2; opacity: .55; }
.diagram .path.kept { stroke: var(--orange); stroke-width: 2.4; opacity: 1; }
.diagram .probe { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.diagram .probe.hit { fill: var(--ink); }
.diagram .label { font-family: var(--sans); font-size: 13px; fill: var(--graphite); }
.diagram .label.strong { fill: var(--ink); font-weight: 600; }
.diagram .axis { stroke: var(--ink); stroke-width: 1; }
.diagram .gate { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 4; }

.js .diagram .path { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.js .diagram.drawn .path { transition: stroke-dashoffset 1.6s cubic-bezier(.3,.6,.2,1); stroke-dashoffset: 0; }
.js .diagram.drawn .path.kept { transition-delay: .9s; transition-duration: 1.4s; }

/* Impact stories */
.story-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.story-index li { border-bottom: 1px solid var(--rule); }
.story-index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 15rem);
  column-gap: var(--gutter);
  padding-block: 1.1rem;
  text-decoration: none;
  color: var(--ink);
  align-items: baseline;
}
.story-index .t { font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; }
.story-index .d { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); }


.story { padding-top: clamp(4rem, 9vw, 7rem); }
.story > header { row-gap: 1rem; }
.story h2 { font-size: var(--step-4); max-width: 20ch; }
.story .context { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); }
.story-body { margin-top: 2rem; row-gap: 0; }
.story-body .part { display: contents; }
.story-body h3 { grid-column: 1; font-size: 1rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; padding-top: .35rem; border-top: 1px solid var(--rule); padding-block: 1rem; }
.story-body .part > div { grid-column: 2; border-top: 1px solid var(--rule); padding-block: 1rem; }
.story-body .part > div p:last-child { margin-bottom: 0; }

.verify {
  background: none;
  outline: 1px dashed var(--graphite);
  padding: 0 .2em;
  border-radius: 2px;
  font-style: normal;
}
.verify::before { content: "To verify: "; font-family: var(--sans); font-size: .8em; font-weight: 600; }

/* Thinking */
.essays { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.essays li {
  display: grid;
  grid-template-columns: minmax(7rem, 13rem) minmax(0, 1fr);
  column-gap: var(--gutter);
  padding-block: 1.3rem;
  border-bottom: 1px solid var(--rule);
}
.essays .theme { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); padding-top: .4rem; }
.essays .t { font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; display: block; }
.essays .s { font-size: 1rem; color: var(--graphite); margin: .4rem 0 0; }
.essays .status { font-family: var(--sans); font-size: .8rem; color: var(--graphite); }

.article { padding-bottom: 2rem; }
.article .prose p:first-of-type::first-line { font-variant-caps: all-small-caps; letter-spacing: .04em; }

/* Contact */
.contact-ways { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.contact-ways li { display: grid; grid-template-columns: minmax(7rem, 13rem) minmax(0, 1fr); column-gap: var(--gutter); padding-block: 1.1rem; border-bottom: 1px solid var(--rule); align-items: baseline; }
.contact-ways .k { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); }
.contact-ways .v { font-family: var(--serif); font-size: var(--step-2); letter-spacing: -0.02em; overflow-wrap: anywhere; min-width: 0; }

form.talk { display: grid; gap: 1.2rem; max-width: 34rem; font-family: var(--sans); }
form.talk label { display: grid; gap: .4rem; font-size: var(--step--1); font-weight: 600; }
form.talk input, form.talk textarea {
  font: inherit; font-family: var(--serif); font-size: var(--step-0); font-weight: 400;
  background: var(--field); color: var(--ink);
  border: 1px solid var(--rule); border-bottom: 2px solid var(--ink);
  padding: .7rem .8rem; border-radius: 2px;
}
form.talk textarea { min-height: 9rem; resize: vertical; }
form.talk .hint { font-weight: 400; color: var(--graphite); }
form.talk button { justify-self: start; border: 0; cursor: pointer; }

/* ---------- Small screens: the margin column folds above its content ---------- */

@media (max-width: 52rem) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .frame > *, .frame > .margin, .frame > .note { grid-column: 1; }
  .margin { padding-top: 0; }
  .ledger li { grid-template-columns: 1fr; row-gap: .3rem; }
  .ledger .who { order: 4; }
  .mode, .principle { grid-template-columns: 1fr; row-gap: .6rem; }
  .timeline li, .essays li, .contact-ways li { grid-template-columns: 1fr; row-gap: .3rem; }
  .story-index a { grid-template-columns: 1fr; row-gap: .3rem; }
  .story-body h3, .story-body .part > div { grid-column: 1; }
  .story-body .part > div { border-top: 0; padding-top: 0; }
  .portrait { max-width: 10rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .diagram.hero-diagram svg { min-width: 0; }
  .diagram { overflow-x: auto; }
  .diagram svg { min-width: 40rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .diagram .path { stroke-dashoffset: 0; }
}

@media print {
  .masthead nav, .draft-flag, .skip, form.talk { display: none; }
  :root { --paper: #fff; --ink: #000; --graphite: #5E5E5A; --rule: #D0D0CB; color-scheme: light; }
  .textsize { display: none; }
}

/* ---------- v2: photographs ----------
   Photos sit in greyscale wherever they are an index or a teaser, so the site stays black and white.
   Colour comes back on hover or focus, and in full inside each workshop story. */

.photo { display: block; overflow: hidden; background: var(--paper-deep); }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter .5s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
a:hover .photo img, a:focus-visible .photo img { filter: none; transform: scale(1.02); }

.makes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 2.4rem var(--gutter); }
.makes a { display: grid; gap: .55rem; text-decoration: none; color: var(--ink); }
.makes .photo { aspect-ratio: 4 / 5; }
.makes .craft { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin-top: .35rem; }
.makes .t { font-family: var(--serif); font-size: var(--step-1); line-height: 1.2; }


.standfirst { font-family: var(--serif); font-size: var(--step-1); line-height: 1.4; color: var(--graphite); font-style: italic; font-weight: 400; margin-top: .9rem; max-width: 32rem; }

.make-story, .impact-story { padding-top: clamp(4.5rem, 10vw, 8rem); row-gap: 1.6rem; scroll-margin-top: 1rem; }
.make-story h2, .impact-story h2 { font-size: var(--step-4); max-width: 18ch; }
.make-story > .margin, .impact-story > .margin { grid-row: span 2; }
.make-story .lead { margin: .6rem 0 .4rem; max-width: 46rem; }
.make-story .lead img { width: 100%; height: auto; max-height: 78vh; object-fit: cover; }
.make-story figcaption, .duo figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin-top: .55rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.6rem var(--gutter); margin-top: 1rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin: 2.4rem 0; max-width: var(--measure); }
.duo figure { margin: 0; }
.duo .photo { aspect-ratio: 4 / 5; }
.duo:hover .photo img { filter: none; }

.impact-story .prose { max-width: var(--measure); }
.row .textlink { font-family: var(--sans); }

/* Long-form reading (impact stories, workshop stories, essays, About) is set in Georgia, as on the workshop site. */
.prose p:not(.lede), .prose li { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.7; letter-spacing: -0.005em; }

/* Work page hero: the tangle */
.approach-head { padding-top: clamp(1.5rem, 4vw, 3rem); }
.approach-diagram { margin-bottom: 1.6rem; }
.approach-diagram .path { stroke-width: 1.4; }
.approach-diagram .path.kept { stroke-width: 3; }
.approach-head .field-caption { color: var(--ink); }
.work-head { padding-top: clamp(1.5rem, 4vw, 3rem); }
.tangle-field { height: clamp(14rem, 30vw, 26rem); margin-bottom: .4rem; }
.work-head .field-caption { color: var(--ink); }
.section.intro { padding-top: clamp(1.75rem, 3vw, 2.5rem); }

/* Home hero: wood grain becoming pixels */
.hero-art { margin: 0; align-self: center; width: 100%; max-width: 31rem; justify-self: end; }
.hero-art canvas { display: block; width: 100%; aspect-ratio: 1 / 1; }
.hero-art figcaption { font-family: var(--serif); font-style: italic; color: var(--graphite); font-size: var(--step--1); margin-top: .8rem; }
@media (max-width: 52rem) { .hero-art { justify-self: start; } .hero-art canvas { aspect-ratio: 4 / 3; } }

/* Each real problem gets a small line drawing. Hovering a row redraws it, alongside the highlight. */
.ledger .ico { display: block; width: 5.5rem; color: var(--ink); grid-column: 2; grid-row: 1; }
.ledger .q { grid-column: 3; grid-row: 1; }
.ledger .who { grid-column: 4; grid-row: 1; }
/* The detail waits for a hover, so the list reads as questions and pictures first. */
@media (hover: hover) {
  .ledger .who { opacity: 0; transform: translateX(-.5rem); transition: opacity .35s, transform .45s cubic-bezier(.2,.7,.2,1); }
  .ledger li:hover .who, .ledger li:focus-within .who { opacity: 1; transform: none; transition-delay: .15s; }
}
.ledger .ico svg { display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ledger .ico svg * { stroke-dasharray: 1; stroke-dashoffset: 0; opacity: .55; transition: opacity .3s; }
.ledger li:hover .ico svg *, .ledger li:focus-within .ico svg * { opacity: 1; animation: ledger-draw .9s cubic-bezier(.3,.6,.2,1) both; }
.ledger li:hover .ico svg *:nth-child(2n), .ledger li:focus-within .ico svg *:nth-child(2n) { animation-delay: .12s; }
.ledger li:hover .ico svg *:nth-child(3n), .ledger li:focus-within .ico svg *:nth-child(3n) { animation-delay: .24s; }
@keyframes ledger-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ledger li:hover .ico svg * { animation: none; } }
@media (max-width: 52rem) {
  .ledger li { grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: 1rem; row-gap: .4rem; align-items: start; }
  .ledger .when { grid-column: 1 / -1; grid-row: 1; }
  .ledger .ico { grid-column: 1; grid-row: 2; width: 3.5rem; }
  .ledger .q { grid-column: 2; grid-row: 2; }
  .ledger .who { grid-column: 2; grid-row: 3; }
}

/* Home: a little about me. Full width, one big line, as on the workshop site. */
.intro-body .kicker { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin: 0 0 .8rem; }
.intro-body h2 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); line-height: 1; letter-spacing: -0.05em; max-width: none; margin: 0; }
.intro-body .intro-lede { font-size: var(--step-2); line-height: 1.4; letter-spacing: -0.02em; max-width: 46rem; margin-top: 1.6rem; }
.intro-body .intro-more { max-width: 52rem; margin-top: 1.2rem; }
.intro-body .textlink { display: inline-block; margin-top: 1rem; }
.intro-body + .story-index { margin-top: 2.6rem; }
.makes-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.6rem; }
@media (max-width: 40rem) { .makes-3 { grid-template-columns: 1fr; } }
.closing-note h2 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); max-width: 20ch; line-height: 1; }

/* The highlighter sweep from the problems list, on every article title too. */
.t .hl {
  background-image: linear-gradient(var(--sweep), var(--sweep));
  background-repeat: no-repeat;
  background-size: 0% 38%;
  background-position: 0 88%;
  transition: background-size .45s cubic-bezier(.2,.7,.2,1);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
a:hover .t .hl, a:focus-visible .t .hl, a.t:hover .hl, a.t:focus-visible .hl { background-size: 100% 38%; }
.t .hl.punct::after { content: none; }
.t .hl::after { content: "."; color: var(--orange); opacity: 0; transition: opacity .15s; }
a:hover .t .hl::after, a:focus-visible .t .hl::after, a.t:hover .hl::after, a.t:focus-visible .hl::after { opacity: 1; transition: opacity .2s .4s; }
.essays a.t, .story-index a, .makes a { text-decoration: none; }

/* About: the portrait, cut out and standing on the rule under the title */
.about-title { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 26rem); gap: var(--gutter); align-items: end; border-bottom: 1px solid var(--ink); }
.about-title h1 { padding-bottom: 1.6rem; }
.portrait-cut { margin: 0; }
.portrait-cut img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.portrait-cut:hover img { filter: none; }
@media (max-width: 52rem) {
  .about-title { grid-template-columns: 1fr; }
  .about-title h1 { padding-bottom: 0; }
  .portrait-cut { max-width: 18rem; justify-self: end; margin-top: -1rem; }
}

/* ---------- The reading panel ---------- */
/* With JavaScript, stories live in the HTML but are read in a panel that slides in from the right. */
.has-reader .story-src { display: none; }
.reader-shade { position: fixed; inset: 0; background: rgba(10, 10, 10, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .45s, visibility 0s .45s; z-index: 50; }
.reader-shade.on { opacity: 1; visibility: visible; transition: opacity .45s; }
.reader {
  position: fixed; z-index: 51;
  top: 0; bottom: 0; right: 0;
  width: min(94vw, 62rem);
  display: flex; flex-direction: column;
  background: var(--paper);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .25);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s .6s;
}
.reader.on { transform: none; visibility: visible; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.reader-open, .reader-open body { overflow: hidden; }
.reader-bar { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1.25rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); flex: none; }
.reader-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.reader-close { display: inline-flex; align-items: center; gap: .6rem; font: 600 var(--step--1) / 1 var(--sans); color: var(--ink); background: none; border: 0; padding: .4rem 0; cursor: pointer; }
.reader-close .esc { font-weight: 400; font-size: .75rem; color: var(--graphite); border: 1px solid var(--rule); padding: .2rem .35rem; }
.reader-close:hover { text-decoration: underline; text-underline-offset: .25em; }
.reader-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; outline: none; padding: clamp(2.5rem, 7vh, 5rem) clamp(1.25rem, 4vw, 3rem) 0; }
/* one centred reading column, not the page's notebook grid */
.reader-body > article { display: block; max-width: 36rem; margin: 0 auto; padding: 0; }
.reader-body > article > * + * { margin-top: 1.6rem; }
.reader-body .margin { padding: 0; margin-bottom: 1.1rem; color: var(--graphite); }
.reader-body h2 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: .98; letter-spacing: -0.035em; max-width: 14ch; }
.reader-body h2::after { content: "."; color: var(--orange); }
.reader-body .standfirst { max-width: 34rem; margin-top: 1.1rem; }
.reader-body .prose, .reader-body .impact-story .prose { max-width: none; }
.reader-body .make-story .lead { max-width: none; margin: 2.2rem 0 .6rem; }
.reader-body .make-story .lead img { max-height: 70vh; }
.reader-body .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2.4rem; }
.reader-next { max-width: 36rem; margin: clamp(4rem, 10vh, 7rem) auto 0; border-top: 1px solid var(--ink); padding: 1.4rem 0 clamp(3rem, 10vh, 6rem); }
.reader-next a { display: block; text-decoration: none; color: var(--ink); }
.reader-next .k { display: block; font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin-bottom: .7rem; }
.reader-next .t { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -0.025em; }
.reader-next a:hover .hl, .reader-next a:focus-visible .hl { background-size: 100% 38%; }
.reader-body .gallery img { aspect-ratio: 4 / 5; height: auto; object-fit: cover; }
@media (hover: none) { .reader-close .esc { display: none; } }
@media (min-width: 66rem) { .reader-body .make-story .lead, .reader-body .gallery { margin-inline: -5rem; } }
@media (max-width: 52rem) {
  .reader { top: 0; bottom: 0; width: 100vw; }
  .reader-body > .frame { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .reader, .reader.on { transition: visibility 0s; }
  .reader { transform: none; opacity: 0; }
  .reader.on { opacity: 1; }
}

/* Footnotes in stories */
.gallery.sequence, .reader-body .gallery.sequence { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; max-width: 46rem; }
.gallery.sequence img, .reader-body .gallery.sequence img { aspect-ratio: auto; height: auto; max-height: 80vh; object-fit: contain; object-position: left; }
.footnote, .prose .footnote { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); border-top: 1px solid var(--rule); padding-top: .9rem; margin-top: 2rem; }
.fn-ref { color: var(--orange-text); text-decoration: none; }

/* Workshop hero: tools sketch themselves in turn */
.tools-field { display: flex; justify-content: flex-end; align-items: stretch; overflow: hidden; }
.tools { height: 100%; width: auto; max-width: 100%; overflow: visible; }
.tools path { fill: none; stroke: var(--ink); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 3; stroke-dashoffset: 1.25; }
.tools path.o { stroke: var(--orange); stroke-width: 1.5; }
.tools path.faint { stroke: var(--rule); }
.tools .carry { fill: var(--orange); stroke: none; }
.tools .bench { stroke: var(--rule); stroke-width: .6; stroke-dasharray: none; stroke-dashoffset: 0; }
.tools .tool path { animation: tool-sketch 12s cubic-bezier(.45, .1, .3, 1) infinite both; animation-delay: calc(var(--i) * 3s); }
.tools-field.paused .tool path { animation-play-state: paused; }
@keyframes tool-sketch {
  0% { stroke-dashoffset: 1.25; }
  11% { stroke-dashoffset: 0; }
  21% { stroke-dashoffset: 0; }
  28%, 100% { stroke-dashoffset: -1.25; }
}
@media (prefers-reduced-motion: reduce) {
  .tools .tool path { animation: none; stroke-dashoffset: 1.25; }
  .tools .tool-keyboard path { stroke-dashoffset: 0; }
}

/* Contact form */
form.talk .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.talk .form-note { font-weight: 600; }
form.talk .form-note.ok { color: var(--ink); }
form.talk button:disabled { opacity: .5; cursor: progress; }

/* Photos inside story text */
.prose figure.inline { margin: 2rem 0; max-width: 26rem; }
.prose figure.inline img { width: 100%; height: auto; display: block; }
.prose figure.inline figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin-top: .55rem; }

/* Essay charts: redrawn in house style. Ink for the ordinary, orange for what matters. */
.prose figure.chart { margin: 2.2rem 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--sans); }
.chart figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin-top: .8rem; max-width: 34rem; }
.chart .c-label { font-size: 15px; fill: var(--ink); }
.chart .c-label.strong { font-family: var(--serif); font-size: 19px; }
.chart .c-value { font-size: 14px; fill: var(--graphite); font-variant-numeric: tabular-nums; }
.chart .c-value.neg { fill: var(--orange-text); }
.chart .c-track { fill: var(--paper-deep); }
.chart .c-bar.pos { fill: var(--ink); }
.chart .c-bar.neg { fill: var(--orange); }
.chart .c-zero { stroke: var(--graphite); stroke-width: 1; }
.chart .c-layer rect { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.chart .c-layer.hot rect { stroke: var(--orange); }
.chart .c-name { font-family: var(--serif); font-size: 20px; fill: var(--ink); text-anchor: middle; }
.chart .c-sub { font-size: 13px; fill: var(--graphite); text-anchor: middle; }
.chart .c-sub.hot, .chart .c-arrow.hot { fill: var(--orange-text); }
.chart .c-arrow { font-size: 22px; fill: var(--graphite); text-anchor: middle; }
.chart .c-brace { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.chart .c-brace.hot { stroke: var(--orange); }
@media (max-width: 640px) { .chart .c-label { font-size: 17px; } .chart .c-sub { font-size: 15px; } }

/* ---------- Text size control ---------- */
.textsize { display: flex; align-items: baseline; gap: .15rem; margin-left: 1.2rem; }
.textsize button {
  font-family: var(--serif); background: none; border: 0; color: var(--graphite); cursor: pointer;
  padding: .2rem .35rem; line-height: 1; border-bottom: 1px solid transparent;
  min-width: 1.75rem; min-height: 1.75rem; /* WCAG 2.2 target size */
}
.textsize button:hover { color: var(--ink); border-bottom-color: var(--rule); }
.textsize button:disabled { opacity: .35; cursor: default; border-bottom-color: transparent; }
.textsize .dn { font-size: .85rem; }
.textsize .up { font-size: 1.2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Larger text on very narrow screens: grow a little less, and let long words and fields give way */
@media (max-width: 30em) {
  html[data-text="1"] { font-size: 106%; }
  html[data-text="2"] { font-size: 112.5%; }
  html[data-text="3"] { font-size: 118%; }
}
h1, h2, h3 { overflow-wrap: break-word; }
form.talk label, form.talk input, form.talk textarea { min-width: 0; width: 100%; }
.ledger li > *, .timeline li > *, .essays li > * { min-width: 0; }
@media (max-width: 52rem) {
  .masthead nav { order: 3; flex-basis: 100%; margin-left: 0; }
  .masthead .textsize { margin-left: auto; }
}

/* Essay pages: each essay at its own address, read in place rather than in the reader */
.crumb { padding-top: clamp(2rem, 6vw, 4rem); font-family: var(--sans); font-size: var(--step--1); }
.crumb a { color: var(--graphite); text-decoration: none; }
.crumb a::before { content: "\2190\00a0"; }
.crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.standalone { padding-top: clamp(1.5rem, 4vw, 3rem); }
.standalone h1 { line-height: .98; letter-spacing: -0.035em; margin-bottom: 1.4rem; }
.permalink { font-family: var(--sans); font-size: var(--step--1); margin-top: 2.4rem; }
.permalink a { color: var(--graphite); }
.essay-next { padding-block: clamp(3rem, 8vw, 6rem); }
.essay-next a { display: block; text-decoration: none; color: var(--ink); border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.essay-next .t { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -0.025em; }
.essay-next a:hover .hl, .essay-next a:focus-visible .hl { background-size: 100% 38%; }

/* Cookie choice: quiet, bottom left, never covers the whole page */
.consent { position: fixed; left: 1rem; bottom: 1rem; z-index: 40; max-width: 24rem; background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink); padding: 1rem 1.1rem; font-family: var(--sans); font-size: var(--step--1); line-height: 1.45; }
.consent p { margin: 0; }
.consent-actions { display: flex; gap: .6rem; margin-top: .8rem !important; }
.consent button { font: 600 var(--step--1) / 1 var(--sans); padding: .6rem .9rem; min-height: 2.2rem; cursor: pointer; border: 1px solid var(--ink); }
.consent .yes { background: var(--ink); color: var(--paper); }
.consent .no { background: none; color: var(--ink); }
.consent button:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.foot-privacy { margin-left: 1rem; }
.consent a { color: inherit; }
.consent-open { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin-left: 1rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
@media print { .consent, .consent-open { display: none; } }
