/* ==========================================================================
   GrantClock design system
   Civic trust: deep teal, warm sand, signal amber.
   Spectral for display, IBM Plex Sans for interface and body.
   Motif: data ribbons, ledger rules, calendar grids.
   ========================================================================== */

:root {
  /* Brief palette */
  --bg: #F6F8F7;
  --surface: #FFFFFF;
  --ink: #10231F;
  --primary: #12574C;
  --accent: #E0A82E;
  --muted: #5A6B67;

  /* Teal ramp derived from the primary */
  --teal-900: #071F1B;
  --teal-800: #0B3A33;
  --teal-700: #12574C;
  --teal-600: #176B5D;
  --teal-500: #1E8271;
  --teal-300: #7FB3A8;
  --teal-200: #BCD8D1;
  --teal-100: #DCEAE6;
  --teal-050: #EDF4F2;

  /* Warm sand ramp, the civic paper stock */
  --sand-500: #D3C09B;
  --sand-400: #DFD0B2;
  --sand-300: #EADFC8;
  --sand-200: #F2EBDB;
  --sand-100: #F8F4EA;

  /* Signal amber, used only where something is due */
  --amber-700: #8A6210;
  --amber-600: #B4801B;
  --amber-500: #E0A82E;
  --amber-200: #F5E2B4;
  --amber-100: #FBF1DA;

  /* Support */
  --line: #DAE4E1;
  --line-strong: #BFD1CC;
  --ink-soft: #24413B;
  --white: #FFFFFF;

  /* Spacing scale */
  --s0: 4px;
  --s1: 8px;
  --s2: 12px;
  --s3: 16px;
  --s4: 22px;
  --s5: 30px;
  --s6: 40px;
  --s7: 54px;
  --s8: 72px;
  --s9: 96px;
  --s10: 128px;

  /* Radii */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadows tinted with teal instead of neutral gray */
  --sh-1: 0 1px 2px rgba(7, 31, 27, .06), 0 2px 8px rgba(7, 31, 27, .04);
  --sh-2: 0 2px 6px rgba(7, 31, 27, .07), 0 14px 34px rgba(7, 31, 27, .07);
  --sh-3: 0 4px 12px rgba(7, 31, 27, .09), 0 26px 60px rgba(7, 31, 27, .12);
  --sh-inset: inset 0 0 0 1px var(--line);

  /* Type */
  --font-display: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --t-xs: .78rem;
  --t-sm: .875rem;
  --t-base: 1.02rem;
  --t-md: 1.14rem;
  --t-lg: clamp(1.22rem, 1.05rem + .6vw, 1.45rem);
  --t-h4: clamp(1.15rem, 1rem + .55vw, 1.35rem);
  --t-h3: clamp(1.35rem, 1.1rem + 1vw, 1.72rem);
  --t-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.6rem);
  --t-h1: clamp(2.3rem, 1.5rem + 3.4vw, 4rem);

  --wrap: 1200px;
  --wrap-narrow: 760px;
  --header-h: 76px;

  /* Ledger rule texture used on large surfaces */
  --ledger: repeating-linear-gradient(
    180deg,
    rgba(18, 87, 76, .055) 0,
    rgba(18, 87, 76, .055) 1px,
    transparent 1px,
    transparent 32px);
  --calendar-grid: repeating-linear-gradient(
      90deg, rgba(18, 87, 76, .07) 0, rgba(18, 87, 76, .07) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(
      180deg, rgba(18, 87, 76, .07) 0, rgba(18, 87, 76, .07) 1px, transparent 1px, transparent 64px);
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--ledger),
    radial-gradient(1100px 520px at 88% -8%, rgba(224, 168, 46, .13), transparent 62%),
    radial-gradient(900px 480px at -10% 4%, rgba(18, 87, 76, .09), transparent 60%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.68;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-600); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.012em;
  color: var(--ink);
  margin: 0 0 var(--s3);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); letter-spacing: -.024em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
p { margin: 0 0 var(--s3); }
ul, ol { margin: 0 0 var(--s3); padding-left: 1.15rem; }
li { margin-bottom: var(--s1); }
strong { font-weight: 600; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
figure { margin: 0; }
blockquote { margin: 0; }
::selection { background: var(--amber-200); color: var(--teal-900); }

/* ------------------------------------------------------- a11y helpers -- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s3); top: -70px; z-index: 999;
  background: var(--teal-800); color: var(--white);
  padding: 12px 18px; border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600; text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: var(--white); }
:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 3px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 1px;
}

/* ------------------------------------------------------------ layout -- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }
.section { padding-block: clamp(58px, 7vw, 104px); position: relative; }
.section--tight { padding-block: clamp(44px, 5vw, 72px); }

/* The calm two column reading rhythm: a sticky left rail, a wide right column */
.rhythm {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5);
}
@media (min-width: 900px) {
  .rhythm { grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: clamp(40px, 5vw, 88px); }
  .rhythm__rail { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
}
.rhythm__rail p { color: var(--muted); font-size: var(--t-sm); max-width: 34ch; }
.rail-note {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  font-size: var(--t-sm);
  color: var(--muted);
}

/* Section bands */
.band--sand {
  background-color: var(--sand-100);
  background-image: var(--calendar-grid);
  background-size: 64px 64px;
  border-block: 1px solid var(--sand-400);
}
.band--paper { background: var(--surface); border-block: 1px solid var(--line); }
.band--deep {
  background-color: var(--teal-800);
  background-image:
    repeating-linear-gradient(180deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 1px, transparent 34px),
    radial-gradient(760px 380px at 82% 0%, rgba(224,168,46,.22), transparent 64%);
  color: var(--sand-200);
}
.band--deep h2, .band--deep h3, .band--deep h4 { color: var(--white); }
.band--deep p { color: var(--teal-200); }

/* ------------------------------------------------------------ eyebrow -- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin: 0 0 var(--s2);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 3px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--teal-700) 55%, var(--amber-500) 55%);
}
.band--deep .eyebrow { color: var(--amber-500); }
.band--deep .eyebrow::before { background: linear-gradient(90deg, var(--amber-500) 55%, var(--sand-300) 55%); }

.lede { font-size: var(--t-lg); color: var(--ink-soft); line-height: 1.55; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }

/* ------------------------------------------------------ data ribbons -- */
/* The signature motif: stacked bars of unequal length, an amber cap where a
   deadline falls. Bars grow from the left when the block scrolls into view. */
.ribbons { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.ribbon {
  position: relative;
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--teal-100);
  overflow: hidden;
}
.ribbon__fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  transform: scaleX(var(--w, .6));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--teal-700), var(--teal-500));
  transition: transform 1.05s cubic-bezier(.22, .78, .24, 1);
  transition-delay: var(--delay, 0ms);
}
.ribbon--due .ribbon__fill { background: linear-gradient(90deg, var(--amber-600), var(--amber-500)); }
.ribbon--sand .ribbon__fill { background: linear-gradient(90deg, var(--sand-500), var(--sand-400)); }
.reveal .ribbon__fill { transform: scaleX(0); }
.reveal.is-visible .ribbon__fill { transform: scaleX(var(--w, .6)); }

.ribbon-strip {
  display: flex; gap: 6px; align-items: center;
  height: 6px; margin-bottom: var(--s4);
}
.ribbon-strip span { height: 6px; border-radius: var(--r-pill); background: var(--teal-200); }
.ribbon-strip span:nth-child(1) { width: 58px; background: var(--teal-700); }
.ribbon-strip span:nth-child(2) { width: 26px; background: var(--amber-500); }
.ribbon-strip span:nth-child(3) { width: 14px; background: var(--sand-500); }
.ribbon-strip span:nth-child(4) { width: 40px; }

/* Divider drawn as a ribbon board rather than a plain rule */
.ribbon-rule {
  height: 8px;
  border: 0;
  margin: 0;
  background:
    linear-gradient(90deg, var(--teal-700) 0 18%, transparent 18%),
    linear-gradient(90deg, transparent 0 20%, var(--amber-500) 20% 27%, transparent 27%),
    linear-gradient(90deg, transparent 0 29%, var(--sand-500) 29% 46%, transparent 46%),
    linear-gradient(90deg, transparent 0 48%, var(--teal-300) 48% 74%, transparent 74%),
    linear-gradient(90deg, transparent 0 76%, var(--teal-700) 76% 100%);
  opacity: .85;
}

/* ----------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: .01em;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn--primary {
  background: var(--teal-700);
  color: var(--white);
  box-shadow: inset 0 -3px 0 rgba(224, 168, 46, .95), var(--sh-1);
}
.btn--primary:hover { background: var(--teal-600); color: var(--white); transform: translateY(-2px); box-shadow: inset 0 -3px 0 var(--amber-500), var(--sh-2); }
/* Label held to white through focus and press as well as hover, so the deep
   teal fill always reads at full contrast. */
.btn--primary:focus-visible, .btn--primary:active { color: var(--white); }
.btn--ghost {
  background: transparent;
  color: var(--teal-700);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--teal-050); border-color: var(--teal-300); color: var(--teal-700); transform: translateY(-2px); }
.btn--sand { background: var(--sand-300); color: var(--teal-800); border-color: var(--sand-500); }
.btn--sand:hover { background: var(--sand-200); color: var(--teal-800); transform: translateY(-2px); }
.btn--block { width: 100%; }
.btn--lg { padding: 17px 30px; font-size: var(--t-base); }
.btn .ic { width: 18px; height: 18px; flex: 0 0 auto; }

/* ------------------------------------------------------------ header -- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246, 248, 247, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-700) 0 34%, var(--amber-500) 34% 46%, var(--sand-400) 46% 62%, var(--teal-300) 62% 100%);
  opacity: .9;
}
.site-header.is-stuck { box-shadow: var(--sh-2); background: rgba(246, 248, 247, .98); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 600; letter-spacing: -.015em;
  color: var(--teal-800);
}
.brand__name b { color: var(--amber-600); font-weight: 600; }
.nav { display: flex; align-items: center; gap: var(--s4); }
.nav a {
  font-size: var(--t-sm); font-weight: 500;
  text-decoration: none; padding: 6px 2px; position: relative;
}
/* Ink colour and the amber sweep underline belong to plain nav links only.
   .nav a outranks .btn--primary on specificity, so without :not(.btn) it
   repainted the header CTA label dark on the teal fill, and on hover painted
   it teal on teal. The button keeps its own .btn--primary label colour. */
.nav a:not(.btn) { color: var(--ink-soft); }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--amber-500); border-radius: var(--r-pill);
  transition: right .22s ease;
}
.nav a:not(.btn):hover { color: var(--teal-700); }
.nav a:not(.btn):hover::after { right: 0; }
.header-cta { display: none; }
@media (min-width: 1040px) { .header-cta { display: inline-flex; } }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--teal-700); position: relative; border-radius: 2px; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--teal-700); border-radius: 2px;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; width: 13px; background: var(--amber-500); }
@media (min-width: 1040px) { .nav-toggle { display: none; } }
@media (max-width: 1039px) {
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-2);
    padding: var(--s2) clamp(18px, 4vw, 40px) var(--s4);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: var(--s3); }
}

/* -------------------------------------------------------------- hero -- */
.hero { position: relative; overflow: hidden; padding-block: clamp(44px, 5.5vw, 88px) clamp(52px, 6vw, 96px); }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--calendar-grid);
  background-size: 64px 64px;
  opacity: .5;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 78%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: clamp(34px, 4vw, 60px); align-items: start; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); align-items: center; } }
.hero h1 { margin-bottom: var(--s3); }
.hero h1 em {
  font-style: normal;
  position: relative;
  background: linear-gradient(180deg, transparent 68%, var(--amber-200) 68% 94%, transparent 94%);
  padding-inline: 2px;
}
.hero__sub { font-size: var(--t-lg); color: var(--ink-soft); max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0 var(--s5); }

.trust-strip {
  display: grid; gap: var(--s2);
  padding: var(--s4) 0 0;
  border-top: 1px solid var(--line-strong);
}
@media (min-width: 620px) { .trust-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } }
.trust-strip__item { display: flex; gap: 11px; align-items: flex-start; font-size: var(--t-sm); color: var(--ink-soft); }
.trust-strip__item .ic { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; color: var(--teal-600); }
.trust-strip__item b { display: block; font-weight: 600; color: var(--ink); }

.hero__media { position: relative; }
.hero__frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-3);
  background: var(--surface);
}
.hero__frame img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.hero__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(190deg, rgba(11, 58, 51, .04) 0%, rgba(11, 58, 51, .42) 100%);
  pointer-events: none;
}

/* The deadline board: the product mechanic, drawn in CSS over the photograph */
.board {
  position: relative;
  margin-top: -78px;
  margin-left: clamp(0px, 3vw, 34px);
  margin-right: clamp(0px, 3vw, 10px);
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  padding: var(--s4);
}
.board::before {
  content: "";
  position: absolute; left: var(--s4); right: var(--s4); top: 0; height: 4px;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: linear-gradient(90deg, var(--teal-700) 0 42%, var(--amber-500) 42% 58%, var(--sand-500) 58% 100%);
}
.board__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2);
  margin-bottom: var(--s3);
}
.board__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin: 0; }
.board__meta { font-size: var(--t-xs); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.board__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 0; border-top: 1px dashed var(--line); }
.board__row:first-of-type { border-top: 0; }
.board__line { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.board__funder { font-size: var(--t-sm); font-weight: 500; color: var(--ink); }
.board__due { font-family: var(--font-display); font-size: var(--t-sm); font-variant-numeric: tabular-nums; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--teal-050); color: var(--teal-700); border: 1px solid var(--teal-100);
}
.chip--due { background: var(--amber-100); color: var(--amber-700); border-color: var(--amber-200); }
.chip--filed { background: var(--sand-200); color: var(--teal-800); border-color: var(--sand-400); }

/* --------------------------------------------------------------- cards -- */
.grid { display: grid; gap: var(--s3); }
.grid--2 { grid-template-columns: minmax(0, 1fr); }
.grid--3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s4);
  box-shadow: var(--sh-1);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.card h3 { font-size: var(--t-h4); margin-bottom: var(--s1); }
.card p { color: var(--muted); margin-bottom: 0; font-size: var(--t-sm); line-height: 1.62; }
.card__cost {
  display: inline-block; margin-top: var(--s3);
  font-family: var(--font-display);
  font-size: var(--t-sm); font-weight: 600; color: var(--amber-700);
  border-top: 2px solid var(--amber-500);
  padding-top: 6px;
}
.card--pain { border-left: 3px solid var(--amber-500); }

.feature { display: grid; gap: var(--s2); }
.feature__icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  color: var(--teal-700);
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 4px; }

/* -------------------------------------------------------------- steps -- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); counter-reset: step; }
.step {
  display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: var(--s3);
  align-items: start; margin: 0;
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step__num {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--teal-800);
  background: var(--sand-200);
  border: 1px solid var(--sand-500);
  box-shadow: inset 0 -3px 0 rgba(224, 168, 46, .55);
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin-bottom: var(--s2); }
.step .ribbons { max-width: 260px; }

.figure-frame {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-2);
  background: var(--surface);
}
.figure-frame img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.figure-caption {
  font-size: var(--t-xs); color: var(--muted);
  padding: var(--s2) var(--s3);
  border-top: 1px solid var(--line);
  background: var(--sand-100);
}

/* ------------------------------------------------------------ metrics -- */
.outcome {
  display: grid; gap: var(--s2);
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.outcome__num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.4rem);
  font-weight: 600; line-height: 1;
  color: var(--teal-700);
  font-variant-numeric: tabular-nums lining-nums;
}
.outcome__num span { color: var(--amber-600); }
.outcome h3 { font-size: var(--t-h4); margin: 0; }
.outcome p { margin: 0; color: var(--muted); font-size: var(--t-sm); }

.results {
  display: grid; gap: var(--s4);
  padding: var(--s5);
  border-radius: var(--r-lg);
  background: var(--teal-800);
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 1px, transparent 30px);
  border: 1px solid var(--teal-700);
}
@media (min-width: 760px) { .results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.results__num {
  font-family: var(--font-display); font-size: 2.3rem; font-weight: 600; color: var(--amber-500);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.results p { color: var(--teal-200); font-size: var(--t-sm); margin: 8px 0 0; }

/* ------------------------------------------------------ testimonials -- */
.testimonial {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s4) var(--s4);
  box-shadow: var(--sh-1);
  display: flex; flex-direction: column; height: 100%;
}
.testimonial::before {
  content: "";
  position: absolute; top: 0; left: var(--s4); width: 62px; height: 5px;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: linear-gradient(90deg, var(--teal-700) 0 60%, var(--amber-500) 60% 100%);
}
.testimonial blockquote { font-family: var(--font-display); font-size: var(--t-md); line-height: 1.55; color: var(--ink); margin: 0 0 var(--s3); }
.testimonial figcaption { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--t-sm); }
.testimonial figcaption b { display: block; color: var(--ink); font-weight: 600; }
.testimonial figcaption span { color: var(--muted); }

/* ------------------------------------------------------------ pricing -- */
.tiers { display: grid; gap: var(--s4); align-items: start; }
@media (min-width: 940px) { .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tier {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s4) var(--s4);
  display: flex; flex-direction: column; gap: var(--s3);
  position: relative;
}
.tier--pick {
  border-color: var(--teal-700);
  box-shadow: var(--sh-3);
  background:
    linear-gradient(180deg, var(--sand-100), var(--surface) 180px);
}
.tier__flag {
  position: absolute; top: -14px; left: var(--s4);
  background: var(--amber-500); color: var(--teal-900);
  font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 5px 13px; border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
}
.tier h3 { margin: 0; font-size: var(--t-h3); }
.tier__price { display: flex; align-items: baseline; gap: 8px; }
.tier__amount {
  font-family: var(--font-display);
  font-size: 2.7rem; font-weight: 600; color: var(--teal-800);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.tier__per { font-size: var(--t-sm); color: var(--muted); }
.tier__for { font-size: var(--t-sm); color: var(--muted); margin: 0; min-height: 3em; }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tier li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: var(--t-sm); margin: 0; color: var(--ink-soft); }
.tier li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--teal-600); }
.tier .btn { margin-top: auto; }
.billing-note {
  margin-top: var(--s4);
  font-size: var(--t-sm);
  color: var(--muted);
  border-left: 3px solid var(--amber-500);
  padding-left: var(--s3);
}

/* ---------------------------------------------------------------- faq -- */
.faq { display: grid; gap: var(--s1); }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.faq__item.is-open { border-color: var(--teal-300); box-shadow: var(--sh-1); }
.faq__q {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: var(--s3); align-items: center;
  background: none; border: 0; cursor: pointer;
  padding: var(--s3) var(--s4);
  font-family: var(--font-display); font-size: var(--t-h4); font-weight: 600; color: var(--ink);
  line-height: 1.3;
}
.faq__q:hover { background: var(--teal-050); }
.faq__sign { position: relative; width: 26px; height: 26px; display: block; justify-self: end; }
.faq__sign::before, .faq__sign::after {
  content: ""; position: absolute; left: 50%; top: 50%; border-radius: var(--r-pill);
  background: var(--teal-700); transform: translate(-50%, -50%);
  transition: transform .25s ease, opacity .25s ease;
}
.faq__sign::before { width: 18px; height: 3px; }
.faq__sign::after { width: 3px; height: 18px; background: var(--amber-500); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.faq__a { padding: 0 var(--s4) var(--s4); color: var(--muted); font-size: var(--t-sm); line-height: 1.7; }
.faq__a p { margin-bottom: 0; max-width: 74ch; }
.faq__a[hidden] { display: none; }

/* --------------------------------------------------------------- form -- */
.form-shell {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: clamp(22px, 3vw, 40px);
}
.form-grid { display: grid; gap: var(--s3); }
@media (min-width: 720px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field--full { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.field .hint { font-size: var(--t-xs); color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: var(--t-sm); color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 12px 13px;
  width: 100%;
}
.field textarea { min-height: 132px; resize: vertical; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--teal-700) 50%), linear-gradient(135deg, var(--teal-700) 50%, transparent 50%);
  background-position: calc(100% - 19px) 55%, calc(100% - 13px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--teal-300); }
.field [aria-invalid="true"] { border-color: var(--amber-600); background: var(--amber-100); }
.field-error { font-size: var(--t-xs); color: var(--amber-700); font-weight: 600; min-height: 1em; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; align-items: start; }
.consent input { width: 20px; height: 20px; accent-color: var(--teal-700); margin-top: 2px; }
.consent label { font-weight: 400; font-size: var(--t-sm); color: var(--muted); }
.form-foot { margin-top: var(--s4); display: grid; gap: var(--s2); }
.form-foot p { margin: 0; font-size: var(--t-sm); color: var(--muted); }

/* ------------------------------------------------------------- footer -- */
.site-footer {
  background: var(--teal-900);
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.045) 0, rgba(255,255,255,.045) 1px, transparent 1px, transparent 36px);
  color: var(--teal-200);
  padding-top: var(--s8);
  border-top: 5px solid var(--amber-500);
}
.footer-grid { display: grid; gap: var(--s5); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: var(--s6); } }
.site-footer h2, .site-footer h3 { color: var(--white); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-body); font-weight: 600; margin-bottom: var(--s3); }
.site-footer p { color: var(--teal-200); font-size: var(--t-sm); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a { color: var(--sand-200); text-decoration: none; font-size: var(--t-sm); }
.site-footer a:hover { color: var(--amber-500); text-decoration: underline; }
.footer-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: var(--s3); }
.footer-brand .brand__name { color: var(--white); }
.footer-brand .brand__name b { color: var(--amber-500); }
.social { display: flex; gap: 10px; margin-top: var(--s4); }
.social a {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--sand-200);
}
.social a:hover { background: var(--teal-700); border-color: var(--amber-500); color: var(--white); }
.social svg { width: 18px; height: 18px; }
.footer-base {
  margin-top: var(--s7);
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-block: var(--s4);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); justify-content: space-between;
  font-size: var(--t-xs); color: var(--teal-300);
}
.footer-base a { font-size: var(--t-xs); }

/* --------------------------------------------------------- doc pages -- */
.doc { padding-block: clamp(40px, 5vw, 76px); }
.doc__inner { max-width: 78ch; }
.doc h2 { font-size: var(--t-h3); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); }
.doc h3 { font-size: var(--t-h4); margin-top: var(--s5); }
.doc p, .doc li { color: var(--ink-soft); }
.doc dl { margin: 0 0 var(--s4); }
.doc dt { font-weight: 600; color: var(--ink); margin-top: var(--s2); }
.doc dd { margin: 0 0 var(--s1); color: var(--ink-soft); }
.page-head { padding-block: clamp(38px, 5vw, 70px) var(--s5); border-bottom: 1px solid var(--line); background: var(--sand-100); background-image: var(--calendar-grid); background-size: 64px 64px; }
.crumbs { font-size: var(--t-xs); color: var(--muted); margin-bottom: var(--s2); letter-spacing: .04em; }
.crumbs a { color: var(--teal-700); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  margin-top: var(--s6); padding: var(--s3) var(--s4);
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  background: var(--sand-100); font-size: var(--t-sm); color: var(--muted);
}
.byline b { color: var(--ink); }
.map-group { margin-bottom: var(--s5); }
.map-group ul { list-style: none; padding: 0; display: grid; gap: var(--s2); }
.map-group li { padding-left: var(--s3); border-left: 2px solid var(--teal-200); }
.map-group li b { display: block; }
.map-group li span { font-size: var(--t-sm); color: var(--muted); }
.author-portrait {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong);
  box-shadow: var(--sh-2); background: var(--surface); max-width: 300px;
}
.author-portrait img { width: 100%; height: auto; }
.profiles { list-style: none; padding: 0; display: grid; gap: 10px; }
.profiles a { font-size: var(--t-sm); }
.status-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 46px); box-shadow: var(--sh-2); max-width: 660px;
}
.status-card .ribbon-strip { margin-bottom: var(--s4); }

/* ------------------------------------------------------------ reveal -- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .68s cubic-bezier(.22, .78, .24, 1), transform .68s cubic-bezier(.22, .78, .24, 1);
  transition-delay: var(--delay, 0ms);
}
.no-js .reveal, .no-io .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ribbon__fill, .reveal .ribbon__fill, .reveal.is-visible .ribbon__fill { transform: scaleX(var(--w, .6)); }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------------------------------------------------------- utilities -- */
.stack > * + * { margin-top: var(--s3); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }
.center { text-align: center; }
.flow-tight p { margin-bottom: var(--s2); }
@media print {
  .site-header, .site-footer, .hero__media, .board { display: none; }
  body { background: #fff; }
}

/* ------------------------------------------------- deep band overrides -- */
/* The request form sits on the deep teal band but keeps a paper surface, so
   its own text has to return to the ink and muted tones. */
.band--deep a { color: var(--amber-500); }
.band--deep a:hover { color: var(--sand-200); }
.band--deep .form-shell p { color: var(--muted); }
.band--deep .form-shell label { color: var(--ink); }
.band--deep .form-shell .hint { color: var(--muted); }
.band--deep .form-shell a { color: var(--teal-700); }
.band--deep .form-shell a:hover { color: var(--teal-600); }
.band--deep .form-shell .consent label { color: var(--muted); }
.band--deep .rhythm__rail .small { color: var(--teal-200); }

@media (max-width: 1039px) {
  .nav.is-open .header-cta { display: inline-flex; }
}

/* ==========================================================================
   The Grant Cycle: the magazine
   Built only from the tokens above. Sand paper stock for the reading bands,
   deep teal for the call to action, signal amber wherever a date is at stake.
   ========================================================================== */

/* ---------------------------------------------------------- crumbs -- */
.mag-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: var(--s3); }
.mag-crumbs__sep { color: var(--teal-300); }
.mag-crumbs__here { color: var(--muted); }

/* ------------------------------------------------- magazine masthead -- */
.mag-hero {
  padding-block: clamp(38px, 5vw, 78px) clamp(30px, 4vw, 58px);
  background: var(--sand-100);
  background-image: var(--calendar-grid);
  background-size: 64px 64px;
  border-bottom: 1px solid var(--line);
}
.mag-hero__inner { max-width: var(--wrap); }
.mag-hero h1 { max-width: 16ch; }
.mag-hero h1 { margin-bottom: var(--s3); }
.mag-hero__standfirst {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 0;
}
.mag-hero__facts { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s3); }
.mag-hero__facts li { margin: 0; padding-left: var(--s3); border-left: 2px solid var(--teal-200); }
.mag-hero__facts b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--t-base);
  font-weight: 600;
  color: var(--ink);
}
.mag-hero__facts span { font-size: var(--t-sm); color: var(--muted); }
.mag-hero__rule { margin-top: var(--s5); }
@media (min-width: 800px) {
  .mag-hero__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
}

/* --------------------------------------------------------- card grid -- */
.mag-list { padding-block: clamp(40px, 5vw, 80px); }
.mag-grid { display: grid; gap: var(--s4); }
@media (min-width: 760px) { .mag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); } }
@media (min-width: 1060px) { .mag-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .mag-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.mag-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mag-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.mag-card__fig { position: relative; background: var(--sand-200); }
.mag-card__fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card__tag {
  position: absolute; left: 13px; bottom: 13px;
  background: var(--amber-100);
  color: var(--amber-700);
  border: 1px solid var(--amber-200);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.mag-card__body {
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  flex: 1 1 auto;
}
.mag-card__rule { margin-bottom: 2px; }
.mag-card__title { font-size: var(--t-h4); line-height: 1.22; margin: 0; }
.mag-card__title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--amber-500), var(--amber-500));
  background-repeat: no-repeat;
  background-size: 0 2px;
  background-position: 0 100%;
  transition: background-size .25s ease, color .2s ease;
}
.mag-card__title a:hover { color: var(--teal-700); background-size: 100% 2px; }
.mag-card__dek {
  margin: 0;
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mag-card__meta {
  margin: auto 0 0;
  padding-top: var(--s2);
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--t-xs);
  color: var(--muted);
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}
.mag-card__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--teal-300); flex: 0 0 auto; }

/* The lead card: article one, given the width of the whole grid */
.mag-card.lead { border-color: var(--teal-200); box-shadow: var(--sh-2); }
.mag-card.lead .mag-card__tag { background: var(--teal-700); color: var(--sand-100); border-color: var(--teal-600); }
@media (min-width: 760px) {
  .mag-card.lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .mag-card.lead .mag-card__fig { flex: 1 1 54%; min-width: 0; }
  .mag-card.lead .mag-card__fig img { height: 100%; min-height: 300px; aspect-ratio: auto; }
  .mag-card.lead .mag-card__body { flex: 1 1 46%; padding: clamp(24px, 3vw, 44px); justify-content: center; }
  .mag-card.lead .mag-card__title { font-size: var(--t-h2); }
  .mag-card.lead .mag-card__dek { font-size: var(--t-base); -webkit-line-clamp: 6; }
}

/* ------------------------------------------------- article masthead -- */
.mag-head {
  padding-block: clamp(32px, 4.4vw, 66px) clamp(26px, 3vw, 42px);
  background: var(--sand-100);
  background-image: var(--calendar-grid);
  background-size: 64px 64px;
  border-bottom: 1px solid var(--line);
}
.mag-article > .wrap, .mag-head__inner { max-width: 940px; }
.mag-head h1 { font-size: clamp(1.95rem, 1.3rem + 2.6vw, 3.1rem); margin-bottom: var(--s3); }
.mag-kicker { margin-bottom: var(--s2); }
.mag-standfirst {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: var(--s4);
}
.mag-byline { display: grid; gap: 7px; padding-top: var(--s3); border-top: 1px solid var(--line-strong); }
.mag-byline p { margin: 0; }
.mag-byline__who { font-size: var(--t-sm); color: var(--ink-soft); }
.mag-byline__who a { color: var(--teal-700); font-weight: 600; text-decoration: none; }
.mag-byline__who a:hover { text-decoration: underline; text-decoration-color: var(--amber-500); }
.mag-byline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
  font-size: var(--t-xs);
  color: var(--muted);
  letter-spacing: .03em;
}
.mag-byline__item { display: inline-flex; align-items: center; gap: 7px; }
.mag-byline__item + .mag-byline__item::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--teal-300);
}
.mag-byline__read { color: var(--amber-700); font-weight: 600; }
.mag-head__rule { margin-top: var(--s4); }

/* -------------------------------------------------- featured picture -- */
.mag-figure {
  margin: clamp(24px, 3vw, 46px) 0 0;
  background: var(--sand-200);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-2);
}
.mag-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* --------------------------------------------------- reading column -- */
/* Measure held between 64 and 75 characters, line height 1.72 */
.mag-body {
  max-width: 68ch;
  margin: clamp(30px, 3.4vw, 54px) auto 0;
  font-size: var(--t-md);
  line-height: 1.72;
  color: var(--ink-soft);
}
.mag-body > h2 {
  font-size: var(--t-h3);
  color: var(--ink);
  margin: var(--s7) 0 var(--s3);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.mag-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.mag-body > h3 { font-size: var(--t-h4); color: var(--ink); margin: var(--s5) 0 var(--s2); }
.mag-body p { margin: 0 0 var(--s4); }
.mag-body ul, .mag-body ol { margin: 0 0 var(--s4); padding-left: 1.35rem; }
.mag-body li { margin-bottom: var(--s2); }
.mag-body li::marker { color: var(--teal-600); }
.mag-body strong { color: var(--ink); font-weight: 600; }
.mag-body a { color: var(--teal-700); font-weight: 500; text-decoration-color: var(--teal-300); }
.mag-body a:hover { color: var(--teal-600); text-decoration-color: var(--amber-500); }
.mag-body blockquote {
  margin: var(--s5) 0;
  padding: var(--s4) clamp(18px, 3vw, 34px);
  background: var(--sand-100);
  border-left: 3px solid var(--amber-500);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--font-display);
  font-size: var(--t-lg);
  line-height: 1.5;
  color: var(--ink);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--s5);
  font-size: var(--t-sm);
  background: var(--surface);
}
.mag-body th, .mag-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mag-body thead th { background: var(--teal-050); color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--teal-200); }

/* The contextual reading link dropped between two sections of the body */
.mag-body .inline-read {
  margin: var(--s5) 0;
  padding: var(--s3) var(--s4);
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  border-left: 3px solid var(--amber-500);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--muted);
}
.inline-read a { font-weight: 600; color: var(--teal-700); }
.inline-read a:hover { color: var(--teal-600); }

/* ------------------------------------------------- call to action -- */
.mag-cta {
  max-width: 920px;
  margin: clamp(38px, 4.6vw, 72px) auto 0;
  display: grid;
  gap: var(--s4);
  padding: clamp(22px, 3vw, 42px);
  background-color: var(--teal-800);
  background-image: var(--calendar-grid);
  background-size: 64px 64px;
  border: 1px solid var(--teal-700);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}
@media (min-width: 640px) {
  .mag-cta { grid-template-columns: 56px minmax(0, 1fr); gap: var(--s5); align-items: start; }
}
.mag-cta__mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--amber-500);
  color: var(--teal-900);
}
.mag-cta__mark svg { width: 28px; height: 28px; }
.mag-cta h2 { color: var(--white); font-size: var(--t-h3); margin-bottom: var(--s2); }
.mag-cta p { color: var(--teal-200); font-size: var(--t-base); margin-bottom: var(--s4); }
.mag-cta .btn--primary { background: var(--amber-500); color: var(--teal-900); border-color: var(--amber-600); }
.mag-cta .btn--primary:hover { background: var(--amber-200); color: var(--teal-900); box-shadow: var(--sh-2); }

/* ------------------------------------------------------- author box -- */
.mag-author {
  max-width: 920px;
  margin: clamp(28px, 3.2vw, 48px) auto 0;
  display: grid;
  gap: var(--s4);
  padding: clamp(20px, 2.6vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal-700);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
@media (min-width: 620px) {
  .mag-author { grid-template-columns: 116px minmax(0, 1fr); gap: var(--s5); align-items: start; }
}
.mag-author__portrait {
  width: 116px; height: 116px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--sand-200);
  border: 1px solid var(--line-strong);
}
.mag-author h2 { font-size: var(--t-h4); margin-bottom: var(--s2); }
.mag-author p { color: var(--muted); font-size: var(--t-sm); line-height: 1.7; margin-bottom: var(--s2); }
.mag-author__link { margin-bottom: 0; }
.mag-author__link a { color: var(--teal-700); font-weight: 600; }

/* --------------------------------------------------------- read also -- */
.mag-related {
  padding-block: clamp(44px, 5vw, 84px);
  background-color: var(--sand-100);
  background-image: var(--ledger);
  border-top: 1px solid var(--line);
}
.mag-related__head { max-width: 64ch; margin-bottom: var(--s5); }
.mag-related__head h2 { font-size: var(--t-h3); margin-bottom: var(--s2); }
.mag-related__intro { color: var(--muted); font-size: var(--t-sm); margin: 0; }
.mag-related__grid { display: grid; gap: var(--s3); }
@media (min-width: 700px) { .mag-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } }
.mag-rel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mag-rel:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.mag-rel__fig { background: var(--sand-200); }
.mag-rel__fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel__body { padding: var(--s3) var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s2); flex: 1 1 auto; }
.mag-rel__title { font-size: var(--t-base); line-height: 1.3; margin: 0; }
.mag-rel__title a { color: var(--ink); text-decoration: none; }
.mag-rel__title a:hover { color: var(--teal-700); text-decoration: underline; text-decoration-color: var(--amber-500); }
.mag-rel__dek {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mag-rel__meta {
  margin: auto 0 0;
  padding-top: var(--s2);
  border-top: 1px dashed var(--line);
  font-size: var(--t-xs);
  color: var(--muted);
  letter-spacing: .03em;
}
.mag-related__all { margin: var(--s5) 0 0; }

/* ------------------------------------ magazine block on the home page -- */
.mag-home__head { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
@media (min-width: 900px) {
  .mag-home__head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s5); }
}
.mag-home__head p { margin-bottom: 0; }
.mag-home__all { margin: var(--s5) 0 0; }

/* --------------------------------------- narrow screens, down to 360 -- */
@media (max-width: 420px) {
  .mag-hero { padding-block: var(--s6) var(--s5); }
  .mag-hero h1 { font-size: 2.1rem; }
  .mag-head h1 { font-size: 1.85rem; }
  .mag-body { font-size: var(--t-base); }
  .mag-card__body { padding: var(--s3); }
  .mag-card__title { font-size: 1.12rem; }
  .mag-cta { padding: var(--s4); }
  .mag-cta .btn { width: 100%; justify-content: center; }
  .mag-author { padding: var(--s4); }
  .mag-author__portrait { width: 92px; height: 92px; }
  .mag-crumbs { font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mag-card, .mag-rel { transition: none; }
  .mag-card:hover, .mag-rel:hover { transform: none; }
  .mag-card__title a { transition: none; }
}



/* Network strip: five sibling products, rotated so every site is linked the same
   number of times. Spans the full footer grid rather than adding a fifth column,
   because each footer declares a fixed column count and a fifth item would wrap. */
.site-network { grid-column: 1 / -1; flex-basis: 100%; width: 100%;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.site-network h2 { font: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.7rem; opacity: 0.72; }
.site-network ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-network li + li { margin-top: 0; }
.site-network a { font-size: 0.86rem; text-decoration: none; opacity: 0.9;
  border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 620px) { .site-network ul { gap: 0.45rem 1.1rem; } }


/* Decorative bleed guard. Several sections intentionally hang a rotated or offset
   pseudo element past the viewport edge. overflow-x: clip contains them without
   creating a scroll container, so position: sticky keeps working, unlike overflow
   hidden. Genuine content overflow is still reported by the element level check in
   the browser pass. */
html { overflow-x: clip; }
body { overflow-x: clip; }


/* Wide content on phones. Class names for the prose wrapper differ from site to site,
   so this targets tables and pre blocks directly: they scroll inside their own box
   rather than pushing cells past the right edge, per the build contract. */
@media (max-width: 700px) {
  table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { overflow-wrap: anywhere; }
  pre { overflow-x: auto; max-width: 100%; }
}
