@import url("tokens.css?v=23");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Anchored sections land clear of the sticky header. */
[id] { scroll-margin-top: 104px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-1);
  color: var(--fg-1);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: rgba(58, 46, 85, 0.12);
}

img, svg { max-width: 100%; display: block; vertical-align: middle; }
a {
  color: var(--js-purple);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color var(--dur-base);
}
@media (hover: hover) {
  a:hover { color: var(--js-green-700); }
}

/* Visible keyboard focus ring on all interactives */
:focus-visible {
  outline: 2px solid var(--js-green);
  outline-offset: 3px;
  border-radius: 2px;
}
button:focus-visible,
.btn:focus-visible {
  outline-offset: 3px;
}

p { margin: 0 0 var(--s-4); line-height: var(--lh-relaxed); }
h1, h2, h3, h4 { margin: 0; color: var(--js-purple); letter-spacing: var(--tracking-tight); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

/* ---------- Eyebrow / caption ---------- */
.eyebrow {
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: var(--tracking-caps);
  color: var(--js-green);
  margin: 0 0 var(--s-3);
  display: block;
}

.eyebrow-on-purple { color: var(--js-green); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 22px;
  border-radius: var(--radius-1);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: background var(--dur-base), color var(--dur-base), transform var(--dur-fast), box-shadow var(--dur-base);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--js-purple); color: #fff; }
.btn-accent { background: var(--js-green); color: #fff; }
.btn-ghost { background: transparent; color: var(--js-purple); border: 1.5px solid var(--js-purple); }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid #fff; }
.btn-link {
  background: transparent;
  color: var(--js-purple);
  padding: 12px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* Oversized CTA — used on the help page in place of the contact form. */
.btn-big {
  font-size: 18px;
  font-weight: 700;
  padding: 22px 36px;
  align-self: start;
}
@media (hover: hover) {
  .btn-primary:hover { background: var(--js-purple-700); color: #fff; }
  .btn-accent:hover { background: var(--js-green-700); color: #fff; }
  .btn-primary:hover,
  .btn-accent:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
  .btn-ghost:hover { background: var(--js-purple); color: #fff; }
  .btn-ghost-light:hover { background: #fff; color: var(--js-purple); }
  .btn-link:hover { color: var(--js-green-700); }
}
/* Pressed state must beat the hover lift above. */
.btn-primary:active,
.btn-accent:active { transform: translateY(1px); box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border-1);
  /* Avoid Safari iOS jitter on sticky element when content scrolls underneath */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Soft shadow fades in once the page scrolls (js/site.js toggles
   .is-scrolled). Lives on a pseudo-element so only opacity animates. */
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transition: opacity var(--dur-base);
  pointer-events: none;
}
.site-header.is-scrolled::after { opacity: 1; }
.site-header-inner {
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 56px;
  gap: 56px;
}
.site-logo {
  flex: 0 0 auto;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  /* Decouple the underline from links inside the brand mark */
  border: 0;
}
.site-logo img {
  height: 64px;
  width: auto;
  display: block;
}
.site-nav {
  display: flex;
  gap: 32px;
  flex-wrap: nowrap;
  margin-left: auto;
}
.site-nav a {
  color: var(--js-purple);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 0;
  position: relative;
  white-space: nowrap;
  transition: color var(--dur-base);
}
@media (hover: hover) {
  .site-nav a:hover { color: var(--js-green-700); }
}
.site-nav a.active { color: var(--js-purple); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  height: 3px;
  background: var(--js-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-standard);
}
.site-nav a.active::after { transform: scaleX(1); }
@media (hover: hover) {
  .site-nav a:hover::after { transform: scaleX(1); }
}
.site-header .btn-accent { flex-shrink: 0; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--js-purple);
  margin: 5px 0;
  transition: transform var(--dur-base) var(--ease-standard), opacity var(--dur-fast);
}
/* Burger morphs into a cross via the aria-expanded state the nav
   toggle in js/site.js maintains. Bars are 2px tall with 5px gaps, so
   the outer bars travel 7px to meet in the middle. */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(480px, 52vh, 640px);
  align-items: stretch;
}
.hero-media {
  position: relative;
  min-height: inherit;
  /* Clip the photo's entrance settle / parallax overscan. */
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 42%;
}
.hero-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 28px 16px 12px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(180deg, transparent, rgba(20, 16, 32, 0.72));
}
.hero-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-text {
  width: min(100%, 560px);
  margin-inline: auto;
  padding: 80px clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
}
.hero-h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--js-purple);
  text-wrap: pretty;
  margin: 0;
}
.hero-h1 em { color: var(--js-green); font-weight: 500; font-style: italic; }
.hero-lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--js-purple-300);
  max-width: 520px;
  margin: 0;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Page hero (smaller, for inner pages) */
.page-hero {
  background: var(--js-purple);
  color: #fff;
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}

/* Page hero with portrait — 50/50 split (used on About). */
.page-hero-split .page-hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.page-hero-photo {
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  background-color: var(--js-purple-700);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  border-top: 4px solid var(--js-green);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/pattern.png");
  background-size: 320px auto;
  background-repeat: repeat;
  opacity: 0.12;
  pointer-events: none;
}
.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  max-width: 900px;
  margin: 12px 0 16px;
}
.page-hero h1 em { color: var(--js-green); font-weight: 500; font-style: italic; }
.page-hero p {
  font-size: 19px;
  line-height: 1.55;
  max-width: 720px;
  opacity: 0.92;
}

/* ---------- Section header ---------- */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 32px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  letter-spacing: var(--tracking-tight);
  color: var(--js-purple);
}
.section-head h2 em { font-style: italic; color: var(--js-green); font-weight: 500; }

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

/* ---------- Stat strip ---------- */
.stats {
  background: var(--js-purple);
  color: #fff;
  padding: 64px 0;
  position: relative;
  overflow: hidden;
  z-index: 2;
  /* Sits flush below the hero so the portrait reads as a full square. */
  margin-top: 0;
}
/* Hidden until scrolled into view; the shared reveal utility in
   js/site.js flips .is-revealed. Hidden state only exists under
   html.anim so the panel fails open without JS or with reduced motion
   (data-reveal="custom" opts out of the generic reveal styling). */
html.anim .stats {
  opacity: 0;
  transform: translateY(72px);
  transition:
    opacity 800ms cubic-bezier(.2,.7,.2,1),
    transform 800ms cubic-bezier(.2,.7,.2,1);
}
html.anim .stats.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger the individual numbers as the panel reveals. */
html.anim .stats .stat-num,
html.anim .stats .stat-label {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms cubic-bezier(.2,.7,.2,1),
    transform 700ms cubic-bezier(.2,.7,.2,1);
}
html.anim .stats.is-revealed .stat-num,
html.anim .stats.is-revealed .stat-label {
  opacity: 1;
  transform: translateY(0);
}
.stats.is-revealed .stats-inner > :nth-child(1) .stat-num { transition-delay: 200ms; }
.stats.is-revealed .stats-inner > :nth-child(2) .stat-num { transition-delay: 320ms; }
.stats.is-revealed .stats-inner > :nth-child(3) .stat-num { transition-delay: 440ms; }
.stats.is-revealed .stats-inner > :nth-child(4) .stat-num { transition-delay: 560ms; }
.stats.is-revealed .stats-inner > :nth-child(1) .stat-label { transition-delay: 280ms; }
.stats.is-revealed .stats-inner > :nth-child(2) .stat-label { transition-delay: 400ms; }
.stats.is-revealed .stats-inner > :nth-child(3) .stat-label { transition-delay: 520ms; }
.stats.is-revealed .stats-inner > :nth-child(4) .stat-label { transition-delay: 640ms; }
.stats-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat-num {
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 700;
  color: var(--js-green);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 12px;
  opacity: 0.92;
}

/* ---------- Priorities grid ---------- */
/* ---------- Moments marquee (homepage) ----------
   Continuous-scroll filmstrip: 3-up on desktop, ~1.5-up on mobile.
   Track contains the 5 unique slides duplicated once for a seamless
   loop — translateX(-50%) lands exactly where the duplicates begin. */
.moments {
  background: var(--bg-2);
  padding: 96px 0;
  overflow: hidden;
}
.moments-marquee {
  margin-top: 32px;
  overflow: hidden;
  /* Soft fade at both edges so slides drift in/out gracefully */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.moments-track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  animation: moments-marquee 50s linear infinite;
  will-change: transform;
}
.moments-marquee:hover .moments-track,
.moments-marquee:focus-within .moments-track {
  animation-play-state: paused;
}
.moments-slide {
  /* margin-right (not flex gap) so translateX(-50%) lands on the
     duplicated slide boundary exactly. Tuned to show ~3 at desktop
     widths and ~1.3 on mobile. */
  flex: 0 0 clamp(240px, 24vw, 360px);
  margin-right: 24px;
}
.moments-slide figure { margin: 0; }
.moments-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  /* About page still uses background-image divs with this class; keep the
     cover sizing so those crop correctly. Harmless on the homepage <img>. */
  background-size: cover;
  background-position: center;
  background-color: var(--js-purple-100);
  border-radius: 12px;
  transition: transform var(--dur-slow) var(--ease-standard);
}
@media (hover: hover) and (pointer: fine) {
  .moments-slide figure:hover .moments-img { transform: scale(1.03); }
}
.moments-slide figcaption {
  padding: 14px 4px 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--js-purple);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
}
@keyframes moments-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Once the user clicks a dot, the marquee is "taken over": animation off,
   transform is JS-controlled, slide changes glide via transition. */
.moments-marquee.moments-manual .moments-track {
  animation: none;
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}

.moments-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  padding: 0 16px;
}
.moments-dot {
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background-color: var(--js-purple-300);
  -webkit-mask: url('../assets/logo/sign-green.svg') center / contain no-repeat;
          mask: url('../assets/logo/sign-green.svg') center / contain no-repeat;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.moments-dot:hover { background-color: var(--js-purple); transform: scale(1.15); }
.moments-dot.is-active { background-color: var(--js-green); transform: scale(1.2); }

@media (max-width: 760px) {
  .moments { padding: 64px 0; }
  .moments-slide {
    flex: 0 0 clamp(220px, 70vw, 320px);
    margin-right: 16px;
    scroll-snap-align: start;
  }
  .moments-slide figcaption { font-size: 14px; }
  /* Native finger swipe + scroll-snap on touch; JS adds auto-advance.
     Hide the desktop duplicates so we have one clean list of 5. */
  .moments-marquee {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: none;
            mask-image: none;
    padding-left: 6vw;
    padding-right: 6vw;
  }
  .moments-marquee::-webkit-scrollbar { display: none; }
  .moments-track {
    animation: none;
    width: auto;
  }
  .moments-slide[aria-hidden="true"] { display: none; }
  .moments-dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .moments-track { animation: none; }
}

.priorities {
  background: #fff;
  padding: 96px 0;
}
.priorities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

/* Rich priority card variant — title + tagline + evidence list. */
.priority-card-rich {
  background: var(--js-purple-050);
  border-top: 4px solid var(--js-green);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.priority-card-rich .priority-num {
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--js-green);
  margin: 0;
}
.priority-card-rich h3 {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--js-purple);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}
.priority-card-rich .priority-tagline {
  font-size: 15.5px;
  line-height: 1.55;
  font-style: italic;
  color: var(--js-purple);
  margin: 0;
}
.priority-card-rich ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.priority-card-rich ul li {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--js-purple);
  padding-left: 26px;
  position: relative;
}
.priority-card-rich ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--js-green);
  font-weight: 700;
  font-size: 16px;
}
.priority-card-rich .priority-cta {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--js-purple-300);
  margin: 4px 0 0;
}
.priority-card-rich .priority-cta a { color: var(--js-green-700); }
.priority-card {
  background: var(--js-purple-050);
  border-top: 3px solid var(--js-green);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background var(--dur-base);
}
@media (hover: hover) {
  .priority-card:hover { background: var(--js-purple-100); }
}
.priority-icon {
  width: 48px;
  height: 48px;
  background: var(--js-green);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.priority-icon img { width: 28px; height: 28px; filter: brightness(0) invert(1); }
.priority-card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--js-purple);
  margin: 0;
}
.priority-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--js-purple-300);
  margin: 0;
}

/* ---------- Role / "What does an MP do" ---------- */
.role-section {
  background: var(--bg-2);
  padding: 96px 0;
}
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}
.role-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.role-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border-2);
  align-items: start;
}
.role-list li:last-child { border-bottom: 1px solid var(--border-2); }
.role-list .role-icon {
  width: 44px;
  height: 44px;
  background: var(--js-green);
  display: grid;
  place-items: center;
}
.role-list .role-icon img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.role-list h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--js-purple);
}
.role-list p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--js-purple-300);
  margin: 0;
}

/* ---------- News grid ---------- */
.news { padding: 96px 0; background: #fff; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.news-card {
  background: #fff;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-base);
  /* Gentle entrance when a feed grid (re)renders. CSS animations restart
     when the section flips from display:none, so JS-injected cards get
     this for free — including pagination re-renders. */
  animation: card-in 480ms var(--ease-out) backwards;
}
.news-grid > .news-card:nth-child(2) { animation-delay: 70ms; }
.news-grid > .news-card:nth-child(3) { animation-delay: 140ms; }
.news-grid > .news-card:nth-child(4) { animation-delay: 210ms; }
.news-grid > .news-card:nth-child(5) { animation-delay: 280ms; }
.news-grid > .news-card:nth-child(n+6) { animation-delay: 350ms; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
}
@media (hover: hover) {
  .news-card:hover { transform: translateY(-4px); }
  .news-card:hover h3 { color: var(--js-green-700); }
  .news-card:hover .news-img { box-shadow: var(--shadow-hover); }
}
.news-img {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  background-color: var(--js-purple-100);
  transition: box-shadow var(--dur-base);
}
/* Branded fallback for posts without a hero image (e.g. Substack
   essays that only embed video). Rugby-ball pattern on Vision Purple
   with the green sign mark dropped in as a centred glyph. */
.news-img--placeholder {
  background-color: var(--js-purple);
  background-image:
    url("../assets/logo/sign-green.svg"),
    url("../assets/pattern.png");
  background-size: 80px auto, 220px auto;
  background-position: center, top left;
  background-repeat: no-repeat, repeat;
}
.news-body { padding: 20px 4px; display: flex; flex-direction: column; gap: 8px; }
/* Short summary under the headline on a news card (currently used by
   newsroom items). Clamped to 3 lines so longer excerpts don't blow out
   card height. */
.news-body-excerpt {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--js-purple-300);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prev / status / Next row under a paginated grid (news.html press cards
   and Substack feed). Hidden when the data fits on a single page. */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination-status {
  font-size: 14px;
  color: var(--js-purple-300);
  min-width: 110px;
  text-align: center;
}
.pagination button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Substack subscribe panel below the Substack feed on news.html.
   Copy + read-more link on the left, embed iframe on the right. */
.substack-cta {
  margin-top: 48px;
  padding: 40px;
  background: #fff;
  border-top: 4px solid var(--js-green);
  box-shadow: 0 1px 2px rgba(58, 46, 85, 0.04), 0 12px 28px -20px rgba(58, 46, 85, 0.18);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.substack-cta-copy h3 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  margin: 4px 0 12px;
  color: var(--js-purple);
}
.substack-cta-copy p {
  color: var(--js-purple-300);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.substack-cta-frame {
  width: 100%;
  border: 0;
  background: #fff;
  display: block;
}
@media (max-width: 760px) {
  .substack-cta { padding: 28px 24px; grid-template-columns: 1fr; gap: 24px; }
}
/* Outlet favicon (via Google's favicon service) shown before the
   publication name in a press card eyebrow. Sits inline with the text. */
.press-card-favicon {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 4px;
}
.news-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--js-purple);
  margin: 0;
  text-wrap: pretty;
  transition: color var(--dur-base);
}
.news-meta { color: var(--js-grey-500); font-size: 13px; }

/* ---------- Authority grid (Get help) ---------- */
.authority-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.authority-card {
  background: var(--js-purple);
  color: #fff;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 3px solid var(--js-green);
  box-shadow: 0 1px 2px rgba(58, 46, 85, 0.06), 0 8px 24px -16px rgba(58, 46, 85, 0.35);
}
.authority-card h3 {
  font-size: 19px;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: var(--tracking-tight);
}
.authority-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
  flex: 1 1 auto;
}
.authority-card ul li {
  padding-left: 16px;
  position: relative;
  color: rgba(255, 255, 255, 0.92);
}
.authority-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--js-green);
}
.authority-card .authority-contact {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.authority-card .authority-contact a {
  color: var(--js-green);
  text-decoration: none;
  font-weight: 600;
}
.authority-card .authority-contact a:hover { color: #fff; }

.authority-grid--three { grid-template-columns: repeat(3, 1fr); }
.authority-card p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  flex: 1 1 auto;
}

.authority-note {
  margin-top: 28px;
  background: var(--js-green-100);
  border-left: 3px solid var(--js-green);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--js-purple);
}
.authority-note strong { color: var(--js-green-700); }

/* "When to contact me" panel — singular dark slab, deliberately
   distinct from the .authority-card set above. No top stripe; instead
   a soft inner highlight + rounded edges for a quieter, more
   premium read. */
.when-panel {
  position: relative;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(20, 200, 120, 0.08), transparent 55%),
    var(--js-purple);
  color: #fff;
  padding: 44px 48px;
  margin-top: 40px;
  border-radius: 18px;
  box-shadow: 0 24px 48px -32px rgba(34, 26, 54, 0.5);
}
.when-panel h3 {
  color: #fff;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 20px;
  padding-left: 16px;
  position: relative;
}
.when-panel h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--js-green);
  border-radius: 2px;
}
.when-panel ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}
.when-panel ul li {
  font-size: 16px;
  line-height: 1.5;
  padding-left: 28px;
  position: relative;
  color: rgba(255, 255, 255, 0.92);
}
.when-panel ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--js-green);
  font-weight: 700;
}
.when-panel-honest {
  background: rgba(255, 255, 255, 0.06);
  padding: 22px 26px;
  border-left: 2px solid var(--js-green);
  border-radius: 0 12px 12px 0;
  font-size: 15.5px;
  line-height: 1.55;
}
.when-panel-honest strong { color: var(--js-green); }

/* ---------- Casework / contact ---------- */
.casework {
  background: var(--js-purple-050);
  padding: 96px 0;
}
.casework-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
/* Single-column variant — used on the help page so the "Book a surgery"
   CTA stacks below the contact list instead of floating on the right. */
.casework-grid--stacked { display: block; text-align: center; }
.casework-grid--stacked > .btn { margin-top: 32px; }
.casework .casework-grid--stacked p.lead { max-width: 460px; margin: 16px auto 32px; }
.casework-grid--stacked .contact-list { width: fit-content; margin-inline: auto; text-align: left; }
.casework h2 { font-size: clamp(36px, 4.2vw, 56px); margin: 0 0 16px; }
.casework h2 em { font-style: italic; color: var(--js-green); font-weight: 500; }
.casework p.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--js-purple-300);
  max-width: 460px;
  margin: 16px 0 32px;
}
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-row {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 16px;
  color: var(--js-purple);
}
.contact-row .contact-icon {
  width: 40px;
  height: 40px;
  background: var(--js-purple);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-row .contact-icon img {
  width: 22px; height: 22px;
  filter: brightness(0) invert(1);
}
.contact-row a { color: var(--js-purple); }
@media (hover: hover) {
  .contact-row a:hover { color: var(--js-green-700); }
}

/* ---------- Form ---------- */
.form {
  background: #fff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 4px solid var(--js-green);
}
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--js-purple-300);
  margin-bottom: 8px;
  transition: color var(--dur-base);
}
.field:focus-within label { color: var(--js-green-700); }
.field input, .field textarea, .field select {
  width: 100%;
  font: 400 16px/1.4 var(--font-sans);
  color: var(--js-purple);
  border: 1.5px solid var(--js-grey-300);
  border-radius: var(--radius-1);
  padding: 13px 14px;
  background: #fff;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.field textarea {
  resize: vertical;
  min-height: 96px;
  font-family: var(--font-sans);
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233a2e55'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  padding-right: 38px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--js-green);
  box-shadow: 0 0 0 3px rgba(20, 200, 120, 0.18);
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: none;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--js-grey-500);
  opacity: 1;
}
.form button { align-self: flex-start; padding: 14px 26px; font-size: 15px; }

.field-optional { color: var(--js-purple-300); font-weight: 400; font-size: 13px; }

/* Required-field asterisk and invalid-field highlight. Same red as
   .form-status.is-error so the message and the fields read as one. */
.field-required { color: #c0392b; }
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: #c0392b; }
.field.has-error input:focus,
.field.has-error textarea:focus,
.field.has-error select:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}
.field-checkbox.has-error input[type="checkbox"] { outline: 2px solid #c0392b; outline-offset: 1px; }
.field-checkbox.has-error label { color: #c0392b; }

/* Honeypot — visually hidden, off-screen, never displayed to humans. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consent checkbox row — overrides the generic .field rules so the
   checkbox renders natively (so the tick is visible) and the label
   reads as a normal sentence (not the caps eyebrow). */
.field-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.field-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  -webkit-appearance: auto;
          appearance: auto;
  accent-color: var(--js-green);
  cursor: pointer;
}
.field-checkbox label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  color: var(--js-purple-300);
  margin: 0;
  cursor: pointer;
}
.field-checkbox a { color: var(--js-green-700); text-decoration: underline; }

/* Submit status text under the form. */
.form-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 14px;
  line-height: 1.4;
  color: var(--js-purple-300);
}
.form-status.is-success { color: var(--js-green-700); font-weight: 600; }
.form-status.is-error { color: #c0392b; font-weight: 600; }
.form-status.is-success,
.form-status.is-error { animation: rise-in 250ms var(--ease-out); }

/* Submit button feedback while the surgery form posts. */
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
.btn.is-success { background: var(--js-green-700); }

/* ---------- Pull quote / focus block ---------- */
.pullquote {
  background: var(--js-purple);
  color: #fff;
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
.pullquote::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/pattern.png");
  background-size: 360px auto;
  background-repeat: repeat;
  opacity: 0.10;
  pointer-events: none;
}
.pullquote-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.pullquote blockquote {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.3;
  font-weight: 500;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}
.pullquote blockquote em { color: var(--js-green); font-weight: 500; font-style: italic; }
.pullquote-attr {
  margin-top: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--js-green);
}

/* ---------- Long-form prose ---------- */
.prose-section { padding: 96px 48px; background: #fff; }
.prose-section--tint { background: var(--bg-2); }
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  margin: 48px 0 16px;
  letter-spacing: var(--tracking-tight);
}
.prose h2:first-child { margin-top: 0; }
.prose h2 em { color: var(--js-green); font-style: italic; font-weight: 500; }
.prose h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--js-purple);
}
.prose p, .prose li {
  font-size: 17px;
  line-height: 1.6;
  color: var(--js-purple);
}
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--js-purple); font-weight: 700; }

.prose-aside {
  position: relative;
  background: #fff;
  border: 1px solid var(--js-purple-100);
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin: 40px 0;
  box-shadow: 0 1px 2px rgba(58, 46, 85, 0.04), 0 12px 28px -20px rgba(58, 46, 85, 0.18);
}
.prose-aside p { margin: 0; font-size: 16px; }
.prose-aside p + p { margin-top: 12px; }
.prose-aside h4 {
  display: inline-block;
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--js-green);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: #fff;
  margin: 0;
  font-weight: 700;
  font-style: normal;
}
.prose-aside--standards h4 { background: var(--js-purple); }
.help-emergency-note { margin: 0 0 32px; }
.help-emergency-note .prose-aside { margin: 0; }
.help-emergency-note .prose-aside h4 { background: #c41e3a; }
.help-emergency-note .prose-aside a {
  color: var(--js-purple);
  font-weight: 700;
}
@media (hover: hover) {
  .help-emergency-note .prose-aside a:hover { color: #9a1830; }
}
.page-hero + .priorities { padding-top: 48px; }

/* ---------- About — half-half block ----------
   Header (eyebrow + h2) spans both columns. Image is on the left, prose
   list on the right. On mobile everything stacks: header → prose → image. */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 32px 64px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}
.about-block .about-block__head {
  grid-column: 1 / -1;
  grid-row: 1;
}
.about-block .about-block__head h2 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  margin: 8px 0 0;
  color: var(--js-purple);
}
.about-block .about-block__head h2 em {
  color: var(--js-green);
  font-style: italic;
  font-weight: 500;
}
.about-block .about-photo-wrap {
  grid-column: 1;
  grid-row: 2;
}
.about-block .about-photo {
  aspect-ratio: 3/2;
  background-size: cover;
  background-position: center;
  border-top: 4px solid var(--js-green);
}
.about-block .about-photo-credit {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--js-purple-300);
  letter-spacing: var(--tracking-tight);
}
.about-block .about-photo-credit a { color: inherit; text-decoration: underline; }
.about-block > .prose {
  grid-column: 2;
  grid-row: 2;
  max-width: none;
  margin: 0;
}

/* ---------- Surface cards (newsletter + help CTA) ----------
   One reusable card for the Substack subscribe block and the homepage
   help redirect, so they read consistently across pages. */
.surface-card {
  background: #fff;
  padding: 40px 40px 28px;
  border-top: 4px solid var(--js-green);
  box-shadow: 0 1px 2px rgba(58, 46, 85, 0.04), 0 12px 28px -20px rgba(58, 46, 85, 0.18);
}
.surface-card .eyebrow { display: block; }
.surface-card h3 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  margin: 4px 0 12px;
  color: var(--js-purple);
}
.surface-card > p {
  color: var(--js-purple-300);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 16px;
}
.surface-card iframe {
  width: 100%;
  border: 0;
  display: block;
  background: #fff;
}
.surface-card hr {
  border: 0;
  border-top: 1px solid var(--border-1);
  margin: 16px 0 20px;
}
.surface-card .surface-card-eyebrow-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--js-green);
  margin: 0 0 14px;
  font-weight: 700;
  font-style: italic;
}
.surface-card .surface-card-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}
@media (max-width: 720px) {
  .surface-card { padding: 28px 24px 22px; }
}

/* Homepage combined coverage section: press cards + op-eds + subscribe
   CTA all in one box. Each block stacks; ample gap between them. */
.coverage-block + .coverage-block { margin-top: 80px; }

/* Small inline note used on the surgery page to redirect users who
   should try the help guide first. */
.surgery-note {
  margin: 24px 0 32px;
  padding: 18px 22px;
  background: var(--js-green-100);
  border-left: 3px solid var(--js-green);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--js-purple);
  max-width: 520px;
}
.surgery-note p { margin: 0 0 8px; }
.surgery-note p:last-child { margin: 0; }
.surgery-note a {
  color: var(--js-green-700);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--js-purple);
  color: #fff;
  /* Positioning context + clip for the pattern reveal layer below. */
  position: relative;
  overflow: hidden;
}
.site-footer a { color: #fff; }
@media (hover: hover) {
  .site-footer a:hover { color: var(--js-green); }
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 48px 48px;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 80px;
  /* Above the pattern reveal layer. */
  position: relative;
  z-index: 1;
}
.site-footer-brand img {
  height: 76px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin-bottom: 24px;
}
.site-footer-slogan {
  font-size: 30px;
  font-weight: 500;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
  margin: 0 0 24px;
}
.site-footer-slogan em { color: var(--js-green); font-style: italic; font-weight: 500; }
.site-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.site-footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin: 0 0 16px;
  color: var(--js-green);
  font-weight: 700;
  font-style: italic;
}
.site-footer-col p, .site-footer-col li {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}
.site-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer-col a { text-decoration: none; }
/* Links inside footer prose need a non-colour cue (WCAG link-in-text-block) */
.site-footer-col p a { text-decoration: underline; text-underline-offset: 3px; }
.social {
  display: flex;
  gap: 10px;
  margin: 4px 0 20px;
  align-items: center;
  flex-wrap: wrap;
}
.social a {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2);
  transition:
    background-color var(--dur-base),
    transform var(--dur-fast);
  position: relative;
}
.social a::before {
  /* Inner glyph painted from the linked SVG via mask. */
  content: "";
  width: 18px;
  height: 18px;
  background-color: #fff;
  -webkit-mask: var(--m) center / contain no-repeat;
          mask: var(--m) center / contain no-repeat;
  transition: background-color var(--dur-base);
}
.social a:active { transform: translateY(1px); }
@media (hover: hover) {
  .social a:hover { background: var(--js-green); transform: translateY(-2px); }
  .social a:hover::before { background-color: #fff; }
}
.social img { display: none; }  /* legacy <img> hidden; mask drives visuals */

/* Inline variant — for use on light surfaces (e.g. about-page newsletter card). */
.social--inline { gap: 8px; margin: 0; }
.social--inline a {
  width: 34px;
  height: 34px;
  background: var(--js-purple-100);
}
.social--inline a::before { background-color: var(--js-purple); }
@media (hover: hover) {
  .social--inline a:hover { background: var(--js-purple); }
  .social--inline a:hover::before { background-color: #fff; }
}
.site-footer-fine {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
}
/* Fine-print row sits inside the main footer block, above the pattern. */
.site-footer-fine {
  max-width: 1280px;
  margin: 64px auto 0;
  padding: 40px 48px 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.site-footer-fine a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
@media (hover: hover) {
  .site-footer-fine a:hover { color: var(--js-green); }
}

/* Rugby-ball pattern — a texture layer behind the footer content
   rather than a strip in normal flow, so it adds no page height.
   js/site.js drives --fp-y from the scroll position: parked at the
   bottom of the page the layer is slid down (mostly hidden behind the
   content); scrolling up slides it back into view at a slower rate
   than the page — a parallax reveal. Without JS or with reduced
   motion, --fp-y stays 0 and it's simply a static low-contrast
   texture. The mask fades the layer's top edge so it always reads as
   texture rising from the bottom, never a hard band. */
.site-footer-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../assets/pattern.png");
  background-size: 280px auto;
  opacity: 0.16;
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent 92%);
          mask-image: linear-gradient(to top, #000 45%, transparent 92%);
  transform: translate3d(0, var(--fp-y, 0px), 0);
}
.site-footer-base a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
@media (hover: hover) {
  .site-footer-base a:hover { color: var(--js-green); }
}

/* Inline note appended after the office email, per John's note that
   the address is .uk not .co.uk. Inherits parent colour so it works on
   purple footers and white panels alike. */
.email-note {
  display: inline-block;
  font-size: 12px;
  font-style: italic;
  opacity: 0.7;
  margin-left: 6px;
  white-space: nowrap;
}

/* "Load more" row at the bottom of paginated lists. */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 48px 0 0;
}
.load-more-wrap[hidden] { display: none; }
.load-more-wrap .btn { min-width: 200px; }
.load-more-wrap .btn[disabled] { opacity: 0.5; pointer-events: none; }

/* Article modal loading state — shown while older posts fetch. */
.article-modal__loading {
  padding: 24px 0;
  font-size: 14px;
  color: var(--js-purple-300);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
}
.article-modal__loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--js-green);
  border-top-color: transparent;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -2px;
  animation: article-modal-spin 0.8s linear infinite;
}
@keyframes article-modal-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Article modal (in-page Substack reader) ---------- */
.article-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: article-modal-fade 200ms ease-out both;
}
@keyframes article-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.article-modal[hidden] { display: none; }
html.article-modal-open { overflow: hidden; }

.article-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 26, 54, 0.85);
  cursor: pointer;
}

.article-modal__panel {
  position: relative;
  background: #fff;
  width: calc(100% - 48px);
  max-width: 760px;
  margin: 56px auto 80px;
  border-top: 4px solid var(--js-green);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  animation: article-modal-rise 320ms cubic-bezier(.2,.7,.2,1) both;
}
@keyframes article-modal-rise {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.article-modal__close {
  position: sticky;
  top: 16px;
  float: right;
  z-index: 2;
  margin: 16px 16px 0 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--js-purple-050);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--js-purple);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-base);
}
@media (hover: hover) {
  .article-modal__close:hover { background: var(--js-purple-100); }
}

.article-modal__inner { padding: 24px 56px 56px; }
.article-modal__eyebrow { display: block; margin-bottom: 12px; }
.article-modal__title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--js-purple);
  letter-spacing: var(--tracking-tight);
}
.article-modal__meta {
  font-size: 13px;
  color: var(--js-grey-500);
  margin: 0 0 28px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  font-weight: 600;
}

/* Typography for the article body itself (rendered from Substack RSS). */
.article-modal__body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--js-purple);
  word-wrap: break-word;
}
.article-modal__body > * + * { margin-top: 1em; }
/* Hero image at the top of a newsroom article. Full bleed of the modal
   content column, flat corners (matches brand-card treatment). The
   descendant selector wins specificity against .article-modal__body img. */
.article-modal__body .article-modal__hero {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 0 28px;
  border-radius: 0;
}

/* Static per-article page (generated at build time by
   scripts/build-articles.mjs into news/<slug>.html). Reuses the modal
   body's typography via .article-modal__body so press releases on the
   page render identically to the modal preview. */
.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 96px;
}
.article-page-head { margin-bottom: 32px; }
.article-page-head .eyebrow { display: block; margin-bottom: 12px; }
.article-page-head h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 12px;
  color: var(--js-purple);
}
.article-page-meta {
  color: var(--js-purple-300);
  font-size: 14px;
  margin: 0;
}
.article-page-hero {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 28px;
  border-radius: 0;
}
.article-page-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--js-purple-100);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 760px) {
  .article-page { padding: 56px 24px 72px; }
}
.article-modal__body p { margin: 0 0 1em; }
.article-modal__body h1,
.article-modal__body h2,
.article-modal__body h3,
.article-modal__body h4 {
  color: var(--js-purple);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
  margin: 1.6em 0 0.4em;
}
.article-modal__body h1 { font-size: 28px; }
.article-modal__body h2 { font-size: 24px; }
.article-modal__body h3 { font-size: 20px; }
.article-modal__body h4 { font-size: 17px; text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.article-modal__body a {
  color: var(--js-purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover) {
  .article-modal__body a:hover { color: var(--js-green-700); }
}
.article-modal__body strong { font-weight: 700; color: var(--js-purple); }
.article-modal__body em { font-style: italic; }
.article-modal__body blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--js-green);
  background: var(--js-purple-050);
  font-size: 18px;
  font-style: italic;
  color: var(--js-purple);
}
.article-modal__body ul,
.article-modal__body ol { padding-left: 1.4em; margin: 0 0 1em; }
.article-modal__body li { margin-bottom: 0.4em; }
.article-modal__body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border-radius: var(--radius-1);
}
.article-modal__body figure { margin: 24px 0; }
.article-modal__body figcaption {
  font-size: 14px;
  color: var(--js-grey-500);
  text-align: center;
  margin-top: 8px;
}
.article-modal__body iframe,
.article-modal__body video {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Fallback for browsers that don't support aspect-ratio (Safari < 15) */
  min-height: 240px;
  border: 0;
  margin: 24px 0;
  display: block;
}
.article-modal__body hr {
  border: 0;
  border-top: 1px solid var(--border-1);
  margin: 32px 0;
}
.article-modal__body pre,
.article-modal__body code {
  background: var(--js-purple-050);
  border-radius: var(--radius-1);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
}
.article-modal__body code { padding: 2px 6px; }
.article-modal__body pre { padding: 16px; overflow-x: auto; }

.article-modal__cta {
  margin-top: 48px;
  padding: 32px;
  background: var(--js-purple-050);
  border-top: 4px solid var(--js-green);
}
.article-modal__cta .eyebrow { display: block; margin-bottom: 8px; }
.article-modal__cta-title {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  color: var(--js-purple);
  margin: 0 0 8px;
}
.article-modal__cta-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--js-purple-300);
  margin: 0 0 20px;
}
.article-modal__cta iframe { background: #fff; }
.article-modal__cta-source {
  margin: 16px 0 0;
  font-size: 14px;
  text-align: center;
  color: var(--js-purple-300);
}
.article-modal__cta-source a {
  color: var(--js-purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover) {
  .article-modal__cta-source a:hover { color: var(--js-green-700); }
}

@media (max-width: 720px) {
  .article-modal__panel {
    width: calc(100% - 24px);
    margin: 24px auto 48px;
  }
  .article-modal__inner { padding: 24px 24px 40px; }
  .article-modal__close { margin: 16px 12px 0 0; }
}

/* ---------- Skip-to ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--js-purple);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Responsive ---------- */

/* Tier 1: smaller laptops — ease the header crowd before tablet */
@media (max-width: 1200px) {
  .site-header-inner { padding: 18px 40px; gap: 40px; }
  .site-logo img { height: 48px; }
  .site-nav { gap: 26px; }
  .wrap,
  .site-footer-inner,
  .stats-inner,
  .casework-grid,
  .page-hero-inner {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Tier 2: tablet portrait — collapse 2-up layouts, drop 50/50 */
@media (max-width: 1024px) {
  .wrap,
  .site-header-inner,
  .stats-inner,
  .casework-grid,
  .site-footer-inner,
  .page-hero-inner {
    padding-left: 32px;
    padding-right: 32px;
  }
  .site-header-inner { gap: 24px; padding-top: 16px; padding-bottom: 16px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding: 64px 32px; max-width: 560px; }
  .hero-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-top: 4px solid var(--js-green);
  }
  .hero-photo {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .priorities-grid { grid-template-columns: repeat(2, 1fr); }
  .authority-grid { grid-template-columns: repeat(2, 1fr); }
  .when-panel { padding: 36px 32px; }
  .when-panel ul { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .role-grid { grid-template-columns: 1fr; gap: 40px; }
  .casework-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-block { grid-template-columns: 1fr; gap: 24px; }
  .about-block .about-block__head { grid-column: 1; grid-row: 1; }
  .about-block > .prose { grid-column: 1; grid-row: 2; }
  .about-block .about-photo-wrap { grid-column: 1; grid-row: 3; }
  .about-block .about-photo { aspect-ratio: 16/10; }
  .page-hero-split .page-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .page-hero-photo { aspect-ratio: 1 / 1; max-height: none; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 56px; }
  .site-footer-cols { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding: 72px 0 80px; }
  .page-hero + .priorities { padding-top: 40px; }
  .help-emergency-note { margin-bottom: 28px; }
  .section, .priorities, .role-section, .news, .casework, .pullquote, .prose-section { padding: 80px 0; }
}

/* Tier 3: phone — burger nav, single-column, tighter vertical rhythm */
@media (max-width: 720px) {
  [id] { scroll-margin-top: 76px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    margin-left: 0;
    border-bottom: 1px solid var(--border-1);
    box-shadow: var(--shadow-2);
    /* Animated open/close. visibility keeps the closed menu out of the
       tab order and accessibility tree (same semantics as display:none),
       delayed on close so the fade-out is visible. */
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity 220ms var(--ease-standard),
      transform 220ms var(--ease-standard),
      visibility 0s linear 220ms;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .site-nav a { padding: 16px 28px; font-size: 16px; }
  .site-nav a::after { display: none; }
  .site-nav a.active { color: var(--js-green-700); }
  .site-header-inner {
    padding: 14px 24px;
    gap: 12px;
    justify-content: space-between;
  }
  .site-logo img { height: 40px; }
  .site-header .btn-accent {
    /* Compact CTA on phones — full text still readable */
    padding: 11px 16px;
    font-size: 13px;
  }

  .stats-inner { grid-template-columns: 1fr; gap: 32px; }
  .priorities-grid { grid-template-columns: 1fr; gap: 16px; }
  .authority-grid { grid-template-columns: 1fr; gap: 16px; }
  .when-panel { padding: 28px 24px; }
  .news-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer-cols { grid-template-columns: 1fr; gap: 32px; }

  .wrap,
  .site-header-inner,
  .casework-grid,
  .site-footer-inner,
  .stats-inner,
  .page-hero-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .form { padding: 28px 24px; }
  .form button { width: 100%; align-self: stretch; justify-content: center; }
  .field { width: 100%; }

  .hero-text { padding: 56px 24px; gap: 18px; }
  .hero-h1 { font-size: 38px; line-height: 1.08; }
  .hero-lead { font-size: 17px; }

  .page-hero { padding: 56px 0 64px; }
  .page-hero h1 { font-size: 36px; line-height: 1.1; }
  .page-hero p { font-size: 17px; }

  .section,
  .priorities,
  .role-section,
  .news,
  .casework,
  .pullquote { padding: 64px 0; }
  .prose-section { padding: 64px 24px; }
  .page-hero + .priorities { padding-top: 32px; }
  .help-emergency-note { margin-bottom: 24px; }

  .casework h2 { font-size: 36px; }
  .pullquote-inner { padding: 0 24px; }
  .pullquote blockquote { font-size: 26px; line-height: 1.3; }

  .role-list li { grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; }
  .role-list .role-icon { width: 40px; height: 40px; }

  .priority-card { padding: 28px 24px; }
  .priority-icon { width: 44px; height: 44px; }

  .prose { padding: 0 4px; }
  .prose h2 { margin-top: 40px; }
  .prose p, .prose li { font-size: 16px; }

  .stat-num { font-size: 56px; }

  .site-footer-inner { padding: 56px 24px 32px; }
  .site-footer-brand img { height: 64px; }
  .site-footer-slogan { font-size: 24px; }
  .site-footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px 24px;
  }
}

/* Tier 4: small phones — only the strict minimums */
@media (max-width: 480px) {
  .wrap,
  .site-header-inner,
  .casework-grid,
  .site-footer-inner,
  .stats-inner,
  .page-hero-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero-text { padding: 48px 20px; }
  .hero-h1 { font-size: 34px; }
  .page-hero h1 { font-size: 32px; }
  .casework h2 { font-size: 32px; }
  .site-header .btn-accent {
    /* Keep the CTA visible on phones, but tighten it so the logo
       and burger still get room. Drop the trailing arrow. */
    padding: 9px 12px;
    font-size: 12px;
    letter-spacing: 0.02em;
  }
  .site-header .btn-accent span[aria-hidden="true"] { display: none; }
  .site-header-inner { gap: 8px; }
  .form { padding: 24px 20px; }
}

/* ---------- Motion & reveal utilities ---------- */
/* Scroll-reveal. The head snippet on every page adds html.anim before
   first paint — only when IntersectionObserver exists and the user
   hasn't asked for reduced motion — so content fails open everywhere
   else. js/site.js flips .is-revealed as elements enter the viewport.
   data-reveal="custom" opts an element out of this generic styling
   (it brings its own hidden/revealed CSS, e.g. .stats) while still
   getting the .is-revealed toggle. Stagger inside a
   [data-reveal-group] container via the --ri index set by the JS. */
html.anim [data-reveal]:not([data-reveal="custom"]) {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--ri, 0) * 70ms);
}
html.anim [data-reveal]:not([data-reveal="custom"]).is-revealed {
  opacity: 1;
  transform: none;
}

/* Page-load entrance. Keyed on the preview gate's .locked class so it
   plays when content actually becomes visible, not behind the gate. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
}
html:not(.locked) .hero-text > *,
html:not(.locked) .page-hero-inner > *,
html:not(.locked) .article-page-head > * {
  animation: rise-in var(--dur-enter) var(--ease-out) backwards;
}
html:not(.locked) .hero-text > :nth-child(2),
html:not(.locked) .page-hero-inner > :nth-child(2),
html:not(.locked) .article-page-head > :nth-child(2) { animation-delay: 80ms; }
html:not(.locked) .hero-text > :nth-child(3),
html:not(.locked) .page-hero-inner > :nth-child(3),
html:not(.locked) .article-page-head > :nth-child(3) { animation-delay: 160ms; }
html:not(.locked) .hero-text > :nth-child(n+4),
html:not(.locked) .page-hero-inner > :nth-child(n+4),
html:not(.locked) .article-page-head > :nth-child(n+4) { animation-delay: 240ms; }

/* Hero photo settles in with a slow un-zoom. Transform only — no
   opacity — so the LCP image paints immediately. With no `to` frame it
   lands on the computed base transform (the parallax rule below). */
@keyframes hero-settle {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
}
html:not(.locked) .hero-photo {
  animation: hero-settle 1100ms var(--ease-out) backwards;
}

/* Parallax (desktop, mouse-driven devices only — js/site.js drives
   --para-y, the media query here mirrors the gate in the JS). The
   resting 5% overscan gives the drift room inside .hero-media's clip. */
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  html.anim .hero-photo {
    transform: translate3d(0, var(--para-y, 0px), 0) scale(1.05);
  }
}

/* Pause the marquee's infinite animation while it's offscreen
   (js/site.js toggles the class) — no point compositing it all day. */
.moments-marquee.is-offscreen .moments-track { animation-play-state: paused; }

/* ---------- Reduced motion ---------- */
/* Belt-and-braces: html.anim is never set under reduced motion (so no
   content is ever hidden waiting for a reveal), and this block flattens
   everything else — entrances, hovers, smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto !important; }
  /* Spinners signal loading, not decoration — keep them moving. */
  .article-modal__loading::before { animation: article-modal-spin 0.8s linear infinite !important; }
  .btn.is-loading::after { animation: btn-spin 0.7s linear infinite !important; }
}
