/* ════════════════════════════════════════════════════════════════
   SITE — the Modernist system.
   Loads last on every page. Owns the tokens, body, the header and
   footer, and the components of the home page, the series pages
   (with the full-screen viewer) and the long-read story layout.
   Rules: Archivo throughout, zero radius, structure from 2px rules,
   everything flush left, accent red used sparingly.
   ════════════════════════════════════════════════════════════════ */

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-divider: rgba(32, 30, 29, 0.4);
  --color-neutral-300: #d7d3d3;
  --color-neutral-400: #bab6b6;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --shadow-md: 0 3px 10px rgba(45, 43, 43, 0.16);
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --m-gutter: clamp(16px, 3vw, 40px);
  --md-text-font: 'Archivo';
}

body,
.md-main,
.md-container {
  background-color: var(--color-bg);
}
body {
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}
.md-container {
  padding-top: 0;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── Header (copied into overrides/main.html as critical CSS) ── */
.m-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-divider);
  font-family: var(--font-body);
}
/* Material's JS adds md-header--shadow on scroll; the rule is enough. */
.m-header.md-header--shadow {
  box-shadow: none;
}
.m-header a {
  color: var(--color-text);
  text-decoration: none;
}
.m-header a:hover,
.m-header a[aria-current] {
  color: var(--color-accent);
}
.m-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 3px var(--m-gutter);
  display: flex;
  align-items: center;
  gap: 0 32px;
  flex-wrap: wrap;
}
.m-brand {
  flex: none;
  margin-right: auto;
  white-space: nowrap;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 44px;
}
.m-nav {
  display: flex;
  gap: 0 clamp(14px, 2.4vw, 28px);
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.m-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ── Footer ── */
.m-footer {
  border-top: 2px solid var(--color-divider);
  background: var(--color-bg);
  font-family: var(--font-body);
}
.m-footer__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 8px var(--m-gutter) 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0 24px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-neutral-700);
}
.m-footer__links {
  display: flex;
  gap: 0 20px;
  flex-wrap: wrap;
}
.m-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-neutral-700);
  text-decoration: none;
}
.m-footer a:hover {
  color: var(--color-accent);
}

/* ── Shared ── */
.m {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
}
:where(.m) a {
  color: var(--color-text);
  text-decoration: none;
}
:where(.m) a:hover {
  color: var(--color-accent);
}
.m h1,
.m h2,
.m p,
.m figure {
  margin: 0;
}
.m-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--m-gutter);
}
.m-rule {
  border-top: 2px solid var(--color-divider);
}
.m-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}
.m-display {
  font-size: clamp(48px, 9vw, 136px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.m-lead {
  max-width: 46ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--color-neutral-800);
  text-wrap: pretty;
}
.m-h2 {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

/* Page heading block: kicker + giant title, blurb on the right */
.m-lead a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.m-head {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 104px) var(--m-gutter) clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 24px 48px;
  align-items: end;
}
.m-head__title {
  display: flex;
  flex-direction: column;
  gap: 12px;
  container-type: inline-size;
}
/* A word cannot wrap, so the title's longest word must fit its column: a
   title with a long word takes the full row (blurb drops below), and every
   title is capped to the column width by that word's length (--chars, set
   by the template). --fs is the uncapped size. */
.m-head__title--long {
  grid-column: 1 / -1;
}
.m-head__title .m-display {
  --fs: clamp(48px, 9vw, 136px);
  font-size: min(var(--fs), calc(100cqi / (var(--chars, 6) * 0.78)));
}

/* One-line caption under a painting */
.m-caption {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px var(--m-gutter);
  display: flex;
  align-items: baseline;
  gap: 6px 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-neutral-700);
}
.m-caption__title {
  font-weight: 800;
  color: var(--color-text);
}
.m-caption__more {
  margin-left: auto;
  font-weight: 600;
  color: var(--color-accent-700);
}

/* The red banner */
.m-banner {
  background: var(--color-accent);
  color: var(--color-bg);
}
.m-banner__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 104px) var(--m-gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 28px 48px;
  align-items: end;
}
.m-banner h2 {
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--color-bg);
  max-width: 14ch;
}
.m-banner__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.m-banner p {
  max-width: 40ch;
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-bg);
}
.m-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 800;
  font-size: 15px;
}
.m-button:hover {
  background: var(--color-neutral-800);
  color: var(--color-bg);
}
.m-banner--story .m-banner__inner {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(40px, 6vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  flex-wrap: wrap;
}
.m-banner--story .m-banner__body {
  gap: 10px;
}
.m-banner--story h2 {
  font-size: clamp(30px, 4vw, 56px);
  max-width: none;
}
.m-banner--story p {
  font-size: 17px;
  max-width: none;
}

/* Ruled link cells (series doors, "more" links) */
.m-cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2px;
  background: var(--color-divider);
  border-left: 2px solid var(--color-divider);
  border-right: 2px solid var(--color-divider);
}
.m-cells > a {
  background: var(--color-bg);
}
.m-cells > a:hover {
  background: var(--color-surface);
}

/* ══ Home ══════════════════════════════════════════════════════ */
.m-hero {
  display: block;
  background: var(--color-surface);
}
.m-hero img {
  width: 100%;
  height: min(86vh, 75vw);
  object-fit: cover;
}
.m-caption--hero .m-caption__title {
  font-size: 15px;
}

.m-statement {
  padding-top: clamp(48px, 8vw, 120px);
  padding-bottom: clamp(48px, 8vw, 120px);
}
.m-statement h1 {
  max-width: 16ch;
  font-size: clamp(36px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
.m-statement .m-lead {
  margin-top: 24px;
  max-width: 44ch;
}

.m-door {
  display: flex;
  flex-direction: column;
}
.m-door__img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-surface);
}
.m-door__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.m-door__body {
  padding: 20px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 2px solid var(--color-divider);
}
.m-door__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.m-door__name {
  font-weight: 800;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.m-door__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-neutral-700);
  white-space: nowrap;
}
.m-door__line {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-neutral-800);
  text-wrap: pretty;
}

.m-stories {
  scroll-margin-top: 64px;
}
.m-stories__inner {
  padding-top: clamp(48px, 7vw, 104px);
  padding-bottom: clamp(48px, 7vw, 104px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 32px 48px;
}
.m-stories__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.m-stories__intro .m-h2 {
  max-width: 14ch;
  text-wrap: balance;
}
.m-stories__all {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}
.m-storylist {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--color-divider);
}
.m-storylist a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-divider);
}
.m-storylist__num {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-neutral-700);
}
.m-storylist__title {
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.m-storylist__arrow {
  font-size: 15px;
}

/* ══ Series ════════════════════════════════════════════════════ */
/* Ruled grid without gap filler: cells draw their own right and bottom
   rules, so a short last row leaves clean ground, not a grey block. */
.m-works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  border-left: 2px solid var(--color-divider);
}
.m-work {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border-right: 2px solid var(--color-divider);
  border-bottom: 2px solid var(--color-divider);
  scroll-margin-top: 64px;
}
.m-work__mat {
  appearance: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface);
}
.m-work__mat:hover {
  background: var(--color-neutral-300);
}
/* An absolute box has a definite height, so the painting can be capped
   at 100% of it in both directions and the shadow hugs the painting. */
.m-work__fit {
  position: absolute;
  inset: clamp(20px, 3vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-work__fit img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  box-shadow: var(--shadow-md);
}
.m-work__cap {
  padding: 16px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 2px solid var(--color-divider);
}
.m-work__title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.m-work__meta {
  font-size: 13px;
  color: var(--color-neutral-700);
}

.m-next {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--m-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.m-next__label {
  font-size: 15px;
  color: var(--color-neutral-700);
}
.m-next a {
  font-weight: 800;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

/* ── Full-screen viewer ── */
html.m-locked,
html.m-locked body {
  overflow: hidden;
}
.m-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-text);
  color: var(--color-bg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.m-viewer[hidden],
.m-viewer [hidden] {
  display: none;
}
.m-viewer button {
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.m-viewer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--m-gutter);
  border-bottom: 2px solid var(--color-neutral-800);
  font-size: 13px;
  font-weight: 600;
}
.m-viewer__pos {
  color: var(--color-neutral-400);
}
.m-viewer .m-viewer__close {
  min-height: 44px;
  padding: 0 0 0 16px;
  color: var(--color-bg);
}
.m-viewer__close:hover {
  color: var(--color-accent);
}
.m-viewer__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px) clamp(48px, 7vw, 112px);
  min-height: 0;
}
.m-viewer__img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  cursor: default;
}
.m-viewer .m-viewer__nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(48px, 7vw, 112px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--color-neutral-400);
}
.m-viewer .m-viewer__nav:hover {
  color: var(--color-bg);
}
.m-viewer__nav--prev { left: 0; }
.m-viewer__nav--next { right: 0; }
.m-viewer__info {
  border-top: 2px solid var(--color-neutral-800);
  padding: 18px var(--m-gutter) 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 40px;
  flex-wrap: wrap;
}
.m-viewer__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 760px;
  min-width: 0;
  flex: 1 1 320px;
}
.m-viewer__title {
  font-weight: 800;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.m-viewer__meta {
  font-size: 13px;
  color: var(--color-neutral-400);
}
.m .m-viewer__note {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-neutral-300);
  text-wrap: pretty;
}
.m-viewer__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.m-viewer__story,
.m-viewer__enquire {
  padding: 13px 18px;
  font-size: 14px;
  color: var(--color-bg);
}
.m-viewer__story {
  border: 1px solid var(--color-neutral-600);
  font-weight: 600;
}
.m-viewer__story:hover {
  border-color: var(--color-bg);
  color: var(--color-bg);
}
.m-viewer__enquire {
  background: var(--color-accent);
  font-weight: 800;
}
.m-viewer__enquire:hover {
  background: var(--color-accent-600);
  color: var(--color-bg);
}

/* ══ Story ═════════════════════════════════════════════════════ */
.m-head--story {
  padding-bottom: clamp(28px, 4vw, 56px);
  gap: 20px 48px;
}
.m-head--story .m-display {
  --fs: clamp(44px, 8vw, 120px);
}
.m-head--story .m-lead {
  max-width: 42ch;
  line-height: 1.5;
}

.m-plate {
  border-top: 2px solid var(--color-divider);
  border-bottom: 2px solid var(--color-divider);
  background: var(--color-surface);
}
.m-plate__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 56px) var(--m-gutter);
}
.m-plate img {
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 84vh;
  box-shadow: var(--shadow-md);
}

.m-story-body {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 96px) var(--m-gutter);
  border-top: 2px solid var(--color-divider);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px clamp(32px, 5vw, 96px);
  align-items: start;
}
.m-ref {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-ref img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}
.m-ref figcaption {
  font-size: 13px;
  color: var(--color-neutral-700);
}
.m-prose {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 62ch;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.65;
  text-wrap: pretty;
}
.m .m-pull {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.m-details {
  padding-bottom: clamp(40px, 6vw, 96px);
}
.m-details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2px;
  background: var(--color-divider);
  border: 2px solid var(--color-divider);
}
.m-details__cell {
  background: var(--color-bg);
  padding: 24px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-details__cell p {
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

.m-closing {
  padding-bottom: clamp(48px, 7vw, 104px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px clamp(32px, 5vw, 96px);
}
.m-closing p {
  max-width: 62ch;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.65;
  text-wrap: pretty;
}
.m .m-closer {
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 14ch;
}

.m-more__cell {
  padding: 28px 22px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m-more__label {
  font-size: 13px;
  color: var(--color-neutral-700);
}
.m-more__name {
  font-weight: 800;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

/* ══ Hill Town ═════════════════════════════════════════════════
   overrides/hilltown.html: head, sub-nav, then Markdown in .m-page. */
.m-subnav {
  border-top: 2px solid var(--color-divider);
  border-bottom: 2px solid var(--color-divider);
}
.m-subnav__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--m-gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(16px, 2.4vw, 32px);
  font-size: 14px;
  font-weight: 600;
}
.m-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}
.m-subnav a[aria-current] {
  color: var(--color-accent);
}

.m-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 96px) var(--m-gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.65;
}
.m-page > p,
.m-page > ul,
.m-page > ol {
  max-width: 62ch;
  text-wrap: pretty;
}
.m-page ul,
.m-page ol {
  margin: 0;
  padding-left: 1.2em;
  list-style: square;
}
.m-page li + li {
  margin-top: 10px;
}
.m-page h2 {
  align-self: stretch;
  margin: clamp(28px, 4vw, 56px) 0 4px;
  padding-top: 20px;
  border-top: 2px solid var(--color-divider);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.m-page > h2:first-child {
  margin-top: 0;
}
.m-page h3 {
  margin: 16px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}
.m-page p a,
.m-page li a,
.m-page td a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.m-page strong {
  font-weight: 800;
}

/* Figures sit on a surface mat with the shadow hugging the image. */
.m-page figure {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-page figure > a,
.m-page figure > p {
  display: block;
  margin: 0;
}
.m-page figure img,
.m-page > p > a > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 84vh;
  box-shadow: var(--shadow-md);
}
.m-page figcaption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-neutral-700);
}
.m-page > p:has(> a > img) {
  max-width: none;
  align-self: stretch;
}

/* Two or three figures side by side */
.m-figs {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 32px clamp(24px, 3vw, 48px);
  align-items: start;
  margin: 12px 0;
}

/* The pages of the Hill Town section, as ruled cells */
.m-page .m-cells {
  align-self: stretch;
  border: 2px solid var(--color-divider);
  margin-top: 12px;
}
.m-page .m-more__cell {
  text-decoration: none;
}
.m-more__line {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-neutral-800);
  text-wrap: pretty;
}

/* Tables: ruled, flush left */
.m-page table {
  align-self: stretch;
  max-width: 980px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.m-page th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  padding: 0 24px 10px 0;
  border-bottom: 2px solid var(--color-divider);
}
.m-page td {
  vertical-align: top;
  padding: 12px 24px 12px 0;
  border-bottom: 1px solid var(--color-divider);
}
.m-page td:first-child {
  white-space: nowrap;
  font-weight: 600;
}

/* Admonition (the "not for navigation" warning) */
.m-page .admonition {
  border: 2px solid var(--color-divider);
  padding: 16px 20px;
  max-width: 62ch;
}
.m-page .admonition p {
  margin: 0;
}
.m-page .admonition-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  margin-bottom: 4px;
}

.m-page iframe {
  align-self: stretch;
  display: block;
  width: 100%;
  height: 80vh;
  border: 2px solid var(--color-divider);
}

/* ══ Headed Markdown pages ═════════════════════════════════════
   overrides/headed.html: the Modernist head above a custom.css page
   (stories, the stories index, About). The head matches the 1280px
   content column; the in-page headings take the Modernist type. */
.m-headed {
  border-bottom: 2px solid var(--color-divider);
}
.m-headed .m-head {
  max-width: 1280px;
}
.md-main__inner:has(.m-body) {
  padding: clamp(16px, 3vw, 32px) var(--m-gutter) 64px;
}
/* Matches Material's sidebar-margin rule (0,5,0) so the body lines up with the head. */
.md-main__inner:has(.m-body) > .md-content > .md-content__inner.md-typeset {
  margin-left: 0;
  margin-right: 0;
}
.md-typeset .m-body .story > h2:first-child {
  margin-top: 0;
}
.md-typeset .m-body .story > h2 {
  font-family: var(--font-body);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-transform: none;
  color: var(--color-text);
  border-bottom: 0;
  border-top: 2px solid var(--color-divider);
  padding: 20px 0 0;
}
.md-typeset .m-body .image-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}
.md-typeset .m-body .image-meta {
  font-family: var(--font-body);
  color: var(--color-neutral-700);
}
/* Long titles (essays) are set smaller so they read as a headline. */
.m-head--essay .m-display {
  --fs: clamp(36px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 22ch;
  text-wrap: balance;
}
.md-typeset .m-body .essay {
  font-family: var(--font-body);
  color: var(--color-text);
}
.md-typeset .m-body .essay h2 {
  font-family: var(--font-body);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--color-text);
  border-top: 2px solid var(--color-divider);
  padding-top: 18px;
}
.md-typeset .m-body .essay-card {
  border-top: 2px solid var(--color-divider);
}
.md-typeset .m-body .essay-list .essay-card:last-child {
  border-bottom: 2px solid var(--color-divider);
}
.md-typeset .m-body .essay-card-content h3 {
  font-family: var(--font-body);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.md-typeset .m-body .essay-card-content h3 a {
  color: var(--color-text);
}
.md-typeset .m-body .essay-card-content h3 a:hover {
  color: var(--color-accent);
}
.md-typeset .m-body .essay-card-content > p:first-of-type {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}
.md-typeset .m-body .essay > h2:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.md-typeset .m-body .essays-intro {
  text-align: left;
  color: var(--color-neutral-800);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
