/*
 * IC Solutions — "workshop" design (selected study A)
 * Shared by the refreshed homepage (/) and the first journal article.
 * Self-contained: no web fonts, no Tailwind, no dependency on /styles/main.css.
 */

:root {
  --ink: #0f100d;
  --ink-2: #1b1d18;
  --ink-3: #2a2d25;
  --on-ink: #f2eee4;
  --on-ink-muted: #a9ab9e;
  --paper: #f2eee4;
  --paper-2: #e7e1d3;
  --on-paper: #15160f;
  --on-paper-muted: #5a574e;
  --rule-paper: #cfc7b5;
  --rule-ink: #3a3d33;
  --lime: #d4ff3a;

  /*
   * Font stacks: Apple faces first (the selected look), then explicit
   * condensed / text alternatives found on Windows, Android and Linux,
   * then generic families. No fonts are downloaded.
   */
  --display: "Avenir Next Condensed", "DIN Condensed", "Bahnschrift Condensed", "Roboto Condensed",
             "Arial Narrow", "Liberation Sans Narrow", "Ubuntu Condensed", "DejaVu Sans Condensed",
             "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, "Noto Serif",
           "DejaVu Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, "Roboto Mono", "DejaVu Sans Mono", monospace;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 84rem;
  --measure: 38rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--on-paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; overflow-wrap: break-word; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }

.skip {
  position: absolute; left: .75rem; top: -4rem; z-index: 10;
  background: var(--lime); color: var(--ink); padding: .6rem 1rem; font-weight: 600;
}
.skip:focus { top: .75rem; }

/* Focus: visible on both surfaces */
:focus-visible { outline: 3px solid var(--on-paper); outline-offset: 3px; border-radius: 2px; }
.on-ink :focus-visible { outline-color: var(--lime); }

/* ───────── Masthead ───────── */
.on-ink { background: var(--ink); color: var(--on-ink); }
.preview-notice {
  border-bottom: 1px solid var(--rule-ink);
  color: #c9cbbd;
}
.preview-notice .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; }
.preview-notice span:last-child { display: none; }
@media (min-width: 40rem) { .preview-notice span:last-child { display: inline; } }

.masthead .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem;
  padding-block: 1.1rem;
}
.brand { text-decoration: none; display: flex; align-items: center; gap: .25rem .75rem; flex-wrap: wrap; min-height: 44px; }
.brand b {
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: -.01em; line-height: 1;
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
}
.brand b::before {
  content: ""; width: .7rem; height: .7rem; background: var(--lime); display: inline-block;
  transform: translateY(-.05rem);
}
.brand small { color: var(--on-ink-muted); font-size: .8rem; display: none; }
@media (min-width: 52rem) { .brand small { display: inline; } }

.nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.nav a {
  text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .55rem .7rem; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 2px;
}
.nav a:hover { color: var(--lime); }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--lime); }

@media (max-width: 25rem) {
  .masthead .wrap { padding-block: .9rem .5rem; }
  .nav { gap: 0; margin-left: -.45rem; }
  .nav a { padding-inline: .45rem; }
}

/* ───────── Homepage: opening ───────── */
.opening { position: relative; padding-bottom: clamp(3.75rem, 10vw, 8rem); }
.opening-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem;
  padding-top: clamp(1.75rem, 7vw, 6rem);
}
.headline {
  font-family: var(--display); font-weight: 700;
  font-size: min(clamp(3rem, 12.5vw, 6.75rem), 15vw);
  line-height: .9; letter-spacing: -.02em;
  text-transform: uppercase;
}
.headline span { display: block; }
.headline .l2 { color: var(--on-ink-muted); margin-top: .12em; }
.headline .l3 { padding-left: 1.1em; margin-top: .1em; }
.headline .l3 em {
  font-style: normal; color: var(--ink); background: var(--lime);
  padding: 0 .12em; margin-left: -.06em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.intro { max-width: 34rem; font-size: 1.125rem; color: #dcd8cd; }
.intro p:first-child { color: var(--on-ink); }
.primary-link {
  display: inline-flex; align-items: center; gap: .75rem; margin-top: .5rem;
  text-decoration: none; font-weight: 600; font-size: 1.05rem;
  padding: .8rem 1.1rem .8rem 0; min-height: 44px;
  border-bottom: 2px solid var(--lime);
}
.primary-link .arrow { transition: transform .25s var(--ease); }
.primary-link:hover .arrow { transform: translateX(4px); }
.primary-link .k { color: var(--on-ink-muted); font-weight: 400; }

@media (min-width: 40rem) {
  .opening-grid { gap: 2.5rem; }
}
@media (min-width: 64rem) {
  .opening-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: clamp(2rem, 4vw, 4.5rem); row-gap: 3rem;
  }
  .headline { grid-column: 1; grid-row: 1; font-size: min(clamp(3.75rem, 5.9vw, 6.5rem), 7.5vw); }
  .intro { grid-column: 1; grid-row: 2; }
  .workshop { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin-top: clamp(4rem, 8vw, 7.5rem); }
}

/* stepped edge into the reading surface */
.stepped { position: relative; }
.stepped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(2rem, 5vw, 4rem);
  background: var(--paper);
  clip-path: polygon(0 100%, 0 66%, 34% 66%, 34% 33%, 67% 33%, 67% 0, 100% 0, 100% 100%);
}

/* ───────── Workshop figure ───────── */
.workshop { position: relative; margin: 0; }
.workshop-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: .75rem; color: var(--on-ink-muted); }
/*
 * The plate holds two layers: .drawing (decorative, sized to the plate) and
 * .stations (the real tab controls). Control labels are sized in rem so they
 * follow the reader's text size. Container queries are measured in em
 * (font-size: 1rem on the plate), so when enlarged labels no longer fit the
 * drawing the controls move into a row beneath it instead of shrinking.
 */
.plate {
  position: relative; width: 100%; font-size: 1rem;
  background:
    linear-gradient(var(--ink-2), var(--ink-2)) padding-box,
    linear-gradient(135deg, var(--rule-ink), #50544a 50%, var(--rule-ink)) border-box;
  border: 1px solid transparent;
  container: plate / inline-size;
  --px: 0px; --py: 0px;
}
.drawing { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.plate-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(242,238,228,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(242,238,228,.05) 1px, transparent 1px);
  background-size: calc(100% / 12) calc(100% / 9);
}
.plate-num {
  position: absolute; left: 3%; bottom: -6%;
  font-family: var(--display); font-weight: 700; font-size: 44cqi; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(212,255,58,.28);
  transform: translate(var(--px), var(--py));
  transition: transform .6s var(--ease);
  pointer-events: none; user-select: none;
}
.plate-num span { display: inline-block; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.plate-num span.out { opacity: 0; transform: translateY(12%); }

.drawing svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.p-base { fill: none; stroke: #565a4e; stroke-width: 1.5; }
.p-prog {
  fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: square;
  stroke-dasharray: 648; stroke-dashoffset: 534;
  transition: stroke-dashoffset .7s var(--ease);
}
.plate[data-step="2"] .p-prog { stroke-dashoffset: 298; }
.plate[data-step="3"] .p-prog { stroke-dashoffset: 62; }
.p-loop { fill: none; stroke: #6f7364; stroke-width: 1.25; stroke-dasharray: 4 6; }
.p-tick { stroke: #4a4e43; stroke-width: 1; }
.p-end { fill: none; stroke: var(--on-ink); stroke-width: 1.5; }
.p-thing { fill: var(--on-ink); transition: fill .4s var(--ease); }
.plate[data-step="3"] .p-thing { fill: var(--lime); }

.plate-tag {
  position: absolute; font-family: var(--mono); font-size: clamp(8px, 2.1cqi, 11px);
  letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-muted);
  transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
}
.plate-tag--end { transform: translate(-100%, -50%); }
.plate-tag--start { transform: translate(0, -50%); }
@container plate (max-width: 304px) { .plate-tag--start, .plate-tag--endpoint { display: none; } }

.stations { position: absolute; inset: 0; pointer-events: none; }
.station {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  font: inherit; color: var(--on-ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 44px; padding: .3em .8em .3em .4em;
  background: var(--ink); border: 1px solid #5d6155; border-radius: 999px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.station .n {
  font-family: var(--mono); font-weight: 500;
  width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center;
  font-size: max(.74em, .625rem); flex: none;
  border: 1px solid #6c7063;
}
.station:hover { border-color: var(--lime); }
.station[aria-selected="true"] {
  background: var(--lime); color: var(--ink); border-color: var(--lime);
  box-shadow: 0 0 0 6px rgba(212,255,58,.14);
}
.station[aria-selected="true"] .n { border-color: var(--ink); }
.on-ink .station:focus-visible { outline: 3px solid var(--on-ink); outline-offset: 4px; border-radius: 999px; }
@container plate (min-width: 20em) { .station { font-size: .875rem; } }
@container plate (min-width: 26em) { .station { font-size: .95rem; } }
/* Enlarged text (or a very narrow plate): controls leave the drawing and form a row beneath it. */
@container plate (max-width: 16em) {
  .stations {
    position: static; pointer-events: auto;
    display: flex; flex-wrap: wrap; gap: .5rem;
    padding: .75rem; border-top: 1px solid var(--rule-ink);
  }
  .station { position: static; transform: none; font-size: .95rem; }
}

.panels { margin-top: 1rem; position: relative; }
.panel {
  border-left: 3px solid var(--lime);
  padding: .2rem 0 .2rem 1.1rem;
}
/* Without JavaScript every panel is shown as a list; with it, one at a time. */
.panel:not([hidden]) ~ .panel:not([hidden]) { margin-top: 1.25rem; }
.panel[hidden] { display: none; }
.panel.enter { animation: panelIn .45s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel .who { color: var(--lime); margin-bottom: .35rem; display: block; }
.panel h3 { font-family: var(--display); font-weight: 600; font-size: min(clamp(1.4rem, 3.4vw, 1.75rem), 10vw); line-height: 1.1; margin-bottom: .45rem; }
.panel p { color: #d8d4c9; margin: 0; max-width: 34rem; font-size: 1rem; }
.plate-note { color: var(--on-ink-muted); font-size: .85rem; margin-top: 1rem; }

/* Tablet: the figure sits beside its explanation instead of spanning the full width */
@media (min-width: 36rem) and (max-width: 63.999rem) {
  .workshop {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-areas: "head head" "plate panels" "plate note";
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(1.25rem, 3vw, 2rem);
  }
  .workshop-head { grid-area: head; }
  .plate { grid-area: plate; align-self: start; }
  .panels { grid-area: panels; margin-top: 0; }
  .plate-note { grid-area: note; margin-top: .75rem; }
}

/* ───────── Featured essay ───────── */
.section-label { display: flex; align-items: center; gap: .75rem; color: var(--on-paper-muted); margin-bottom: 1.5rem; }
.section-label::before { content: ""; width: .6rem; height: .6rem; background: var(--on-paper); }

.featured { padding-block: clamp(2.5rem, 8vw, 7rem) clamp(3rem, 7vw, 6rem); }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.feature-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: min(clamp(2.6rem, 9vw, 5.25rem), 15vw); line-height: .92; letter-spacing: -.015em;
}
.feature-title a { text-decoration: none; }
.feature-title a:hover .hl, .feature-title a:focus-visible .hl { background-size: 100% .32em; }
.hl {
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat; background-position: 0 88%;
  background-size: 100% .2em;
  transition: background-size .3s var(--ease);
}
.featured .byline { color: var(--on-paper-muted); margin-top: 1.25rem; font-size: .95rem; }
.excerpt { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; max-width: 36rem; }
.excerpt .lede::first-letter {
  font-family: var(--display); font-weight: 700; float: left;
  font-size: 4.2em; line-height: .78; padding: .06em .1em 0 0;
}
.pull {
  margin: 1.75rem 0; padding: 1.1rem 0 1.1rem 1.25rem; border-left: 3px solid var(--on-paper);
  font-family: var(--display); font-weight: 500; font-size: 1.45rem; line-height: 1.25;
}
.pull small { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--on-paper-muted); margin-top: .6rem; }
.text-link {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; text-decoration: none;
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 6px;
  padding: .2rem .15rem;
  transition: background-size .25s var(--ease);
}
.text-link:hover { background-size: 100% 100%; }
@media (min-width: 64rem) {
  .feature-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: 5rem; align-items: start; }
}

/* ───────── Projects ───────── */
.projects { background: var(--paper-2); padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.projects h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: min(clamp(2.2rem, 6.5vw, 3.75rem), 13vw); line-height: .95; letter-spacing: -.01em;
}
.projects .lead-in { font-family: var(--serif); font-size: 1.15rem; color: var(--on-paper-muted); max-width: 30rem; margin-top: .9rem; }
.project-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }

.body-of-work { position: relative; list-style: none; margin: 0; padding: 0 0 0 2.25rem; }
.body-of-work::before {
  content: ""; position: absolute; left: .55rem; top: .9rem; bottom: 1.5rem; width: 2px; background: var(--on-paper);
}
.work { position: relative; padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.work:last-child { padding-bottom: 0; }
.work::before {
  content: ""; position: absolute; left: -2.25rem; top: .55rem;
  width: 1.25rem; height: 1.25rem; background: var(--paper-2); border: 2px solid var(--on-paper);
}
.work.w1::before { background: var(--on-paper); }
.work.w2::before { border-radius: 50%; }
.work.w3::before { transform: rotate(45deg) scale(.85); border-style: dashed; }

.work h3 { font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.work p { font-family: var(--serif); line-height: 1.6; margin: .8rem 0 0; }
.w1 h3 { font-size: min(clamp(2.2rem, 7vw, 4rem), 14vw); text-transform: uppercase; }
.w1 p { font-size: clamp(1.15rem, 2.4vw, 1.4rem); max-width: 40rem; }
.w2 h3 { font-size: min(clamp(1.8rem, 5vw, 2.6rem), 13vw); }
.w2 p { font-size: 1.125rem; max-width: 30rem; }
.w3 h3 { font-size: min(clamp(1.6rem, 4.5vw, 2.2rem), 13vw); font-style: italic; font-weight: 600; }
.w3 p { font-size: 1.05rem; max-width: 34rem; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px dashed var(--on-paper); padding: .2rem .5rem; margin-bottom: .7rem;
}
@media (min-width: 64rem) {
  .project-head { grid-template-columns: 1fr 1fr; align-items: end; column-gap: 5rem; }
  .project-head .lead-in { margin: 0; }
  .body-of-work { padding-left: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; }
  .body-of-work::before { display: none; }
  .work { padding: 2rem 0 0 2rem; border-top: 2px solid var(--on-paper); }
  .work::before { left: 0; top: -.7rem; }
  .w1 { grid-column: 1 / span 12; padding-bottom: 3.5rem; }
  .w1 .work-inner { display: grid; grid-template-columns: 5fr 7fr; column-gap: 2rem; align-items: start; }
  .w1 p { margin: 0; }
  .w2 { grid-column: 1 / span 6; }
  .w3 { grid-column: 8 / span 5; border-top-style: dashed; margin-top: 4rem; }
}

/* ───────── About ───────── */
.about { padding-block: clamp(4rem, 9vw, 7rem); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.about h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: min(clamp(2.4rem, 7vw, 4.5rem), 12vw); line-height: .92; letter-spacing: -.015em;
}
.about h2 em { font-style: normal; color: var(--lime); }
.about-text { font-family: var(--serif); font-size: 1.2rem; line-height: 1.65; max-width: 36rem; color: #e2ded3; }
.about-text p:last-child { margin-bottom: 0; }
.about-text .primary-link { font-family: var(--sans); font-size: 1rem; }
.expand {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-muted);
  display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.75rem;
}
.expand b { color: var(--lime); font-weight: 500; }
@media (min-width: 64rem) {
  .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 5rem; align-items: start; }
}

/* ───────── Footer ───────── */
.footer { border-top: 1px solid var(--rule-ink); }
.footer .wrap { display: grid; gap: 1.25rem; padding-block: 2.25rem 2.75rem; }
.wordmark {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(3rem, 15vw, 10rem); line-height: .82; letter-spacing: -.02em;
  color: var(--ink-3);
  user-select: none; overflow: hidden; white-space: nowrap;
}
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; color: var(--on-ink-muted); font-size: .9rem; }
.footer-meta a, .footer--compact a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-meta a:hover, .footer--compact a:hover { color: var(--lime); }
.footer--compact .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 2rem; color: var(--on-ink-muted); font-size: .9rem; }

/* ───────── Article ───────── */
.title-block { padding-bottom: clamp(4rem, 9vw, 7rem); }
.title-block .wrap { padding-top: clamp(2rem, 7vw, 5.5rem); }
.kicker { display: flex; align-items: center; gap: .75rem; color: var(--on-ink-muted); margin: 0 0 1.5rem; }
.kicker::before { content: ""; width: .6rem; height: .6rem; background: var(--lime); }
.title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: min(clamp(2.75rem, 10.5vw, 7rem), 15vw); line-height: .9; letter-spacing: -.02em;
  max-width: 14ch;
}
.title em { font-style: normal; color: var(--ink); background: var(--lime); padding: 0 .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.title-block .byline { margin: 1.75rem 0 0; color: var(--on-ink-muted); font-size: .95rem; }
.title-block .byline strong { color: var(--on-ink); font-weight: 600; }

.reading { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.reading-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.contents { font-size: .95rem; }
.contents ol { list-style: none; margin: .75rem 0 0; padding: 0; border-top: 1px solid var(--rule-paper); }
.contents li { border-bottom: 1px solid var(--rule-paper); }
.contents a { display: flex; gap: .75rem; align-items: baseline; padding: .7rem 0; min-height: 44px; text-decoration: none; }
.contents a span { font-family: var(--mono); font-size: .7rem; color: var(--on-paper-muted); }
.contents a:hover { background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 100% / 100% 3px; }
@media (min-width: 64rem) {
  .reading-grid { grid-template-columns: 14rem minmax(0, var(--measure)); column-gap: clamp(3rem, 7vw, 7rem); justify-content: start; }
  .contents { padding-top: .4rem; }
}

.prose { font-family: var(--serif); font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.7; max-width: var(--measure); }
.prose p { margin: 0 0 1.15em; }
.prose > p:first-of-type { font-size: 1.12em; line-height: 1.6; }
.prose h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: -.005em;
  font-size: min(clamp(1.75rem, 4vw, 2.25rem), 11.5vw); line-height: 1;
  margin: 2.4em 0 .8em; padding-top: 1rem; border-top: 2px solid var(--on-paper);
  scroll-margin-top: 1.5rem;
}
/* Inline markers (not flex) so an enlarged heading wraps across the full measure. */
.prose h2 .sec { display: inline-block; margin-right: .8rem; font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .06em; color: var(--on-paper-muted); transform: translateY(-.35em); }
.prose h2::before { content: ""; display: inline-block; margin-right: .8rem; width: .55rem; height: .55rem; background: var(--lime); outline: 1.5px solid var(--on-paper); transform: translateY(-.25em); }
.prose .mark { background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); padding: 0 .05em; }
.return { border-top: 2px solid var(--on-paper); margin-top: 3rem; padding-top: 1.5rem; font-family: var(--sans); }

/* ───────── About page (reuses the article reading layout) ───────── */
.title--about { font-size: min(clamp(2.4rem, 6.5vw, 5.25rem), 12vw); max-width: 18ch; }
/*
 * Page titles (article and About): the inline highlight would paint the font's whole
 * content area (about 1.37em in Avenir Next Condensed) inside a .9 line-height,
 * covering the neighbouring lines. Paint a band from just above cap height to just
 * below the baseline instead.
 */
.title em { background: linear-gradient(transparent 13%, var(--lime) 13%, var(--lime) 82%, transparent 82%); }
.about-intro { max-width: 40rem; margin-top: 1.75rem; font-size: 1.125rem; color: #dcd8cd; }
.about-intro p:first-child { color: var(--on-ink); }
.about-intro p:last-child { margin-bottom: 0; }
.prose > h2:first-child { margin-top: 0; }
.prose--about > p:first-of-type { font-size: inherit; line-height: inherit; }

/* ───────── 404 page ───────── */
.not-found-text { max-width: 34rem; margin: 1.5rem 0 .5rem; font-size: 1.125rem; color: #dcd8cd; }
.page-404 { background: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
.page-404 main { flex: 1; background: var(--ink); }

/* ───────── Motion preferences ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
