/*
  Global stylesheet — single source of truth for the site.

  Structure:
    1) Reset and base
    2) Design tokens (:root) — palette and typography are owned by the
       `brand-guidelines` skill. Spacing, radii, shadows, motion, and layout
       tokens are owned here.
    3) Layout primitives
    4) Components (site-wide reusable primitives only — page-specific
       styles live with their page builds, not here)
    5) Utilities
*/

/* Webfonts (brand-guidelines: Fraunces heading / Public Sans body). Loaded once
   here so every page picks them up automatically via --font-heading/--font-body
   without needing a per-page <link> in <head>. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Public+Sans:wght@400;500;600;700&display=swap');

/* ===== 1) Reset and base ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 2) Design tokens ===== */
/* Palette and typography are written by the `brand-guidelines` skill from
   `build-assets/0-the-brand/tokens.json`. Spacing, radii, shadows, and
   transitions are owned here. */
:root {
  /* Palette (brand-guidelines) */
  --color-bg: #faf7fc;
  --color-surface: #ffffff;
  --color-surface-soft: #f2e9f7;
  --color-text: #2e2438;
  --color-text-soft: #6e6178;
  --color-primary: #a982c2;
  --color-primary-dark: #8a64a6;
  --color-primary-light: #e9dcf2;
  --color-accent: #d6a15c;
  --color-focus: #a982c2;
  --color-primary-deep: #241b30;  /* brand-guidelines */
  --color-primary-mid: #4a3860;   /* brand-guidelines */
  --color-primary-soft: #c9a8de;  /* brand-guidelines */

  /* Typography (brand-guidelines) */
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(60, 64, 67, 0.12);
  --shadow-md: 0 4px 14px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, 0.12);

  /* Motion */
  --transition-fast: 180ms ease;
  --transition-base: 260ms ease;

  /* Layout */
  --container-max: 72rem;

  /* Aesthetic dials — the `design-system` skill SETS these per brand to diverge
     the look (sharp vs soft, flat vs shadowed, square vs pill). Defaults below are
     a soft/rounded baseline; a brand's design stage should deliberately override
     them so two brands don't look like the same template reskinned. */
  --logo-height: 3.25rem;    /* prominent by default — the logo is a brand asset, not chrome */
  --logo-max-width: 22rem;   /* generous, so wide wordmarks stay tall (not width-starved) */
  --header-bg: var(--color-surface);   /* header band — design-system may set a brand colour */
  --header-fg: var(--color-text);      /* header text/nav colour — flips for a coloured band */
  --btn-radius: var(--radius-pill);
  --card-radius: var(--radius-md);
  --card-shadow: var(--shadow-sm);
  --card-border: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent);
  --chip-radius: var(--radius-pill);
}

/* Logo grows on wider screens — override the dial at the breakpoint, never per-page. */
@media (min-width: 1024px) {
  :root { --logo-height: 4rem; }
}

/* ===== 3) Layout primitives ===== */
.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

@media (max-width: 640px) {
  /* The default 1rem total gutter (≈8px/side) is too tight for comfortable
     mobile margins — widen it a bit on small screens, site-wide. */
  .container { width: min(100% - 2.5rem, var(--container-max)); }
}

.section {
  padding: var(--space-10) 0;
}

@media (max-width: 640px) {
  .section { padding: var(--space-8) 0; }
}

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== 4) Components ===== */

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  color: var(--header-fg);
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* The header logo is an <img src="{{logo.src}}"> whose REAL file is injected by the CMS
   at upload — its aspect ratio is unknown at build time. HEIGHT is the primary driver
   (a generous --logo-height), so every logo renders at a consistent, prominent height
   regardless of ratio; --logo-max-width is a generous, viewport-relative safety cap that
   only clamps a very wide logo on small screens (it then scales down proportionally, never
   distorts). Never pin width AND height. Tune the dials per brand — never a per-page size. */
.site-logo img {
  height: auto;
  width: auto;
  max-height: var(--logo-height);
  /* On narrow phones, a flat 55vw cap was clipping WIDE wordmark logos (like this
     brand's ~5.3:1 mark) down to a fraction of --logo-height before the height dial
     ever got a chance to apply — the real bottleneck was width, not height, so
     bumping --logo-height alone did nothing visible on mobile. calc() reserves
     space for the container gutters + hamburger icon instead of a flat vw guess,
     so the logo can actually reach close to its intended height on small screens. */
  max-width: min(var(--logo-max-width, 22rem), calc(100vw - 7rem));
  object-fit: contain;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
}

/* CMS-rendered menu — `{{menu.footer}}` expands to <ul class="canvas-footer-menu">
   with <li><a> children. This brand uses native menus, so the footer nav is
   hand-coded reusing this class name; style it directly. */

.canvas-footer-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

/* Footers can carry many links. With 8+ items, flow them into responsive columns
   (auto-fill grid) instead of one long, sprawling wrapping row — multi-column on wide
   screens, collapsing toward a single column on mobile. Short footer menus keep the
   inline row above. Where :has() is unsupported it harmlessly stays the flex row. */
.canvas-footer-menu:has(> li:nth-child(8)) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
  align-items: start;
  gap: var(--space-2) var(--space-5);
}

.canvas-footer-menu > li {
  margin: 0;
}

.canvas-footer-menu a {
  color: var(--color-text-soft);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.canvas-footer-menu a:hover,
.canvas-footer-menu a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--color-primary);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--color-text-soft);
  opacity: 0.6;
}

.breadcrumb [aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--btn-radius);
  min-height: 2.75rem;
  padding: 0.78rem 1.4rem;
  font-size: 0.98rem;
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline-offset: 3px; }

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-primary) 40%, transparent);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-text) 16%, transparent);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-surface-soft) 75%, #fff);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-text) 20%, transparent);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--color-surface-soft) 65%, transparent);
}

/* Header CTAs follow the header foreground so they stay legible on a coloured band
   (no-op on the neutral default where --header-fg == --color-text). */
.site-header .btn-ghost {
  color: var(--header-fg);
  border-color: color-mix(in srgb, var(--header-fg) 20%, transparent);
}

.btn-sm {
  min-height: 2.2rem;
  padding: 0.55rem 1rem;
  font-size: 0.87rem;
}

.btn-lg {
  min-height: 3rem;
  padding: 0.9rem 1.7rem;
  font-size: 1.04rem;
}

.btn-block { width: 100%; }

/* Tertiary — a filled-but-quiet CTA for in-content links (feature splits,
   "see more" links). .btn-ghost's transparent fill blends into the page's
   own light background; this gives it enough presence to read as clickable
   without competing with the solid .btn-primary CTAs. */
.btn-tertiary {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border: none;
}
.btn-tertiary:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Chip — pill-shaped tag */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--chip-radius);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.chip-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Site footer */
.site-footer {
  padding: var(--space-10) 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
  border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}

.footer-legal a {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.footer-legal a:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Member profile */
.profile-head {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-6);
}
.profile-avatar {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: var(--radius-pill);
  object-fit: cover;
}
.profile-id {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.profile-headline {
  font-size: 1.15rem;
  font-weight: 600;
}
.profile-bio {
  color: var(--color-text-soft);
  max-width: 60ch;
}
.profile-interests {
  margin-top: var(--space-3);
}

/* Member profile — "Related members" cross-link block at the end of the page. */
.related-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.member-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--card-border);
  border-radius: var(--card-radius);
  text-decoration: none;
  transition: box-shadow var(--transition-fast);
}
.member-mini-card:hover { box-shadow: var(--card-shadow); }
.member-mini-avatar { width: 4.5rem; height: 4.5rem; border-radius: var(--radius-pill); object-fit: cover; }
.member-mini-name { font-weight: 600; color: var(--color-text); }
.member-mini-location { font-size: 0.82rem; color: var(--color-text-soft); }

/* Homepage logo bump — scoped to the homepage only via body class, per
   web-page-builder's homepage brief (logo should feel confident on landing).
   The shared --logo-height dial itself stays untouched for every other page. */
.page-home .site-logo img { --logo-height: 3.75rem; }
@media (min-width: 1024px) {
  .page-home .site-logo img { --logo-height: 4.5rem; }
}

/* Transparent overlay header — sits directly on the hero image, no white box.
   Only applied via the .site-header--overlay modifier (homepage today), so
   every other page keeps the normal solid white sticky header. */
.site-header--overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  border-bottom: none;
  background: linear-gradient(to bottom, rgba(15, 10, 20, 0.5) 0%, rgba(15, 10, 20, 0) 100%);
  --header-fg: #ffffff;
}
/* The real logo is a mid-tone purple mark — too low-contrast on a dark photo.
   Force it to render solid white only in this overlay context. */
.site-header--overlay .site-logo img {
  filter: brightness(0) invert(1);
}
/* Login as a frosted glass pill (like Sign In on Mate Local) rather than a
   plain text link, so it reads clearly against a busy photo. */
.site-header--overlay .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}
.site-header--overlay .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Native primary nav — checkbox-driven mobile drawer (no JavaScript, so the
   page stays safe for a bulk/ZIP import). See notes/decisions.md. */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 22px; height: 2px; background: var(--header-fg); display: block; border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  transform-origin: center;
}
.site-nav .nav-list { display: flex; align-items: center; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.site-nav .nav-list a:not(.btn) { color: var(--header-fg); font-weight: 600; font-size: 0.95rem; }
.site-nav .nav-list a:not(.btn):hover { color: var(--color-primary); }

/* Backdrop behind the mobile drawer — a <label> so tapping it (like tapping
   outside the menu) closes the drawer via the same checkbox, no JS needed. */
.nav-backdrop { display: none; }

@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 20rem);
    background: var(--color-surface); box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform var(--transition-base);
    padding: var(--space-8) var(--space-6);
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    z-index: 30;
    /* The drawer's own panel is always light, regardless of the header it
       lives in (overlay or solid) — reset the color context locally so
       nav links and the Login button never inherit white-on-white. */
    --header-fg: var(--color-text);
  }
  .site-nav .nav-list { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .site-nav .btn-ghost {
    background: transparent;
    border-color: color-mix(in srgb, var(--color-text) 20%, transparent);
  }
  .nav-toggle-input:checked ~ .site-nav { transform: translateX(0); }

  .nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(15, 10, 20, 0.45);
    z-index: 29;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
  }
  .nav-toggle-input:checked ~ .nav-backdrop { opacity: 1; pointer-events: auto; }

  /* Hamburger morphs into an X while the drawer is open. */
  .nav-toggle-input:checked ~ .nav-toggle .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle-input:checked ~ .nav-toggle .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .nav-toggle .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* Lock background scroll while the mobile drawer is open (progressive
   enhancement — harmless where :has() isn't supported). */
body:has(.nav-toggle-input:checked) { overflow: hidden; }

/* Hero — full-bleed photo, purple gradient overlay, copy anchored bottom-left */
.hero-deep {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh; /* accounts for mobile browser chrome where supported */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}
.hero-deep picture { display: contents; }
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg,
      var(--color-primary-deep) 0%,
      color-mix(in srgb, var(--color-primary-deep) 62%, transparent) 34%,
      color-mix(in srgb, var(--color-primary-mid) 15%, transparent) 62%,
      transparent 100%),
    linear-gradient(100deg,
      color-mix(in srgb, var(--color-primary-deep) 58%, transparent) 0%,
      transparent 55%);
}
.hero-deep .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: var(--space-8);
  padding-bottom: 7rem;
  padding-left: 24rem;
  padding-right: 2rem;
}
.hero-text { max-width: 34rem; }
/* Badge-style eyebrow (bordered pill), matching the reference layout, rather
   than plain uppercase text floating with no shape of its own. */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-5);
}
.hero-badge svg { width: 0.85rem; height: 0.85rem; flex-shrink: 0; }
.hero-deep .eyebrow { color: var(--color-primary-soft); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; }
.hero-deep h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.1; margin: var(--space-4) 0; }
.hero-deep .lede { font-size: 1.1rem; color: rgba(255,255,255,0.85); max-width: 30rem; margin-bottom: var(--space-8); }
.hero-ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }
/* Secondary hero CTA sits on a dark photo — needs a solid white pill with
   purple text, not the default dark-on-transparent .btn-secondary. */
.hero-ctas .btn-secondary {
  background: #fff;
  color: var(--color-primary-dark);
  border: none;
}
.hero-ctas .btn-secondary:hover {
  background: var(--color-primary-light);
}

@media (max-width: 1024px) {
  .hero-deep .container { padding-left: 2.5rem; padding-right: 2.5rem; }
}

@media (max-width: 640px) {
  /* Keep the same full-bleed photo + overlay pattern as desktop — just tuned
     so the copy stack has real breathing room on a tall narrow viewport
     instead of pinning flush to the bottom edge (which is what read as
     "falling off the screen" / crowding the photo before). Two changes do
     the actual work: (1) safe-area-aware bottom padding so the last CTA
     always clears the device's home-indicator / gesture-bar area, and
     (2) slightly tighter vertical rhythm on the badge/h1/lede so the whole
     stack takes a bit less height, leaving more of the photo visible above it. */
  .hero-deep .container {
    padding-bottom: calc(2.75rem + env(safe-area-inset-bottom, 0px));
  }
  .hero-badge { margin-bottom: var(--space-4); }
  .hero-deep h1 { margin: var(--space-3) 0; }
  .hero-deep .lede { margin-bottom: var(--space-5); }
  /* "Meet local widows & widowers" is long enough to overflow a narrow
     screen under the base .btn's white-space: nowrap — stack the CTAs
     full-width and let text wrap instead of forcing a horizontal overflow. */
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { white-space: normal; text-align: center; }
}

@media (max-width: 640px) and (max-height: 700px) {
  /* Short phones (iPhone SE and similar, ~667px tall) have roughly the same
     width as taller phones but noticeably less vertical space — the same
     fixed-height copy stack (badge + h1 + lede + 2 buttons) that looks right
     on a 844-932px viewport eats a much bigger share of a 667px one, reading
     as "everything is zoomed in" and cropping the photo more tightly. Trim
     the vertical rhythm specifically here so the stack takes less height. */
  .hero-deep .container { padding-top: var(--space-5); }
  .hero-badge {
    margin-bottom: var(--space-3);
    padding: 0.35rem 0.8rem;
    font-size: 0.66rem;
  }
  .hero-deep h1 { font-size: 1.7rem; margin: var(--space-2) 0; }
  .hero-deep .lede { font-size: 0.98rem; margin-bottom: var(--space-3); }
  .hero-ctas { gap: var(--space-2); }
  .hero-ctas .btn {
    min-height: 2.5rem;
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
  }
}


/* Section heads + collection cards */
.section-head { max-width: 34rem; margin-bottom: var(--space-8); }
.section-head .eyebrow { color: var(--color-primary-dark); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: var(--space-2) 0; }
.section-head p { color: var(--color-text-soft); }

.collection-card {
  background: var(--color-surface);
  border-radius: var(--card-radius);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--space-6) var(--space-5);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.collection-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.collection-card .icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm);
  background: var(--color-surface-soft); color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.collection-card h3 { font-size: 1.1rem; margin-bottom: var(--space-2); }
.collection-card p { color: var(--color-text-soft); font-size: 0.9rem; }

/* Member showcase carousel */
.member-scroll {
  display: flex; gap: var(--space-5); overflow-x: auto; padding-bottom: var(--space-3);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: var(--space-4);
}
.member-scroll::-webkit-scrollbar { height: 6px; }
.member-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--color-text) 15%, transparent); border-radius: var(--radius-pill); }
.member-card {
  scroll-snap-align: start; flex: 0 0 15rem;
  background: var(--color-surface); border-radius: var(--card-radius);
  overflow: hidden; box-shadow: var(--card-shadow); border: var(--card-border);
}
.member-avatar { height: 13.5rem; position: relative; background: var(--color-surface-soft); }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-verified-badge {
  position: absolute; top: var(--space-3); right: var(--space-3);
  background: var(--color-surface); color: var(--color-primary-dark);
  font-size: 0.72rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: var(--radius-pill);
}
.member-body { padding: var(--space-4) var(--space-4) var(--space-5); }
.member-body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.member-body p { font-size: 0.85rem; color: var(--color-text-soft); margin-bottom: var(--space-4); }

/* Feature splits */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10); align-items: center; }
.feature-split + .feature-split { margin-top: var(--space-10); }
.feature-split.reverse .fs-media { order: 2; }
.fs-media {
  aspect-ratio: 4/3; border-radius: var(--radius-lg);
  overflow: hidden;
}
.fs-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-text .eyebrow { color: var(--color-primary-dark); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700; display: block; margin-bottom: var(--space-2); }
.fs-text h3 { font-size: 1.5rem; margin-bottom: var(--space-3); }
.fs-text p { color: var(--color-text-soft); max-width: 26rem; margin-bottom: var(--space-4); }
@media (max-width: 760px) {
  .feature-split, .feature-split.reverse { grid-template-columns: 1fr; }
  .feature-split.reverse .fs-media { order: 0; }
}

/* Trust / safety cards — sit on the page's own background, no colored band */
.trust-card {
  background: var(--color-surface);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--card-radius);
  padding: var(--space-5);
}
.trust-card .icon {
  width: 2.25rem; height: 2.25rem;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-3);
  display: flex; align-items: center; justify-content: center;
}
.trust-card .icon svg { width: 100%; height: 100%; }
.trust-card h4 { font-size: 1rem; margin-bottom: var(--space-2); }
.trust-card p { font-size: 0.85rem; color: var(--color-text-soft); }

/* Testimonial — contained card (not a full-bleed band), same language as
   the promo-cards elsewhere on the page */
.testimonial-card {
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: var(--space-10) var(--space-8);
}
.testimonial-card blockquote {
  font-family: var(--font-heading); font-size: 1.6rem; font-weight: 500;
  max-width: 42rem; margin: 0 auto var(--space-4); color: var(--color-primary-deep); line-height: 1.35;
}
.testimonial-card cite { font-style: normal; font-size: 0.9rem; font-weight: 600; color: var(--color-primary-dark); }
@media (max-width: 480px) {
  .testimonial-card { padding: var(--space-8) var(--space-5); }
  .testimonial-card blockquote { font-size: 1.25rem; }
}

/* FAQ — native <details>/<summary>, no JavaScript */
.faq { max-width: 46rem; }
.faq-item { border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) 0.25rem; cursor: pointer; font-weight: 600; font-size: 1rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--color-primary); transition: transform var(--transition-fast); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 0.25rem var(--space-4); color: var(--color-text-soft); font-size: 0.92rem; }

/* Journal / blog cards (currently placeholder content — see notes/image-usage.md) */
.blog-card {
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
}
.blog-thumb { aspect-ratio: 400 / 170; background: var(--color-surface-soft); }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Real article photos are 800x500 (8:5), much taller than the base 400:170
   ratio (which was originally calibrated for the homepage's now-removed
   placehold.co placeholder cards). Scoped to the articles grid, the featured
   card, and the homepage journal section — everywhere real photos are used. */
.article-grid .blog-thumb, .journal-grid .blog-thumb { aspect-ratio: 8 / 5; }
/* NOTE: the featured card's image sizing is NOT set here — see the single,
   consolidated `.featured-article .blog-thumb--placeholder` rule further
   down (near the .featured-article block itself). Deliberately no
   aspect-ratio on that element: aspect-ratio fighting with a flex/grid
   "stretch" cross-size caused a genuine cross-browser text/image overlap
   bug at intermediate viewport widths — see notes/decisions.md. */
.blog-body { padding: var(--space-5) var(--space-5) var(--space-6); }
.blog-body .date { font-size: 0.78rem; color: var(--color-text-soft); margin-bottom: var(--space-2); letter-spacing: 0.03em; }
.blog-body h4 { font-size: 1.05rem; margin-bottom: var(--space-3); line-height: 1.35; color: var(--color-text-soft); font-style: italic; }

/* Generic content-page hero (Safety, Pricing, Founder, etc.) — a plain text
   hero for pages that aren't the full-bleed homepage. Reusable site-wide. */
.page-hero { padding: var(--space-12) 0 var(--space-8); text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: var(--space-4); }
.page-hero p { color: var(--color-text-soft); max-width: 42rem; margin: 0 auto; font-size: 1.05rem; }

/* Jump-to-section pill row — horizontal-scroll on mobile, wraps on desktop.
   Reuses .chip for the pills themselves. */
.jump-nav {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding: var(--space-2) 0 var(--space-6);
  -webkit-overflow-scrolling: touch;
}
.jump-nav .chip { flex: 0 0 auto; white-space: nowrap; cursor: pointer; }
.jump-nav .chip:hover { background: var(--color-primary-light); }

/* Feature carousel — mobile: horizontal swipe strip (keeps a long feature
   list from turning into a huge vertical scroll); desktop: proper grid.
   Content is identical either way, just laid out differently, so nothing
   is hidden from search engines or screen readers. */
.feature-carousel {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.feature-carousel .feature-card { flex: 0 0 15.5rem; scroll-snap-align: start; }
@media (min-width: 768px) {
  .feature-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    overflow: visible;
  }
  .feature-carousel .feature-card { flex: unset; }
}

.feature-card {
  background: var(--color-surface);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--card-radius);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
}
.feature-card .icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm);
  background: var(--color-surface-soft); color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.feature-card h3 { font-size: 1.02rem; margin-bottom: var(--space-2); }
.feature-card .what-it-does { color: var(--color-text-soft); font-size: 0.9rem; margin-bottom: var(--space-3); }
.feature-card .protects {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
  font-size: 0.85rem;
  color: var(--color-primary-dark);
  font-weight: 600;
}
.feature-card .protects .label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.category-section + .category-section { margin-top: var(--space-10); }

/* Platform availability rows */
.platform-row {
  display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  background: var(--color-surface); border: var(--card-border); border-radius: var(--card-radius);
  padding: var(--space-4) var(--space-5);
}
.platform-row + .platform-row { margin-top: var(--space-3); }
.platform-row .icon {
  width: 2.5rem; height: 2.5rem; flex-shrink: 0; color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
}
.platform-row .icon img, .platform-row .icon svg { width: 100%; height: 100%; }
.platform-row .platform-body { flex: 1; min-width: 12rem; }
.platform-row h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.platform-row p { font-size: 0.85rem; color: var(--color-text-soft); margin: 0; }
.platform-row .availability {
  font-size: 0.78rem; font-weight: 700; color: var(--color-primary-dark);
  background: var(--color-surface-soft); padding: 0.3rem 0.7rem; border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Membership tier cards — carousel on mobile (swipe between Classic/VIP/VIP+
   instead of a long stacked scroll), grid on desktop. */
.tier-carousel {
  display: flex; gap: var(--space-5); overflow-x: auto; padding-bottom: var(--space-2);
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-padding-left: var(--space-4);
}
.tier-carousel .tier-card { flex: 0 0 82vw; max-width: 22rem; scroll-snap-align: start; }
@media (min-width: 768px) {
  /* auto-fit rather than a hardcoded column count — 3 tiers (Features) get
     3 even columns, 2 tiers (Pricing) get 2 even columns, self-correcting. */
  .tier-carousel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); overflow: visible; }
  .tier-carousel .tier-card { flex: unset; max-width: none; }
}
.tier-card {
  background: var(--color-surface); border: var(--card-border); box-shadow: var(--card-shadow);
  border-radius: 1.5rem; padding: var(--space-6) var(--space-5);
  display: flex; flex-direction: column;
}
.tier-card h3 { font-size: 1.3rem; margin-bottom: var(--space-2); }
.tier-card .tier-desc { color: var(--color-text-soft); font-size: 0.92rem; margin-bottom: var(--space-4); }
.tier-card .tier-includes { font-size: 0.85rem; color: var(--color-text-soft); font-style: italic; margin-bottom: var(--space-3); }
.tier-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.tier-card ul li { font-size: 0.9rem; color: var(--color-text); padding-left: 1.4rem; position: relative; }
.tier-card ul li::before { content: "\2713"; position: absolute; left: 0; color: var(--color-primary-dark); font-weight: 700; }
.tier-badge { display: inline-flex; }
.tier-badge--vip { color: var(--color-primary); }
.tier-badge--vip-plus { color: var(--color-accent); }
.tier-badge svg { display: block; height: 22px; width: auto; }

/* VIP+ card — a light, faded-purple tint (the same --color-surface-soft used
   for icon backgrounds on the Features page), not a dark/inverted card.
   Text stays dark (matching VIP) since white wouldn't read on a light tint. */
.tier-card[data-theme="dark"] {
  background: var(--color-surface-soft);
  color: var(--color-text);
  border-color: color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.tier-card[data-theme="dark"] .tier-badge--vip-plus { color: var(--color-primary-dark); }
.tier-card[data-theme="dark"] .tier-desc { color: var(--color-text-soft); }
.tier-card[data-theme="dark"] .tier-includes { color: var(--color-text-soft); }
.tier-card[data-theme="dark"] ul li { color: var(--color-text); }
.tier-card[data-theme="dark"] ul li::before { color: var(--color-primary-dark); }
.tier-card[data-theme="dark"] .price-block { border-top-color: color-mix(in srgb, var(--color-primary) 20%, transparent); }
.tier-card[data-theme="dark"] .price-row .currency { color: var(--color-text-soft); }

/* margin-top: auto pushes the price block (and the CTA below it) down to
   the bottom of the card, so when two tier cards have different feature-list
   lengths (VIP: 7 bullets, VIP+: 6), their price rows and buttons still
   align on the same line — the standard equal-height-sibling-cards pattern. */
.price-block { margin: auto 0 var(--space-5); padding-top: var(--space-4); border-top: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent); }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: 0.3rem 0; font-size: 0.92rem; }
.price-row .currency { font-weight: 700; opacity: 0.7; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.price-row .amounts { display: flex; gap: var(--space-3); font-weight: 700; }
.price-row .amounts .per { font-weight: 500; opacity: 0.7; font-size: 0.82rem; }

.length-note { text-align: center; color: var(--color-text-soft); font-size: 0.88rem; margin-top: var(--space-8); max-width: 34rem; margin-inline: auto; }

.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6);
  color: var(--color-text-soft); font-size: 0.85rem; margin-top: var(--space-6);
}
.trust-strip span { display: inline-flex; align-items: center; gap: 0.4rem; }
.trust-strip svg { width: 1rem; height: 1rem; color: var(--color-primary-dark); }

.swipe-hint {
  display: none; text-align: center; font-size: 0.8rem; color: var(--color-text-soft);
  margin-bottom: var(--space-3);
}
@media (max-width: 767px) { .swipe-hint { display: block; } }

/* Generic bulleted list for prose sections (matching algorithm, super match) */
.check-list { list-style: none; padding: 0; margin: var(--space-4) 0; display: flex; flex-direction: column; gap: var(--space-2); }
.check-list li { padding-left: 1.4rem; position: relative; color: var(--color-text-soft); }
.check-list li::before { content: "\2022"; position: absolute; left: 0.2rem; color: var(--color-primary); font-weight: 700; }

/* Comparison table — real <table>, horizontal scroll wrapper for mobile
   rather than restructuring into stripes (keeps real table semantics). */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--card-radius); border: var(--card-border); }
.compare-table { width: 100%; border-collapse: collapse; background: var(--color-surface); font-size: 0.88rem; }
.compare-table th, .compare-table td { padding: var(--space-3) var(--space-4); text-align: left; white-space: nowrap; }
.compare-table thead th { background: var(--color-surface-soft); font-weight: 700; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent); }
.compare-table th:not(:first-child), .compare-table td:not(:first-child) { text-align: center; }
.compare-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--color-surface-soft) 45%, transparent); }
.compare-table tbody th { font-weight: 500; text-align: left; white-space: normal; }
.compare-table .yes { color: var(--color-primary-dark); font-weight: 700; }
.compare-table .no { color: var(--color-text-soft); }
.compare-table .tier-badge svg { height: 15px; }

/* Review ticker — three-row CSS-only marquee (community page). Pure CSS,
   no JS: each row's cards are duplicated in the HTML so translateX(-50%)
   loops seamlessly. */
.ticker {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-row {
  display: flex;
  gap: var(--space-4);
  width: max-content;
  animation: ticker-scroll 60s linear infinite;
}
.ticker-row + .ticker-row { margin-top: var(--space-4); }
.ticker-row.is-reverse { animation-direction: reverse; }
.ticker-row.is-slow { animation-duration: 80s; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker:hover .ticker-row, .ticker:focus-within .ticker-row { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ticker-row { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
}
.ticker-card {
  flex: 0 0 17rem;
  background: var(--color-surface);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--card-radius);
  padding: var(--space-4);
  display: flex;
  gap: var(--space-3);
}
.ticker-avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ticker-body { min-width: 0; }
.ticker-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.15rem; }
.stars { color: var(--color-accent); letter-spacing: 0.05em; font-size: 0.8rem; }
.ticker-quote { font-size: 0.85rem; color: var(--color-text-soft); margin: 0.3rem 0 0; }

/* All-members directory — compact wrapping pills, not a full-width single
   column, so a large roster stays scannable on mobile without a huge
   vertical scroll (one row can fit 2-3 members even on a phone). */
.member-directory { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.directory-card {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: var(--card-border);
}
.directory-card:hover { background: var(--color-surface-soft); }
.directory-avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.directory-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }

/* Promo card — a contained, rounded CTA card (not a full-bleed band), so it
   reads as a card sitting in the page rather than a wall-to-wall block.
   Text-only, centered — no icon or photo (tried both; neither landed, so the
   card now leans on the headline + copy + button alone). */
.promo-card {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.promo-card-text { max-width: 34rem; }
.promo-card-text h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: var(--space-3); }
.promo-card-text p { color: rgba(255,255,255,0.88); margin-bottom: var(--space-6); }
.promo-card-text .btn-primary { background: #fff; color: var(--color-primary-dark); }
.promo-card-text .btn-primary:hover { background: var(--color-primary-light); }
@media (max-width: 700px) {
  .promo-card { padding: var(--space-8) var(--space-6); }
}

/* Articles landing — featured card (larger, above the grid).
   Deliberately flexbox, not CSS Grid: an earlier grid + aspect-ratio +
   align-items:stretch combination caused a genuine cross-browser text/image
   overlap bug at intermediate viewport widths (aspect-ratio fighting with
   the stretched cross-size is inconsistently resolved across engines).
   Flexbox with flex-basis:0 + min-width:0 on both children is the more
   predictable, well-supported pattern for "two equal columns that share
   height" and avoids that conflict entirely — no aspect-ratio on the image
   side at all; object-fit:cover + the stretched flex height already gives a
   clean photo crop without needing a locked ratio. */
.featured-article {
  display: flex; gap: var(--space-6); align-items: stretch;
  background: var(--color-surface); border: var(--card-border); box-shadow: var(--card-shadow);
  border-radius: var(--card-radius); overflow: hidden; margin-bottom: var(--space-8);
}
.featured-article .blog-thumb--placeholder { flex: 1 1 0; min-width: 0; min-height: 14rem; }
.featured-article-body { flex: 1 1 0; min-width: 0; padding: var(--space-6) var(--space-6) var(--space-6) 0; display: flex; flex-direction: column; justify-content: center; }
.featured-article-body .eyebrow { color: var(--color-primary-dark); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; font-weight: 700; }
.featured-article-body h3 { font-size: 1.6rem; margin: var(--space-2) 0; overflow-wrap: break-word; }
.featured-article-body .article-card-desc { overflow-wrap: break-word; }
@media (max-width: 767px) {
  .featured-article { flex-direction: column; }
  .featured-article .blog-thumb--placeholder { flex: 1 1 auto; }
  .featured-article-body { padding: 0 var(--space-5) var(--space-5); }
}

/* Articles landing — category filter pills. CSS-only (radio + label pattern,
   the same hidden-checkbox trick used by the mobile nav drawer) so this page
   stays safe for bulk CMS import — no custom JavaScript. Inputs live inside
   .cat-pills-row (so the row can scroll on mobile) while the featured card
   and article grid live alongside it in .container; the filter rules below
   use :has() on .container rather than a ~ sibling combinator, so this
   nesting doesn't break them. Each input must stay immediately before its
   own .cat-pill label for the :checked + .cat-pill active-state styling. */
.cat-pills-label {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-text-soft); margin: 0 0 var(--space-3);
}
.cat-filter-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 1.1rem; margin: 0 var(--space-2) var(--space-2) 0;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  background: var(--color-surface); color: var(--color-text);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cat-pill:hover { border-color: var(--color-primary); }
.cat-pill-count { font-size: 0.85em; opacity: 0.65; }
.cat-filter-input:checked + .cat-pill { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.cat-filter-input:checked + .cat-pill .cat-pill-count { opacity: 0.85; }
.cat-filter-input:focus-visible + .cat-pill { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* The featured card is a permanent spotlight at the top of the page — it stays
   visible no matter which category pill is selected (previously it hid on any
   non-"All" filter; user wants it static across the whole page now). */

/* Show only the topic-section matching the active filter; "All" (default
   checked) shows every section. Each section carries its own data-cat, so
   hiding is per-section now rather than per-card. */
.container:has(#filter-widowed-dating:checked) .topic-section:not([data-cat="widowed-dating"]),
.container:has(#filter-ready-to-date-again:checked) .topic-section:not([data-cat="ready-to-date-again"]),
.container:has(#filter-aeo-questions:checked) .topic-section:not([data-cat="aeo-questions"]),
.container:has(#filter-emotional-support:checked) .topic-section:not([data-cat="emotional-support"]),
.container:has(#filter-family:checked) .topic-section:not([data-cat="family"]),
.container:has(#filter-practical-dating:checked) .topic-section:not([data-cat="practical-dating"]),
.container:has(#filter-relationships:checked) .topic-section:not([data-cat="relationships"]),
.container:has(#filter-age-specific:checked) .topic-section:not([data-cat="age-specific"]),
.container:has(#filter-men-vs-women:checked) .topic-section:not([data-cat="men-vs-women"]),
.container:has(#filter-success-stories:checked) .topic-section:not([data-cat="success-stories"]),
.container:has(#filter-myth-busting:checked) .topic-section:not([data-cat="myth-busting"]),
.container:has(#filter-statistics:checked) .topic-section:not([data-cat="statistics"]),
.container:has(#filter-glossary:checked) .topic-section:not([data-cat="glossary"]),
.container:has(#filter-long-tail-queries:checked) .topic-section:not([data-cat="long-tail-queries"]) {
  display: none;
}

/* Articles landing — the featured card now sits directly under the page-hero
   title/paragraph, so the default .section top padding (stacked on top of
   .page-hero's own bottom padding) left too large a gap. Scoped to this one
   section only — .section/.page-hero are shared site-wide, so this doesn't
   touch other pages. */
.section.articles-section { padding-top: var(--space-3); }
/* Same reasoning for the space above the "Articles" H1 itself — .page-hero's
   default top padding (var(--space-12)) is shared site-wide, so reduce it
   only here via a page-scoped class. */
.page-hero.articles-hero { padding-top: var(--space-6); }

/* Topic sections — each category now gets its own heading (purple title +
   light article count) and descriptor sentence before its row of cards. */
.topic-section { margin-bottom: var(--space-10); }
.topic-section:last-of-type { margin-bottom: 0; }
.topic-heading { margin-bottom: var(--space-4); }
.topic-title {
  color: var(--color-primary);
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}
.topic-count { font-size: 0.85rem; font-weight: 400; color: var(--color-text-soft); }
.topic-desc { color: var(--color-text-soft); font-size: 0.95rem; max-width: 42rem; margin: 0; }

/* Cards within a topic section — single-row horizontal scroll on mobile
   instead of stacking into a tall vertical list; normal responsive grid
   (2/3 columns) on larger screens via the existing .grid-3 rules. */
@media (max-width: 640px) {
  .topic-section .article-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }
  .topic-section .article-grid .blog-card {
    flex: 0 0 80%;
    max-width: 80%;
    scroll-snap-align: start;
  }
}

/* Category pills — single-row horizontal scroll at every screen size, rather
   than wrapping into a tall block of pills. Inputs stay position:absolute
   (hidden) so they don't affect the flex layout. */
.cat-pills-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-6);
  -webkit-overflow-scrolling: touch;
}
.cat-pills-row .cat-pill { flex: 0 0 auto; }

@media (max-width: 640px) {
  .cat-pill { font-size: 0.8rem; padding: 0.45rem 0.9rem; }
}

/* Articles landing — real article cards (distinct from the homepage's
   placeholder journal cards, which stay italic/muted on purpose). */
.blog-thumb--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface-soft);
  padding: var(--space-4);
  text-align: center;
}
.blog-thumb--placeholder span {
  font-family: var(--font-heading); font-weight: 500; font-size: 1.1rem;
  color: var(--color-primary-dark); line-height: 1.3;
}
/* Real photo variant (used by the featured card once an image is assigned) —
   drop the centering padding and let the photo fill the frame. */
.blog-thumb--placeholder img { width: 100%; height: 100%; object-fit: cover; }
.blog-thumb--placeholder:has(img) { padding: 0; }
.blog-body h4.article-card-title { font-style: normal; color: var(--color-text); }
.article-card-desc { font-size: 0.88rem; color: var(--color-text-soft); margin-bottom: var(--space-3); }

/* Article body — long-form prose */
.article-body { max-width: 42rem; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.15; margin: var(--space-3) 0 var(--space-2); }

/* Article detail page — larger hero image block, sits under the H1, reusing
   the same photo shown on that article's landing-page card. */
.article-hero-image {
  aspect-ratio: 8 / 5;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin: var(--space-4) 0 var(--space-6);
}
.article-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Article detail page — "Related articles" card pair at the end. Reuses the
   landing page's .blog-card styles, scoped to give the 800x500 photos the
   same crop-free 8:5 frame used elsewhere. */
.related-articles-grid .blog-thumb { aspect-ratio: 8 / 5; }
.related-articles-grid .article-card-title { font-style: normal; }
.related-articles-title { color: var(--color-primary); }
/* .article-body a further down underlines inline prose links — the related-article
   cards are also <a> tags inside .article-body, so they'd inherit that underline
   across the whole card (title, description, date, chip) unless excluded here. */
.article-body .blog-card,
.article-body .blog-card * {
  text-decoration: none;
}
.article-byline { color: var(--color-text-soft); font-size: 0.9rem; margin-bottom: var(--space-5); }
.article-body h2 { font-size: 1.4rem; margin: var(--space-8) 0 var(--space-3); }
.article-body p { margin-bottom: var(--space-4); color: var(--color-text); }
.article-body ul { margin: 0 0 var(--space-4); padding-left: 1.4rem; }
.article-body ul li { margin-bottom: var(--space-2); color: var(--color-text); }
.article-body a { color: var(--color-primary-dark); text-decoration: underline; text-underline-offset: 2px; }

/* ===== 5) Utilities ===== */
.text-center { text-align: center; }
.muted { color: var(--color-text-soft); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Comparisons landing — card grid. Per the page-type brief, 1–3 comparisons
   render as a single centered row; at 4+ (current count) it becomes a proper
   responsive grid: 1 column mobile, 2 tablet, 3 desktop. */
.comparisons-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  justify-items: stretch;
}
@media (min-width: 600px) {
  .comparisons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .comparisons-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.comparison-card {
  background: var(--color-surface); border: var(--card-border); box-shadow: var(--card-shadow);
  border-radius: var(--card-radius); overflow: hidden;
  width: 100%;
  display: flex; flex-direction: column;
}
.comparison-card-image { aspect-ratio: 8 / 5; }
.comparison-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comparison-card-body { padding: var(--space-6); display: flex; flex-direction: column; flex: 1; }
.comparison-card .eyebrow { color: var(--color-primary-dark); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; font-weight: 700; }
.comparison-card h3 { font-size: 1.3rem; margin: var(--space-2) 0; }
.comparison-card p { color: var(--color-text-soft); margin-bottom: var(--space-4); }
.comparison-card .btn { align-self: flex-start; margin-top: auto; }
