/* Layout: an academic annual report — one column of left-aligned sections on alternating paper
   and tint grounds, with a carpet-border band as the single ornamental gesture. */
:root {
  --paper: #FAFAF8;
  --tint: #EFF1F5;
  --surface: #FFFFFF;
  --ink: #141B33;
  --ink-2: #394158;
  --muted: #626A80;
  --rule: #D8DCE4;
  --madder: #9C2A29;      /* pomegranate red: accent */
  --indigo: #27367A;      /* carpet indigo: data */
  --bar-before: #A9B2C8;
  /* Rug palette, sampled from the namazlıq the ornament is drawn from */
  --rug-ivory: #EFE6D2; --rug-red: #A8262E; --rug-sky: #8098BF; --rug-navy: #1E2C5E; --rug-green: #2E5B44; --rug-gold: #D8A336;
  --seg1: #27367A; --seg2: #9C2A29; --seg3: #B5872F; --seg4: #5B83BF; --seg5: #8C7B6A;

  --display: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1222; --tint: #141A2D; --surface: #1A2138; --ink: #E9EBF1; --ink-2: #C4C9D7;
    --muted: #9BA3B7; --rule: #2C3452; --madder: #E2716A; --indigo: #93A5EB; --bar-before: #4A5578;
    --rug-ivory: #D9CFB9; --rug-red: #A3303A; --rug-sky: #7489B0;
    --seg1: #93A5EB; --seg2: #E2716A; --seg3: #D6AC55; --seg4: #6FB0D9; --seg5: #B7A794;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1222; --tint: #141A2D; --surface: #1A2138; --ink: #E9EBF1; --ink-2: #C4C9D7;
  --muted: #9BA3B7; --rule: #2C3452; --madder: #E2716A; --indigo: #93A5EB; --bar-before: #4A5578;
  --rug-ivory: #D9CFB9; --rug-red: #A3303A; --rug-sky: #7489B0;
  --seg1: #93A5EB; --seg2: #E2716A; --seg3: #D6AC55; --seg4: #6FB0D9; --seg5: #B7A794;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--madder); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--madder); outline-offset: 3px; border-radius: 2px; }
p, ul, dl, dd, figure, blockquote, h1, h2, h3, h4 { margin: 0; }
ul { padding: 0; list-style: none; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.r-ivory { fill: var(--rug-ivory); } .r-red { fill: var(--rug-red); } .r-sky { fill: var(--rug-sky); }
.r-navy { fill: var(--rug-navy); } .r-green { fill: var(--rug-green); } .r-gold { fill: var(--rug-gold); }
.c-red { color: var(--rug-red); } .c-sky { color: var(--rug-sky); } .c-green { color: var(--rug-green); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 14px; border: 1px solid var(--rule); }
.skip:focus { left: 16px; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }

/* ---------- Type ---------- */
h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 6.2vw, 5.1rem);
  line-height: .96;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.15rem, 4.2vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -.006em;
  text-wrap: balance;
}
h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  text-wrap: balance;
}
h4 { font: 700 1.0625rem/1.3 var(--body); }

.eyebrow {
  display: flex; align-items: flex-start; gap: 10px;
  font: 700 .75rem/1.45 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--madder);
}
.eyebrow::before {
  content: ""; flex: none;
  width: 7px; height: 7px;
  margin-top: .42em;
  background: currentColor;
  transform: rotate(45deg);
}
.label-sm {
  font: 700 .75rem/1.45 var(--body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.num {
  font-family: var(--display);
  font-weight: 600;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  color: var(--ink);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); position: relative; }
.brand {
  display: flex; align-items: center; gap: 10px;
  margin-right: auto;
  font: 700 1.25rem/1 var(--display);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand svg { width: 22px; height: 22px; flex: none; }
.nav { display: flex; gap: clamp(14px, 1.8vw, 24px); }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 600; transition: color 150ms ease; }

/* Segmented switches (language, before/after): a thumb slides under the active option */
.lang, .toggle {
  position: relative; flex: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border: 1px solid var(--rule); border-radius: 999px;
  transition: transform 160ms var(--ease-out);
}
.lang { padding: 2px; }
.toggle { padding: 3px; }
.lang:has(button:active), .toggle:has(button:active) { transform: scale(0.98); }
.thumb {
  position: absolute; left: 2px; top: 2px; bottom: 2px;
  width: calc((100% - 4px) / 3);
  border-radius: 999px; background: var(--ink);
}
.toggle .thumb { left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 2); }
.js-ready .thumb { transition: transform 260ms var(--ease-in-out); }
.lang[data-active="az"] .thumb, .toggle[data-mode="after"] .thumb { transform: translateX(100%); }
.lang[data-active="ru"] .thumb { transform: translateX(200%); }
.lang button, .toggle button {
  position: relative; z-index: 1;
  border: 0; background: none; color: var(--muted);
  border-radius: 999px; cursor: pointer;
  transition: color 260ms ease;
}
.lang button { font: 700 .72rem/1 var(--body); letter-spacing: .08em; padding: 7px 10px; }
.lang button[aria-pressed="true"], .toggle button[aria-pressed="true"] { color: var(--paper); }

.menu-btn {
  display: none;
  font: 600 .85rem/1 var(--body);
  color: var(--ink); background: none;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 150ms ease;
}
.menu-btn:active { transform: scale(0.97); }
@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 4px var(--gutter) 12px;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  }
  .nav.open { display: flex; }
  @starting-style { .nav.open { opacity: 0; transform: translateY(-6px); } }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
  .nav a:last-child { border-bottom: 0; }
}
@media (max-width: 560px) {
  .brand-tail { display: none; }
  .header-row { gap: 10px; }
  .lang button { padding: 7px 8px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 9vw, 116px) clamp(48px, 7vw, 92px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
.hero-text { display: grid; gap: 24px; min-width: 0; }
.lede { font-size: clamp(1.125rem, 1.55vw, 1.3rem); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.hero-meta { font-size: .92rem; color: var(--muted); max-width: 62ch; padding-top: 4px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.fact { display: flex; flex-direction: column; gap: 8px; padding-block: 22px 20px; border-bottom: 1px solid var(--rule); min-width: 0; }
.fact:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--rule); }
.fact:nth-child(even) { padding-left: 22px; }
.fact .num { font-size: clamp(2.8rem, 5vw, 4.1rem); }
.fact .label { font-size: .9rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Ornament band ---------- */
/* Red edge, guard stripe, rosette border, guard stripe, red edge: the rug's border sequence */
.band { line-height: 0; }
.band svg { display: block; width: 100%; height: 56px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section.alt { background: var(--tint); }
.sec-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head p:not(.eyebrow) { color: var(--ink-2); max-width: 65ch; }
.prose { display: grid; gap: 18px; align-content: start; min-width: 0; }
.prose > p:not(.eyebrow):not(.label-sm) { color: var(--ink-2); max-width: 65ch; }
.prose .label-sm { margin-top: 8px; }

.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); }
.two.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two > div { min-width: 0; display: grid; gap: 18px; align-content: start; }
@media (max-width: 860px) { .two, .two.even { grid-template-columns: 1fr; } }

/* Lists with a small diamond marker */
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-2); line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .55em;
  width: 6px; height: 6px; background: var(--madder); transform: rotate(45deg);
}
.ticks.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.ticks.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
@media (max-width: 860px) { .ticks.cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ticks.cols, .ticks.cols3 { grid-template-columns: 1fr; } }

/* Placeholder slots (map, photos) */
.slot {
  position: relative; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  max-width: 100%;
}
.slot-art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .09; }
.slot-text { position: relative; display: grid; gap: 6px; padding: 24px; }
.slot-title { font: 600 1.5rem/1.2 var(--display); color: var(--ink); }
.slot-note { position: relative; font: 600 .75rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.map-slot { aspect-ratio: 4 / 3.4; align-self: start; }
.slot.photo { aspect-ratio: 4 / 5; }

/* ---------- Research ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); margin-bottom: clamp(40px, 5vw, 64px); }
.stat-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-row > div { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 4px 0; min-width: 0; }
.stat-row > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.stat-row .num { font-size: clamp(2.6rem, 4.6vw, 3.8rem); }
.stat-row dd { color: var(--muted); font-size: .95rem; line-height: 1.4; max-width: 26ch; }
@media (max-width: 760px) {
  .stat-row, .stat-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row > div { padding: 20px 16px 18px 0; border-bottom: 1px solid var(--rule); }
  .stat-row > div + div { padding-left: 0; border-left: 0; }
  .stat-row > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
}

.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 16px; }
.groups li { padding: 4px 24px 4px 0; color: var(--ink-2); line-height: 1.5; min-width: 0; }
.groups li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
@media (max-width: 760px) {
  .groups { grid-template-columns: 1fr; gap: 14px; }
  .groups li, .groups li + li { padding: 0 0 0 16px; border-left: 2px solid var(--rule); }
}

.finding { margin-block: clamp(48px, 6vw, 72px); max-width: 880px; display: grid; gap: 14px; padding-top: 28px; border-top: 1px solid var(--rule); }
.finding .label-sm { color: var(--madder); }
.finding-text {
  font: 500 clamp(1.45rem, 2.5vw, 2rem)/1.32 var(--display);
  color: var(--ink);
  text-wrap: pretty;
}

/* Pricing tool */
.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 56px);
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: clamp(22px, 3.5vw, 44px);
}
.pricing-intro { display: grid; gap: 14px; align-content: start; min-width: 0; }
.pricing-intro > p:not(.eyebrow) { color: var(--ink-2); font-size: 1rem; }
.costs { border: 0; padding: 0; margin: 8px 0 0; display: grid; }
.cost {
  display: grid; grid-template-columns: auto 12px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding-block: 11px; border-top: 1px solid var(--rule); cursor: pointer; font-size: .98rem;
}
.cost:last-child { border-bottom: 1px solid var(--rule); }
.cost input { width: 18px; height: 18px; margin: 0; accent-color: var(--indigo); cursor: pointer; }
.cost input:disabled { cursor: default; }
.cost:has(input:disabled) { cursor: default; }
.cost-name small { color: var(--muted); font-size: .82rem; }
.cost-val { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.cost:has(input:not(:checked)) .cost-name, .cost:has(input:not(:checked)) .cost-val { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }
.sw { width: 12px; height: 12px; display: block; }
.s1 { background: var(--seg1); } .s2 { background: var(--seg2); } .s3 { background: var(--seg3); }
.s4 { background: var(--seg4); } .s5 { background: var(--seg5); }

.pricing-viz { display: grid; gap: 14px; align-content: center; min-width: 0; }
.price-total { display: flex; align-items: baseline; gap: 10px; }
.price-total .num { font-size: clamp(3.4rem, 6vw, 4.8rem); }
.price-total .unit { font: 700 .9rem/1 var(--body); letter-spacing: .1em; color: var(--muted); }
.stack { position: relative; padding-top: 44px; padding-bottom: 26px; }
.stack-track { position: relative; height: 44px; background: var(--tint); overflow: hidden; }
/* Each segment spans the track and is positioned with translateX + scaleX, so only transform animates */
.seg {
  position: absolute; inset: 0;
  transform-origin: left center;
  transition: transform 320ms var(--ease-in-out);
}
.marker { position: absolute; top: 30px; bottom: 20px; width: 0; border-left: 2px dashed var(--ink); }
.marker-label {
  position: absolute; bottom: calc(100% + 4px); left: -2px;
  white-space: nowrap; font: 600 .8rem/1.2 var(--body); color: var(--ink);
}
.scale { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; }
.scale span { position: absolute; transform: translateX(-50%); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale span:first-child { transform: none; }
.price-msg { font-size: 1rem; color: var(--ink-2); min-height: 3em; }
.price-msg strong { color: var(--madder); }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .marker-label { font-size: .72rem; } }

/* ---------- Method ---------- */
.stepper { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.steps { display: grid; border-top: 2px solid var(--ink); }
.steps button {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: baseline; gap: 10px;
  text-align: left; width: 100%;
  font: 600 1rem/1.35 var(--body); color: var(--muted);
  background: none; border: 0; border-bottom: 1px solid var(--rule);
  padding: 15px 8px 15px 0; cursor: pointer;
  transition: color 150ms ease;
}
.steps button[aria-selected="true"] { color: var(--ink); }
.step-n { font: 600 1.6rem/1 var(--display); font-feature-settings: "lnum" 1; color: var(--rule); transition: color 150ms ease; }
.steps button[aria-selected="true"] .step-n { color: var(--madder); }
.panels { min-width: 0; }
.panel {
  display: grid; gap: 22px; align-content: start;
  background: var(--surface); border: 1px solid var(--rule);
  padding: clamp(22px, 3.5vw, 40px);
  min-height: 100%;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
@starting-style { .panel { opacity: 0; transform: translateY(4px); } }
.panel > p { color: var(--ink-2); max-width: 65ch; font-size: 1.05rem; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 28px; }
.mini-stats > div { display: grid; gap: 4px; border-top: 1px solid var(--rule); padding-top: 12px; }
.mini-stats dt { font: 600 2.2rem/1 var(--display); font-feature-settings: "lnum" 1; color: var(--indigo); }
.mini-stats dd { font-size: .9rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 860px) {
  .stepper { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .steps button { font-size: .92rem; padding: 12px 4px 12px 0; grid-template-columns: 26px minmax(0, 1fr); }
  .step-n { font-size: 1.35rem; }
}

.pathways { margin-top: clamp(56px, 7vw, 88px); display: grid; gap: 28px; }
.pw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.pw { display: grid; gap: 10px; align-content: start; border-top: 2px solid var(--ink); padding-top: 18px; min-width: 0; }
.pw p { color: var(--ink-2); font-size: .98rem; line-height: 1.55; }
@media (max-width: 900px) { .pw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pw-grid { grid-template-columns: 1fr; } }

/* ---------- Results ---------- */
.chart { background: var(--surface); border: 1px solid var(--rule); padding: clamp(22px, 3.5vw, 44px); display: grid; gap: 28px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.toggle button { font: 600 .88rem/1 var(--body); padding: 9px 20px; }
.bars { display: grid; gap: 22px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr) 118px; align-items: center; gap: 24px; }
.bar-label { color: var(--ink-2); line-height: 1.35; font-size: .98rem; }
.track { position: relative; height: 14px; background: var(--tint); }
.bar {
  position: absolute; inset: 0;
  background: var(--indigo);
  transform-origin: left center;
  transition: transform 480ms var(--ease-in-out), background-color 300ms ease;
}
.bar.is-before { background: var(--bar-before); }
.tick { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); transition: opacity 200ms ease; }
.bar-val { display: grid; justify-items: end; gap: 2px; }
.bar-val .v { font: 600 1.7rem/1 var(--display); font-feature-settings: "lnum" 1, "tnum" 1; color: var(--ink); white-space: nowrap; }
.was { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.chart-note { font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) {
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; column-gap: 16px; }
  .bar-label { grid-column: 1; grid-row: 1; }
  .bar-val { grid-column: 2; grid-row: 1; }
  .track { grid-column: 1 / -1; grid-row: 2; }
}

.follow {
  margin-top: clamp(32px, 4vw, 48px);
  max-width: 760px;
  font: 500 clamp(1.3rem, 2.2vw, 1.7rem)/1.35 var(--display);
  color: var(--ink);
}
.follow strong { font-weight: 700; color: var(--madder); font-feature-settings: "lnum" 1; }

.table-title { margin-top: clamp(48px, 6vw, 72px); margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
.scope { width: 100%; border-collapse: collapse; font-size: 1rem; }
.scope th { text-align: left; font: 700 .75rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 0 12px; border-bottom: 2px solid var(--ink); }
.scope th:last-child, .scope td:last-child { text-align: right; padding-left: 24px; white-space: nowrap; }
.scope td { padding: 13px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.scope td:last-child { font: 600 1.3rem/1 var(--display); font-feature-settings: "lnum" 1, "tnum" 1; color: var(--ink); }
.source { margin-top: 16px; font-size: .85rem; color: var(--muted); max-width: 70ch; }

/* ---------- Catalogue ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); }
.tile { display: grid; gap: 12px; min-width: 0; }
.tile figcaption { font: 600 1.25rem/1.25 var(--display); color: var(--ink); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Lessons / closing lines ---------- */
.closing {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  max-width: 820px;
  font: 500 italic clamp(1.3rem, 2.1vw, 1.65rem)/1.4 var(--display);
  color: var(--ink);
}

/* ---------- Team ---------- */
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.person {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 22px; align-items: start;
  background: var(--surface); border: 1px solid var(--rule);
  padding: clamp(22px, 3vw, 36px);
}
.portrait {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--tint); border: 1px solid var(--rule);
  font: 600 1.6rem/1 var(--display); color: var(--indigo); letter-spacing: .04em;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.person-body { display: grid; gap: 12px; min-width: 0; }
.role { font: 700 .75rem/1.5 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--madder); }
.person-body > p:not(.role) { color: var(--ink-2); font-size: 1rem; }
.person-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; border-top: 1px solid var(--rule); padding-top: 16px; }
.person-facts > div { display: grid; gap: 4px; align-content: start; min-width: 0; }
.person-facts dt { font: 600 1.9rem/1 var(--display); font-feature-settings: "lnum" 1, "tnum" 1; color: var(--ink); white-space: nowrap; }
.person-facts .of { font-size: 1.05rem; color: var(--muted); }
.person-facts dd { font-size: .84rem; line-height: 1.35; color: var(--muted); }
@media (max-width: 960px) { .people { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .person { grid-template-columns: 1fr; }
  .portrait { width: 64px; height: 64px; font-size: 1.35rem; }
}

/* ---------- Contact ---------- */
#contact .two > div:first-child { gap: 18px; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 6px; }
.email {
  font: 600 clamp(1.35rem, 2.6vw, 2rem)/1.2 var(--display);
  color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
  border-bottom: 1px solid var(--madder);
  transition: color 150ms ease;
}
.copy-btn {
  font: 600 .85rem/1 var(--body); color: var(--ink);
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 9px 16px; cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 150ms ease;
}
.copy-btn:active { transform: scale(0.97); }
.org { background: var(--tint); padding: clamp(22px, 3vw, 36px); }
.org-name { font: 600 1.4rem/1.3 var(--display); color: var(--ink); }
.org-dl { display: grid; gap: 14px; margin-top: 6px; }
.org-dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--rule); padding-top: 12px; }
.org-dl dt { font: 700 .72rem/1.6 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.org-dl dd { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 420px) { .org-dl > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Footer ---------- */
.site-footer { padding-block: 28px 36px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; font-size: .88rem; }
.footer-row .muted { max-width: 60ch; }

/* ---------- Hover (mouse only, so taps don't leave sticky states) ---------- */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
  .nav a:hover, .email:hover { color: var(--madder); }
  .lang button:not([aria-pressed="true"]):hover,
  .toggle button:not([aria-pressed="true"]):hover,
  .steps button:hover { color: var(--ink); }
  .steps button:not([aria-selected="true"]):hover .step-n { color: var(--muted); }
  .menu-btn:hover, .copy-btn:hover { border-color: var(--ink); }
}

/* ---------- Motion ---------- */
/* Hero settles in once on load, staggered */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
.hero-text > *, .fact { animation: rise 700ms var(--ease-out) both; }
.hero-text > :nth-child(2) { animation-delay: 60ms; }
.hero-text > :nth-child(3) { animation-delay: 120ms; }
.hero-text > :nth-child(4) { animation-delay: 180ms; }
.fact:nth-child(1) { animation-delay: 220ms; }
.fact:nth-child(2) { animation-delay: 270ms; }
.fact:nth-child(3) { animation-delay: 320ms; }
.fact:nth-child(4) { animation-delay: 370ms; }

/* Changed values blur through the swap instead of hard-cutting */
@keyframes swap { from { filter: blur(2px); opacity: .45; } }
.swap { animation: swap 240ms var(--ease-out); }

/* Reduced motion: keep fades and colour changes, drop movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text > *, .fact { animation-name: fade; }
  .bar, .seg, .js-ready .thumb { transition-property: background-color, opacity; }
  .lang, .toggle, .menu-btn, .copy-btn { transition: none; }
  .lang:has(button:active), .toggle:has(button:active), .menu-btn:active, .copy-btn:active { transform: none; }
  @starting-style { .panel, .nav.open { transform: none; } }
}
