/* Groundwork Minerals - one stylesheet for every page.
   Tokens come from logo/palette/palette.css. Mobile first; breakpoints sm 36rem, md 48rem, lg 64rem only. */

@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --gw-navy: #1E2B45;
  --gw-navy-raised: #2C3B5A;
  --gw-gold: #B38B4D;
  --gw-sand: #E4D8C3;
  --gw-stone: #C3B9A4;
  --gw-mist: #8C95A8;
  --gw-white: #FFFFFF;
  --gw-accent: var(--gw-gold);
  --font: "Lato", "Carlito", "Calibri", "Segoe UI", sans-serif;
  /* data labels: the system monospace, no download (decided 2026-11-18) */
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --tick: 0.625rem; /* survey corner ticks */
  --text: var(--gw-navy);
  --line: color-mix(in srgb, var(--gw-navy) 14%, transparent);
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;
  --radius: 0.25rem;
  --gutter: 1rem;
  --container: 72rem;
  --narrow: 44rem;
  --header-h: 3rem; /* one row on phones too (v-0.16): badge, four entries, language */
  --focus: 0 0 0 2px var(--gw-white), 0 0 0 5px var(--gw-navy);
  /* the screen below the sticky header and its 1px rule: what each full-screen section fills (2026-12-01) */
  --screen-h: calc(100svh - var(--header-h) - 1px);
}

/* on phones the browser's toolbar hides while scrolling, so the visible screen grows past 100svh and the next
   section peeked in under a full-screen one; dvh follows the screen actually shown, toolbar or not. Text and
   portrait sizes keep svh, so content that fits the smaller screen still fits. */
@supports (height: 100dvh) {
  :root {
    --screen-h: calc(100dvh - var(--header-h) - 1px);
  }
}

.panel-navy,
.hub-navy,
.project-photo,
.site-footer {
  --focus: 0 0 0 2px var(--gw-navy), 0 0 0 5px var(--gw-gold);
}

/* over the strata bands gold falls below 3:1; white holds at 7:1 or more */
.hero {
  --focus: 0 0 0 2px var(--gw-navy), 0 0 0 5px var(--gw-white);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1px + var(--s3));
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--gw-white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 var(--s4);
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 var(--s4);
}

a {
  color: inherit;
  text-decoration-color: var(--gw-gold);
  text-underline-offset: 0.2em;
}

/* a panel focused by /home.js after a slow jump, as an anchor jump would: not itself a control, so no ring */
.panel[tabindex="-1"]:focus {
  outline: none;
}

/* the transparent outline is what forced-colours (Windows high contrast) draws, since it drops box-shadow */
a:focus-visible,
summary:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container.narrow,
.narrow {
  max-width: var(--narrow);
}

.lead {
  font-size: 1.125rem;
}

.skip-link {
  position: absolute;
  left: var(--s2);
  top: calc(-1 * var(--s7));
  z-index: 20;
  padding: var(--s2) var(--s3);
  background: var(--gw-navy);
  color: var(--gw-white);
}

.skip-link:focus {
  top: var(--s2);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  /* translucent; the current entry is marked by its gold underline only (white backing dropped in v-0.16) */
  background: color-mix(in srgb, var(--gw-white) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  align-content: center;
  justify-content: space-between; /* phones: the spare width goes either side of the entries, not between them */
  column-gap: var(--s2);
  max-width: var(--container);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--s2);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 1.75rem;
  min-height: 2.75rem;
}

.brand-full {
  display: none;
}

.brand-icon {
  width: 1.75rem;
  height: 1.75rem;
}

/* phones (v-0.16, an accepted exception to the 44 px target and 0.8125rem minimum): the four entries share
   one row with the badge and the language menu, the type shrinking with the screen down to 320 px */
.site-nav {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  gap: min(var(--s3), 2.4vw);
  font-size: clamp(0.625rem, 3.1vw, 0.8125rem);
  font-weight: 700;
  white-space: nowrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  background: linear-gradient(var(--gw-gold), var(--gw-gold)) left bottom / 0 2px no-repeat;
  transition: background-size 0.25s var(--ease);
}

.site-nav a:hover {
  background-size: 100% 2px;
}

/* navy, not gold: the underline is the only current-page cue and needs 3:1 on the light header (WCAG 1.4.11) */
.site-nav a[aria-current] {
  border-bottom-color: var(--gw-navy);
}

/* the logo already links home on phones; Home stays in the nav for screen readers */
.site-nav a[data-spy="home"]:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* focused, it shows over the logo instead of widening the one-line header */
.site-nav a[data-spy="home"]:focus-visible {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding-inline: var(--s3);
  background: var(--gw-white);
}

.lang-menu {
  position: relative;
  flex: none;
  font-size: clamp(0.625rem, 3.1vw, 0.8125rem);
  font-weight: 700;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 2rem; /* phones: a lower box (v-0.16); the tap target below keeps 44 px */
  list-style: none;
  cursor: pointer;
  padding: 0 var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lang-menu summary::before {
  content: "";
  position: absolute;
  inset: -0.375rem 0;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary::after {
  content: " ▾";
}

/* the dropdown card shared by the language menu and the header submenus */
.lang-menu ul,
.nav-sub {
  position: absolute;
  margin: 0;
  padding: var(--s2) 0;
  list-style: none;
  background: var(--gw-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 0.5rem 1.5rem color-mix(in srgb, var(--gw-navy) 18%, transparent);
}

.lang-menu ul {
  right: 0;
  top: calc(100% + var(--s1));
  min-width: 8rem;
}

.lang-menu li a,
.site-nav .nav-sub a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 var(--s4);
  text-decoration: none;
}

.lang-menu a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--gw-gold);
  text-decoration-thickness: 2px;
}

.lang-menu a[aria-disabled] {
  color: var(--gw-mist);
  cursor: not-allowed;
}

/* ---------- header submenus (Method, Projects) ----------
   Open on hover (pointer devices), on keyboard focus, or with the ▾ toggle that /nav.js shows (touch).
   On phones the card spans the header's width under it; from sm up it hangs under its entry. */

.nav-item {
  display: flex;
  align-items: center;
}

.nav-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* widens the hit area into the gaps either side, to 44 px, without widening the phone header */
.nav-toggle::before {
  content: "";
  position: absolute;
  inset: 0 -0.125rem;
}

.nav-toggle[hidden] {
  display: none;
}

.nav-toggle::after {
  content: "▾";
  transition: transform 0.15s;
}

.nav-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.nav-toggle:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus);
}

.nav-sub {
  display: none;
  z-index: 20;
  top: 100%;
  left: var(--s3);
  right: var(--s3);
  font-size: 0.875rem;
}

.site-nav .nav-sub a {
  border-bottom: 0;
  background-image: none;
}

/* not on the current link: its gold underline needs plain white for 3:1 */
.site-nav .nav-sub a:not([aria-current]):hover {
  background: color-mix(in srgb, var(--gw-sand) 55%, transparent);
}

.site-nav .nav-sub a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--gw-gold);
  text-decoration-thickness: 2px;
}

/* bridges the gap between the entry and the card so the pointer can reach it without closing it */
.nav-sub::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--s3);
}

@media (hover: hover) {
  .nav-item:hover > .nav-sub {
    display: block;
  }
}

/* keyboard focus on the entry or its toggle opens it; nav.js's .nav-focus keeps it open while focus moves inside */
.nav-item:has(:focus-visible) > .nav-sub,
.nav-sub:focus-within,
.nav-item.nav-focus > .nav-sub,
.nav-item.nav-lingering > .nav-sub,
.nav-toggle[aria-expanded="true"] ~ .nav-sub {
  display: block;
}

/* Escape (nav.js) closes a submenu that hover or focus holds open */
.nav-item.nav-dismissed > .nav-sub {
  display: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gw-gold);
  color: var(--gw-navy);
}

.btn-primary:hover {
  background: var(--gw-sand);
}

.btn-secondary {
  border-color: var(--gw-sand);
  color: var(--gw-sand);
}

.btn-secondary:hover {
  background: var(--gw-navy-raised);
}

/* ---------- homepage panels ---------- */

.panel {
  position: relative;
  padding-block: var(--s7) var(--s8);
}

.panel-sand {
  background: var(--gw-sand);
}

.panel-navy,
.hub-navy {
  background: var(--gw-navy);
  color: var(--gw-sand);
}

.hero {
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  background: var(--gw-navy) url("/assets/bg/strata.svg") center bottom / cover no-repeat;
  color: var(--gw-white);
}

.hero-logo {
  display: block;
  width: min(18rem, 80%);
  height: auto;
  margin-bottom: var(--s6);
}

/* hero video (web/CLAUDE.md, Imagery > Hero video): clips cross-fade behind the copy, driven by /home.js.
   Without JS, or under reduced motion, the first clip's poster stands still; the strata show until it loads. */
.hero {
  isolation: isolate;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* navy veil: at least 65% navy wherever copy sits keeps white text above 4.5:1 on any frame */
.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--gw-navy) 70%, transparent);
}

.hero-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.hero-video:not(.is-running) > .hero-clip:first-child,
.hero-clip.is-leaving {
  opacity: 1;
}

.hero-clip.is-on {
  z-index: 1;
  opacity: 1;
}

.hero-pause {
  position: absolute;
  right: var(--s4);
  bottom: var(--s4);
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: var(--s2) var(--s3);
  border: 2px solid var(--gw-sand);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--gw-navy) 70%, transparent);
  color: var(--gw-sand);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.hero-pause:hover {
  background: var(--gw-navy-raised);
}

.hero-pause[hidden] {
  display: none;
}

/* ---------- survey look: blueprint grid, corner ticks, data labels ---------- */

.panel-navy,
.hub-navy {
  background-image:
    linear-gradient(color-mix(in srgb, var(--gw-mist) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--gw-mist) 9%, transparent) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  background-position: center top;
}

.breadcrumb,
.project-card-stage,
.project-card-status,
.facts dt,
.person-role {
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.breadcrumb,
.facts dt,
.person-role {
  font-size: 0.8125rem;
  text-transform: uppercase;
}

/* commodity tiles, periodic-table style; decorative (aria-hidden), the text beside them names the metals */
.elements {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-block: var(--s1);
}

.element {
  position: relative;
  display: inline-grid;
  place-items: end center;
  width: 2.25rem;
  height: 2.25rem;
  padding-bottom: 0.2rem;
  border: 1px solid var(--gw-gold);
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
}

.element::before {
  content: attr(data-z);
  position: absolute;
  top: 0.15rem;
  left: 0.2rem;
  font-size: 0.625rem;
  font-weight: 400;
}

.element-minor {
  border-style: dashed;
  border-color: var(--gw-stone);
  opacity: 0.8;
}

.project-card .element {
  color: var(--gw-white);
  background: color-mix(in srgb, var(--gw-gold) 14%, transparent);
}

.facts .elements {
  margin: 0 0 var(--s2);
}

.facts .element {
  background: color-mix(in srgb, var(--gw-sand) 45%, transparent);
}

/* homepage section indices (01-04): decorative, so the alt text after "/" is empty */
main {
  counter-reset: panel;
}

.panel[id] h2::before {
  counter-increment: panel;
  content: counter(panel, decimal-leading-zero);
  content: counter(panel, decimal-leading-zero) / "";
  /* on the heading's own line, so the #method panel still fits one screen from md up */
  display: inline-block;
  margin-right: var(--s3);
  vertical-align: 0.35em;
  color: var(--gw-navy-raised);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
}

.panel-navy[id] h2::before {
  color: var(--gw-sand); /* gold is for large text and graphics only */
}

.project-card .project-card-stage,
.project-card .project-card-status {
  font-size: 0.75rem;
}

.project-card-status {
  text-transform: uppercase;
}

/* display headline, scaled after antegris.com (Montserrat 600 at ~8.75vw); set in Lato 700 */
.hero h1 {
  max-width: 20ch;
  margin-bottom: 0;
  font-size: clamp(2.375rem, 1rem + 5vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-sub {
  max-width: 34ch;
  margin-top: var(--s5);
  color: var(--gw-sand);
  font-size: clamp(1.125rem, 0.9rem + 1vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* a line break placed for the two-line desktop sub-line; elsewhere the text wraps on its own */
.hero-sub br {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}

#method,
.hub-method,
.leaf-head {
  background: var(--gw-sand);
}

/* the geological cross-section (2026-11-30, the user's choice A from web/prototypes/method-background/): folded
   strata, a gold seam, a fault and a drill trace along the bottom of the #management panel and the /management/
   hub, behind the cards, fading out upwards so the heading stays on plain sand. Decorative; its lines draw in once
   on load inside the SVG, and not at all under reduced motion. */
#management,
.hub-management {
  position: relative;
  isolation: isolate;
}

#management::after,
.hub-management::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: min(50%, 26rem);
  opacity: 0.5; /* the bios sit on the sand without a card behind them: keep the lines faint under text */
  pointer-events: none;
  background: url("/assets/bg/cross-section.svg") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(transparent, var(--gw-navy) 22%);
  mask-image: linear-gradient(transparent, var(--gw-navy) 22%);
}

/* the survey grid (2026-11-30, the user's choice B from web/prototypes/method-background/): a fine navy grid with
   crosshairs behind the #method panel and the /method/ hub, fading out towards the heading at the top left, and
   two corner registration marks around the content. Decorative, behind everything, no motion. */
#method,
.hub-method {
  position: relative;
  isolation: isolate;
}

#method::before,
.hub-method::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/assets/bg/survey-grid.svg") 0 0 / 10rem 10rem;
  -webkit-mask-image: radial-gradient(130% 110% at 85% 100%, var(--gw-navy) 35%, transparent 90%);
  mask-image: radial-gradient(130% 110% at 85% 100%, var(--gw-navy) 35%, transparent 90%);
}

#method > .container,
.hub-method .mirror {
  position: relative;
}

#method > .container::before,
#method > .container::after,
.hub-method .mirror::before,
.hub-method .mirror::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 0 solid var(--gw-navy);
  opacity: 0.45;
  pointer-events: none;
}

#method > .container::before,
.hub-method .mirror::before {
  top: calc(-1 * var(--s4));
  left: calc(var(--gutter) - var(--s3));
  border-width: 1.5px 0 0 1.5px;
}

#method > .container::after,
.hub-method .mirror::after {
  bottom: calc(-1 * var(--s4));
  right: calc(var(--gutter) - var(--s3));
  border-width: 0 1.5px 1.5px 0;
}

.next {
  position: absolute;
  left: 50%;
  bottom: var(--s4);
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -1.375rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.55;
}

.next::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.next:hover,
.next:focus-visible {
  opacity: 1;
}

.ways {
  padding-left: 1.25rem;
}

.ways li {
  margin-bottom: var(--s2);
}

.principles {
  display: grid;
  gap: var(--s4);
  margin: var(--s5) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: principle;
}

.principles li {
  position: relative;
  padding: var(--s5) var(--s5) var(--s4);
  background: color-mix(in srgb, var(--gw-white) 72%, transparent);
  border-top: 3px solid var(--gw-gold);
  border-radius: 0 0 var(--radius) var(--radius);
  counter-increment: principle;
}

.principles li::before {
  content: counter(principle, decimal-leading-zero);
  display: block;
  margin-bottom: var(--s2);
  color: var(--gw-navy);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.principles p {
  margin: 0;
}

.project-photo img {
  display: block;
  width: 100%;
  height: 40vh;
  min-height: 14rem;
  object-fit: cover;
}

/* credit lines sit below the photo on solid navy: over a bright salar a fade can't keep them legible */
.project-photo figcaption {
  padding: var(--s2) var(--gutter);
  background: var(--gw-navy);
  font-size: 0.8125rem;
  color: var(--gw-sand);
}

.project-photo figcaption a {
  color: var(--gw-white);
}

.steps {
  margin: 0;
  padding-left: var(--s5);
}

.steps li {
  margin-bottom: var(--s3);
}

.steps li::marker {
  color: var(--gw-navy);
  font-weight: 700;
}

.steps h3 {
  margin-bottom: var(--s1);
  font-size: 1rem;
}

.steps p {
  margin: 0;
}

.closing {
  margin-top: var(--s5);
  font-size: 1.125rem;
  font-weight: 700;
}

/* ---------- Method: panel, hub and leaves ---------- */

.method-grid {
  display: grid;
  gap: var(--s5);
  align-items: center;
  margin-top: min(var(--s5), 2.5svh);
}

#method .lead,
.hub-method .lead,
.leaf-head .lead {
  max-width: 62ch;
}

/* phones (v-0.16): the #method panel fits one screen below the header, down to 375 × 667; its spacing shrinks
   with the viewport height. It also fills that screen (2026-11-30), as every panel does from md up, and an
   anchor jump lands it just under the header. :where() keeps these at class weight, so the md rules take over. */
.panel:where(#method) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--screen-h);
  padding-block: min(var(--s6), 3.5svh) calc(2.75rem + 2 * min(var(--s4), 1.6svh));
  scroll-margin-top: calc(-1 * var(--s3));
}

/* phones: the #management and #contact panels fill the screen below the header too, content centred, and an
   anchor jump lands them just under the header (user, 2026-12-01); from md up every panel does (below) */
.panel:where(#management, #contact) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--screen-h);
  padding-block: min(var(--s6), 3.5svh) calc(2.75rem + 2 * min(var(--s4), 1.6svh));
  scroll-margin-top: calc(-1 * var(--s3));
}

/* the last panel has no arrow below it, so it needs no room for one */
.panel:where(#contact) {
  padding-bottom: min(var(--s6), 3.5svh);
}

/* the /method/ hub fills the screen below the header too (2026-11-30), so the footer starts below the fold;
   so do the /management/ and /contact/ hubs (user, 2026-11-30), at every width */
.hub-method,
.hub:has(.people),
.hub-contact {
  min-height: var(--screen-h);
}

/* these hubs have no arrow at the bottom, and their padding shrinks with the screen's height like the panels',
   so that what fits the screen is not pushed past it (2026-12-01) */
.hub:has(.people),
.hub.hub-contact, /* two classes: outweighs .hub below */
.hub:has(.projects-stage) {
  padding-block: min(var(--s5), 2.5svh) min(var(--s5), 3svh);
}

.panel:where(#method) .next {
  bottom: min(var(--s4), 1.6svh);
}

.panel:where(#method) h2 {
  margin-bottom: var(--s2);
}

.panel:where(#method) .lead {
  margin-bottom: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* the method diagram (v-0.15, reworked v-0.16): four linked steps. Phones: a list of cards, each a heading and a
   "View section" tag. From md: two by two, from lg one row of four; they slide in from the left. */
.method-cycle {
  position: relative;
}

.method-steps {
  counter-reset: step;
  display: grid;
  gap: min(var(--s3), 1.2svh);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* the whole step is the link's hit area; the heading text stays the accessible name */
.method-step {
  position: relative;
  padding: min(var(--s3), 1.4svh) var(--s4);
  background:
    linear-gradient(var(--gw-navy), var(--gw-navy)) right bottom / var(--tick) 1px no-repeat,
    linear-gradient(var(--gw-navy), var(--gw-navy)) right bottom / 1px var(--tick) no-repeat,
    color-mix(in srgb, var(--gw-white) 72%, transparent); /* a little see-through */
  border-top: 3px solid var(--gw-gold);
  transition: background-color 0.2s ease, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* the step index sits in the corner and adds no height; decorative, so the alt text is empty */
.method-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  content: counter(step, decimal-leading-zero) / "";
  position: absolute;
  top: var(--s3);
  right: var(--s4);
  color: var(--gw-navy-raised);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.method-step:hover,
.method-step:focus-within {
  background-color: var(--gw-white);
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 1.5rem -1rem color-mix(in srgb, var(--gw-navy) 45%, transparent);
}

.method-step h3 {
  margin-bottom: var(--s1);
  padding-right: var(--s5); /* room for the corner index */
  font-size: 1rem;
}

.method-step a {
  text-decoration: none;
}

.method-step a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.method-step:hover a {
  text-decoration: underline;
}

/* phones: the heading and a "View section" tag only (v-0.16); the sentence shows from md up */
.method-step p {
  display: none;
  margin: 0;
  font-size: 0.9375rem;
}

.method-step-cta {
  display: block;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gw-navy);
}

.method-step-cta::after {
  content: "→" / "";
  display: inline-block;
  margin-left: var(--s2);
  color: var(--gw-gold);
  transition: transform 0.15s ease;
}

.method-step:hover .method-step-cta::after,
.method-step:focus-within .method-step-cta::after {
  transform: translateX(3px);
}

.faq h3 {
  margin-top: var(--s5);
  font-size: 1.125rem;
}

.faq h3 + p {
  margin-top: var(--s2);
}

.leaf-head h1 {
  margin-bottom: var(--s3);
}

.leaf {
  padding-block: var(--s5) var(--s7);
}

.leaf section {
  margin-top: var(--s6);
}

.leaf h2 {
  font-size: 1.375rem;
}

.leaf .principles {
  grid-template-columns: 1fr;
}

/* on the white leaf page the panel's white-on-sand cards need a tint to show */
.leaf .principles li {
  background: color-mix(in srgb, var(--gw-sand) 45%, var(--gw-white));
}

.rights,
.review-steps {
  padding-left: 1.25rem;
}

.rights li,
.review-steps li {
  margin-bottom: var(--s2);
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin-bottom: var(--s2);
  padding-left: var(--s5);
}

/* a drawn tick: gold is fine for graphics on white (3:1) */
.checklist li::before {
  content: "";
  position: absolute;
  left: var(--s1);
  top: 0.3em;
  width: 0.4rem;
  height: 0.75rem;
  border-right: 2px solid var(--gw-gold);
  border-bottom: 2px solid var(--gw-gold);
  transform: rotate(45deg);
}

.table-wrap {
  margin-top: var(--s4);
  overflow-x: auto;
}

.methods {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.methods th,
.methods td {
  overflow-wrap: anywhere;
  padding: var(--s3) var(--s3) var(--s3) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.methods thead th {
  border-bottom: 2px solid var(--gw-navy);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.methods tbody th {
  width: 38%;
}

/* ---------- hub pages ---------- */

.hub {
  padding-block: var(--s5) var(--s7);
}

.hub-sand {
  background-color: var(--gw-sand);
}

.page-only {
  padding-block: var(--s7);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0 0 var(--s5);
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb a,
.pager a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: var(--s2);
  color: var(--gw-gold);
}

/* gold on sand is 2.2:1 */
.hub-sand .breadcrumb li + li::before {
  color: var(--gw-navy-raised);
}

.hub-navy .breadcrumb {
  color: var(--gw-sand);
}

/* ---------- contact (panel and hub share the .mirror markup) ---------- */

/* the gaps shrink with the screen's height, so the section fits short phones and laptops (2026-12-01) */
.contact-trust {
  margin-block: min(var(--s4), 1.5svh) min(var(--s5), 2svh);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gw-navy-raised);
}

.contact-facts dd a {
  overflow-wrap: anywhere;
}

.contact-action {
  margin-top: min(var(--s5), 2svh);
  margin-bottom: 0;
}

/* ---------- projects map and list ---------- */

.project-map {
  margin: var(--s5) calc(-1 * var(--gutter)) var(--s5);
  overflow: hidden;
}

/* phones: the off-map labels are hidden, so crop their column away (width - 100% = margin, so the east edge stays) */
.project-map-svg {
  display: block;
  width: 143%;
  max-width: none;
  height: auto;
  margin-left: -43%;
}

.map-province {
  fill: var(--gw-sand);
  text-transform: uppercase;
  font: 700 13px var(--font);
  letter-spacing: 2px;
}

.map-leader {
  stroke: var(--gw-gold);
  stroke-width: 1.5;
  display: none;
}

.map-label {
  display: none;
  text-decoration: none;
}

/* a navy halo keeps the labels at full contrast where grid lines cross them */
.map-label text {
  fill: var(--gw-gold);
  stroke: var(--gw-navy);
  stroke-width: 4px;
  stroke-linejoin: round;
  paint-order: stroke;
}

/* sizes in SVG units; the largest (tablets) is LABEL_NAME / LABEL_SUB in tools/build_map.py, which spaces the labels */
.map-label-name {
  font: 700 21px var(--font);
}

.map-label-sub {
  font: 400 15px var(--font);
  fill: var(--gw-mist);
}

.map-hit {
  fill: transparent;
}

.map-dot {
  fill: var(--gw-gold);
  stroke: var(--gw-navy);
  stroke-width: 2;
  r: 15px;
  transition: r 0.3s ease, fill 0.3s ease;
}

.map-plus {
  stroke: var(--gw-navy);
  stroke-width: 2;
}

/* a target ring round each marker and an arrow after each label say "this opens something" before any hover */
.map-ring {
  fill: none;
  stroke: var(--gw-gold);
  stroke-width: 1.5;
  stroke-opacity: 0.6;
  r: 18.5px;
  transition: r 0.3s ease, stroke-opacity 0.3s ease;
}

.map-label-go {
  font: 700 15px var(--font);
}

/* hidden, it ignores the pointer; shown, it is part of the marker link, so the pointer can move onto it */
.map-tip {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

.map-tip rect {
  fill: var(--gw-white);
  stroke: var(--gw-gold);
}

.map-tip text {
  fill: var(--gw-navy);
  font: 700 12px var(--font);
}

.map-project:hover .map-dot,
.map-project:focus-within .map-dot {
  r: 17px;
  fill: var(--gw-sand);
}

.map-project:hover .map-ring,
.map-project:focus-within .map-ring {
  r: 21px;
  stroke-opacity: 1;
}

.map-project:hover .map-leader,
.map-project:focus-within .map-leader {
  stroke-width: 2.5;
}

.map-project:hover .map-label text,
.map-project:focus-within .map-label text {
  fill: var(--gw-sand);
}

.map-marker:hover .map-tip,
.map-marker:focus-visible .map-tip {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.15s ease;
}

.map-marker:focus-visible,
.map-label:focus-visible {
  outline: 2px solid transparent;
}

.map-marker:focus-visible .map-dot {
  stroke: var(--gw-white);
  stroke-width: 3;
}

.project-list {
  display: grid;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card a {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto 1fr; /* the cue line sits at the bottom, aligned across a row */
  gap: var(--s1);
  height: 100%;
  padding: var(--s4);
  background:
    linear-gradient(var(--gw-gold), var(--gw-gold)) right top / var(--tick) 1px no-repeat,
    linear-gradient(var(--gw-gold), var(--gw-gold)) right top / 1px var(--tick) no-repeat,
    linear-gradient(var(--gw-gold), var(--gw-gold)) right bottom / var(--tick) 1px no-repeat,
    linear-gradient(var(--gw-gold), var(--gw-gold)) right bottom / 1px var(--tick) no-repeat,
    var(--gw-navy-raised);
  border: 1px solid color-mix(in srgb, var(--gw-mist) 35%, transparent);
  border-left: 3px solid var(--gw-gold);
  border-radius: 0;
  color: var(--gw-sand);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ease);
}

.project-card a:hover,
.project-card a:focus-visible {
  background-color: color-mix(in srgb, var(--gw-navy-raised) 80%, var(--gw-mist));
  border-color: var(--gw-gold);
  transform: translateY(-2px);
}

.project-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gw-white);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease;
}

.project-card a:hover .project-card-name,
.project-card a:focus-visible .project-card-name {
  text-decoration-color: var(--gw-gold);
}

/* drawn as a button, so the card reads as a link before any hover; the whole card is the target */
.project-card-cta {
  align-self: end;
  justify-self: end;
  margin-top: var(--s3);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--gw-gold);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gw-white);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.project-card a:hover .project-card-cta,
.project-card a:focus-visible .project-card-cta {
  background: var(--gw-gold);
  color: var(--gw-navy);
}

.project-card-cta::after {
  content: "→";
  display: inline-block;
  margin-left: var(--s2);
  color: var(--gw-gold);
  transition: transform 0.15s ease;
}

.project-card a:hover .project-card-cta::after,
.project-card a:focus-visible .project-card-cta::after {
  color: var(--gw-navy);
  transform: translateX(3px);
}

.project-card-meta,
.project-card-stage {
  font-size: 0.875rem;
}

.project-card-status {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gw-white);
}

.project-card-status::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: var(--s2);
  border-radius: 50%;
  background: var(--gw-gold);
}

.project-card-summary {
  font-size: 0.875rem;
  color: var(--gw-sand);
}

/* phones (user, 2026-11-30; map behind the cards 2026-12-01): /projects/ and the #projects panel fill the screen
   below the header, as the method section does, with the map in the background and the minimal cards over it, a
   little see-through: the name and the province and commodity on the left, the element tiles on the right, a gold
   arrow as the link cue. The map is turned upright so the country runs down the screen behind the list; its
   labels and leaders stay hidden and it ignores the pointer. Stage, status, summary and the
   View project line come back from md up, with the map beside the list. */
.hub:has(.projects-stage),
.panel:where(#projects) {
  display: flex;
  flex-direction: column;
  min-height: var(--screen-h);
}

.hub:has(.projects-stage) > .mirror,
.panel:where(#projects) > .container {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.projects-stage > .project-map {
  position: absolute;
  inset: calc(-1 * var(--s4)) calc(-1 * var(--gutter));
  z-index: 0;
  margin: 0;
  container-type: size;
  pointer-events: none;
}

/* turned upright: the country's axis (from about -629,824 to -20,1200 in the viewBox, 715 units long, 32° below
   the horizontal) runs down the screen at 95% of the stage's height, its middle (66.2%, 49.5% of the viewBox) at
   the stage's centre. The svg is 1020 × 580 units, so at 95cqh / 715 per unit it is 135.5cqh × 77.1cqh. */
.projects-stage > .project-map > .project-map-svg {
  position: absolute;
  top: 11.45cqh;
  left: calc(50cqw - 89.7cqh);
  width: auto;
  height: 77.1cqh;
  aspect-ratio: 1020 / 580;
  margin: 0;
  opacity: 0.7;
  transform-origin: 66.2% 49.5%;
  transform: rotate(58deg);
}

/* keep the markers' + upright */
.projects-stage > .project-map .map-plus {
  transform-box: fill-box;
  transform-origin: center;
  rotate: -58deg;
}

.projects-stage .project-list {
  position: relative;
  z-index: 1;
  gap: var(--s2);
  margin-top: var(--s4);
}

.projects-stage .project-card a {
  background-color: color-mix(in srgb, var(--gw-navy-raised) 72%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.projects-stage .project-card a {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto;
  column-gap: var(--s3);
  row-gap: 0;
  align-items: center;
  padding: var(--s2) var(--s3);
}

.projects-stage .project-card-name {
  grid-area: 1 / 1;
  font-size: 1rem;
}

.projects-stage .project-card-meta {
  grid-area: 2 / 1;
  font-size: 0.8125rem;
}

.projects-stage .project-card .elements {
  grid-area: 1 / 2 / 3 / 3;
  flex-wrap: nowrap;
  margin: 0;
}

.projects-stage .project-card .element {
  width: 1.875rem;
  height: 1.875rem;
  font-size: 0.8125rem;
}

.projects-stage .project-card .element::before {
  font-size: 0.5625rem;
}

.projects-stage .project-card a::after {
  content: "→";
  grid-area: 1 / 3 / 3 / 4;
  color: var(--gw-gold);
  font-weight: 700;
}

.projects-stage :is(.project-card-stage, .project-card-status, .project-card-summary, .project-card-cta) {
  display: none;
}

/* the project the auto-cycle is on (/projects-map.js, 2026-12-01) is highlighted in the list as under hover;
   from md up with a hovering pointer, it is the one card shown over the map instead (.js-cards, below) */
.projects-stage .project-card {
  position: relative;
}

.projects-stage .project-card a:hover,
.projects-stage .project-card a:focus-visible,
.projects-stage:not(.js-cards) .project-card.is-shown a {
  background-color: color-mix(in srgb, var(--gw-navy-raised) 80%, var(--gw-mist));
  border-color: var(--gw-gold);
  transform: translateY(-2px);
}

.projects-stage:not(.js-cards) .project-card.is-shown .project-card-name {
  text-decoration-color: var(--gw-gold);
}

/* ---------- projects stage: heading over the map, cards on hover (2026-11-30, prototype v3) ----------
   On /projects/ and the homepage #projects panel, .projects-stage holds the heading, the map and the project
   list. From md up the map's top-left corner is the heading's top-left corner (the heading sits on the map's
   empty north-west), and the map is sized to fit the screen's height. With a pointer that hovers, /projects-map.js
   adds .js-cards: the list then becomes one card at a time over the right of the map, shown while a project's
   label is hovered or its marker or card has focus. Phones, touch screens and no JavaScript keep the list below
   the map. */

.projects-stage {
  position: relative;
  display: grid;
  flex: 1; /* phones: the stage fills the section, the map behind it, the heading and list centred */
  align-content: center;
  /* the base map's viewBox proportions (written by tools/build_map.py) */
  --map-ratio: calc(1020 / 580);
  /* what sits above and below the map on the hub: the section's padding, the breadcrumb, a little air */
  --map-fit-offset: 7.5rem;
}

.projects-stage > :is(h1, h2) {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

/* the project whose card is up stays lit on the map, as under hover */
.map-project.is-hot .map-dot {
  r: 17px;
  fill: var(--gw-sand);
}

.map-project.is-hot .map-ring {
  r: 21px;
  stroke-opacity: 1;
}

.map-project.is-hot .map-leader {
  stroke-width: 2.5;
}

.map-project.is-hot .map-label text {
  fill: var(--gw-sand);
}

@media (min-width: 48rem) {
  #projects .projects-stage {
    --map-fit-offset: calc(min(var(--s7), 4svh) + 2.75rem + 2 * min(var(--s4), 1.6svh) + var(--s4));
  }

  /* the phone layout (map behind the cards, the stage filling the section) is undone here */
  /* it still fills the screen below the header, as the other hubs do (2026-12-01) */
  .hub:has(.projects-stage) {
    display: block;
  }

  .hub:has(.projects-stage) > .mirror,
  .panel:where(#projects) > .container {
    display: block;
  }

  .projects-stage {
    flex: none;
    width: min(100%, (100svh - var(--header-h) - var(--map-fit-offset)) * var(--map-ratio));
  }

  .projects-stage > :is(h1, h2),
  .projects-stage > .project-map {
    grid-area: 1 / 1;
    align-self: start;
  }

  .projects-stage > .project-map {
    position: static;
    margin: 0;
    container-type: normal;
    pointer-events: auto;
  }

  .projects-stage > .project-map > .project-map-svg {
    position: static;
    width: 100%;
    height: auto;
    opacity: 1;
    transform: none;
  }

  .projects-stage > .project-map .map-plus {
    rotate: none;
  }

  .projects-stage > .project-list {
    gap: var(--s3);
    margin-top: var(--s5);
  }

  /* the full cards again (the phone rules above are undone here) */
  .projects-stage .project-card a {
    grid-template-columns: none;
    grid-template-rows: auto auto auto auto auto auto 1fr;
    gap: var(--s1);
    align-items: stretch;
    padding: var(--s4);
  }

  .projects-stage .project-card a::after {
    content: none;
  }

  .projects-stage .project-card :is(.project-card-name, .project-card-meta, .elements) {
    grid-area: auto;
  }

  .projects-stage .project-card-name {
    font-size: 1.125rem;
  }

  .projects-stage .project-card-meta {
    font-size: 0.875rem;
  }

  .projects-stage .project-card .elements {
    flex-wrap: wrap;
    margin-block: var(--s1);
  }

  .projects-stage .project-card .element {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9375rem;
  }

  .projects-stage .project-card .element::before {
    font-size: 0.625rem;
  }

  .projects-stage :is(.project-card-stage, .project-card-status, .project-card-summary, .project-card-cta) {
    display: block;
  }

  .map-project.is-hot .map-dot {
    r: 13px;
  }

  .map-project.is-hot .map-ring {
    r: 17px;
  }

  /* the card's left edge at 90% of the map's width, never closer than 2rem to the window's right edge.
     --stage-x is where the stage starts in the window (the centred container's margin plus its gutter);
     the % values are of the stage's width */
  .js-cards > .project-list {
    --stage-x: calc((100vw - min(100vw, var(--container))) / 2 + var(--gutter));
    --card-w: min(21rem, 40%);
    position: absolute;
    z-index: 2;
    top: 14%;
    left: min(90%, 100vw - var(--stage-x) - 2rem - var(--card-w));
    width: var(--card-w);
    display: block;
    margin: 0;
  }

  /* the other cards stay in the page for screen readers and keyboard users: focusing one brings it up */
  .js-cards .project-card:not(.is-shown) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .js-cards .project-card {
    animation: none;
  }

  /* partly see-through, so the map shows under the card; the blur keeps the text readable over the borders */
  .js-cards .project-card a,
  .js-cards .project-card a:hover,
  .js-cards .project-card a:focus-visible {
    background-color: color-mix(in srgb, var(--gw-navy-raised) 72%, transparent);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    box-shadow: 0 0.75rem 2rem color-mix(in srgb, var(--gw-navy) 50%, transparent);
  }
}

@media (min-width: 48rem) and (prefers-reduced-motion: no-preference) {
  .js-cards .project-card.is-shown {
    animation: gw-card-in 0.45s var(--ease) both;
  }
}

@keyframes gw-card-in {
  from {
    opacity: 0;
    transform: translateX(1.25rem);
  }
}

/* while the auto-cycle runs, a gold line along the bottom of the selected card fills over the 3 s it stays
   (STEP in /projects-map.js), so the change that follows is expected */
@media (prefers-reduced-motion: no-preference) {
  .is-cycling .project-card.is-shown::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gw-gold);
    transform-origin: left;
    animation: gw-cycle-progress 3s linear both;
    pointer-events: none;
  }

  .map-label text {
    transition: fill 0.3s ease;
  }
}

@keyframes gw-cycle-progress {
  from {
    transform: scaleX(0);
  }
}

/* ---------- project pages ---------- */

.project-photo {
  position: relative;
  margin: 0;
}

.project-photo img {
  height: 35vh;
  min-height: 12rem;
}

/* where the subject sits in a photo that is cropped to a wide strip */
.photo-top img {
  object-position: center 20%;
}

.photo-low img {
  object-position: center 80%;
}

.project {
  padding-block: var(--s5) var(--s7);
}

.project-intro {
  display: grid;
  gap: var(--s5);
  margin-bottom: var(--s6);
}

.facts {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--s3);
  padding-block: var(--s2);
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

.locator {
  margin: 0;
}

.locator img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}

.project-body section {
  margin-top: var(--s6);
}

/* where a real project's figures come from (root CLAUDE.md: every figure cites its source and date) */
.project-body .sources {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.project-cta {
  margin-top: var(--s6);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-weight: 700;
}

/* ---------- management ---------- */

/* All three cards fit one screen below the header, title included (2026-11-30): the portrait's height is the
   screen's height, less the header, breadcrumb and heading, shared between the rows (three rows, two from lg).
   Each bio sits beside its portrait and is cut to the portrait's height by /people.js, which adds a "…more"
   button where the text runs over. Without JavaScript the full bio shows and the card grows. */
.people {
  --rows: 3;
  --portrait-h: clamp(7.5rem, calc((100svh - var(--header-h) - 11.5rem - (var(--rows) - 1) * var(--s4)) / var(--rows)), min(20rem, 50vw));
  display: grid;
  gap: var(--s4);
}

.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--s4);
  align-items: start;
}

.person img {
  display: block;
  width: auto;
  max-width: none;
  height: var(--portrait-h);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

.person h3 {
  margin-bottom: var(--s1);
}

.person-role {
  margin-bottom: var(--s2);
  color: var(--gw-navy-raised);
  font-weight: 700;
  line-height: 1.35;
}

.person-bio {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.person-bio.is-clamped {
  max-height: calc(var(--lines, 3) * 1.55em);
  overflow: hidden;
}

.person-more {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gw-navy);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gw-gold);
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.person-more:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus);
}

/* ---------- prose pages ---------- */

.prose {
  padding-block: var(--s5) var(--s7);
}

.prose h2 {
  margin-top: var(--s6);
  font-size: 1.375rem;
}

.note {
  padding: var(--s3) var(--s4);
  background: var(--gw-sand);
  border-left: 3px solid var(--gw-gold);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--gw-navy);
  color: var(--gw-sand);
  padding-block: var(--s7);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-brand img {
  width: 11.75rem;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-block: var(--s5);
  font-weight: 700;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.disclaimer,
.copyright {
  max-width: 48rem;
  font-size: 0.8125rem;
  color: var(--gw-mist);
}

/* ---------- wider screens ---------- */

@media (min-width: 36rem) {
  :root {
    --header-h: 3.5rem;
  }

  /* the gap to the language menu matches the gap between the entries (v-0.16) */
  .header-inner {
    column-gap: var(--s4);
    padding-inline: var(--gutter);
  }

  .brand {
    min-width: 2.75rem;
  }

  .site-nav {
    flex: 0 1 auto;
    justify-content: flex-start;
    margin-left: auto;
    gap: var(--s4);
    font-size: 0.875rem;
  }

  .lang-menu {
    font-size: 0.8125rem;
  }

  .lang-menu summary {
    min-height: 2.75rem;
    padding: 0 var(--s2);
  }

  .nav-toggle {
    width: 1.5rem;
  }

  .nav-toggle::before {
    inset: 0 -0.625rem;
  }

  .nav-item {
    position: relative;
  }

  .nav-sub {
    top: calc(100% + var(--s1));
    left: 0;
    right: auto;
    min-width: 11rem;
  }


  .site-nav a[data-spy="home"]:not(:focus-visible),
  .site-nav a[data-spy="home"]:focus-visible {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    padding-inline: 0;
    background: none;
  }

  .principles,
  .project-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts div {
    grid-template-columns: 11rem 1fr;
  }
}

@media (min-width: 48rem) {
  :root {
    --gutter: 1.5rem;
    --header-h: 4rem;
  }

  .brand-full {
    display: block;
    width: 11.75rem;
    height: auto;
  }

  .brand-icon {
    display: none;
  }

  /* each panel fills exactly the screen below the sticky header (and its 1px rule), and an anchor jump lands
     it there; spacing and type below shrink with the viewport height (svh), so the hero and #method fit on
     short, wide laptop screens, and reach their usual sizes on taller ones */
  .panel {
    min-height: var(--screen-h);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: min(var(--s7), 4svh) calc(2.75rem + 2 * min(var(--s4), 1.6svh));
    scroll-margin-top: calc(-1 * var(--s3));
  }

  .next {
    bottom: min(var(--s4), 1.6svh);
  }

  .panel h2 {
    font-size: clamp(1.375rem, min(1.15rem + 1.6vw, 4.6svh), 2.25rem);
    margin-bottom: min(var(--s4), 2svh);
  }

  /* the header already shows the full logo from md up (v-0.16) */
  .hero-logo {
    display: none;
  }

  /* tablet: the veil thins toward the right, where the copy runs out (v-0.16) */
  .hero-video::after {
    background: linear-gradient(90deg,
      color-mix(in srgb, var(--gw-navy) 75%, transparent) 0%,
      color-mix(in srgb, var(--gw-navy) 65%, transparent) 70%,
      color-mix(in srgb, var(--gw-navy) 55%, transparent) 100%);
  }

  .hero h1 {
    font-size: clamp(2.375rem, min(1rem + 5vw, 10.5svh), 5.5rem);
  }

  .hero-sub {
    margin-top: min(var(--s5), 3svh);
    font-size: clamp(1.125rem, min(0.9rem + 1vw, 3.4svh), 1.75rem);
  }

  .hero-actions {
    margin-top: min(var(--s5), 3svh);
  }

  /* wider than elsewhere: two or three lines keep the panel to one screen */
  #method .lead,
  .hub-method .lead {
    max-width: 100ch;
    margin-bottom: 0;
    font-size: clamp(0.875rem, 2.6svh, 1.125rem);
    line-height: 1.6;
  }

  .method-grid {
    margin-top: min(var(--s5), 2.5svh);
  }

  .method-step {
    padding: min(var(--s4), 1.2svh) var(--s4);
  }

  .method-step h3 {
    margin-bottom: min(var(--s2), 1svh);
    font-size: clamp(1rem, 2.6svh, 1.0625rem);
  }

  .method-step p {
    font-size: clamp(0.875rem, 2.1svh, 0.9375rem);
  }

  .project-map {
    margin-inline: 0;
  }

  .project-map-svg {
    width: 100%;
    margin-left: 0;
  }

  .map-leader {
    display: inline;
  }

  .map-label {
    display: inline;
  }

  /* tablets draw the map at about 70% of its size: enlarge the labels so they stay readable */
  .map-label-name {
    font-size: 26px;
  }

  .map-label-sub {
    font-size: 18px;
  }

  .map-dot {
    r: 11px;
  }

  .map-ring {
    r: 14.5px;
  }

  .map-project:hover .map-dot,
  .map-project:focus-within .map-dot {
    r: 13px;
  }

  .map-project:hover .map-ring,
  .map-project:focus-within .map-ring {
    r: 17px;
  }

  .project-intro {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* tablet: two by two, in reading order; from lg one row of four (v-0.16, option A). Equal cards, even gaps, the
     container's full width, so the row lines up with the heading and lead above. */
  .method-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--s4);
  }

  /* the cycle closes: a small return mark at the foot of step 4 (decorative, so the alt text after "/" is empty) */
  .method-step:last-child::after {
    content: "\21BA  01" / "";
    position: absolute;
    right: var(--s4);
    bottom: var(--s3);
    color: var(--gw-navy-raised);
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    white-space: pre;
  }

  .method-step:last-child {
    padding-bottom: calc(var(--s4) + 1.25rem);
  }

  /* a step sliding in from the left passes behind the ones already in place, not over them */
  .method-step:nth-child(1) { z-index: 4; }
  .method-step:nth-child(2) { z-index: 3; }
  .method-step:nth-child(3) { z-index: 2; }
  .method-step:nth-child(4) { z-index: 1; }

  .method-step {
    backdrop-filter: blur(2px);
  }

  .method-step p {
    display: block;
  }

  .method-step-cta {
    display: none;
  }
}

@media (min-width: 64rem) {
  /* Eduardo Marquina's card across the full width, the other two side by side below: two rows */
  .people {
    --rows: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s6);
  }

  .person {
    column-gap: var(--s5);
  }

  .person-lead {
    grid-column: 1 / -1;
  }

  .person-lead .person-text {
    max-width: 75ch;
  }

  .person-bio,
  .person-more {
    font-size: 1rem;
  }

  .header-inner {
    column-gap: var(--s5);
  }

  .site-nav {
    gap: var(--s5);
    font-size: 0.9375rem;
  }

  .method-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s5);
  }

  /* more air between the heading row and the cards (v-0.16), still within one screen on short laptops */
  .method-grid {
    margin-top: clamp(var(--s5), 7svh, var(--s8));
  }

  /* Method section on desktop: the lead sits beside the title, not under it (v-0.16). The leaf strip widens
     to the full container for it; everything else in the block (breadcrumb, diagram) spans both columns. */
  #method > .container,
  .hub-method .mirror,
  .leaf-head .container {
    display: grid;
    grid-template-columns: fit-content(40%) minmax(0, 1fr);
    column-gap: var(--s7);
    align-items: center;
  }

  .leaf-head .container {
    max-width: var(--container);
  }

  #method > .container > *,
  .hub-method .mirror > *,
  .leaf-head .container > * {
    grid-column: 1 / -1;
  }

  #method > .container > h2,
  .hub-method .mirror > h1,
  .leaf-head .container > h1 {
    grid-column: 1;
    margin-bottom: 0;
  }

  #method > .container > .lead,
  .hub-method .mirror > .lead,
  .leaf-head .container > .lead {
    grid-column: 2;
    margin-block: 0;
    padding-left: var(--s5);
    border-left: 2px solid var(--gw-gold);
  }

  /* wide screens: the copy keeps to the left, so the veil thins to the right (65% under the two-line
     sub-line, 40% past the far end of the headline, 15% at the edge; lightened in v-0.16) */
  .hero-video::after {
    background: linear-gradient(90deg,
      color-mix(in srgb, var(--gw-navy) 80%, transparent) 0%,
      color-mix(in srgb, var(--gw-navy) 65%, transparent) 60%,
      color-mix(in srgb, var(--gw-navy) 40%, transparent) 78%,
      color-mix(in srgb, var(--gw-navy) 15%, transparent) 100%);
  }

  /* more air around the copy (v-0.16); the sub-line runs to two lines */
  .hero h1 {
    margin-top: min(var(--s7), 6svh);
  }

  .hero-sub br {
    display: inline;
  }

  .hero-sub {
    max-width: 58ch;
    margin-top: min(2.5rem, 4.5svh);
  }

  .hero-actions {
    margin-top: min(4rem, 7svh);
  }

  .principles {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-list {
    grid-template-columns: repeat(5, 1fr);
  }

  .map-label-name {
    font-size: 21px;
  }

  .map-label-sub {
    font-size: 15px;
  }

}

/* ---------- motion: only when the reader has not asked for less ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* cross-page fades (Chrome, Edge, Safari; others just navigate) */
  @view-transition {
    navigation: auto;
  }

  .site-header {
    view-transition-name: site-header;
  }

  ::view-transition-old(root) {
    animation: 0.18s ease both gw-fade-out;
  }

  ::view-transition-new(root) {
    animation: 0.32s var(--ease) both gw-rise;
  }

  /* hero: the lines arrive one after another */
  .hero-logo,
  .hero h1,
  .hero-sub,
  .hero-actions {
    animation: 0.5s var(--ease) both gw-rise;
  }

  .hero h1 { animation-delay: 0.1s; }
  .hero-sub { animation-delay: 0.15s; }
  .hero-actions { animation-delay: 0.2s; }

  /* hero video: the incoming clip fades in over the outgoing one (keep in step with FADE in /home.js) */
  .hero-clip.is-on {
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* submenus fade down when they open */
  .nav-sub {
    transition: opacity 0.18s ease, translate 0.18s var(--ease), display 0.18s allow-discrete;
  }

  @starting-style {
    .nav-sub {
      opacity: 0;
      translate: 0 -0.25rem;
    }
  }

  /* the /method/ hub: the steps slide in from the left one after another on load, as on the homepage */
  @media (min-width: 48rem) {
    .hub-method .method-step {
      animation: gw-slide-in 0.9s var(--ease) both;
    }

    .hub-method .method-step:nth-child(2) { animation-delay: 0.25s; }
    .hub-method .method-step:nth-child(3) { animation-delay: 0.5s; }
    .hub-method .method-step:nth-child(4) { animation-delay: 0.75s; }
  }

  /* scroll reveals; where scroll timelines are unsupported, everything is simply there */
  @supports (animation-timeline: view()) {
    .project-card,
    .principles li,
    .steps li,
    .person,
    .facts div,
    .project-map {
      animation: gw-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }

    /* the method steps (v-0.16), at every width: they slide in from the left of the screen one after another and
       settle into place, scrubbed by the scroll. Elsewhere each step on its own view; on the homepage on the
       #method panel's timeline, the last in place as the panel comes fully into view (entry 100%). On phones the
       steps sit low in the panel, so they start later. /home.js slows the arrow's jump here. */
    .method-step {
      animation: gw-slide-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }

    #method {
      view-timeline-name: --method;
    }

    #method .method-step {
      animation-timeline: --method;
    }

    #method .method-step:nth-child(1) { animation-range: entry 50% entry 78%; }
    #method .method-step:nth-child(2) { animation-range: entry 60% entry 86%; }
    #method .method-step:nth-child(3) { animation-range: entry 70% entry 94%; }
    #method .method-step:nth-child(4) { animation-range: entry 78% entry 100%; }

    @media (min-width: 48rem) {
      #method .method-step:nth-child(1) { animation-range: entry 30% entry 64%; }
      #method .method-step:nth-child(2) { animation-range: entry 44% entry 78%; }
      #method .method-step:nth-child(3) { animation-range: entry 58% entry 90%; }
      #method .method-step:nth-child(4) { animation-range: entry 70% entry 100%; }
    }

    /* the map: markers drop in, then the leader lines run out to their labels */
    /* on the figure, not the SVG: .project-map clips its overflow, which makes it the SVG's scroll container */
    .project-map {
      view-timeline-name: --map;
    }

    .map-dot,
    .map-plus,
    .map-ring,
    .map-leader {
      animation-timeline: --map;
      animation-timing-function: linear;
      animation-fill-mode: both;
    }

    .map-dot,
    .map-plus,
    .map-ring {
      animation-name: gw-pop;
      animation-range: entry 25% entry 65%;
      transform-box: fill-box;
      transform-origin: center;
    }

    .map-marker:focus-visible :is(.map-dot, .map-plus, .map-ring) {
      animation: none;
    }

    .map-leader {
      stroke-dasharray: 1;
      animation-name: gw-draw;
      animation-range: entry 55% entry 95%;
    }
  }
}

/* a method step comes in from beyond the left edge of the screen and eases into its place */
@keyframes gw-slide-in {
  from {
    translate: -100vw 0;
    opacity: 0;
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  to {
    translate: 0 0;
    opacity: 1;
  }
}

@keyframes gw-draw {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes gw-fade {
  from {
    opacity: 0;
  }
}

@keyframes gw-pop {
  from {
    opacity: 0;
    scale: 0.4;
  }
}

@keyframes gw-rise {
  from {
    opacity: 0;
    translate: 0 1rem;
  }
}

@keyframes gw-fade-out {
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .method-step:hover,
  .method-step:focus-within,
  .method-step:hover .method-step-cta::after,
  .method-step:focus-within .method-step-cta::after,
  .project-card a:hover,
  .project-card a:focus-visible,
  .project-card a:hover .project-card-cta::after,
  .project-card a:focus-visible .project-card-cta::after {
    transform: none;
  }
}
