/* TexaHub — "the printed annual"
   One axis at 42% of the viewport, charcoal paper, flat primary fields.
   Every colour and size below is a token; components reference tokens only. */

:root {
  --bg: #191919;
  --surface: #242424;
  --surface-2: #2e2e2e;
  --ink: #ffffff;
  --muted: #b4b4b4;
  --accent: #0c7866;
  --accent-hover: #0a6656;
  --accent-ink: #ffffff;
  --red: #d71e1e;    --red-ink: #ffffff;
  --blue: #1e4bd7;   --blue-ink: #ffffff;
  --teal: #0c7866;   --teal-ink: #ffffff;
  --yellow: #ffe927; --yellow-ink: #111111;
  --scrim: rgba(0, 0, 0, 0.55);
  --focus: #ffe927;           /* focus ring; redefined on light grounds and yellow fields */
  --err: #ff7a7a;             /* 6.96:1 on the dark ground */
  --black: #0d0d0d;
  --on-dark: #ffffff;
  --on-light: #111111;
  --deck-1: #1e4bd7; --deck-2: #1a3fb4; --deck-3: #2a5bf0;
  --veil: rgba(127, 127, 127, 0.12);
  --check: rgba(0, 0, 0, 0.08);

  --font-display: "Young Serif", Georgia, serif;
  --font-text: "Source Serif 4", Georgia, serif;

  /* five size steps */
  --step-small: clamp(0.9375rem, 0.92rem + 0.1vw, 1rem);
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.5rem, 1rem + 8.3vw, 8rem);

  --m: clamp(16px, 2.2vw, 32px);           /* the page margin */
  --axis: 42vw;                             /* the column line */
  --section: clamp(72px, 7vw, 128px);       /* gap between sections */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f2f0;
  --surface: #e4e4e0;
  --surface-2: #d8d8d3;
  --ink: #111111;
  --muted: #555555;
  --accent: #0a6656;
  --accent-hover: #075446;
  --scrim: rgba(0, 0, 0, 0.5);
  --focus: #111111;
  --err: #b3121b;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f2f0;
    --surface: #e4e4e0;
    --surface-2: #d8d8d3;
    --ink: #111111;
    --muted: #555555;
    --accent: #0a6656;
    --accent-hover: #075446;
    --scrim: rgba(0, 0, 0, 0.5);
  --focus: #111111;
  --err: #b3121b;
    color-scheme: light;
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--yellow); color: var(--yellow-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* coloured fields set their own ring: dark on yellow, yellow on red, blue and teal */
.f-yellow { --focus: var(--on-light); }
.f-red, .f-blue, .f-teal, .site-foot, .sheet, .card, .panel, .routes .f-red, .routes .f-teal { --focus: #ffe927; }
html { scrollbar-color: var(--surface-2) var(--bg); }
input, textarea { caret-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--m); top: -100px; z-index: 50; background: var(--yellow); color: var(--yellow-ink); padding: 12px 16px; text-decoration: none; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 0.98; text-wrap: balance; }
h4 { font-family: var(--font-text); font-weight: 600; font-size: var(--step-lead); line-height: 1.2; }
p { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- frame: margin + axis ---------- */
.wrap { padding-inline: var(--m); }
.axis {
  display: grid;
  grid-template-columns: calc(var(--axis) - var(--m)) minmax(0, 1fr);
  padding-inline: var(--m);
}
.axis > .side { padding-right: clamp(24px, 4vw, 64px); }
.axis > .main { grid-column: 2; }
.section { margin-top: var(--section); }
.measure { max-width: 38ch; }
.measure-wide { max-width: 62ch; }

@media (max-width: 860px) {
  :root { --axis: 0px; }
  .axis { grid-template-columns: minmax(0, 1fr); }
  .axis > .side { padding-right: 0; }
  .axis > .main { grid-column: 1; }
}

/* ---------- header ---------- */
.site-head {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: stretch;
  min-height: 64px;
  background: var(--bg);
}
.site-head .mark {
  display: flex; align-items: center;
  background: var(--black);
  padding: 0 var(--m);
  flex: 0 0 auto;
}
:root[data-theme="light"] .site-head .mark { background: var(--on-light); }
.site-head .mark img { width: 132px; height: auto; }
.site-head .tab {
  display: flex; align-items: center; gap: clamp(16px, 2.2vw, 36px);
  background: transparent;
  color: var(--ink);
  padding: 0 clamp(20px, 2.4vw, 36px);
  width: calc(var(--axis) - 196px);
  min-width: max-content;
}
.site-head .tab a { text-decoration: none; font-size: var(--step-small); font-weight: 600; padding: 10px 0; position: relative; }
.site-head .tab a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease-out); /* taste-skill-ignore: underline grows from the left edge */
}
.site-head .tab a:hover::after, .site-head .tab a[aria-current="page"]::after { transform: scaleX(1); }
.site-head .tools { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-right: var(--m); }
.site-head .tools a.link { font-size: var(--step-small); font-weight: 600; text-decoration: none; padding: 10px 12px; }
.site-head .tools a.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer; color: var(--ink);
  transition: background-color 200ms, transform 120ms;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

@media (max-width: 1100px) {
  .site-head .tools a.link.hide-md { display: none; }
}
@media (max-width: 860px) {
  .site-head .tab { display: none; }
  .site-head .tools .btn { display: none; }
  .menu-btn { display: grid; width: 44px; padding: 0; }
}

/* mobile menu sheet */
.sheet {
  position: fixed; inset: 0; z-index: 40;
  background: var(--accent); color: var(--accent-ink);
  display: flex; flex-direction: column; padding: 16px var(--m) 32px;
  display: none;
}
.sheet[data-open="true"] { display: flex; animation: sheet-in 450ms var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(-100%); } to { transform: none; } }
.sheet .sheet-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.sheet .sheet-top img { width: 120px; }
.sheet .icon-btn { color: var(--accent-ink); }
.sheet .icon-btn:hover { background: var(--scrim); }
.sheet nav { margin-top: 24px; display: grid; gap: 4px; }
.sheet nav a { font-family: var(--font-display); font-size: 12vw; line-height: 1.05; text-decoration: none; letter-spacing: -0.02em; }
.sheet .sheet-foot { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 0; cursor: pointer;
  font-family: var(--font-text); font-weight: 600; font-size: var(--step-small);
  text-decoration: none; white-space: nowrap;
  transition: background-color 200ms, transform 120ms var(--ease-out);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.ink:hover { background: var(--muted); }
.btn.sm { min-height: 40px; padding: 0 16px; }
.btn .arrow { transition: transform 250ms var(--ease-out); }
.btn:hover .arrow, .text-link:hover .arrow { transform: translateX(4px); }
/* inline-block so the arrow (an atomic inline) is never underlined, only the words */
.text-link {
  display: inline-block;
  padding-block: 10px;
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.text-link:hover { text-decoration-color: var(--accent); }
.text-link .arrow { display: inline-block; margin-left: 8px; transition: transform 250ms var(--ease-out); }

/* home first screen: standfirst left, title centred, actions right */
@media (min-width: 861px) {
  .hero.home { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: clamp(24px, 3vw, 56px); align-items: center; padding-top: clamp(28px, 3.5vw, 56px); }
  .hero.home .main { display: contents; }
  .hero.home h1 { grid-column: 2; grid-row: 1; text-align: center; }
  .hero.home .side { grid-column: 1; grid-row: 1; align-self: center; padding: 0; }
  .hero.home .main > .after { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; }
  .hero.home .actions { margin-top: 0; flex-direction: column; align-items: flex-end; gap: 8px; }
  .hero.home .standfirst { max-width: 26ch; }
}

/* ---------- masthead mosaic ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 1fr);
  height: 48svh;
  min-height: 300px;
}
.mosaic.short { height: 30svh; min-height: 220px; grid-template-rows: 1fr; }
.mosaic > * { position: relative; overflow: hidden; min-width: 0; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.mosaic .wide { grid-column: span 2; }
.mosaic .tall { grid-row: span 2; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(16px, 1.4vw, 22px);
  text-decoration: none;
  transition: filter 250ms;
}
a.tile:hover { filter: brightness(1.1); }
.tile .t-name { font-family: var(--font-display); font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); line-height: 1.08; letter-spacing: -0.01em; }
.tile .t-count { font-family: var(--font-display); font-size: clamp(2.25rem, 1rem + 3vw, 4rem); line-height: 0.9; letter-spacing: -0.03em; }
.tile.small-count .t-count { font-size: var(--step-lead); line-height: 1.2; font-family: var(--font-text); font-weight: 600; letter-spacing: 0; }
.f-red { background: var(--red); color: var(--red-ink); }
.f-blue { background: var(--blue); color: var(--blue-ink); }
.f-teal { background: var(--teal); color: var(--teal-ink); }
.f-yellow { background: var(--yellow); color: var(--yellow-ink); }
.f-ink { background: var(--black); color: var(--on-dark); }
.f-surface { background: var(--surface); color: var(--ink); }
.mosaic figure img { transform: scale(1.02); transition: transform 1.6s var(--ease-out), filter 600ms; }
.mosaic figure:hover img { transform: scale(1.06); filter: grayscale(0) contrast(1); }

@media (max-width: 860px) {
  .mosaic { grid-template-columns: repeat(3, 1fr); height: 30svh; min-height: 220px; }
  .mosaic.short { height: 24svh; min-height: 160px; }
  .mosaic .hide-sm { display: none; }
  .mosaic .wide { grid-column: span 1; }
  .tile .t-name { font-size: 1rem; }
  .tile .t-count { font-size: 2rem; }
}

/* ---------- hero (under the band) ---------- */
.hero {
  padding-top: clamp(32px, 4vw, 64px);
  align-items: end;
}
.hero .side { align-self: end; padding-bottom: 0.6em; }
.hero .standfirst { font-size: var(--step-lead); line-height: 1.4; max-width: 30ch; }
.hero h1 {
  font-size: var(--step-display);
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-wrap: initial;
}
.hero h1.page-title { font-size: clamp(3rem, 1rem + 6.4vw, 6.5rem); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 32px; }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: block; }
.js .line > span { transform: translateY(0.3em); }
.js .ready .line > span { transform: none; transition: transform 900ms var(--ease-out); }
.js .ready .line:nth-child(2) > span { transition-delay: 110ms; }
.js .hero .after { opacity: 0; transform: translateY(12px); }
.js .ready .after, .js .ready.after { opacity: 1; transform: none; transition: opacity 700ms 450ms var(--ease-out), transform 700ms 450ms var(--ease-out); }

@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero h1 { font-size: 13vw; }
  .hero h1.page-title { font-size: 12.5vw; }
  .hero .side { order: 2; margin-top: 20px; padding-bottom: 0; }
  .hero .standfirst { font-size: 1.125rem; max-width: none; }
}

/* ---------- section headings ---------- */
.h-section { font-size: var(--step-head); margin-bottom: clamp(24px, 3vw, 48px); }
.h-mid { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem); line-height: 1.02; }
.lead { font-size: var(--step-lead); line-height: 1.4; }
.small { font-size: var(--step-small); line-height: 1.45; }
.muted { color: var(--muted); }
.meta { font-size: var(--step-small); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.meta .type { color: var(--ink); font-weight: 600; text-transform: capitalize; }
.prose p + p { margin-top: 1em; }

/* ---------- the lead story ---------- */
.lead-story { align-items: start; }
.lead-story .pic { position: relative; }
.lead-story .pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.lead-story .pic figcaption { margin-top: 10px; }
.lead-story h2 { font-size: clamp(1.5rem, 1rem + 1.1vw, 2rem); line-height: 1.1; margin-bottom: 18px; }
.lead-story h2 a { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 3px; text-underline-offset: 8px; transition: text-decoration-color 300ms; }
.lead-story h2 a:hover { text-decoration-color: currentColor; }
.lead-story .excerpt { margin-top: 28px; max-width: 46ch; }
.lead-story .meta .type { text-transform: none; }
.lead-story .foot { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
@media (max-width: 860px) {
  .lead-story .pic { margin-bottom: 28px; }
  .lead-story h2 { font-size: 1.25rem; }
}

/* ---------- spines deck (pinned latest) ---------- */
.deck-wrap { position: relative; }   /* height is set by script: the stage plus the scroll it pins for */
.deck-stage { position: sticky; top: max(72px, calc(50svh - 300px)); display: flex; flex-direction: column; padding-inline: var(--m); overflow: hidden; }
.deck-stage .h-section { margin-bottom: 40px; }
.deck { position: relative; height: 380px; overflow: hidden; }
.card {
  position: absolute; top: 0; left: 0; height: 100%;
  width: var(--card-w, 620px);
  padding: 32px;
  display: flex; flex-direction: column;
  text-decoration: none;
  overflow: hidden;
  transition: transform 650ms var(--ease-in-out), width 650ms var(--ease-in-out);
  will-change: transform;
}
.card:nth-child(3n+1) { background: var(--deck-1); color: var(--on-dark); }
.card:nth-child(3n+2) { background: var(--deck-2); color: var(--on-dark); }
.card:nth-child(3n+3) { background: var(--deck-3); color: var(--on-dark); }
.card .c-meta { font-size: var(--step-small); display: flex; gap: 12px; font-weight: 600; white-space: nowrap; }
.card .c-title { display: block; font-family: var(--font-display); font-size: 1.625rem; line-height: 1.12; letter-spacing: -0.01em; margin-top: 20px; min-width: 556px; max-width: 556px; transition: opacity 300ms; }
.card .c-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; max-width: 120px; padding: 28px 0; display: flex; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: var(--step-small); font-weight: 600; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 300ms; }
.card[data-state="spine"] .c-title { opacity: 0; visibility: hidden; }
.card[data-state="spine"] .c-spine { opacity: 1; visibility: visible; transition-delay: 250ms; }
.card p { margin-top: 16px; font-size: 1rem; line-height: 1.5; min-width: 556px; max-width: 556px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .c-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: 1rem; min-width: 556px; max-width: 556px; }
.card .c-foot span:last-child { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.card[data-state="spine"] { cursor: pointer; }
.card[data-state="spine"] .c-meta, .card[data-state="spine"] p, .card[data-state="spine"] .c-foot { opacity: 0; transition: opacity 200ms; }
.card .c-meta, .card p, .card .c-foot { transition: opacity 400ms 250ms; }
.deck-foot { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.deck-foot .progress { display: flex; gap: 6px; }
.deck-foot .progress i { display: block; width: 28px; height: 6px; background: var(--surface-2); transition: background-color 300ms; }
.deck-foot .progress i[data-on="true"] { background: var(--blue); }

@media (max-width: 860px), (max-height: 640px) {
  .deck-wrap { height: auto; }
  .deck-stage { position: static; height: auto; padding-block: 0; overflow: visible; }
  /* snap carousel — cards same size, next one peeks */
  .deck {
    height: auto;
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: scroll;
    /* snap enabled after load (.loaded): re-snapping during load counts as a scroll and stops LCP */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .deck::-webkit-scrollbar { display: none; }
  .card {
    position: relative;
    flex: 0 0 calc(100% - 36px);
    transform: none !important;
    padding: 20px;
    min-height: 0;
    scroll-snap-align: start;
  }
  .card .c-title, .card p, .card .c-foot { min-width: 0; max-width: none; }
  .card .c-title { font-size: 1.15rem; margin-top: 12px; }
  .card p { margin-top: 10px; -webkit-line-clamp: 2; font-size: .9rem; }
  .card .c-spine { display: none; }
  .card .c-foot { margin-top: 16px; font-size: .875rem; }
  .card[data-state] .c-meta, .card[data-state] p, .card[data-state] .c-foot { opacity: 1; }
  /* dot indicators */
  .deck-foot .progress { display: flex; }
  .deck-foot .progress i { width: 20px; height: 4px; }
}

/* ---------- unequal panels band ---------- */
.panels { display: flex; height: 68svh; min-height: 420px; }
.panel {
  position: relative; flex: var(--g, 2) 1 0; min-width: 0; overflow: hidden;
  text-decoration: none; color: var(--on-dark);
  overflow: hidden; isolation: isolate;
}
/* full colour, sharp sources; hover only moves the picture on the compositor (transform), never the layout */
.panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translateZ(0) scale(1); backface-visibility: hidden; transition: transform 900ms var(--ease-out); }
.panel:hover img, .panel:focus-visible img { transform: translateZ(0) scale(1.04); }
.panel .p-label {
  position: absolute; left: 0; top: 0; right: 0;
  padding: 22px 24px 40px;
  background: var(--scrim);
  padding-bottom: 22px;
  right: auto; max-width: 78%;
}
.panel .p-label h3 { font-size: var(--step-lead); line-height: 1.1; max-width: 14ch; }
.panel .p-label p { margin-top: 8px; font-size: var(--step-small); max-width: 32ch; opacity: 0; transform: translateY(8px); transition: opacity 400ms, transform 400ms var(--ease-out); }
.panel:hover .p-label p, .panel:focus-visible .p-label p { opacity: 1; transform: none; }
.panel .p-count { position: absolute; left: 24px; bottom: 20px; font-family: var(--font-display); font-size: var(--step-head); line-height: 1; background: var(--scrim); padding: 6px 12px 10px; left: 0; bottom: 0; }
@media (hover: hover) and (min-width: 861px) {
  .panel { transition: none; }
}
.panels-caption { margin-top: 14px; }
@media (max-width: 860px) {
  .panels {
    display: flex;
    flex-direction: row;
    height: 56svh;
    min-height: 300px;
    overflow-x: scroll;
    /* snap enabled after load (.loaded): re-snapping during load counts as a scroll and stops LCP */
    scroll-snap-padding-inline-start: var(--m);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-inline: var(--m);
  }
  .panels::-webkit-scrollbar { display: none; }
  .panel {
    flex: 0 0 72vw;
    min-width: 0;
    scroll-snap-align: start;
  }
  .panel:nth-child(3) { order: 0; }
  .panel .p-label p { opacity: 1; transform: none; }
  .panel .p-label { padding: 16px 20px 18px; max-width: 100%; }
  .panel .p-count { font-size: 2rem; padding: 6px 16px 10px; }
}

/* ---------- topic picker (live) ---------- */
.picker { margin-top: clamp(40px, 5vw, 80px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--surface); color: var(--ink);
  font-size: var(--step-small); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background-color 200ms, color 200ms, transform 120ms;
}
.chip:hover { background: var(--surface-2); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.chip .n { font-weight: 400; opacity: 0.75; font-variant-numeric: tabular-nums; }
.picked { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.picked .count { font-family: var(--font-display); font-size: clamp(5rem, 2rem + 8vw, 10rem); line-height: 0.85; letter-spacing: -0.04em; }
.picked .count-label { margin-top: 12px; }
.picked ol { list-style: none; padding: 0; display: grid; gap: 4px; }
.picked li a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: center; padding: 12px; margin-inline: -12px; text-decoration: none; transition: background-color 200ms; }
.picked li a:hover { background: var(--surface); }
.picked li img { width: 96px; height: 64px; object-fit: cover; }
.picked li .t { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; }
.picked li .d { font-size: var(--step-small); color: var(--muted); margin-top: 4px; }
@media (max-width: 860px) {
  .picked { grid-template-columns: 1fr; }
  .picked .count { font-size: 5rem; }
  .picked li a { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .picked li img { width: 72px; height: 54px; }
  .picked li .t { font-size: 1.0625rem; }
}

/* ---------- many into one (method) ---------- */
.method .diagram { margin-top: clamp(40px, 5vw, 72px); }
.method .diagram svg { width: 100%; height: auto; }
.method .diagram .sq { transition: transform 900ms var(--ease-out), opacity 600ms; }
.js .method:not(.in) .diagram .sq { opacity: 0; }
.method .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); margin-top: 32px; list-style: none; padding: 0; }
.method .steps h3 { font-family: var(--font-text); font-weight: 600; font-size: 1.25rem; letter-spacing: 0; line-height: 1.2; }
.method .steps p { margin-top: 8px; font-size: 1rem; max-width: 40ch; }
.method .diagram .v { display: none; }
@media (max-width: 860px) {
  .method .layout { display: block; }
  .method .diagram { display: none; }
  .method .steps { grid-template-columns: 1fr; margin-top: 24px; gap: 16px; }
  .method .steps li { align-self: auto; }
}

/* ---------- photo strip + field (subscribe CTA) ---------- */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip video { width: 100%; height: 40svh; min-height: 240px; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.strip img { width: 100%; height: 40svh; min-height: 240px; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.field-band { padding: clamp(48px, 6vw, 96px) var(--m); min-height: 44svh; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px); align-items: end; }
.field-band .h-section { margin-bottom: 20px; }
.field-band .statement { font-family: var(--font-display); font-size: clamp(1.5rem, 1rem + 1.2vw, 2.25rem); line-height: 1.12; letter-spacing: -0.015em; max-width: 24ch; }
.field-band .statement a { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.field-band .statement a:hover { text-decoration-thickness: 6px; }
.field-band .sub { margin-top: 32px; font-size: 1rem; max-width: 46ch; }
@media (max-width: 860px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .strip img:first-child { grid-column: span 2; height: auto; aspect-ratio: 4 / 3; }
  .strip img, .strip video { height: auto; aspect-ratio: 1; min-height: 0; }
  .field-band { grid-template-columns: 1fr; }
}

/* ---------- forms ---------- */
.form { display: grid; gap: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: var(--step-small); font-weight: 600; }
.field .hint { font-size: var(--step-small); opacity: 0.8; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: transparent; color: inherit;
  border: 2px solid currentColor; border-radius: 0;
  font-size: 1.0625rem;
  transition: background-color 200ms, border-color 200ms;
}
.input::placeholder, .textarea::placeholder { color: inherit; opacity: 0.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; background: var(--veil); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.textarea { min-height: 160px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.select option { color: #111; background: #fff; }
.field[data-invalid="true"] .input, .field[data-invalid="true"] .textarea, .field[data-invalid="true"] .select { border-color: var(--err); }
.field .err { font-size: var(--step-small); color: var(--err); font-weight: 600; display: none; }
.f-yellow .field .err, .f-red .field .err { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; }
.f-yellow .field[data-invalid="true"] .input { border-width: 3px; border-color: var(--on-light); }
.field[data-invalid="true"] .err { display: block; }
.inline-sub { display: flex; gap: 0; max-width: 520px; }
.inline-sub .input { border-right: 0; }
.inline-sub .btn { min-height: 52px; }

.form-status { font-weight: 600; min-height: 1.5em; }
.counter { font-size: var(--step-small); opacity: 0.8; text-align: right; font-variant-numeric: tabular-nums; }
fieldset { border: 0; padding: 0; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.check span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: var(--surface); font-size: var(--step-small); font-weight: 600; transition: background-color 200ms, color 200ms; }
.check input:checked + span { background: var(--ink); color: var(--bg); }
.check input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check:hover span { background: var(--surface-2); }
.check input:checked:hover + span { background: var(--ink); }
@media (max-width: 860px) {
  .form .row { grid-template-columns: 1fr; }
  .inline-sub { flex-direction: column; gap: 8px; }
  .inline-sub .input { border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
}

/* ---------- footer: contact as the headline ---------- */
.site-foot {
  margin-top: var(--section);
  background: var(--teal); color: var(--teal-ink);
  display: flex; flex-direction: column;
  padding: clamp(28px, 3.5vw, 48px) var(--m) 28px;
}
.site-foot .top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; font-size: var(--step-small); }
.site-foot .top img { width: 120px; margin-bottom: 14px; }
.site-foot .top nav { display: grid; gap: 2px; align-content: start; }
.site-foot .top nav a { text-decoration: none; padding: 3px 0; }
.site-foot .top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-foot .top .label { font-weight: 600; margin-bottom: 6px; }
.site-foot .say { margin-top: clamp(28px, 3vw, 48px); }
.site-foot .say p { font-size: var(--step-lead); margin-bottom: 16px; position: relative; z-index: 1; }
.site-foot .mail {
  display: block; padding-top: 0.06em; font-family: var(--font-display); text-decoration: none;
  font-size: clamp(2.5rem, 0.5rem + 7vw, 8rem); line-height: 0.9; letter-spacing: -0.045em;
  white-space: nowrap;
}
.site-foot .mail span { display: inline-block; transition: transform 500ms var(--ease-out); }
.site-foot .mail:hover span { transform: translateX(0.04em); }
.site-foot .mail:hover { text-decoration: underline; text-decoration-thickness: 0.04em; text-underline-offset: 0.08em; }
.site-foot .meta-row { margin-top: 24px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px 24px; font-size: 0.875rem; }
.site-foot .meta-row > :nth-child(2) { text-align: center; }
.site-foot .meta-row > :last-child { text-align: right; }
.site-foot .meta-row a { text-underline-offset: 3px; }
@media (max-width: 860px) {
  .site-foot { min-height: auto; }
  .site-foot .top { grid-template-columns: 1fr 1fr; gap: 20px 24px; }
  .site-foot .top > div:first-child { grid-column: 1 / -1; }
  .site-foot .mail { font-size: 12vw; white-space: normal; line-height: 1.05; }
  .site-foot .mail .at { display: block; }
  .site-foot .meta-row { grid-template-columns: 1fr; font-size: 0.875rem; }
  .site-foot .meta-row > * { text-align: left !important; }
}

/* ---------- library ---------- */
.lib-tools { display: grid; gap: 24px; }
.search { position: relative; max-width: 640px; }
.search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; opacity: 0.7; pointer-events: none; }
.search .input { padding-left: 48px; font-size: var(--step-lead); min-height: 64px; border-width: 0; background: var(--surface); }
.search .input:focus { background: var(--surface-2); }
.filter-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; align-items: start; }
.filter-row > span { font-size: var(--step-small); font-weight: 600; padding-top: 9px; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.entries { list-style: none; padding: 0; }
.entry > a {
  display: grid; grid-template-columns: calc(var(--axis) - var(--m)) minmax(0, 1fr) 200px;
  gap: 0 clamp(20px, 3vw, 48px);
  padding: 28px var(--m); margin-inline: calc(var(--m) * -1);
  text-decoration: none; align-items: start;
  transition: background-color 200ms;
}
.entry > a:hover { background: var(--surface); }
.entries .entry:nth-child(even) > a { background: color-mix(in srgb, var(--surface) 45%, transparent); }
.entries .entry:nth-child(even) > a:hover { background: var(--surface); }
.entry .when { font-size: var(--step-small); display: grid; gap: 2px; }
.entry .when .type { font-weight: 600; text-transform: capitalize; }
.entry .when .tp { color: var(--muted); }
.entry h3 { font-size: clamp(1.375rem, 1rem + 0.9vw, 1.875rem); line-height: 1.1; max-width: 30ch; }
.entry p { margin-top: 10px; font-size: 1rem; max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry img { width: 200px; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 400ms; }
.entry > a:hover img { filter: none; }
.entry .ext { font-size: var(--step-small); color: var(--muted); margin-top: 10px; display: inline-block; }
.more { margin-top: 32px; display: flex; justify-content: center; }
.empty { padding: 64px 0; }
.empty h3 { font-size: var(--step-lead); font-family: var(--font-text); font-weight: 600; letter-spacing: 0; }
@media (max-width: 1100px) { .entry > a { grid-template-columns: 180px minmax(0, 1fr) 160px; } .entry img { width: 160px; } }
@media (max-width: 860px) {
  .entry > a { grid-template-columns: minmax(0, 1fr) 96px; gap: 8px 16px; padding: 20px var(--m); }
  .entry .when { grid-column: 1 / -1; display: flex; gap: 10px; }
  .entry img { width: 96px; grid-row: 2; grid-column: 2; }
  .entry h3 { font-size: 1.25rem; }
  .filter-row { grid-template-columns: 1fr; }
  .filter-row > span { padding-top: 0; }
  .chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--m) * -1); padding-inline: var(--m); scrollbar-width: none; }
  .chips.scroll .chip { flex: 0 0 auto; }
}

/* ---------- article ---------- */
.crumbs { font-size: var(--step-small); padding-top: 28px; }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--muted); display: inline-block; max-width: 40ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.art-head { padding-top: clamp(32px, 5vw, 72px); }
.art-head h1 { font-size: clamp(2.25rem, 1rem + 3.6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; max-width: 22ch; }
.art-head .dek { margin-top: 28px; font-size: var(--step-lead); line-height: 1.4; max-width: 46ch; }
.art-side { display: grid; gap: 22px; align-content: start; font-size: var(--step-small); }
.art-side .k { font-weight: 600; margin-bottom: 4px; }
.art-side .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.art-side .tags a { background: var(--surface); padding: 6px 10px; text-decoration: none; transition: background-color 200ms; }
.art-side .tags a:hover { background: var(--surface-2); }
.art-side .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.art-figure { margin-top: clamp(40px, 5vw, 72px); }
.art-figure img { width: 100%; max-height: 78svh; aspect-ratio: 16 / 9; object-fit: cover; }
.art-figure figcaption { padding: 12px var(--m) 0; font-size: var(--step-small); color: var(--muted); }
.art-body { margin-top: clamp(48px, 6vw, 96px); }
.art-body .prose { max-width: 40rem; font-size: var(--step-body); line-height: 1.65; }
.art-body .prose h2 { font-size: clamp(1.625rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.08; margin: 1.8em 0 0.6em; }
.art-body .prose h2:first-child { margin-top: 0; }
.art-body .prose p { margin-top: 1em; }
.art-body .prose h2 + p { margin-top: 0; }
.art-body .prose a { text-underline-offset: 3px; }
.art-body .prose sup { line-height: 0; }
.art-body .prose a.cite {
  display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 4px; margin-left: 2px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-size: 0.7rem; font-weight: 600; vertical-align: 0.35em;
  transition: background-color 200ms;
}
.art-body .prose a.cite:hover { background: var(--accent-hover); }
.art-body .side .sticky { position: sticky; top: 24px; }
.sources { margin-top: clamp(56px, 6vw, 96px); }
.sources ol { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 20px; max-width: 40rem; }
.sources li a { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 14px 16px; background: var(--surface); text-decoration: none; transition: background-color 200ms; }
.sources li a:hover { background: var(--surface-2); }
.sources li:target a { background: var(--accent); color: var(--accent-ink); }
.sources .sn { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.sources .su { font-size: var(--step-small); opacity: 0.8; word-break: break-all; display: block; margin-top: 4px; }
.reading-bar { position: fixed; left: 0; top: 0; height: 4px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 30; }
.related { margin-top: var(--section); }
.related-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0; }
.related-grid a { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 420px; padding: 24px; text-decoration: none; color: var(--on-dark); overflow: hidden; }
.related-grid a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(0.6); transition: filter 500ms, transform 1s var(--ease-out); }
.related-grid a:hover img { filter: grayscale(0) brightness(0.55); transform: scale(1.03); }
.related-grid a > * { position: relative; }
.related-grid .t { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.12; max-width: 22ch; }
.related-grid a:first-child .t { font-size: clamp(1.75rem, 1rem + 1.6vw, 2.5rem); }
.related-grid .d { font-size: var(--step-small); margin-bottom: 10px; font-weight: 600; }
@media (max-width: 860px) {
  .art-side { margin-top: 28px; grid-template-columns: 1fr 1fr; }
  .art-head h1 { font-size: 2.25rem; }
  .art-body .side { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .related-grid a { min-height: 280px; }
  .crumbs [aria-current] { max-width: 22ch; }
}

/* ---------- topics wall ---------- */
.wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 11vw, 170px); grid-auto-flow: dense; }
.wall .tile { transition: filter 250ms, opacity 400ms; }
.wall .tile .t-name { font-size: var(--step-lead); font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; max-width: 16ch; }
.wall .tile .t-latest { font-size: var(--step-small); line-height: 1.35; max-width: 40ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wall .tile .t-bottom { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.wall .tile[data-dim="true"] { opacity: 0.18; }
.wall .s-xl { grid-column: span 6; grid-row: span 2; }
.wall .s-l { grid-column: span 4; grid-row: span 2; }
.wall .s-m { grid-column: span 4; }
.wall .s-s { grid-column: span 3; }
.wall .s-xs { grid-column: span 2; }
.wall .s-xs .t-name, .wall .s-s .t-name { font-size: 1.125rem; }
.wall .s-xs .t-latest, .wall .s-s .t-latest, .wall .s-m .t-latest { display: none; }
.wall .s-xl .t-count { font-size: clamp(4rem, 2rem + 6vw, 8rem); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--step-small); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; display: inline-block; }
@media (max-width: 860px) {
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 132px; }
  .wall .s-xl, .wall .s-l { grid-column: span 2; grid-row: span 1; }
  .wall .s-m, .wall .s-s, .wall .s-xs { grid-column: span 1; grid-row: span 1; }
  .wall .tile .t-latest { display: none; }
  .wall .tile .t-name { font-size: 1.0625rem !important; }
  .wall .s-xl .t-count { font-size: 3rem; }
}

/* ---------- services ---------- */
.svc-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.svc-table th { text-align: left; font-size: var(--step-small); font-weight: 600; padding: 0 16px 14px 0; color: var(--muted); }
.svc-table td { padding: 28px 24px 28px 0; vertical-align: top; border-top: 2px solid var(--surface-2); }
.svc-table td:first-child { width: 46%; }
.svc-table h3 { font-size: clamp(1.5rem, 1rem + 1.2vw, 2.25rem); line-height: 1.05; }
.svc-table td p { margin-top: 10px; max-width: 46ch; }
.svc-table .big { font-family: var(--font-display); font-size: var(--step-lead); line-height: 1.15; }
.svc-table tr { transition: background-color 200ms; }
.svc-table tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
@media (max-width: 860px) {
  .svc-table thead { display: none; }
  .svc-table, .svc-table tbody, .svc-table tr, .svc-table td { display: block; width: auto !important; }
  .svc-table tr { padding: 24px 0; border-top: 2px solid var(--surface-2); }
  .svc-table td { border: 0; padding: 6px 0; }
  .svc-table td[data-k]::before { content: attr(data-k); display: block; font-size: var(--step-small); font-weight: 600; color: var(--muted); }
}
.route { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.route li { padding: 28px 20px 32px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; }
.route li:nth-child(1) { background: var(--surface); }
.route li:nth-child(2) { background: var(--surface-2); }
.route li:nth-child(3) { background: var(--blue); color: var(--blue-ink); }
.route li:nth-child(4) { background: var(--red); color: var(--red-ink); }
.route li:nth-child(5) { background: var(--yellow); color: var(--yellow-ink); }
.route li:nth-child(6) { background: var(--teal); color: var(--teal-ink); }
.route h3 { font-size: clamp(1.375rem, 1rem + 0.8vw, 1.75rem); line-height: 1.05; }
.route p { font-size: 1rem; line-height: 1.45; }
@media (max-width: 1100px) { .route { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .route { grid-template-columns: 1fr; } .route li { min-height: 0; gap: 20px; } }

/* ---------- about / standards ---------- */
.standards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(32px, 4vw, 64px); }
.standards h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 0.9vw, 2rem); line-height: 1.05; }
.standards p { margin-top: 10px; font-size: 1rem; max-width: 44ch; }
@media (max-width: 860px) { .standards { grid-template-columns: 1fr; } }
.colour-page { padding: clamp(48px, 6vw, 96px) var(--m); }
.colour-page blockquote, .colour-page .big-statement { font-family: var(--font-display); font-size: clamp(1.625rem, 1rem + 1.8vw, 2.25rem); line-height: 1.15; letter-spacing: -0.015em; max-width: 30ch; }
.colour-page .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 96px); }
.colour-page .pair h2 { font-size: var(--step-head); margin-bottom: 24px; }
.colour-page .pair p { font-size: var(--step-lead); line-height: 1.4; max-width: 34ch; }
@media (max-width: 860px) { .colour-page .pair { grid-template-columns: 1fr; } }

/* ---------- contact routes ---------- */
.routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.routes a { display: flex; flex-direction: column; gap: 10px; min-height: 280px; padding: 28px 24px; text-decoration: none; transition: filter 250ms; }
.routes a:hover { filter: brightness(1.08); }
.routes h3 { font-size: clamp(1.5rem, 1rem + 1vw, 2rem); line-height: 1.05; }
.routes .addr { margin-top: auto; font-family: var(--font-display); font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); word-break: break-word; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
@media (max-width: 860px) { .routes { grid-template-columns: 1fr; } .routes a { min-height: 200px; } }

/* ---------- legal ---------- */
.legal .prose { max-width: 40rem; }
.legal .prose h2 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); margin: 1.8em 0 0.5em; line-height: 1.08; }
.legal .prose ul { padding-left: 1.2em; margin-top: 0.8em; display: grid; gap: 0.4em; }
.legal .toc { position: sticky; top: 24px; display: grid; gap: 2px; font-size: var(--step-small); }
.legal .toc a { text-decoration: none; padding: 6px 0; }
.legal .toc a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) { .legal .toc { display: none; } }

/* ---------- reveal motion ---------- */
.js [data-reveal] > * { opacity: 0; transform: translateY(24px); }
.js [data-reveal].in > * { opacity: 1; transform: none; transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.js [data-reveal].in > *:nth-child(2) { transition-delay: 80ms; }
.js [data-reveal].in > *:nth-child(3) { transition-delay: 160ms; }
.js [data-reveal].in > *:nth-child(4) { transition-delay: 240ms; }
.js [data-reveal].in > *:nth-child(n+5) { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .line > span, .js .hero .after, .js [data-reveal] > *, .js .method:not(.in) .diagram .sq { transform: none !important; opacity: 1 !important; }
}

@media print {
  :root, :root[data-theme] { --bg: #fff; --surface: #f0f0f0; --surface-2: #e0e0e0; --ink: #000; --muted: #444; --accent: #000; --accent-ink: #fff; }
  .site-head, .site-foot, .sheet, .reading-bar, .related, .art-side .acts, .skip, .mosaic, .strip, .video-ctl { display: none !important; }
  body { background: #fff; color: #000; }
  .js [data-reveal] > *, .js .line > span, .js .hero .after, .js .mosaic > * { opacity: 1 !important; transform: none !important; }
  img { filter: none !important; break-inside: avoid; }
  .art-body .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
}

/* team: volume bars */
.beat { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; text-decoration: none; padding: 14px 18px; isolation: isolate; }
.beat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--surface); z-index: -1; transform-origin: left; transition: background-color 200ms; }
.beat:hover::before { background: var(--accent); }
.js [data-reveal] .beat::before { transform: scaleX(0); } /* taste-skill-ignore: bar grows to its value */
.js [data-reveal].in .beat::before { transform: none; transition: transform 1s var(--ease-out); }

@media (prefers-reduced-motion: reduce) { .strip .clip { display: none; } .strip { grid-template-columns: repeat(2, 1fr); } }

/* phone: the masthead is a pure colour-and-picture band; tile words stay for screen readers */
@media (max-width: 860px) {
  .mosaic .tile > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .panel .p-label h3 { font-size: 1rem; hyphens: auto; overflow-wrap: anywhere; }
}
.picked li .t, .picked li .d { display: block; }
@media (max-width: 860px) {
  .hero { display: flex; flex-direction: column; align-items: stretch; }
  .hero .main { display: contents; }
  .hero h1 { order: 1; }
  .hero .side { order: 2; }
  .hero .main > .after { order: 3; }
  .hero .actions { margin-top: 24px; }
}
@media (max-width: 860px) { .axis > .after-sm { order: 2; } .axis > .after-sm + .main { margin-bottom: 0; } .axis > .after-sm p { margin-bottom: 28px; } }

/* ---------- side figures, desks, article head ---------- */
.side-fig { margin-top: 32px; }
.side-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 500ms; }
.side-fig:hover img { filter: none; }
.side-fig figcaption { margin-top: 10px; max-width: 40ch; }
.standards.with-pics img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 18px; filter: grayscale(1) contrast(1.05); transition: filter 500ms; }
.standards.with-pics > div:hover img { filter: none; }
.art-head h1 { font-size: clamp(1.875rem, 1rem + 2.3vw, 3rem); line-height: 1.04; letter-spacing: -0.02em; max-width: none; margin-bottom: clamp(28px, 3vw, 48px); }
.art-head .dek { margin-top: 0; }
.related-grid .t { font-size: 1.375rem; }
.related-grid a:first-child .t { font-size: clamp(1.375rem, 1rem + 0.8vw, 1.75rem); }
.related-grid .d { margin: 10px 0 0; }
.entry h3 { max-width: none; font-size: clamp(1.25rem, 1rem + 0.6vw, 1.625rem); }
.hero h1.page-title { font-size: clamp(3rem, 1rem + 5.4vw, 5.5rem); }
.lead.measure-wide, .prose.lead.measure-wide { max-width: 44ch; }
.svc-table td[data-k]::before { content: attr(data-k); display: block; font-size: var(--step-small); font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.wall .tile .t-bottom { display: grid; gap: 6px; }
.wall .tile .t-latest { font-size: 1rem; }
.colour-page .pair blockquote { align-self: center; }
.site-foot .say p { max-width: none; }
.site-foot .meta-row { font-size: var(--step-small); }
.field label, .field legend { font-size: 1rem; }
@media (max-width: 860px) {
  .hero h1.page-title { font-size: 11vw; }
  .chips.scroll { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .art-head h1 { font-size: 1.625rem; }
  .side-fig { margin-bottom: 32px; }
  .main.form { max-width: none !important; }
}
@media (min-width: 601px) and (max-width: 860px) {
  .routes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .routes a { min-height: 240px; padding: 20px 16px; }
}

/* masthead cells arrive one after another */
.js .mosaic > * { opacity: 0; transform: translateY(16px); }
.js .mosaic.in > * { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .mosaic.in > :nth-child(2) { transition-delay: 60ms; }
.js .mosaic.in > :nth-child(3) { transition-delay: 120ms; }
.js .mosaic.in > :nth-child(4) { transition-delay: 180ms; }
.js .mosaic.in > :nth-child(5) { transition-delay: 240ms; }
.js .mosaic.in > :nth-child(6) { transition-delay: 300ms; }
.js .mosaic.in > :nth-child(n+7) { transition-delay: 360ms; }
@media (prefers-reduced-motion: reduce) { .js .mosaic > * { opacity: 1 !important; transform: none !important; } }

/* ---------- round 4 ---------- */
.art-head .art-figure { margin: 0 0 clamp(32px, 4vw, 56px); }
.art-head .art-figure img { max-height: 64svh; }
.related-grid .t, .related-grid a:first-child .t { font-size: 1.25rem; line-height: 1.15; }
.wall .tile .t-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wall .tile .t-top .t-count { line-height: 0.85; }
.wall .tile .t-bottom { margin-top: auto; }
.routes p { font-size: 1rem; }
.site-foot .top { font-size: 1rem; }
@media (min-width: 600px) and (max-width: 860px) { .art-head h1 { font-size: 2.25rem; } }

/* topics wall: rows that always fill, each field weighted by its count */
.wall { display: flex; flex-wrap: wrap; }
.wall .tile { flex: var(--n) 1 calc(var(--n) * 0.55%); min-width: 180px; min-height: calc(120px + var(--n) * 4px); }
.wall .s-xs .t-latest, .wall .s-s .t-latest, .wall .s-m .t-latest { display: none; }
@media (max-width: 860px) { .wall .tile { min-width: 140px; min-height: calc(110px + var(--n) * 2px); } }

/* ---------- audit fixes ---------- */
/* buttons placed on a coloured field */
.btn.on-field { background: transparent; color: inherit; border: 2px solid currentColor; }
.btn.on-field:hover { background: var(--scrim); }
.btn.ink-solid { background: var(--on-light); color: var(--on-dark); }
.btn.ink-solid:hover { background: var(--black); }
.check.on-yellow span { background: var(--check); }
/* video in the subscribe strip: a pause control */
.strip .clip { position: relative; }
.video-ctl {
  position: absolute; right: 12px; bottom: 12px;
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--black); color: var(--on-dark);
  font-size: var(--step-small); font-weight: 600;
  transition: background-color 200ms, transform 120ms;
}
.video-ctl:hover { background: var(--surface-2); }
.video-ctl:active { transform: scale(0.96); }
.video-ctl { --focus: #ffe927; }
@media (prefers-reduced-motion: reduce) { .video-ctl { display: none; } }
@media (max-width: 860px) { .shape .video-ctl { display: none; } }
@media (max-width: 860px) { .strip .clip:first-child { grid-column: span 2; } }

/* masthead tiles: a label only, set at the foot of the field */
.mosaic .tile { justify-content: flex-end; }
.mosaic .tile .t-name { font-size: clamp(1.25rem, 0.9rem + 0.9vw, 2rem); line-height: 1.05; max-width: 14ch; }

/* ---------- home masthead: photo grid with one rounded corner per cell ---------- */
.shapes {
  --bleed: 5vw;
  --gap: 12px;
  --r: clamp(40px, 5.5vw, 96px);      /* the single rounded corner */
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  width: calc(100% + 2 * var(--bleed));
  margin-left: calc(var(--bleed) * -1);
  height: min(62svh, calc(2 * (100vw + 2 * var(--bleed) - 4 * var(--gap)) / 5 + var(--gap)));
  min-height: 380px;
  padding-top: var(--gap);
}
.shape { position: relative; display: block; min-width: 0; }
.sh-link { position: absolute; inset: 0; display: block; color: var(--ink); text-decoration: none; outline-offset: 4px; }
.sh-frame { position: absolute; inset: 0; display: block; overflow: hidden; background: var(--surface); }
.sh-frame img, .sh-frame video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.sh-link:hover .sh-frame img, .sh-link:focus-visible .sh-frame img,
.sh-link:hover .sh-frame video, .sh-link:focus-visible .sh-frame video { transform: scale(1.05); }
/* one large rounded corner per cell */
.sh-corner-br .sh-frame { border-radius: 0 0 var(--r) 0; }
.sh-corner-tl .sh-frame { border-radius: var(--r) 0 0 0; }
.sh-corner-tr .sh-frame { border-radius: 0 var(--r) 0 0; }
.sh-corner-bl .sh-frame { border-radius: 0 0 0 var(--r); }
/* the one circle */
.sh-circle .sh-frame { top: 0; bottom: 0; left: 50%; right: auto; height: 100%; width: auto; aspect-ratio: 1; max-width: 100%; transform: translateX(-50%); border-radius: 50%; }

/* the topic name: a tab in the page's own colour, cut into a square corner of the picture,
   so it reads as part of the gap between cells rather than a sticker on top of the photo */
.shapes { --lp: 12px; --lq: 20px; --lr: 18px; }
.sh-label {
  position: absolute;
  display: inline-flex; align-items: baseline; gap: 0.4em;
  max-width: calc(100% - var(--r));
  background: var(--bg); color: var(--ink);
  font-family: var(--font-display); font-size: clamp(1rem, 0.75rem + 0.55vw, 1.375rem); line-height: 1.1; letter-spacing: -0.01em;
}
/* the tab always sits in a square corner that is on screen */
.lab-bl .sh-label { left: 0; bottom: 0; padding: var(--lp) var(--lq) 0 0; border-radius: 0 var(--lr) 0 0; }
.lab-br .sh-label { right: 0; bottom: 0; padding: var(--lp) 0 0 var(--lq); border-radius: var(--lr) 0 0 0; }
.lab-tl .sh-label { left: 0; top: 0; padding: 0 var(--lq) var(--lp) 0; border-radius: 0 0 var(--lr) 0; }
.lab-tr .sh-label { right: 0; top: 0; padding: 0 0 var(--lp) var(--lq); border-radius: 0 0 0 var(--lr); }
.lab-c .sh-label { left: 50%; bottom: 0; transform: translateX(-50%); padding: var(--lp) var(--lq) 0; border-radius: var(--lr) var(--lr) 0 0; max-width: 80%; white-space: nowrap; }
.sh-label .arrow { display: inline-block; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity 250ms, transform 350ms var(--ease-out); }
:root:not([data-theme="light"]) .sh-label .arrow { color: var(--yellow); }
.sh-link:hover .sh-label .arrow, .sh-link:focus-visible .sh-label .arrow { opacity: 1; transform: none; }
.shape .video-ctl { top: 10px; left: 10px; right: auto; bottom: auto; }
/* tiles stay opaque from first paint so the LCP image counts; only scale animates */
.js .shapes > .shape { transform: scale(0.96); }
.js .shapes.in > .shape { transform: none; transition: transform 1000ms var(--ease-out); }
.js .shapes.in > :nth-child(2) { transition-delay: 70ms; }
.js .shapes.in > :nth-child(3) { transition-delay: 140ms; }
.js .shapes.in > :nth-child(4) { transition-delay: 210ms; }
.js .shapes.in > :nth-child(5) { transition-delay: 280ms; }
.js .shapes.in > :nth-child(6) { transition-delay: 350ms; }
.js .shapes.in > :nth-child(7) { transition-delay: 420ms; }
.js .shapes.in > :nth-child(n+8) { transition-delay: 490ms; }
@media (max-width: 860px) {
  .shapes { --bleed: 9vw; --gap: 8px; --r: 36px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: calc((100vw + 18vw - 16px) / 3); height: auto; min-height: 0; }
  .shape { grid-column: auto !important; grid-row: auto !important; }
  .shapes .hide-sm { display: none; }
  .shapes { --lp: 7px; --lq: 10px; --lr: 12px; }
  .sh-label { font-size: 0.875rem; max-width: calc(100% - var(--bleed) - 6px); }
  .lab-c .sh-label { max-width: 92%; white-space: normal; text-align: center; }
  .lab-sm-tl .sh-label { left: 0; right: auto; top: 0; bottom: auto; padding: 0 var(--lq) var(--lp) 0; border-radius: 0 0 var(--lr) 0; }
  .sh-label .arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .js .shapes > .shape { opacity: 1 !important; transform: none !important; } }
@media print { .shapes { display: none !important; } }

.shapes-wrap { overflow: hidden; }

/* the clip's pause control: an icon button */
.video-ctl { width: 44px; height: 44px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.video-ctl svg { width: 14px; height: 14px; }
/* a clip in the left-hand column: its control sits inside the visible part of the cell */
.shape .video-ctl.ctl-tl { left: 10px; right: auto; }

/* clip control: a bare, half-transparent icon over the footage */
.shape .video-ctl { background: transparent; color: var(--on-dark); opacity: 0.72; border-radius: 0; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)); transition: opacity 200ms, transform 120ms; } /* taste-skill-ignore: legibility on bright sky, icon only */
.shape .video-ctl:hover, .shape .video-ctl:focus-visible { background: transparent; opacity: 1; }
.shape .video-ctl svg { width: 15px; height: 15px; }

/* ---------- home first screen fits the window height ----------
   The title scales with the shorter of width and height, and the photo band takes
   whatever height is left, so band + title + actions always land on the first screen. */
@media (min-width: 861px) {
  :root { --hfs: min(8.3vw, 12.5svh, 8rem); --head-h: 64px; }
  .hero.home { padding-top: clamp(20px, 3svh, 40px); }
  .hero.home h1 { font-size: max(3rem, var(--hfs)); }
  .shapes {
    height: min(
      calc(100svh - var(--head-h) - 1.8 * var(--hfs) - clamp(20px, 3svh, 40px) - 48px),
      calc(2 * (100vw + 2 * var(--bleed) - 4 * var(--gap)) / 5 + var(--gap))
    );
    min-height: 300px;
  }
}

/* topic picker: the chosen subject named large instead of a count */
.picked .picked-name { font-family: var(--font-display); font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; max-width: 12ch; }
.picked .count-label { margin-top: 16px; }

/* ---------- no yellow fields: the "yellow" role now uses the site's dark surfaces ---------- */
.f-yellow { background: var(--surface-2); color: var(--ink); --focus: var(--yellow-focus, #ffe927); --check: rgba(127, 127, 127, 0.18); }
:root[data-theme="light"] .f-yellow { --focus: #111111; }
.route li:nth-child(5) { background: var(--surface-2); color: var(--ink); }
.sh-label .arrow, :root:not([data-theme="light"]) .sh-label .arrow { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
.field-band .inline-sub .input { border-color: var(--muted); }
.field-band .inline-sub .btn.ink-solid { background: var(--accent); color: var(--accent-ink); }
.field-band .inline-sub .btn.ink-solid:hover { background: var(--accent-hover); }
form.f-yellow .btn.ink-solid { background: var(--accent); color: var(--accent-ink); }
form.f-yellow .btn.ink-solid:hover { background: var(--accent-hover); }
.f-yellow .field[data-invalid="true"] .input { border-color: var(--err); }
.site-foot .top { align-items: start; }

/* the footer sits flush under a full-bleed ending; text endings keep the section gap */
.site-foot { margin-top: 0; }
main { padding-bottom: var(--section); }
main:has(> section:last-child :is(.field-band, .colour-page, .routes, .related-grid)),
main:has(> section:last-child.related) { padding-bottom: 0; }

/* ================= inner pages in the home page's language ================= */
/* short masthead: one row of the photo grid */
.shapes.short { grid-template-rows: minmax(0, 1fr); height: clamp(200px, 30svh, 340px) !important; min-height: 0; }
@media (max-width: 860px) { .shapes.short { height: auto !important; } }

/* first screen: standfirst left, title centred, actions right — on every page */
@media (min-width: 861px) {
  .hero.page { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: clamp(24px, 3vw, 56px); align-items: center; padding-top: clamp(28px, 4svh, 56px); }
  .hero.page .main { display: contents; }
  .hero.page h1 { grid-column: 2; grid-row: 1; text-align: center; }
  .hero.page .side { grid-column: 1; grid-row: 1; align-self: center; padding: 0; }
  .hero.page .main > .after { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; }
  .hero.page .actions { margin-top: 0; flex-direction: column; align-items: flex-end; gap: 8px; }
  .hero.page .standfirst { max-width: 26ch; }
}

/* colour fields become the site's dark surfaces; teal stays the one accent */
.colour-page:is(.f-red, .f-blue, .f-teal) { background: var(--surface-2); color: var(--ink); }
.colour-page .btn.ink { background: var(--accent); color: var(--accent-ink); }
.colour-page .btn.ink:hover { background: var(--accent-hover); }
.route li:nth-child(odd) { background: var(--surface); color: var(--ink); }
.route li:nth-child(even) { background: var(--surface-2); color: var(--ink); }
.route li:last-child { background: var(--accent); color: var(--accent-ink); }
.routes { gap: 12px; padding-inline: var(--m); }
.routes a.f-red, .routes a.f-yellow { background: var(--surface-2); color: var(--ink); }
.routes a.f-teal { background: var(--accent); color: var(--accent-ink); }
.routes a:nth-child(1) { border-radius: 0 0 var(--r, 64px) 0; }
.routes a:nth-child(2) { border-radius: var(--r, 64px) 0 0 0; }
.routes a:nth-child(3) { border-radius: 0 var(--r, 64px) 0 0; }
.routes { --r: clamp(40px, 5vw, 88px); }

/* topics: photo tiles sized by volume, labelled with a tab in the page colour */
.wall { display: flex; flex-wrap: wrap; gap: 12px; --r: clamp(36px, 4vw, 72px); }
.ph-tile { position: relative; display: block; overflow: hidden; flex: var(--n) 1 calc(var(--n) * 0.55%); min-width: 200px; min-height: calc(160px + var(--n) * 4px); background: var(--surface); color: var(--ink); text-decoration: none; transition: opacity 400ms; }
.ph-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.ph-tile:hover img, .ph-tile:focus-visible img { transform: scale(1.05); }
.ph-tile.c-0 { border-radius: 0 0 var(--r) 0; }
.ph-tile.c-1 { border-radius: var(--r) 0 0 0; }
.ph-tile.c-2 { border-radius: 0 var(--r) 0 0; }
.ph-tile.c-3 { border-radius: 0 0 0 var(--r); }
.ph-label { position: absolute; left: 0; bottom: 0; display: inline-flex; gap: 0.4em; align-items: baseline; max-width: calc(100% - 24px); padding: 12px 20px 0 0; background: var(--bg); color: var(--ink); border-top-right-radius: 18px; font-family: var(--font-display); font-size: clamp(1rem, 0.8rem + 0.5vw, 1.375rem); line-height: 1.1; }
.ph-tile.c-3 .ph-label { left: auto; right: 0; padding: 12px 0 0 20px; border-radius: 18px 0 0 0; }
.ph-label .arrow { color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity 250ms, transform 350ms var(--ease-out); }
.ph-tile:hover .ph-label .arrow, .ph-tile:focus-visible .ph-label .arrow { opacity: 1; transform: none; }
.ph-tile[data-dim="true"] { opacity: 0.2; }
@media (max-width: 860px) {
  .wall { gap: 8px; --r: 28px; }
  .ph-tile { min-width: 140px; min-height: calc(130px + var(--n) * 2px); }
  .ph-label { font-size: 0.9375rem; padding: 8px 12px 0 0; border-top-right-radius: 12px; }
  .ph-tile.c-3 .ph-label { padding: 8px 0 0 12px; border-radius: 12px 0 0 0; }
}

/* photographs in colour with the grid's single rounded corner */
.entry img { filter: none; border-radius: 0 0 24px 0; }
.side-fig img, .standards.with-pics img { filter: none; border-radius: 0 0 var(--r, 56px) 0; }
.side-fig, .standards.with-pics { --r: clamp(32px, 4vw, 64px); }
.related-grid { gap: 12px; padding-inline: var(--m); --r: clamp(40px, 5vw, 88px); }
.related-grid a { border-radius: 0 0 var(--r) 0; }
.related-grid a:nth-child(2) { border-radius: var(--r) 0 0 0; }
.related-grid a:nth-child(3) { border-radius: 0 var(--r) 0 0; }
.related-grid a img { filter: brightness(0.62); }
.related-grid a:hover img { filter: brightness(0.5); }
.art-figure img { border-radius: 0 0 clamp(48px, 6vw, 112px) 0; }
.colour-page .pair img { filter: none !important; border-radius: 0 0 clamp(40px, 5vw, 88px) 0; }
.strip { gap: 12px; padding-inline: 0; }
.strip img { filter: none; }
.strip img:nth-child(1) { border-radius: 0 0 clamp(40px, 5vw, 88px) 0; }
.strip img:nth-child(2) { border-radius: clamp(40px, 5vw, 88px) 0 0 0; }
.strip img:nth-child(3) { border-radius: 0 clamp(40px, 5vw, 88px) 0 0; }
.panels { gap: 12px; }

/* ---------- scroll-to-top floating button ---------- */
.scroll-top {
  position: fixed; bottom: 24px; right: 20px; z-index: 90;
  width: 44px; height: 44px;
  background: rgba(0, 0, 0, 0.35); border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-size: 1.25rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 250ms, background-color 150ms;
}
.scroll-top.vis { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: rgba(0, 0, 0, 0.6); }
@media (hover: none) { .scroll-top { bottom: 20px; right: 16px; } }

/* ---------- section bands: a lighter grey field marks off a section ---------- */
:root { --band: #222222; }
:root[data-theme="light"] { --band: #e8e8e4; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --band: #e8e8e4; } }
.band { background: var(--band); padding-block: clamp(56px, 6vw, 104px); --surface: #2c2c2c; --surface-2: #363636; }
:root[data-theme="light"] .band { --surface: #dcdcd7; --surface-2: #d0d0ca; }
.band .picker { margin-top: 0; }
.band + .section, .section + .band { margin-top: var(--section); }
.band .side-fig, .band .standards { --r: clamp(32px, 4vw, 64px); }
/* phone: the third masthead cell bleeds off the right edge, keep its label inside the screen */
@media (max-width: 860px) { .shapes .shape .sh-label { max-width: calc(100% - var(--bleed) - 16px); } }

/* labels on cells that bleed off the screen edge: a tab standing on the bottom edge, inset by the bleed */
.lab-bl-in .sh-label { left: var(--bleed); bottom: 0; padding: var(--lp) var(--lq) 0 var(--m); border-radius: 0 var(--lr) 0 0; }
.lab-br-in .sh-label { right: var(--bleed); bottom: 0; padding: var(--lp) var(--m) 0 var(--lq); border-radius: var(--lr) 0 0 0; }
/* inner pages open straight on the title now */
.hero.page { padding-top: clamp(40px, 6svh, 80px); }

/* photo rows inside pages: same shape as the home strip, a little shorter */
.photo-row .strip img { height: clamp(220px, 32svh, 380px); }
@media (max-width: 860px) { .photo-row .strip img { height: auto; } }
.legal .side .side-fig { margin-top: 40px; }
@media (max-width: 860px) { .legal .side { display: none; } }

/* logo sits straight on the header, no block behind it; dark mark on the light theme */
.site-head .mark, :root[data-theme="light"] .site-head .mark { background: transparent; }
:root[data-theme="light"] .site-head .mark img { filter: invert(1); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .site-head .mark img { filter: invert(1); } }

/* ---------- "Pick a subject": header row, then a feature and three more, full width ---------- */
.picker { margin-top: 0; padding-inline: var(--m); --r: clamp(40px, 5vw, 88px); }
.pk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 48px; flex-wrap: wrap; margin-bottom: clamp(28px, 3vw, 48px); }
.pk-head .chips { justify-content: flex-end; max-width: 64%; }
.picker .picked { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3vw, 56px); margin-top: 0; align-items: start; }
.pk-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0 0 var(--r) 0; background: var(--surface); }
.pk-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.pk-media:hover img, .pk-media:focus-visible img { transform: scale(1.04); }
.pk-tab { position: absolute; left: 0; bottom: 0; padding: 12px 20px 0 0; background: var(--band); color: var(--ink); border-top-right-radius: 18px; font-family: var(--font-display); font-size: clamp(1.25rem, 0.9rem + 0.9vw, 2rem); line-height: 1.05; letter-spacing: -0.01em; }
.pk-body { margin-top: 18px; }
.pk-body .meta { margin-bottom: 8px; }
.pk-title { display: block; font-family: var(--font-display); font-size: clamp(1.375rem, 1rem + 0.9vw, 2rem); line-height: 1.12; text-decoration: none; max-width: 30ch; }
.pk-title:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.pk-x { margin-top: 12px; font-size: 1rem; max-width: 60ch; }
.pk-side ol { list-style: none; padding: 0; display: grid; gap: 4px; }
.pk-side .pk-all { margin-top: 20px; }
@media (max-width: 860px) {
  .pk-head { display: block; }
  .pk-head .chips { justify-content: flex-start; max-width: none; margin-top: 20px; }
  .picker .picked { grid-template-columns: 1fr; }
  .pk-tab { font-size: 1.125rem; padding: 8px 12px 0 0; border-top-right-radius: 12px; }
  .pk-title { font-size: 1.25rem; }
}

/* ---------- taller header, larger menu ---------- */
.site-head { min-height: 84px; }
.site-head .mark img { width: 150px; }
.site-head .tab { gap: clamp(20px, 2.4vw, 40px); }
.site-head .tab a, .site-head .tools a.link { font-size: clamp(1.0625rem, 0.95rem + 0.3vw, 1.1875rem); }
.site-head .tab a::after { bottom: 2px; }
.site-head .tools .btn.sm { min-height: 46px; padding: 0 20px; font-size: 1rem; }
@media (min-width: 861px) { :root { --head-h: 84px; } }
@media (max-width: 860px) { .site-head { min-height: 68px; } .site-head .mark img { width: 128px; } }

/* ---------- library: search on the right of the format row ---------- */
@media (min-width: 861px) {
  .lib-tools { grid-template-columns: minmax(0, 1fr) minmax(280px, 520px); align-items: center; column-gap: 32px; }
  .lib-tools .search { grid-column: 2; grid-row: 1; max-width: none; }
  .lib-tools .filter-row:nth-of-type(2) { grid-column: 1; grid-row: 1; }
  .lib-tools .filter-row:nth-of-type(3) { grid-column: 1 / -1; }
}

/* ---------- library: publications as three cards per row ---------- */
.entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px); }
.entries .empty, .entries .entry:only-child { grid-column: 1 / -1; }
.entry > a, .entries .entry:nth-child(even) > a {
  display: flex; flex-direction: column; gap: 0; padding: 0; margin: 0; background: transparent; height: 100%;
}
.entry > a:hover, .entries .entry:nth-child(even) > a:hover { background: transparent; }
.entry img { order: -1; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 16px; border-radius: 0 0 clamp(28px, 3vw, 48px) 0; transition: transform 900ms var(--ease-out); }
.entry > a:hover img { transform: scale(1.02); }
.entry > a > span:last-child:not(.when) { display: block; }
.entry .when { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.entry .when .tp { flex-basis: 100%; }
.entry h3 { font-size: clamp(1.1875rem, 1rem + 0.35vw, 1.375rem); line-height: 1.18; max-width: none; }
.entry > a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.entry p { -webkit-line-clamp: 3; }
@media (max-width: 1100px) { .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); } .entry img { width: 100%; } }
@media (max-width: 600px) {
  .entries { grid-template-columns: 1fr; }
  .entry > a { display: flex; }
  .entry img { width: 100%; grid-row: auto; grid-column: auto; }
}

/* the hidden attribute always wins over layout display values */
[hidden] { display: none !important; }

/* phone: publications as compact rows, picture on the right */
@media (max-width: 600px) {
  .entries { gap: 24px; }
  .entry > a, .entries .entry:nth-child(even) > a { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 6px 14px; align-items: start; }
  .entry img { order: 0; grid-column: 2; grid-row: 1 / span 2; width: 104px; aspect-ratio: 1; margin: 0; border-radius: 0 0 18px 0; }
  .entry .when { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  .entry > a > div { grid-column: 1; grid-row: 2; }
  .entry p { -webkit-line-clamp: 2; font-size: 0.9375rem; }
  .entry h3 { font-size: 1.125rem; }
}

@media (max-width: 860px), (max-height: 640px) { .loaded .deck { scroll-snap-type: x mandatory; } }
@media (max-width: 860px) { .loaded .panels { scroll-snap-type: x mandatory; } }
