/* =========================================================================
   EP3 Accelerator detail pages (/initiatives/[id]/index.html) —
   page composition.

   Loaded ALONGSIDE Bootstrap CSS (which is kept for the legacy parts-content
   inside Overview sections). All chrome and section wrappers below come from
   WebShield Navy tokens; Bootstrap continues to style the per-Accelerator
   narrative blocks until each parts file is rewritten.

   All tokens from webshield-navy.css.
   ========================================================================= */

html { scroll-behavior: smooth; }

/* The WebShield shared nav is sticky; neutralize the Bootstrap-era
   `body { padding-top: 76px }` set by site/css/styles.css (still loaded
   here for parts-content compatibility). */
body.ep3-detail-body { padding-top: 0; background: var(--ws-page); }

/* ── Back-link breadcrumb ───────────────────────────────────── */
.ep3-detail-back {
  background: var(--ws-page);
  border-bottom: 1px solid var(--ws-rule-faint);
}
.ep3-detail-back__wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 48px;
}
.ep3-detail-back__link {
  font-family: var(--ws-font-mono);
  /* A·01 — coral-mono surfaces bumped to 12px / 500 (large-text 3:1
     WCAG threshold). Same propagation as commit 0dd3d80 across the
     four top-level pages. */
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-ink-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ep3-detail-back__link:hover { color: var(--ws-accent); }

/* ── Hero ────────────────────────────────────────────────────── */
.ep3-detail-hero {
  background: var(--ws-page);
  border-bottom: 1px solid var(--ws-rule);
}
.ep3-detail-hero__wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 56px 48px 64px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: center;
}
.ep3-detail-hero__copy { min-width: 0; }
.ep3-detail-hero__eyebrow {
  font-family: var(--ws-font-mono);
  /* A·01 — see .ep3-detail-back__link comment. */
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-accent);
  margin: 0 0 22px;
}
.ep3-detail-hero__title {
  font-family: var(--ws-font-display);
  font-size: clamp(32px, 4.2vw, 44px); font-weight: 500;
  line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ws-ink);
  margin: 0 0 22px;
  text-wrap: balance;
}
.ep3-detail-hero__tagline {
  font-family: var(--ws-font-display);
  font-size: 18px; font-weight: 400;
  line-height: 1.55;
  color: var(--ws-ink-muted);
  margin: 0 0 32px;
  text-wrap: pretty;
}

/* B·06 — Hero body rewrite (used by *-custom.html partials). Two serif
   paragraphs: lede (what it is) + action sentence (what it does).
   Replaces the legacy Bootstrap .lead + green-check bullet list pattern.

   !important wins against the B·01 override layer which forces all
   #initiative-content p to Inter; the hero body is intentionally serif
   chrome, not muted parts content. */
.ep3-detail-hero__body { max-width: 620px; }
#initiative-content p.ep3-detail-hero__body-lede {
  font-family: var(--ws-font-display) !important;
  font-size: 20px !important; font-weight: 400 !important;
  line-height: 1.5 !important;
  color: var(--ws-ink) !important;
  margin: 0 0 18px !important;
  text-wrap: pretty;
}
#initiative-content p.ep3-detail-hero__body-action {
  font-family: var(--ws-font-display) !important;
  font-size: 16px !important; font-weight: 400 !important;
  line-height: 1.6 !important;
  color: var(--ws-ink-muted) !important;
  margin: 0 0 28px !important;
  text-wrap: pretty;
}
.ep3-detail-hero__cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ws-font-body);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: var(--ws-ink);
  color: var(--ws-page);
  padding: 13px 22px;
  border: 1px solid var(--ws-ink);
  transition: background-color 0.2s ease;
}
.ep3-detail-hero__cta:hover { background: var(--ws-ink-deep); }
.ep3-detail-hero__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ws-surface-2);
  border: 1px solid var(--ws-rule);
}
.ep3-detail-hero__image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ── Stats bar ──────────────────────────────────────────────── */
.ep3-detail-stats {
  background: var(--ws-surface);
  border-top: 1px solid var(--ws-rule);
}
.ep3-detail-stats__wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 28px 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.ep3-detail-stats__cell {
  display: flex; flex-direction: column;
  gap: 4px;
}
.ep3-detail-stats__num {
  font-family: var(--ws-font-display);
  font-size: 22px; font-weight: 500;
  line-height: 1; letter-spacing: -0.005em;
  color: var(--ws-ink);
}
.ep3-detail-stats__label {
  font-family: var(--ws-font-mono);
  /* A·01 — see .ep3-detail-back__link comment. */
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-ink-faint);
}

/* ── On-this-page anchor strip (M·01) ───────────────────────
   Static (not sticky — at 16k px the detail page would otherwise
   spend most of the scroll with two stacked nav bars at the top).
   Mono caps, hairline rules above and below, horizontal-scroll on
   mobile so a 5-7 anchor list never wraps and never overflows. */
.ep3-detail-anchors {
  background: var(--ws-page);
  border-top: 1px solid var(--ws-rule);
  border-bottom: 1px solid var(--ws-rule);
}
.ep3-detail-anchors__wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 48px;
  display: flex; align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.ep3-detail-anchors__label {
  font-family: var(--ws-font-mono);
  font-size: 11px;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-ink-faint);
  flex-shrink: 0;
}
.ep3-detail-anchors__link {
  font-family: var(--ws-font-mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ep3-detail-anchors__link:hover {
  color: var(--ws-accent);
}

/* ── Overview sections (parts content) ──────────────────────── */
.ep3-detail-overview {
  background: var(--ws-page);
  border-top: 1px solid var(--ws-rule);
}
.ep3-detail-section {
  padding: 64px 0;
  border-top: 1px solid var(--ws-rule-faint);
}
.ep3-detail-section:first-child {
  border-top: none;
}
.ep3-detail-section--surface { background: var(--ws-surface); }
.ep3-detail-section__inner {
  max-width: 960px; margin: 0 auto;
  padding: 0 48px;
}

/* B·02 — Mono coral eyebrow above the section H2. Rendered only when
   the parts file declares `data-eyebrow="..."` on its <section>;
   sections without the attribute stay unchanged. Inert when parts get
   rewritten away from Bootstrap. */
.ep3-detail-section__eyebrow {
  font-family: var(--ws-font-mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ws-accent);
  margin: 0 0 18px;
}

/* §5 in-section CTA — emitted only when the page has a get-involved
   section. Replaces the standalone .ep3-detail-cta closer band on those
   pages so the explainer copy and the committal action sit together
   (Rich's evolution of the reviewer's S·01). */
.ep3-detail-section__cta {
  margin-top: 28px;
}

/* ── Capabilities definition list (B·04 — Lōkahi) ───────────
   Reviewer's call for the "8-cell label grid is the page's worst single
   moment" finding. A definition list reads as editorial; the labels
   alone were a feature checklist. Mono eyebrow (capability name) +
   serif explanation. Sits inside the parts section, replacing the
   .initiative-capabilities-grid markup. Pattern is reusable on any
   detail page that wants the same shape. */
.ep3-detail-caplist {
  display: grid;
  grid-template-columns: 200px 1fr;
  column-gap: 36px;
  row-gap: 22px;
  margin: 28px 0 0;
  padding: 0;
}
.ep3-detail-caplist dt {
  font-family: var(--ws-font-mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-accent);
  padding-top: 6px;
}
.ep3-detail-caplist dd {
  font-family: var(--ws-font-display);
  font-size: 18px; font-weight: 400;
  line-height: 1.5;
  color: var(--ws-ink);
  margin: 0;
}

@media (max-width: 720px) {
  .ep3-detail-caplist {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .ep3-detail-caplist dt {
    padding-top: 18px;
    border-top: 1px solid var(--ws-rule-faint);
  }
  .ep3-detail-caplist dt:first-of-type {
    border-top: 0;
    padding-top: 0;
  }
  .ep3-detail-caplist dd {
    padding-bottom: 6px;
  }
}

/* ── Team & Affiliates ──────────────────────────────────────── */
.ep3-detail-team {
  background: var(--ws-surface);
  border-top: 1px solid var(--ws-rule);
}
.ep3-detail-team__wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 64px 48px 80px;
}
.ep3-detail-team__head {
  text-align: center;
  margin: 0 0 48px;
}
.ep3-detail-team__eyebrow {
  font-family: var(--ws-font-mono);
  /* A·01 — see .ep3-detail-back__link comment. */
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-accent);
  margin: 0 0 14px;
}
.ep3-detail-team__title {
  font-family: var(--ws-font-display);
  font-size: 28px; font-weight: 500;
  line-height: 1.2; letter-spacing: -0.01em;
  color: var(--ws-ink);
  margin: 0;
}

.ep3-detail-team__subhead {
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-label);
  letter-spacing: var(--ws-tracking-label);
  text-transform: uppercase;
  color: var(--ws-accent); font-weight: 600;
  margin: 32px 0 22px;
}
.ep3-detail-team__subhead:first-child { margin-top: 0; }

/* Affiliates list (small variant — uses similar tokens to ep3-aff-card
   but more compact: logo only, name on hover) */
.ep3-detail-affs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}
.ep3-detail-aff {
  display: flex; flex-direction: column; align-items: center;
  background: var(--ws-surface);
  border: 1px solid var(--ws-rule);
  padding: 18px 12px 14px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.ep3-detail-aff:hover {
  border-color: var(--ws-ink-faint);
  transform: translateY(-1px);
}
.ep3-detail-aff__logo {
  display: flex; align-items: center; justify-content: center;
  height: 44px;
  width: 100%;
  margin-bottom: 8px;
}
.ep3-detail-aff__logo img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.ep3-detail-aff:hover .ep3-detail-aff__logo img { filter: none; opacity: 1; }
.ep3-detail-aff__name {
  font-family: var(--ws-font-body);
  font-size: 11.5px; line-height: 1.3;
  color: var(--ws-ink-muted);
  text-align: center;
}

/* Members grid (smaller card variant) */
.ep3-detail-mems {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

/* ── News ───────────────────────────────────────────────────── */
.ep3-detail-news {
  background: var(--ws-page);
  border-top: 1px solid var(--ws-rule);
}
.ep3-detail-news__wrap {
  max-width: 960px; margin: 0 auto;
  padding: 56px 48px 64px;
}
.ep3-detail-news__title {
  font-family: var(--ws-font-display);
  font-size: 24px; font-weight: 500;
  line-height: 1.2; letter-spacing: -0.01em;
  color: var(--ws-ink);
  margin: 0 0 28px;
}
.ep3-detail-news__item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--ws-rule-faint);
}
.ep3-detail-news__item:first-of-type { border-top: 1px solid var(--ws-rule); }
.ep3-detail-news__item:last-of-type { border-bottom: 1px solid var(--ws-rule); }
.ep3-detail-news__copy { flex: 1; min-width: 0; }
.ep3-detail-news__headline {
  font-family: var(--ws-font-display);
  font-size: 16px; font-weight: 500;
  line-height: 1.35;
  color: var(--ws-ink);
  margin: 0 0 4px;
}
.ep3-detail-news__date {
  font-family: var(--ws-font-mono);
  /* A·01 — see .ep3-detail-back__link comment. */
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-ink-faint);
}
.ep3-detail-news__link {
  font-family: var(--ws-font-body);
  font-size: 13px; font-weight: 500;
  color: var(--ws-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ws-ink);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ep3-detail-news__link:hover {
  color: var(--ws-accent);
  border-bottom-color: var(--ws-accent);
}

/* ── Latest update (F·06 single-item promotion) ─────────────
   When an initiative has exactly one news item, render this quiet
   promotion above the closer instead of a one-item Latest news list.
   The list pattern reads as "the feed hasn't been fed"; the promotion
   reads as editorial. Lights up at count == 1 only; 0 skips entirely,
   2+ falls through to .ep3-detail-news. */
.ep3-detail-update {
  background: var(--ws-page);
  border-top: 1px solid var(--ws-rule);
}
.ep3-detail-update__wrap {
  max-width: 960px; margin: 0 auto;
  padding: 36px 48px 40px;
}
.ep3-detail-update__eyebrow {
  font-family: var(--ws-font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-accent);
  margin: 0 0 14px;
}
.ep3-detail-update__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--ws-rule-faint);
}
.ep3-detail-update__headline {
  font-family: var(--ws-font-display);
  font-size: 18px; font-weight: 500;
  line-height: 1.35;
  color: var(--ws-ink);
  margin: 0;
  flex: 1; min-width: 0;
}
.ep3-detail-update__meta {
  display: flex; align-items: baseline; gap: 14px;
  flex-shrink: 0;
}
.ep3-detail-update__date {
  font-family: var(--ws-font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-ink-faint);
}
.ep3-detail-update__link {
  font-family: var(--ws-font-body);
  font-size: 13px; font-weight: 500;
  color: var(--ws-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ws-ink);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ep3-detail-update__link:hover {
  color: var(--ws-accent);
  border-bottom-color: var(--ws-accent);
}

/* ── Get involved ───────────────────────────────────────────── */
.ep3-detail-cta {
  background: var(--ws-surface);
  border-top: 1px solid var(--ws-rule);
}
.ep3-detail-cta__wrap {
  max-width: 720px; margin: 0 auto;
  padding: 56px 48px 64px;
  text-align: center;
}
.ep3-detail-cta__eyebrow {
  font-family: var(--ws-font-mono);
  /* A·01 — see .ep3-detail-back__link comment. */
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  color: var(--ws-accent);
  margin: 0 0 14px;
}
.ep3-detail-cta__title {
  font-family: var(--ws-font-display);
  font-size: 24px; font-weight: 500;
  line-height: 1.25; letter-spacing: -0.01em;
  color: var(--ws-ink);
  margin: 0 0 28px;
}
.ep3-detail-cta__btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ws-font-body);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: var(--ws-ink);
  color: var(--ws-page);
  padding: 13px 22px;
  border: 1px solid var(--ws-ink);
  transition: background-color 0.2s ease;
}
.ep3-detail-cta__btn:hover { background: var(--ws-ink-deep); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .ep3-detail-hero__wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .ep3-detail-hero__image { max-width: 480px; margin: 0 auto; }
  .ep3-detail-stats__wrap { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; }
  .ep3-detail-affs { grid-template-columns: repeat(4, 1fr); }
  .ep3-detail-mems { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .ep3-detail-back__wrap { padding: 12px 24px; }
  .ep3-detail-hero__wrap { padding: 40px 24px 48px; gap: 28px; }
  .ep3-detail-stats__wrap { padding: 22px 24px; }
  /* M·01 mobile — horizontal scroll, no wrap. Anchor links stay on a
     single row so the strip reads as a compact navigational hint
     rather than a wrapped wall of links. */
  .ep3-detail-anchors__wrap {
    padding: 12px 24px;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ep3-detail-anchors__wrap::-webkit-scrollbar { display: none; }
  .ep3-detail-anchors__label,
  .ep3-detail-anchors__link {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .ep3-detail-team__wrap { padding: 48px 24px 64px; }
  .ep3-detail-news__wrap { padding: 40px 24px 48px; }
  .ep3-detail-update__wrap { padding: 28px 24px 32px; }
  .ep3-detail-update__row { flex-direction: column; gap: 8px; align-items: flex-start; }
  .ep3-detail-cta__wrap { padding: 40px 24px 48px; }
  .ep3-detail-section { padding: 48px 0; }
  .ep3-detail-section__inner { padding: 0 24px; }
  .ep3-detail-affs { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ep3-detail-mems { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .ep3-detail-news__item { flex-direction: column; gap: 8px; align-items: flex-start; }
}
