/* ============================================================
   SIGIST Sweden — main.css
   MOBILE-FIRST. Base styles target small screens; min-width
   media queries at ~640 / 900 / 1200 progressively enhance
   toward the desktop design handoff.

   IMPORTANT: This stylesheet NEVER hides content by default
   (no opacity:0 / visibility:hidden initial states). Entrance
   animation start-states are set from JS only, so the site is
   fully visible with JS disabled or GSAP failed.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --bg: #FAF7F0;            /* cream background */
  --bg-alt: #F2EDE1;        /* tan alt section */
  --border: #E3DCCC;        /* tan-grey border */
  --border-dashed: #C9C0AA; /* dashed sponsor slot */
  --text: #1C1A15;          /* near-black primary */
  --text-2: #4A4638;        /* warm grey secondary */
  --muted: #8A8372;         /* mono captions */
  --green: #2E9E5B;         /* accent / CTA */
  --green-light: #5BC98A;   /* accent on dark bg */
  --green-dark-bg: #163B26; /* dark green band */
  --green-btn-text: #0E2618;/* text on green button */
  --dark-card: #1C1A15;     /* subscribe block bg */
  --dark-field: #242019;    /* dark field bg */
  --dark-field-border: #4A4638;
  --error: #E08A6B;         /* warm red-orange */
  --tag-community: #B8862E; /* Community category tag color (see .post-item__cat) */
  --tag-error500: #2F6B4A;  /* "Error 500 series" tag color — deliberately lighter/
                               more saturated than --green-dark-bg (#163B26), which
                               reads as near-black at 12px and was indistinguishable
                               from body ink; kept forest-green (not full accent
                               --green) so it doesn't borrow the "clickable /
                               confirming" meaning green carries everywhere else. */
  --on-dark: #FAF7F0;
  --on-dark-muted: #C9C4B4;
  --on-dark-green-muted: #C9CBBF;

  /* Fonts */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii */
  --r-card: 20px;
  --r-tile: 16px;
  --r-photo: 24px;
  --r-block: 28px;
  --r-pill: 100px;

  /* Layout */
  --pad-x: 24px;            /* mobile horizontal padding */
  --maxw: 1200px;
  --maxw-narrow: 1080px;

  /* Mobile header height — the fixed header's real height below the 900px nav
     breakpoint (44px hamburger + 18px×2 nav padding). Drives the body top
     padding and anchor scroll-margin so nothing hides behind the fixed bar.
     Only consumed inside the max-width:899.98px block; desktop keeps a static
     header and never reads it. */
  --header-h: 80px;

  /* Vertical rhythm — the single beat between every major block. Matches the
     base .section spacing (mobile) and grows on desktop (see 900px block).
     Home-specific overrides key off this so every homepage gap reads equal. */
  --gap-section: 56px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Every image is fluid and never distorted: cap width to its container and let
   height follow from the intrinsic ratio (overrides the width/height attribute
   presentation hints so aspect-ratio boxes below size correctly). */
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, blockquote, p { margin: 0; }

::selection { background: var(--green); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: var(--on-dark);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  z-index: 200;
  font-family: var(--mono);
  font-size: 13px;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.wrap--narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--gap-section); } /* vertical rhythm (56 → 80) */
.section--tight { padding-block: 40px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--green);
  font-weight: 500;
  text-transform: uppercase;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow--muted { color: var(--muted); }

.check { color: var(--green); font-weight: 700; }

/* ---------- Type scale (mobile base) ---------- */
.h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
  margin: 0 0 12px;
}
.lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
}
.body { font-size: 15px; line-height: 1.65; color: var(--text-2); }
.body--dark { color: var(--text); }

/* ---------- Buttons / pills ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  padding: 15px 26px;
  border-radius: var(--r-pill);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--green); color: var(--bg); }
.btn--primary:hover { background: #278a4f; box-shadow: 0 8px 20px rgba(46,158,91,.25); }

.btn--outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn--outline:hover { background: var(--text); color: var(--bg); }

/* green button used on dark green bands */
.btn--on-green { background: var(--green); color: var(--green-btn-text); font-weight: 700; }
.btn--on-green:hover { background: var(--green-light); box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.btn--ghost-green { background: transparent; color: var(--green-light); border-color: var(--green-light); font-weight: 700; }
.btn--ghost-green:hover { background: var(--green-light); color: var(--green-btn-text); }

/* plain ink-on-cream pill (e.g. the Community "pitch a post" CTA) */
.btn--dark { background: var(--text); color: var(--on-dark); }
.btn--dark:hover { background: #000; }

.link-underline {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 2px solid var(--green);
  padding-bottom: 2px;
  transition: color .18s ease;
}
.link-underline:hover { color: var(--green); }

/* ---------- Header / nav ---------- */
.site-header {
  position: relative;
  border-bottom: 1px solid transparent;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1360px;
  margin-inline: auto;
  padding: 18px var(--pad-x);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__place {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
}
/* Header brand logo (replaces the SIGIST / Sweden text lockup). */
.brand__logo {
  display: block;
  height: 34px;
  width: auto;
}

/* Hamburger toggle (mobile) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav menu — mobile: collapsible panel */
.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  flex-direction: column;
  gap: 4px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px var(--pad-x) 20px;
  box-shadow: 0 18px 40px rgba(28,26,21,.10);
}
.nav-menu.is-open { display: flex; }

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border);
}
.nav-link:last-of-type { border-bottom: none; }
.nav-link[aria-current="page"] { font-weight: 600; color: var(--green); }

.nav-cta {
  text-decoration: none;
  background: var(--text);
  color: var(--on-dark);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  text-align: center;
  margin-top: 8px;
  transition: background-color .18s ease;
}
.nav-cta:hover { background: #000; }

/* ---------- Sticky hide/reveal header — MOBILE ONLY ----------
   Below the 900px nav breakpoint the header becomes FIXED so it can hide on
   scroll-down and reveal on scroll-up (main.js toggles .nav-hidden). Because it
   leaves the normal flow, the body gets a top padding equal to --header-h so the
   page content does not jump up under it. Desktop (>=900px) is untouched: the
   header stays static/relative and always visible (see the 900px block, where
   the nav goes inline). 899.98px avoids double-matching the 900px desktop rule. */
@media (max-width: 899.98px) {
  body { padding-top: var(--header-h); }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;                 /* above content, below the subscribe panel (300) */
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: transform .25s ease;
    will-change: transform;
  }
  /* Hidden state: slide fully out of view. Under prefers-reduced-motion the
     global `transition: none !important` rule makes this an instant toggle. */
  .site-header.nav-hidden { transform: translateY(-100%); }

  /* Anchor jumps (#subscribe) must clear the fixed header. */
  #subscribe { scroll-margin-top: calc(var(--header-h) + 12px); }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 40px 40px;
}
.hero__grid { display: grid; gap: 32px; align-items: center; }
.hero__title { margin: 0 0 20px; }
.hero__lead { margin: 0 0 28px; max-width: 560px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Page hero (About/Conferences/detail style) */
.page-hero { padding-block: 48px 32px; }
.page-hero .h1 { max-width: 820px; margin-bottom: 24px; }
.page-hero .lead { max-width: 680px; font-size: 18px; }

/* ---------- Home vertical rhythm ----------
   The homepage stacks plain .section blocks (which carry --gap-section padding)
   with full-bleed bands (facts, sponsors — no padding of their own) and the
   wide-photo band. Left alone, the bands' neighbours contributed uneven gaps
   (e.g. the hero's 40px bottom, the wide band's fixed 56px top, the cards'
   fixed 80px bottom), so the whitespace around the facts and sponsor bands read
   larger/smaller than elsewhere. These overrides retie every boundary to the
   same --gap-section beat (56 mobile / 80 desktop). Scoped to .is-home so the
   list/detail/community/about pages keep their own .section spacing untouched. */
.is-home .hero { padding-bottom: var(--gap-section); }   /* hero → facts band */
.is-home .home-wide { margin-top: var(--gap-section); }  /* facts band → wide photo */
.is-home .home-cards { padding-bottom: var(--gap-section); } /* cards → sponsors band */

/* ---------- Photo placeholder ---------- */
.photo {
  background-image: repeating-linear-gradient(135deg, #EFE9DB 0px, #EFE9DB 10px, #E5DECC 10px, #E5DECC 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-photo);
  overflow: hidden;
}
.photo span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  text-align: center;
}
.photo--portrait { aspect-ratio: 4/5; }
.photo--wide { aspect-ratio: 16/9; }
.photo--card { aspect-ratio: 4/3; border-radius: 0; }

/* ---------- Fact strip ---------- */
.fact-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.fact-strip__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-block: 26px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.fact-strip__item { display: flex; align-items: center; gap: 10px; }

/* ---------- Key facts (stat grid) ---------- */
.stat-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.stat-grid { display: grid; grid-template-columns: 1fr; }
.stat {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.stat:first-child { border-top: none; }
.stat__num {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 8px;
}
.stat__label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- About teaser (quote + body) ---------- */
.teaser { display: grid; gap: 28px; align-items: start; }
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.35;
  color: var(--text);
}

/* ---------- Card grids ---------- */
.card-grid { display: grid; gap: 24px; }
.card-grid--2 { grid-template-columns: 1fr; }
.card-grid--3 { grid-template-columns: 1fr; }

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.card__body { padding: 28px 24px; }
.card__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* bordered card variant (About objectives / Conference details) */
.card--bordered {
  background: transparent;
  border: 1px solid var(--border);
}
.card--bordered .card__body { padding: 32px 28px; }

/* ---------- Listing (conferences/courses) ---------- */
.list-item {
  display: grid;
  gap: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px 24px;
}
.list-item__meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 4px;
}
.list-item__title { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; margin: 0 0 10px; }
.list-item__title a { text-decoration: none; color: var(--text); transition: color .18s ease; }
.list-item__title a:hover { color: var(--green); }
.list-item__actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: var(--bg);
}
.badge--past { background: var(--border); color: var(--text-2); }

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Empty state */
.empty-state {
  border: 1px dashed var(--border-dashed);
  border-radius: var(--r-card);
  padding: 40px 28px;
  text-align: center;
}

/* ---------- Pitch box (Community "got something to share?") ----------
   Same dashed "open slot" visual language as .empty-state /
   .sponsor-tile--open: a tan-alt block with a dashed border. */
.pitch-box {
  background: var(--bg-alt);
  border: 2px dashed var(--border-dashed);
  border-radius: var(--r-card);
  padding: 32px 28px;
  margin-bottom: var(--gap-section);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* "Show more" button (Community post list) — JS-inserted, see main.js.
   display:table shrink-wraps the button so margin:auto can center it, without
   an extra wrapper element around a node that only JS ever creates. */
.show-more-btn {
  display: table;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 14px 26px;
  border-radius: var(--r-pill);
  cursor: pointer;
  margin: 32px auto 0;
  transition: border-color .18s ease, background-color .18s ease;
}
.show-more-btn:hover { border-color: var(--muted); background: var(--border); }
/* [hidden] and .show-more-btn{display:table} are equal specificity, so without
   this the class would win the cascade (author rules come after the UA
   stylesheet) and a JS-hidden button would still render. */
.show-more-btn[hidden] { display: none; }
/* Illustrated variant (events lists with nothing upcoming). The built-in
   sketch is a transparent PNG sitting straight on the cream background —
   no frame, no plate, purely decorative (alt="" in the markup). */
.empty-state--illustrated { padding-top: 32px; }
.empty-state__illo {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto 20px;
}

/* ---------- Past events expander (events-mode lists) ----------
   Native <details>/<summary>: collapsed on first paint, works with zero JS.
   The default disclosure triangle is replaced by a mono label + chevron in
   the site's caption language. */
.past-block { margin-top: 56px; }
.past-toggle { border-top: 1px solid var(--border); }
.past-toggle__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .18s ease;
}
.past-toggle__summary::-webkit-details-marker { display: none; }
.past-toggle__summary::marker { content: ''; }
.past-toggle__summary:hover { color: var(--text); }
.past-toggle__summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.past-toggle__count { opacity: 0.7; }
.past-toggle__chevron {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}
.past-toggle[open] .past-toggle__chevron { transform: translateY(1px) rotate(-135deg); }
/* Label swaps with the open state — only ever one of the two is in flow. */
.past-toggle__label--hide { display: none; }
.past-toggle[open] .past-toggle__label--show { display: none; }
.past-toggle[open] .past-toggle__label--hide { display: inline; }
.past-toggle__body { padding: 4px 0 8px; }

/* ---------- Community posts (list_mode: posts) ---------- */
/* Editorial list — no cards/badges/actions column, just dividers. Reuses the
   site's mono-eyebrow + serif-title rhythm. */
.post-list {
  display: grid;
  gap: 0;
}
.post-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.post-item:hover .post-item__title { color: var(--green); }
.post-item:first-child { border-top: 0; padding-top: 8px; }
/* From 640px .post-item gets an explicit `display: grid` (below) to lay out
   its meta column beside the content. [hidden] and a class-level display are
   equal specificity, so without this override a JS/server-hidden row would
   still render as an (empty-looking) grid box instead of disappearing. */
.post-item[hidden] { display: none; }
/* When the category filter hides leading rows, the first VISIBLE row is no
   longer :first-child — main.js (and the server, for the no-JS fallback) marks
   it .is-first so it still drops the divider above it. */
.post-item.is-first { border-top: 0; padding-top: 8px; }
.post-item__meta {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 12px;
}
.post-item__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  transition: color .18s ease;
}
.post-item .body { margin: 0 0 16px; max-width: 640px; }
/* Category tag color-coding, matching the approved design's TAG_COLORS map.
   .post-item__cat's base color is the fallback; the modifier classes (applied
   by sigist_post_cat_class() in list.php) override it per category. */
.post-item__cat { color: var(--green); }
.post-item__cat.cat--roundup { color: var(--green); }
.post-item__cat.cat--error500 { color: var(--tag-error500); }
.post-item__cat.cat--community { color: var(--tag-community); }
.post-item__cat.cat--general { color: var(--muted); }

/* ---------- Featured post (Community) ----------
   The one post flagged "featured" in the admin. Rendered as its own block
   above the regular list, framed by ink-colored rules instead of the
   regular list's tan --border, so it reads as a clear step up from the rest. */
.post-item--featured {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  padding: 28px 0;
  margin-bottom: 8px;
}
.post-item--featured__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.post-item--featured__tag {
  color: var(--green);
  font-weight: 600;
  margin-left: auto;
}
.post-item--featured__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  max-width: 780px;
}
.post-item--featured .body { max-width: 680px; margin: 0; }
.post-item--featured:hover .post-item--featured__title { color: var(--green); }
/* Same cascade-order fix as .show-more-btn above: an explicit display on this
   class would otherwise beat the UA [hidden] rule at equal specificity. */
.post-item--featured[hidden] { display: none; }

/* ---------- Community category filter pills ---------- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  /* 12px vertical padding + ~19px line-height clears the 44px mobile
     touch-target guideline (was 7px, ~35px total). */
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.filter-pill:hover { color: var(--text); border-color: var(--muted); }
.filter-pill.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
/* The active pill's checkmark brings the site's signature ✓ motif onto the
   Community page (absent elsewhere on this page) without inventing a new
   icon system — same glyph/class already used for confirmed facts and detail
   meta. --green-light (not the base --green .check color) for contrast on
   the active pill's dark ink background, matching the dark-surface convention
   documented in DESIGN.md. */
.filter-pill.is-active .check { color: var(--green-light); }
.filter-pill__count {
  font-size: 11px;
  opacity: 0.7;
}

/* ---------- Community post reactions (👍 / 👎) ---------- */
.react-section { padding-top: 8px; padding-bottom: 8px; }
.react {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.react__prompt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.react__pills { display: inline-flex; gap: 10px; }
.react__form { margin: 0; }
.react-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-family: var(--sans);
  line-height: 1;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.react-pill:hover { border-color: var(--muted); color: var(--text); }
.react-pill__icon { font-size: 16px; }
.react-pill__count {
  font-family: var(--mono);
  font-size: 13px;
  min-width: 1ch;
  text-align: right;
}
.react-pill.is-active {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}
.react-pill.is-active .react-pill__count { color: var(--bg); }
.react-pill[disabled] { opacity: 0.6; cursor: default; }
.react__status { margin: 0; }

/* ---------- Subscribe block (dark card) ---------- */
.subscribe {
  background: var(--dark-card);
  color: var(--on-dark);
  border-radius: var(--r-block);
  padding: 40px 28px;
  display: grid;
  gap: 32px;
  align-items: center;
}
.subscribe__mark { display: block; height: 46px; width: auto; margin: 0 0 20px; }
.subscribe .eyebrow { color: var(--green-light); }
.subscribe__title { color: var(--on-dark); margin: 0 0 16px; }
.subscribe__copy { font-size: 16px; line-height: 1.7; color: var(--on-dark-muted); max-width: 440px; }

.subscribe-form { display: grid; gap: 12px; }
.subscribe-form__names { display: grid; gap: 12px; }
.field-input {
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--dark-field-border);
  background: var(--dark-field);
  color: var(--on-dark);
  font-size: 15px;
  font-family: var(--sans);
  transition: border-color .18s ease;
}
.field-input::placeholder { color: #9A9384; }
.field-input:focus { outline: none; border-color: var(--green); }
.field-input[aria-invalid="true"] { border-color: var(--error); }

.subscribe-form button[type="submit"] {
  background: var(--green);
  color: var(--green-btn-text);
  border: none;
  font-size: 15px;
  font-weight: 700;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, transform .18s ease;
}
.subscribe-form button[type="submit"]:hover { background: var(--green-light); transform: translateY(-2px); }
.subscribe-form button[type="submit"][disabled] { opacity: .6; cursor: default; transform: none; }

/* visually-hidden label, still read by screen readers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* honeypot — visually + accessibly hidden but present in DOM */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.form-status {
  font-family: var(--mono);
  font-size: 13px;
  min-height: 18px;
  line-height: 1.4;
  margin-top: 4px;
  color: transparent;
}
.form-status.is-success { color: var(--green-light); }
.form-status.is-error { color: var(--error); }
.form-status.is-duplicate { color: var(--green-light); }

/* ---------- Dark green band ---------- */
.band-green {
  background: var(--green-dark-bg);
  color: var(--on-dark);
}
.band-green__inner {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-block: 56px;
}
.band-green .eyebrow { color: var(--green-light); }
.band-green .h2 { color: var(--on-dark); }
.band-green__copy { font-size: 16px; line-height: 1.7; color: var(--on-dark-green-muted); max-width: 480px; }
.band-green__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.4;
  margin: 0 0 28px;
}

/* ---------- Sponsors ---------- */
.sponsors { border-top: 1px solid var(--border); background: var(--bg-alt); }
.sponsors__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 32px;
}
.sponsor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sponsor-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.sponsor-tile span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.sponsor-tile--open { border: 2px dashed var(--border-dashed); }
.sponsor-tile--open span { color: var(--green); font-weight: 600; }

/* ---------- Detail page body (markdown) ---------- */
.prose {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-2);
}
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--text); letter-spacing: -0.01em; margin: 40px 0 14px; line-height: 1.2; }
.prose h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; color: var(--text); margin: 30px 0 12px; }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--text); border-bottom: 2px solid var(--green); text-decoration: none; }
.prose a:hover { color: var(--green); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 700; }

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--text-2);
  text-transform: uppercase;
  margin: 0 0 28px;
}
.detail-meta__item { display: flex; align-items: center; gap: 8px; }
.detail-meta__item .check { color: var(--green); }

.detail-cta { margin: 36px 0 8px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
}
.back-link:hover { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
}
.site-footer__inner {
  max-width: var(--maxw-narrow);
  margin-inline: auto;
  padding: 40px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.site-footer__brand { display: inline-flex; align-items: center; text-decoration: none; }
.site-footer__logo { display: block; height: 30px; width: auto; }
.site-footer__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.03em; text-transform: uppercase; }
.social { display: flex; gap: 14px; align-items: center; }
.social a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color .18s ease, border-color .18s ease;
}
.social a:hover { color: var(--green); border-color: var(--green); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: 80px; }
.notfound .h1 { margin-bottom: 20px; }
.notfound .lead { margin: 0 auto 32px; max-width: 480px; }

/* ---------- Utilities ---------- */
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* ============================================================
   640px+  (large phone / small tablet)
   ============================================================ */
@media (min-width: 640px) {
  :root { --pad-x: 40px; }

  .fact-strip__inner { flex-direction: row; flex-wrap: wrap; gap: 48px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat { border-top: none; border-left: 1px solid var(--border); padding: 32px 28px; }
  .stat:first-child { border-left: none; padding-left: 0; }

  .card-grid--2 { grid-template-columns: 1fr 1fr; }

  .post-item {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 32px;
    /* Without this, grid's default align-items:stretch pads the meta column
       to match the (taller) title+excerpt column, and flexbox's own
       align-content:stretch then spreads that leftover height evenly across
       the meta column's wrapped lines — puffing up the gaps between the
       tag/date/author far more than the explicit `gap` value below. */
    align-items: start;
  }
  .post-item__meta { margin-bottom: 0; }

  .timeline-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .timeline-item + .timeline-item { border-left: 1px solid var(--border); padding-left: 24px; }
  .timeline-item { padding-right: 24px; }

  .sponsor-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .sponsor-tile { height: 110px; }

  .subscribe-form { grid-template-columns: 1fr auto; align-items: start; }
  .subscribe-form__names { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .subscribe-form .form-status { grid-column: 1 / -1; }

  .h1 { font-size: 48px; }
  .hero__title { font-size: 52px; }
  .page-hero .h1 { font-size: 52px; }

  .site-footer__inner { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
}

/* ============================================================
   900px+  (tablet landscape / desktop nav appears)
   ============================================================ */
@media (min-width: 900px) {
  :root { --pad-x: 56px; --gap-section: 80px; }

  /* Fact strip: center items on desktop only (mobile/tablet stays left-aligned) */
  .fact-strip__inner { justify-content: center; }

  /* Desktop nav: show inline links, hide hamburger */
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 36px;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }
  .nav-link {
    padding: 0 0 2px;
    border-bottom: 2px solid transparent;
    font-size: 15px;
  }
  .nav-link:last-of-type { border-bottom: 2px solid transparent; }
  .nav-link[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
    border-bottom: 2px solid var(--green);
  }
  .nav-cta {
    margin-top: 0;
    font-size: 14px;
    padding: 11px 20px;
  }
  .brand__logo { height: 46px; }

  /* .section desktop rhythm now flows from --gap-section (80px, set above). */
  .hero { padding-block: 56px; }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .hero__title { font-size: 60px; }

  .page-hero { padding-block: 72px 40px; }
  .page-hero .h1 { font-size: 60px; }
  .page-hero .lead { font-size: 19px; }

  .teaser { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
  .origin-grid { grid-template-columns: 220px 1fr !important; gap: 56px !important; }
  .quote { font-size: 32px; }
  .band-green__quote { font-size: 30px; }

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

  .subscribe { grid-template-columns: 1fr 1fr; gap: 56px; padding: 64px 56px; }

  .band-green__inner { grid-template-columns: 1.2fr 0.8fr; gap: 56px; padding-block: 84px; }
  .band-green--center .band-green__inner { grid-template-columns: 1fr; max-width: 900px; }

  .sponsors__head { flex-direction: row; justify-content: space-between; align-items: flex-end; }

  .h1 { font-size: 62px; }
  .h2 { font-size: 38px; }
  .h3 { font-size: 22px; }
  .stat__num { font-size: 40px; }

  .list-item { grid-template-columns: 1fr auto; align-items: center; padding: 32px 32px; }
  .list-item__actions { justify-content: flex-end; margin-top: 0; }
  .post-item { padding: 40px 0; }
  .post-item__title { font-size: 32px; }

  .post-item--featured__title { font-size: 34px; }
}

/* ============================================================
   1200px+  (full desktop — max fidelity)
   ============================================================ */
@media (min-width: 1200px) {
  .hero__title { font-size: 64px; }
  .quote { font-size: 34px; }
  .band-green .h2 { font-size: 42px; }
  .subscribe__title { font-size: 38px; }
}

/* ============================================================
   PHASE 2 ADDITIONS
   ============================================================ */

/* ---------- Image slots (real uploads + striped placeholders) ----------
   img_slot() returns either <img class="{class}"> or
   <div class="photo-ph {class}" role="img" aria-label="…">. Both variants
   share the same aspect-ratio modifier so uploads and placeholders line up. */
.media {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;   /* photos crop from the CENTRE, never off to one edge */
  border-radius: var(--r-photo);
  background: var(--bg-alt);
}
.photo-ph {
  width: 100%;
  border-radius: var(--r-photo);
  background-image: repeating-linear-gradient(135deg, #EFE9DB 0px, #EFE9DB 10px, #E5DECC 10px, #E5DECC 20px);
}
.media--portrait { aspect-ratio: 4 / 5; }
.media--wide     { aspect-ratio: 21 / 8; }
.media--about    { aspect-ratio: 16 / 9; }
.media--card     { aspect-ratio: 4 / 3; border-radius: 0; }
.photo-ph.media--card { border-radius: 0; }

/* Transparent illustrations (a PNG/WebP with a see-through background, detected
   automatically at upload). We KEEP the slot's aspect-ratio box — set by
   .media--portrait / --wide / --card / --about above — so the page layout stays
   stable, but the image is CONTAINED (shown whole, never cover-cropped) and
   floats on the page's cream background: no tan fill, no border. A taller- or
   wider-than-slot drawing is letterboxed and centered, cream visible around it.
   The striped placeholder background lives only on .photo-ph (a bare <div> shown
   when a slot is empty), never on an <img>, so no tile can leak behind these. */
.media--transparent {
  object-fit: contain;
  background: transparent; /* no tan --bg-alt fill showing through the art */
  border: 0;               /* no edge line */
  box-shadow: none;        /* no drop shadow around the slot */
  outline: 0;
  border-radius: 0;        /* no rounded-corner clip eating the artwork edges */
}

/* Robust, cascade-proof guarantee for a wide slot holding a transparent
   illustration. wide_photo.php stamps `.media-frame--transparent` on the slot
   wrapper (server-side, from the manifest alpha flag) so the "no frame" state
   does not depend on the <img> class winning the cascade, and cannot be
   reintroduced by an inherited/parent background, border or shadow. The
   descendant selector (0,2,0) also outranks any single-class .media* rule.
   Opaque slots never get this class, so their framed look is untouched. */
.media-frame--transparent {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.media-frame--transparent > .media {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: 0;
  border-radius: 0;
}

/* ---------- Transparent illustration inside a home card tile ----------
   Cards render their <img> as a DIRECT child of `.card`, and `.card` carries the
   tan --bg-alt fill. The hero/wide/about slots letterbox their see-through art
   onto the cream PAGE (a transparent wrapper over the cream body); a card image
   has no such wrapper, so a transparent illustration would letterbox onto the
   card's TAN fill instead. cards.php stamps `.card--illo` on the <article> from
   the manifest alpha flag; here we make ONLY that card's image TILE read as the
   page cream, leaving the card FRAME (border, shadow, radius, tan body) intact —
   the "keep the frame, fix the backing color" outcome. The `.card--illo`
   descendant selector (0,2,0) also outranks the single-class `.media`(0,1,0) tan
   fill, and sits after every .media* rule, so the cream backing can't be lost to
   the cascade. Opaque card photos never get `.card--illo`, so they are
   byte-identical (tan loading fill and framed look unchanged). */
.card--illo .media--card {
  background: var(--bg);   /* cream tile behind the contained art, not tan */
}
.card--illo .media--transparent {
  background: var(--bg);   /* letterbox bars + see-through areas read cream */
}

/* ---------- Layered wide illustration (TRANSPARENT art only) ----------
   When the wide_photo slot holds a see-through illustration, wide_photo.php
   stamps `.wide-photo--illo` on the <section> (its slot wrapper keeps
   `.media-frame--transparent`). The illustration simply sits ABOVE the next
   section's text with a SMALL, deliberate gap — tighter than the standard
   section rhythm — so the drawing and the copy read as one grouped unit.
   No wave, no mask: the artwork's own lower edge is already feathered, so no
   CSS fade is needed. Opaque photos / plain paths never receive
   `.wide-photo--illo`, so they are wholly unaffected — byte-identical markup
   and layout. Static effect, no JS.

   The gap is produced by a negative bottom margin that trims the standard
   section rhythm down to a few px. The follower's own top padding (.section
   padding-block = --gap-section: 56px mobile / 80px desktop) supplies the
   spacing; the negative margin cancels most of it, leaving the small gap:
       visible gap = follower top padding + margin-bottom
       mobile : 56px + (-44px) = 12px
       desktop: 80px + (-62px) = 18px   (target 16-20px)

   z-index is retained purely as a safety net: the illustration sits at
   z-index:0 and the follower at z-index:1, so IF anything ever overlapped, the
   text would still win. With the gap in place they don't actually overlap. */
.wide-photo--illo {
  position: relative;
  z-index: 0;
  /* Trim the standard section rhythm to a small ~12px gap on mobile. Lives on
     the SECTION itself (a plain sibling margin) rather than on an inner wrapper,
     so it can never be swallowed by child→parent margin-collapse. Deepened for
     desktop below. See the gap arithmetic in the block comment above. */
  margin-bottom: -44px;   /* 56px follower top padding − 44 = 12px gap */
}
.wide-photo--illo .media-frame--transparent {
  position: relative;
  z-index: 0;
}
/* Size a TRANSPARENT wide illustration at its OWN natural proportions instead of
   forcing it into the 21/8 photo letterbox. That fixed ratio (far wider than a
   typical sketch) letterboxed the art with dead space AND relied on CSS
   `aspect-ratio` working on a replaced <img>; on engines that ignore it (older
   iOS Safari / Android WebView) the image fell back toward its intrinsic pixel
   height with nothing to cap it, making the band viewport-tall on mobile. We
   drop the ratio, size by width with auto height, and HARD-cap the height in vh
   so the band can never dominate the screen on any engine; object-fit:contain
   keeps an unusually tall drawing whole within that cap. No mask: the art's own
   lower edge is already feathered artwork, so no CSS fade is applied. */
.wide-photo--illo .media--transparent {
  aspect-ratio: auto;
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
}
/* The section that FOLLOWS the illustration is lifted in the stacking order as a
   safety net so its content always reads in front (text wins if anything ever
   overlaps). Every home partial's root is a <section>, so this generic
   adjacent-sibling selector matches whatever the admin ordered next and keeps
   working when sections are reordered or hidden. */
.wide-photo--illo + section {
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .wide-photo--illo {
    /* Desktop: deeper trim keeps the same small gap against the 80px rhythm. */
    margin-bottom: -62px;   /* 80px follower top padding − 62 = 18px gap */
  }
  .wide-photo--illo .media--transparent {
    max-height: 72vh;
  }
}

/* ---------- Slide-in subscribe panel ----------
   Mobile-first: bottom sheet. From 640px it becomes a right-side slide-in.
   Visibility is delayed on close so the slide-out can animate. Under
   prefers-reduced-motion the global transition:none rule makes it instant. */
.subscribe-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  transition: visibility 0s linear .38s;
}
.subscribe-panel.is-open { visibility: visible; transition-delay: 0s; }

.subscribe-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 12, .55);
  opacity: 0;
  cursor: pointer;
  transition: opacity .3s ease;
}
.subscribe-panel.is-open .subscribe-panel__overlay { opacity: 1; }

.subscribe-panel__dialog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--dark-card);
  color: var(--on-dark);
  border-radius: var(--r-block) var(--r-block) 0 0;
  padding: 34px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .4);
}
.subscribe-panel.is-open .subscribe-panel__dialog { transform: translateY(0); }
.subscribe-panel__mark { display: block; height: 40px; width: auto; margin: 0 0 16px; }

.subscribe-panel__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-field);
  border: 1.5px solid var(--dark-field-border);
  color: var(--on-dark);
  border-radius: var(--r-pill);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.subscribe-panel__close:hover { border-color: var(--green); color: var(--green-light); }

.subscribe-panel .eyebrow { color: var(--green-light); }
.subscribe-panel__title { color: var(--on-dark); margin: 0 0 14px; padding-right: 44px; }
.subscribe-panel__copy {
  font-size: 15px;
  line-height: 1.65;
  color: var(--on-dark-muted);
  margin: 0 0 24px;
  max-width: 42ch;
}
.subscribe-panel .subscribe-form { grid-template-columns: 1fr; }
.subscribe-panel .subscribe-form__names { grid-template-columns: 1fr 1fr; }
.subscribe-panel .subscribe-form button[type="submit"] { width: 100%; }

/* Lock background scroll while the panel is open. */
body.has-panel-open { overflow: hidden; }

/* Clean anchor landing for the no-JS / homepage smooth-scroll target. */
#subscribe { scroll-margin-top: 90px; }

/* ---------- Sponsor strip (Home + Conferences) ----------
   Tan band consistent with the fact strip; 2x2 on mobile, 4-across >=640px. */
.sponsor-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  margin-top: 90px;
}
.sponsor-strip__inner { padding-block: 32px; }
.sponsor-strip__eyebrow { color: var(--muted); margin: 0 0 20px; }
.sponsor-strip__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sponsor-strip__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  padding: 16px 20px;
  background: var(--bg);              /* #FAF7F0 tile */
  border: 1px solid var(--border);   /* #E3DCCC */
  border-radius: var(--r-tile);      /* 16px */
  text-decoration: none;
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, opacity .4s ease;
}
.sponsor-strip__item:hover { border-color: var(--green); transform: translateY(-2px); }
/* Normalize any upload (screenshot / icon / wordmark) to a tidy, centered mark:
   constrain BOTH dimensions so a wide logo can't fill the tile and a small icon
   still reads at a consistent size. */
.sponsor-strip__logo {
  max-height: 48px;
  max-width: 70%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .85;
  transition: filter .18s ease, opacity .18s ease;
}
.sponsor-strip__item:hover .sponsor-strip__logo { filter: grayscale(0); opacity: 1; }

/* Fewer than 4 sponsors: center the group instead of stretching it across
   the fixed-column grid above. Column count comes from --sponsor-count
   (set inline per render, see partials/sponsors.php); track width is
   capped so tiles keep roughly their normal size — a few logos are
   grouped centrally rather than spread edge-to-edge. Rotation only kicks
   in above 4 sponsors, so this modifier and data-sponsor-rotate never
   apply to the same render — no conflict with the crossfade JS. */
.sponsor-strip--few .sponsor-strip__grid {
  grid-template-columns: repeat(var(--sponsor-count, 1), minmax(0, 160px));
  justify-content: center;
}

/* ---------- Prose additions (rich-text body) ---------- */
.prose em, .prose i { font-style: italic; }
.prose b { font-weight: 700; color: var(--text); }
.prose u { text-decoration: underline; }
.prose blockquote {
  margin: 24px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--green);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
}
.prose blockquote p { margin: 0 0 8px; }
.prose blockquote p:last-child { margin: 0; }

/* Phase 2 responsive tweaks */
@media (min-width: 640px) {
  .subscribe-panel__dialog {
    left: auto;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(440px, 92vw);
    max-height: none;
    height: 100%;
    border-radius: var(--r-block) 0 0 var(--r-block);
    padding: 72px 40px 40px;
    transform: translateX(100%);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .4);
  }
  .subscribe-panel.is-open .subscribe-panel__dialog { transform: translateX(0); }

  .sponsor-strip__inner { padding-block: 36px; }
  .sponsor-strip__grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .sponsor-strip--few .sponsor-strip__grid { grid-template-columns: repeat(var(--sponsor-count, 1), minmax(0, 220px)); }
  .sponsor-strip__item { height: 110px; }
  .sponsor-strip__logo { max-height: 56px; }
}

/* ============================================================
   Reduced motion — disable smooth scroll & transitions
   (JS also skips all GSAP entrance animation)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .btn:hover, .subscribe-form button:hover { transform: none; }
}
