/* ─────────────────────────────────────────────────
   MONSOON STEEL · paired light + dark
   Every token has a value in BOTH themes.
   No element references raw colors — only tokens.
   Switch via: <html data-theme="light|dark">
   ───────────────────────────────────────────────── */

:root[data-theme="light"] {
  /* canvas */
  --bg:        oklch(96.5% 0.008 230);
  --bg-2:      oklch(94% 0.010 230);
  --bg-3:      oklch(91% 0.014 230);
  --surface:   oklch(98% 0.006 230);
  --surface-2: oklch(95.5% 0.009 230);

  /* rules / borders */
  --rule:        oklch(85% 0.014 230);
  --rule-2:      oklch(76% 0.018 230);
  --rule-strong: oklch(56% 0.024 230);

  /* ink */
  --ink:   oklch(20% 0.030 250);
  --ink-2: oklch(34% 0.024 250);
  --ink-3: oklch(50% 0.020 250);
  --ink-4: oklch(66% 0.016 230);

  /* accent · monsoon teal (PRIMARY) */
  --accent:    oklch(50% 0.10 200);
  --accent-2:  oklch(58% 0.10 200);
  --accent-bg: oklch(93% 0.030 200);

  /* signal · saffron pinpoint (RESERVED — live, new, attention) */
  --signal:    oklch(62% 0.16 65);
  --signal-2:  oklch(68% 0.14 65);
  --signal-bg: oklch(94% 0.04 70);

  /* regulator palette · five distinct hues for cross-region comparison */
  --reg-ich:    #B8923A;  /* ICH M10 · gold/wheat · the harmonised baseline */
  --reg-ich-bg: #FBF3DB;
  --reg-fda:    #B5783E;  /* FDA · warm tan · United States */
  --reg-fda-bg: #FAEAD3;
  --reg-ema:    #4F8051;  /* EMA · forest green · Europe */
  --reg-ema-bg: #DEEBDB;
  --reg-who:    #695E84;  /* WHO · lavender/violet · global PQT */
  --reg-who-bg: #E5DDF1;
  --reg-anv:    #9B5743;  /* ANVISA · terracotta · Brazil */
  --reg-anv-bg: #F4DACE;

  /* converge / diverge tags */
  --converge:    oklch(50% 0.13 145);
  --converge-bg: oklch(94% 0.04 145);
  --diverge:     oklch(58% 0.16 35);
  --diverge-bg:  oklch(94% 0.04 35);

  --shadow-1: 0 1px 2px oklch(20% 0.03 250 / 0.06);
  --shadow-2: 0 4px 16px oklch(20% 0.03 250 / 0.08);
}

/* ─────────────────────────────────────────────────────────────────────
 * WEEKLY SIGNAL CONTRAST CONTRACT · 2026-05-31
 *
 * Weekly digests are focus pages, but their hero and expanded signal
 * cards must still follow the iFeed public-platform banner rule:
 * light page -> dark work surface; dark page -> light work surface.
 * ───────────────────────────────────────────────────────────────────── */
html.w21-signal-room .hero,
html.w21-signal-room .carousel-slide {
  background:
    radial-gradient(circle at 72% 22%, var(--hero-glow-a), transparent 24rem),
    radial-gradient(circle at 14% 72%, var(--hero-glow-b), transparent 22rem),
    linear-gradient(135deg, var(--hero-base), var(--hero-mid) 58%, var(--hero-end)) !important;
  border-color: var(--hero-border) !important;
  color: var(--hero-fg) !important;
}

html.w21-signal-room .hero h1,
html.w21-signal-room .carousel-slide h2,
html.w21-signal-room .hero .metric .value,
html.w21-signal-room .carousel-slide .slide-meta .m-value {
  color: var(--hero-fg) !important;
}

html.w21-signal-room .hero h1 em,
html.w21-signal-room .carousel-slide h2 em,
html.w21-signal-room .hero .eyebrow,
html.w21-signal-room .carousel-slide .slide-kicker,
html.w21-signal-room .carousel-slide .exp-tile strong,
html.w21-signal-room .carousel-slide .slide-source {
  color: var(--hero-em) !important;
}

html.w21-signal-room .hero .lede,
html.w21-signal-room .carousel-slide .slide-summary,
html.w21-signal-room .carousel-slide .exp-tile span,
html.w21-signal-room .carousel-slide .visual-card::after {
  color: var(--hero-fg-soft) !important;
}

html.w21-signal-room .hero .metric,
html.w21-signal-room .carousel-slide .slide-meta,
html.w21-signal-room .carousel-slide .exp-tile,
html.w21-signal-room .carousel-slide .visual-card::after {
  background: color-mix(in srgb, var(--hero-base) 78%, var(--hero-fg) 8%) !important;
  border-color: var(--hero-border) !important;
}

html.w21-signal-room .signal-map,
html.w21-signal-room .carousel-slide .visual-card {
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--hero-base) 78%, var(--hero-em) 14%),
      color-mix(in srgb, var(--hero-mid) 82%, var(--hero-em) 8%)) !important;
  border-color: var(--hero-border) !important;
}

html.w21-signal-room .signal-map .node,
html.w21-signal-room .visual-label,
html.w21-signal-room .diagram-stage {
  background: color-mix(in srgb, var(--hero-base) 76%, var(--hero-fg) 12%) !important;
  border-color: var(--hero-border) !important;
  color: var(--hero-fg) !important;
}

html.w21-signal-room .map-core,
html.w21-signal-room .visual-core,
html.w21-signal-room .diagram-core {
  background: color-mix(in srgb, var(--hero-base) 76%, var(--hero-em) 12%) !important;
  border-color: var(--hero-em) !important;
  color: var(--hero-fg) !important;
}

:root[data-theme="dark"] {
  /* Monsoon Steel · D3 Midnight Teal — locked */
  --bg:        oklch(18% 0.040 210);
  --bg-2:      oklch(21% 0.043 210);
  --bg-3:      oklch(25% 0.045 210);
  --surface:   oklch(22% 0.045 210);
  --surface-2: oklch(26% 0.046 210);

  --rule:        oklch(32% 0.045 205);
  --rule-2:      oklch(40% 0.048 205);
  --rule-strong: oklch(56% 0.052 205);

  --ink:   oklch(95% 0.014 200);
  --ink-2: oklch(80% 0.018 200);
  --ink-3: oklch(64% 0.020 200);
  --ink-4: oklch(50% 0.022 200);

  --accent:    oklch(80% 0.14 195);
  --accent-2:  oklch(72% 0.13 195);
  --accent-bg: oklch(30% 0.07 200);

  --signal:    oklch(82% 0.14 60);
  --signal-2:  oklch(74% 0.13 60);
  --signal-bg: oklch(32% 0.06 65);

  /* regulator palette · dark mode · darker hue + low-saturation backplate */
  --reg-ich:    #E8C282;
  --reg-ich-bg: #3A2F1E;
  --reg-fda:    #DBA478;
  --reg-fda-bg: #3D2C1C;
  --reg-ema:    #93B591;
  --reg-ema-bg: #1F3220;
  --reg-who:    #A89BC1;
  --reg-who-bg: #2A2138;
  --reg-anv:    #C99080;
  --reg-anv-bg: #381F18;

  --converge:    oklch(78% 0.13 145);
  --converge-bg: oklch(28% 0.05 145);
  --diverge:     oklch(78% 0.14 40);
  --diverge-bg:  oklch(28% 0.06 40);

  --shadow-1: 0 1px 2px oklch(0% 0 0 / 0.4);
  --shadow-2: 0 6px 28px oklch(0% 0 0 / 0.55);
}

:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ─────────────────────────────────────────────────
   Banner-stable tokens · used inside dark gradient banners
   regardless of light/dark theme. Banners are ALWAYS dark,
   so their foreground text + overlays must not invert.
   ───────────────────────────────────────────────── */
:root {
  --banner-fg:        rgba(248, 250, 252, 0.96);
  --banner-fg-soft:   rgba(248, 250, 252, 0.85);
  --banner-overlay:   rgba(0, 0, 0, 0.42);
  --banner-stamp-bg:  rgba(255, 255, 255, 0.10);
  --banner-stamp-bd:  rgba(255, 255, 255, 0.55);
  --banner-pattern-a: rgba(255, 255, 255, 0.18);
  --banner-pattern-b: rgba(255, 255, 255, 0.24);
  --banner-pattern-c: rgba(255, 255, 255, 0.32);
}

/* ─────────────────────────────────────────────────
   Hero-canvas tokens · landing banners ALWAYS contrast page body.
   Light theme page → dark banner canvas (deep teal gradient).
   Dark theme page → light banner canvas (cream/teal gradient).
   This gives the "banner that pops" feel on both themes.
   ───────────────────────────────────────────────── */
:root[data-theme="light"] {
  --hero-base:       #0d2a30;
  --hero-mid:        #102f3a;
  --hero-end:        #0d4a5a;
  --hero-glow-a:     rgba(40, 140, 160, 0.42);
  --hero-glow-b:     rgba(40, 140, 160, 0.22);
  --hero-fg:         rgba(248, 252, 254, 0.98);
  --hero-fg-soft:    rgba(220, 235, 240, 0.88);
  --hero-em:         rgba(160, 220, 235, 1);
  --hero-eyebrow-bg: rgba(255, 255, 255, 0.06);
  --hero-eyebrow-bd: rgba(180, 230, 240, 0.32);
  --hero-eyebrow-fg: rgba(190, 235, 245, 0.96);
  --hero-cta1-bg:    rgba(160, 220, 235, 1);
  --hero-cta1-fg:    #0d2a30;
  --hero-cta1-bg-h:  rgba(255, 255, 255, 0.98);
  --hero-cta2-fg:    rgba(220, 235, 240, 0.96);
  --hero-cta2-bd:    rgba(180, 220, 235, 0.55);
  --hero-cta2-bg-h:  rgba(255, 255, 255, 0.08);
  --hero-meta-rule:  rgba(180, 220, 235, 0.20);
  --hero-meta-fg:    rgba(190, 220, 230, 0.80);
  --hero-meta-strong:rgba(220, 240, 245, 0.96);
  --hero-pat-a:      rgba(255, 255, 255, 0.10);
  --hero-pat-b:      rgba(255, 255, 255, 0.16);
  --hero-pat-c:      rgba(160, 220, 235, 0.55);
  --hero-border:     rgba(160, 220, 235, 0.32);
  --hero-signal:     rgba(255, 200, 100, 0.95);
  --hero-signal-halo:rgba(255, 200, 100, 0.22);
}
:root[data-theme="dark"] {
  --hero-base:       #f3f7f9;
  --hero-mid:        #e6eef1;
  --hero-end:        #cfdfe3;
  --hero-glow-a:     rgba(40, 140, 160, 0.18);
  --hero-glow-b:     rgba(40, 140, 160, 0.10);
  --hero-fg:         #0d2a30;
  --hero-fg-soft:    #2a4148;
  --hero-em:         #0e7a8c;
  --hero-eyebrow-bg: rgba(13, 42, 48, 0.04);
  --hero-eyebrow-bd: rgba(14, 122, 140, 0.40);
  --hero-eyebrow-fg: #0e7a8c;
  --hero-cta1-bg:    #0e7a8c;
  --hero-cta1-fg:    #f3f7f9;
  --hero-cta1-bg-h:  #0d2a30;
  --hero-cta2-fg:    #0e7a8c;
  --hero-cta2-bd:    rgba(14, 122, 140, 0.45);
  --hero-cta2-bg-h:  rgba(14, 122, 140, 0.10);
  --hero-meta-rule:  rgba(14, 122, 140, 0.22);
  --hero-meta-fg:    rgba(42, 65, 72, 0.75);
  --hero-meta-strong:#0d2a30;
  --hero-pat-a:      rgba(14, 122, 140, 0.10);
  --hero-pat-b:      rgba(14, 122, 140, 0.16);
  --hero-pat-c:      rgba(14, 122, 140, 0.45);
  --hero-border:     rgba(14, 122, 140, 0.30);
  --hero-signal:     #c97a1f;
  --hero-signal-halo:rgba(201, 122, 31, 0.22);
}

/* ─────────────────────────────────────────────────
   Glass-card tokens · subtle frosted-panel aesthetic for cards.
   Used inside .hero (banner-glass) and across page cards (page-glass).
   ───────────────────────────────────────────────── */
:root[data-theme="light"] {
  --glass-bg:        color-mix(in srgb, #ffffff 62%, transparent);
  --glass-bg-strong: color-mix(in srgb, #ffffff 82%, transparent);
  --glass-bd:        color-mix(in srgb, oklch(50% 0.10 200) 22%, transparent);
  --glass-bd-strong: color-mix(in srgb, oklch(50% 0.10 200) 42%, transparent);
  --glass-blur:      14px;
  --glass-shadow:    0 18px 48px -28px oklch(20% 0.03 250 / 0.32);
  --glass-shadow-h:  0 24px 60px -28px oklch(50% 0.10 200 / 0.40);
  --glass-tint:      linear-gradient(135deg, color-mix(in srgb, oklch(50% 0.10 200) 6%, transparent) 0%, transparent 70%);
  --banner-glass-bg: rgba(255, 255, 255, 0.06);
  --banner-glass-bd: rgba(255, 255, 255, 0.18);
}
:root[data-theme="dark"] {
  --glass-bg:        color-mix(in srgb, oklch(28% 0.05 210) 70%, transparent);
  --glass-bg-strong: color-mix(in srgb, oklch(32% 0.05 210) 84%, transparent);
  --glass-bd:        color-mix(in srgb, oklch(80% 0.14 195) 28%, transparent);
  --glass-bd-strong: color-mix(in srgb, oklch(80% 0.14 195) 50%, transparent);
  --glass-blur:      16px;
  --glass-shadow:    0 18px 48px -22px oklch(0% 0 0 / 0.55);
  --glass-shadow-h:  0 24px 60px -22px oklch(80% 0.14 195 / 0.30);
  --glass-tint:      linear-gradient(135deg, color-mix(in srgb, oklch(80% 0.14 195) 8%, transparent) 0%, transparent 70%);
  --banner-glass-bg: rgba(13, 42, 48, 0.08);
  --banner-glass-bd: rgba(14, 122, 140, 0.22);
}

/* ─────────────────────────────────────────────────
   Uniform banner standard · all .hero.hero-banner-canvas pages.
   Rules A-G:  one fixed height · symmetric padding · viewport-fit ·
   composed elegantly · content quality preserved.
   ───────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────
   Uniform layout heights · top bar + banner + post-banner clean zone.
   ───────────────────────────────────────────────── */
:root { --top-bar-height: 86px; }
/* On phones the 86px breathing space below the hero banner is too much
   (it pushes content way past the fold). Reduce to a tight 12px so the
   subnav sits right under the banner without a yawning gap. */
@media (max-width: 760px) {
  :root { --top-bar-height: 12px; }
}

/* Top bar · reduced padding · ~0.7cm shorter than original */
.nav .nav-inner { padding-top: 8px !important; padding-bottom: 8px !important; }

/* Clean zone immediately below banner · same height as top bar · NO content here.
   Implemented as banner margin-bottom — works regardless of next-element type
   (section, sub-nav, wrap, main). The banner's own gradient ends, then 86px of
   page-background empty space, then the next element starts. */
.hero.hero-banner-canvas {
  margin-bottom: var(--top-bar-height) !important;
}
/* Cancel out the existing top padding on the first sibling so the visible gap
   stays at exactly --top-bar-height (margin alone), not margin + padding. */
.hero.hero-banner-canvas + section,
.hero.hero-banner-canvas + .sec,
.hero.hero-banner-canvas + .pqios-graph-shell,
.hero.hero-banner-canvas + main,
.hero.hero-banner-canvas + .wrap {
  padding-top: 0 !important;
  /* Round 2.26 · uniform banner-separator line directly below the floating
     hero card · contained to match the hero card width · 56px breathing
     space below before the section content starts.
     Per Sunita: 'add this across site all pages below banner'. */
  position: relative;
}
.hero.hero-banner-canvas + section::before,
.hero.hero-banner-canvas + .sec::before,
.hero.hero-banner-canvas + .pqios-graph-shell::before,
.hero.hero-banner-canvas + main::before,
.hero.hero-banner-canvas + .wrap::before {
  content: "";
  display: block;
  width: calc(100% - 48px);
  max-width: 1250px;
  height: 1px;
  /* Round 2.28 · gradient separator · bold ink in center, faded at edges
     (per Sunita: 'bold inside dark at the edge faded') */
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--ink) 35%, transparent) 18%,
    color-mix(in srgb, var(--ink) 80%, transparent) 50%,
    color-mix(in srgb, var(--ink) 35%, transparent) 82%,
    transparent 100%);
  margin: 0 auto 56px auto;
}
/* Sticky sub-nav handling · sub-nav stays sticky but appears AFTER the clean zone.
   Class name is .subnav (no hyphen) on the actual chapter pages — covering both. */
.hero.hero-banner-canvas + .sub-nav,
.hero.hero-banner-canvas + .subnav {
  margin-top: 0 !important;
}
/* Breadcrumb sitting BELOW the banner (library subpages). The cancel rule above
   zeros the wrap's padding-top, so the visible gap = banner margin-bottom (86px) +
   crumb's own padding-top (22px) = 108px. That is the intended breathing space. */
.hero.hero-banner-canvas + .wrap.crumb-after-banner {
  padding-top: 0 !important;
}
.hero.hero-banner-canvas + .wrap.crumb-after-banner .crumb {
  padding-top: 28px;
}

/* ─────────────────────────────────────────────────
   Folder tab · chapter cards on 4 domain pages ONLY.
   Scoped to `a.pl` (anchor tag specifically) so the rule does NOT bleed into
   chapter detail pages where `.pl` is used as a `<div>` for status blocks.
   ───────────────────────────────────────────────── */
a.pl {
  position: relative !important;
  margin-top: 30px !important;
  padding: 26px 28px 24px !important;
  background: var(--surface) !important;
  border: 1.5px solid color-mix(in srgb, var(--accent) 45%, var(--rule)) !important;
  border-radius: 0 10px 10px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.18s, box-shadow 0.22s !important;
  box-shadow: 0 4px 18px -16px color-mix(in srgb, var(--accent) 28%, transparent);
}
a.pl:hover {
  border-color: var(--accent) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 36px -22px color-mix(in srgb, var(--accent) 40%, transparent) !important;
}
a.pl .lab {
  position: absolute !important;
  top: -28px !important;
  left: -1.5px !important;
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 7px 18px 6px !important;
  border-radius: 8px 8px 0 0 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 9.5px !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  font-weight: 500 !important;
  margin: 0 !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
}
a.pl:hover .lab {
  background: color-mix(in srgb, var(--accent) 90%, var(--ink)) !important;
}
a.pl h4 { font-family: 'Source Serif 4', serif !important; font-size: 19px !important; font-weight: 500 !important; margin: 0 0 12px !important; letter-spacing: -0.012em !important; line-height: 1.25 !important; }
a.pl h4 em { font-family: 'Newsreader', serif !important; font-style: italic !important; color: var(--accent) !important; }
a.pl p { font-family: 'Source Serif 4', serif !important; font-size: 13.5px !important; color: var(--ink-2) !important; line-height: 1.6 !important; margin: 0 0 10px !important; }

/* ─────────────────────────────────────────────────
   Domain banner · the small rounded "ribbon" that sits below the main banner
   on each of the 4 library subpages, showing "Library / <Domain>" so the
   reader knows this page is dedicated to that domain. Sits before the subnav.
   Pill-shaped · narrower than full width · centered.
   ───────────────────────────────────────────────── */
.domain-banner-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 28px 32px 24px;
  position: relative;
  z-index: 1;
  background: var(--bg);
}
/* Subnav domain-tag · pill highlight on chapter pages.
   The chapter subnav (sticky on scroll) already shows the domain name as the
   FIRST element. Style THAT element as a highlighted pill — no extra markup,
   sticks naturally with the subnav. !important needed to override the
   per-chapter-page legacy rules in each file's <style> block. */
.subnav .domain-tag {
  font-family: 'Newsreader', serif !important;
  font-style: italic !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  position: sticky !important;
  left: 0 !important;
  z-index: 3 !important;
  color: var(--accent) !important;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-bg) 65%, var(--surface)) 0%,
    color-mix(in srgb, var(--accent-bg) 35%, var(--surface)) 100%) !important;
  border: 1.5px solid color-mix(in srgb, var(--accent) 50%, var(--rule)) !important;
  border-radius: 999px !important;
  padding: 6px 16px !important;
  margin-right: 16px !important;
  margin-left: 0 !important;
  border-right: 0 !important;
  letter-spacing: -0.005em !important;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent) inset,
    0 6px 18px -10px color-mix(in srgb, var(--accent) 35%, transparent),
    -160px 0 0 160px var(--bg-2),
    22px 0 24px -10px var(--bg-2) !important;
  text-transform: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.subnav .domain-tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .subnav .domain-tag {
    font-size: 13px !important;
    padding: 5px 12px !important;
    margin-right: 10px !important;
  }
}

/* Library/regulations chapter subnav mobile fix · 2026-05-31
   The desktop sticky domain pill uses a wide left-side masking shadow so
   horizontal tab strips feel clean. On phones that mask becomes a large
   pale overlay covering content. Keep the pill; remove only the desktop
   mask behavior and constrain the pill to the available row. */
@media (max-width: 760px) {
  body .subnav .domain-tag {
    position: static !important;
    left: auto !important;
    z-index: 1 !important;
    max-width: calc(100vw - 180px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow:
      0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent) inset,
      0 6px 18px -12px color-mix(in srgb, var(--accent) 30%, transparent) !important;
  }
  body .subnav-inner {
    min-width: 0 !important;
  }
}
.domain-banner {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 18px 36px 18px 28px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-bg) 40%, var(--surface)) 0%,
    color-mix(in srgb, var(--surface) 92%, transparent) 100%);
  border: 1.5px solid color-mix(in srgb, var(--accent) 32%, var(--rule));
  border-radius: 999px;
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent) inset,
    0 18px 40px -22px color-mix(in srgb, var(--accent) 26%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 92%;
}
.domain-banner .db-parent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.domain-banner .db-parent:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.domain-banner .db-sep {
  width: 1px; height: 22px;
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  flex-shrink: 0;
}
.domain-banner .db-name {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 26px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.012em;
  line-height: 1;
  white-space: nowrap;
}
.domain-banner .db-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  flex-shrink: 0;
  margin-left: 6px;
}
@media (max-width: 760px) {
  .domain-banner { padding: 14px 24px 14px 22px; gap: 14px; }
  .domain-banner .db-name { font-size: 20px; }
  .domain-banner .db-tag { display: none; }
  .domain-banner-wrap { padding: 28px 16px 18px; }
}

.hero.hero-banner-canvas {
  position: relative; overflow: hidden; isolation: isolate;
  /* ████ BANNER HEIGHT · LOCKED · 688px DESKTOP ████
     Canonical strict-fit container · do not change without explicit Sunita greenlight.
     Content area = 688 − 128 (padding) = 560px. Flex centering keeps text+artefact
     vertically centred. Mobile (≤880px) overrides to height: auto for proportional flow. */
  height: 688px !important;
  padding: 64px 0 64px !important;
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse 90% 60% at 88% 22%, var(--hero-glow-a) 0%, transparent 55%),
    radial-gradient(ellipse 70% 80% at 0% 110%, var(--hero-glow-b) 0%, transparent 55%),
    linear-gradient(135deg, var(--hero-base) 0%, var(--hero-mid) 50%, var(--hero-end) 100%);
  border-bottom: 1px solid var(--hero-border);
  color: var(--hero-fg);
}
.hero.hero-banner-canvas::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 8%  18%, var(--hero-pat-a) 1.4px, transparent 2px),
    radial-gradient(circle at 8%  46%, var(--hero-pat-a) 1.4px, transparent 2px),
    radial-gradient(circle at 8%  74%, var(--hero-pat-a) 1.4px, transparent 2px),
    radial-gradient(circle at 26% 28%, var(--hero-pat-b) 1.6px, transparent 2px),
    radial-gradient(circle at 26% 64%, var(--hero-pat-b) 1.6px, transparent 2px),
    radial-gradient(circle at 48% 16%, var(--hero-pat-a) 1.4px, transparent 2px),
    radial-gradient(circle at 48% 46%, var(--hero-pat-b) 1.8px, transparent 2px),
    radial-gradient(circle at 48% 78%, var(--hero-pat-a) 1.4px, transparent 2px),
    radial-gradient(circle at 70% 28%, var(--hero-pat-a) 1.4px, transparent 2px),
    radial-gradient(circle at 70% 64%, var(--hero-pat-b) 1.6px, transparent 2px),
    radial-gradient(circle at 92% 46%, var(--hero-pat-c) 3px, transparent 4px);
  opacity: 0.7;
}
/* Curved bottom-edge fade for banner-to-page transition */
.hero.hero-banner-canvas::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--hero-em) 30%, var(--hero-em) 70%, transparent 100%);
  opacity: 0.55; z-index: 2;
}
.hero.hero-banner-canvas > .wrap, .hero.hero-banner-canvas > * { position: relative; z-index: 1; width: 100%; }
/* Hero grid · desktop: 2-column (text left, artefact right both in contrast layer) */
.hero.hero-banner-canvas .hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero.hero-banner-canvas .hero-viz { width: 100%; max-width: 460px; justify-self: end; }

/* MOBILE STRUCTURE · rules H, I, J, K
   Top bar (sticky) → banner content (contrast layer, top half) →
   artefact (theme layer, bottom half) → page sections continue.
   Banner shrinks to fit just the text portion; artefact moves to its own
   theme-coloured section directly below using order/CSS relocation. */
@media (max-width: 880px) {
  .hero.hero-banner-canvas {
    /* RESPONSIVE · drop the strict 688px desktop container, use proportional flow.
       Banner shrinks to fit content (text top-half, artefact bottom-half).
       !important needed to override the locked desktop height. */
    height: auto !important;
    min-height: auto !important;
    padding: 36px 0 36px !important;
  }
  .hero.hero-banner-canvas .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Pull the artefact OUT of the banner gradient · render it in theme layer below */
  .hero.hero-banner-canvas .hero-viz {
    order: 99;
    max-width: 360px;
    margin: 24px auto 0;
    padding: 28px 0 4px;
    /* Break out of banner contrast: position relative + theme-tokened bg overlay */
    position: relative;
    isolation: isolate;
  }
  .hero.hero-banner-canvas .hero-viz::before {
    content: ""; position: absolute; inset: -36px -100vw 0 -100vw; z-index: -1;
    background: var(--bg);
    border-top: 1px solid var(--rule-2);
  }
  /* Inside .hero-viz on mobile, override --hero-* tokens to use page-theme tokens */
  .hero.hero-banner-canvas .hero-viz {
    --hero-fg: var(--ink);
    --hero-fg-soft: var(--ink-2);
    --hero-em: var(--accent);
    --hero-cta1-fg: var(--bg);
    --hero-pat-a: color-mix(in srgb, var(--accent) 14%, transparent);
    --hero-pat-b: color-mix(in srgb, var(--accent) 22%, transparent);
    --hero-pat-c: color-mix(in srgb, var(--accent) 50%, transparent);
  }
  .hero.hero-banner-canvas h1 { font-size: clamp(28px, 6vw, 40px); max-width: 100%; }
  .hero.hero-banner-canvas .lede { font-size: 16px; max-width: 100%; }
  .hero.hero-banner-canvas .cta-btn, .hero.hero-banner-canvas .btn { padding: 12px 20px; font-size: 10.5px; }
  .hero.hero-banner-canvas .meta, .hero.hero-banner-canvas .meta-strip { gap: 14px; font-size: 10px; }
}
@media (max-width: 540px) {
  .hero.hero-banner-canvas { padding: 28px 0 28px; }
  .hero.hero-banner-canvas .hero-viz { max-width: 300px; }
  .hero.hero-banner-canvas h1 { font-size: clamp(26px, 7vw, 34px); }
  /* CTAs stack full-width on phones */
  .hero.hero-banner-canvas .cta-row { flex-direction: column; gap: 10px; }
  .hero.hero-banner-canvas .cta-btn, .hero.hero-banner-canvas .btn { width: 100%; justify-content: center; }
}

/* ─────────────────────────────────────────────────
   AUDIT FIX · Section headers anchor-scroll padding
   so sticky main nav doesn't hide section titles when
   scrolled into view.
   ───────────────────────────────────────────────── */
section h2,
section .sec-h,
section .da-h,
section .pq-h,
section .deep-art-shell .da-h {
  scroll-margin-top: 100px;
}

/* ─────────────────────────────────────────────────
   AUDIT FIX · Deep-art-shell SVG becomes unreadable
   on phones (viewBox 1100×540 scaled to ~340px wide
   makes inner text ~3-4px effective). Hide on phones.
   The banner-art SVG (smaller viewBox) stays.
   ───────────────────────────────────────────────── */
@media (max-width: 540px) {
  .deep-art-shell .deep-art {
    /* Option: hide entirely (cleaner) OR enable horizontal scroll */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .deep-art-shell .deep-art svg {
    min-width: 760px;  /* let SVG keep readable size · user scrolls horizontally */
  }
  /* Heading + lead stay readable */
  .deep-art-shell .da-h h2 { font-size: 22px; }
  .deep-art-shell .da-lead { font-size: 15px; }
}
/* Eyebrow pill · tightened margin */
.hero.hero-banner-canvas .eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.20em; text-transform: uppercase; color: var(--hero-eyebrow-fg); margin-bottom: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border: 1px solid var(--hero-eyebrow-bd); border-radius: 999px; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); background: var(--banner-glass-bg); }
.hero.hero-banner-canvas .eyebrow .signal-mark { background: var(--hero-signal) !important; box-shadow: 0 0 0 4px var(--hero-signal-halo) !important; width: 6px !important; height: 6px !important; border-radius: 50% !important; display: inline-block !important; }
/* Headline · compact margins, comfortable line-height kept */
.hero.hero-banner-canvas h1 { font-family: 'Source Serif 4', serif; font-size: clamp(34px, 4.4vw, 60px); font-weight: 500; letter-spacing: -0.022em; line-height: 1.05; margin: 0 0 18px; max-width: 20ch; color: var(--hero-fg); }
.hero.hero-banner-canvas h1 em { font-family: 'Newsreader', serif; font-style: italic; color: var(--hero-em); font-weight: 500; }
/* Lede · compact bottom margin */
.hero.hero-banner-canvas .lede { font-family: 'Source Serif 4', serif; font-size: 17px; line-height: 1.55; color: var(--hero-fg-soft); max-width: 56ch; margin: 0 0 20px; }
.hero.hero-banner-canvas .lede em { font-family: 'Newsreader', serif; font-style: italic; color: var(--hero-em); }
.hero.hero-banner-canvas p, .hero.hero-banner-canvas p em { color: var(--hero-fg-soft); }
.hero.hero-banner-canvas p em { color: var(--hero-em); }
/* CTA row · tightened gap + bottom margin */
.hero.hero-banner-canvas .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero.hero-banner-canvas .cta-btn, .hero.hero-banner-canvas .btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; border-radius: 999px; transition: transform 0.22s, background 0.22s, border-color 0.22s, color 0.22s, box-shadow 0.22s; }
.hero.hero-banner-canvas .cta-btn.primary, .hero.hero-banner-canvas .btn.primary { background: var(--hero-cta1-bg); color: var(--hero-cta1-fg); border: 1px solid var(--hero-cta1-bg); box-shadow: 0 8px 22px -10px var(--hero-cta1-bg); }
.hero.hero-banner-canvas .cta-btn.primary:hover, .hero.hero-banner-canvas .btn.primary:hover { transform: translateY(-2px); background: var(--hero-cta1-bg-h); border-color: var(--hero-cta1-bg-h); box-shadow: 0 12px 28px -10px var(--hero-cta1-bg-h); }
.hero.hero-banner-canvas .cta-btn.secondary, .hero.hero-banner-canvas .btn.secondary { background: transparent; color: var(--hero-cta2-fg); border: 1px solid var(--hero-cta2-bd); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.hero.hero-banner-canvas .cta-btn.secondary:hover, .hero.hero-banner-canvas .btn.secondary:hover { transform: translateY(-2px); background: var(--hero-cta2-bg-h); }
/* Meta strip · tighter top padding */
.hero.hero-banner-canvas .meta, .hero.hero-banner-canvas .meta-strip { display: flex; gap: 22px; flex-wrap: wrap; padding: 12px 0 0; border-top: 1px solid var(--hero-meta-rule); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.08em; color: var(--hero-meta-fg); }
.hero.hero-banner-canvas .meta b, .hero.hero-banner-canvas .meta-strip b { color: var(--hero-meta-strong); font-weight: 500; }
.hero.hero-banner-canvas .meta a, .hero.hero-banner-canvas .meta-strip a { color: var(--hero-em); }
.hero.hero-banner-canvas a { color: var(--hero-em); }
/* In-banner SVG defaults · all artefacts inherit banner contrast */
.hero.hero-banner-canvas svg.banner-art { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 18px 32px var(--hero-em)); filter: drop-shadow(0 18px 32px color-mix(in srgb, var(--hero-em) 18%, transparent)); }
.hero.hero-banner-canvas svg.banner-art .ba-sub { stroke: var(--hero-fg); opacity: 0.20; fill: none; }
.hero.hero-banner-canvas svg.banner-art .ba-fire { stroke: var(--hero-em); fill: none; stroke-linecap: round; }
.hero.hero-banner-canvas svg.banner-art .ba-node { fill: var(--hero-fg); opacity: 0.85; }
.hero.hero-banner-canvas svg.banner-art .ba-input { fill: var(--hero-em); }
.hero.hero-banner-canvas svg.banner-art .ba-mid { fill: var(--hero-fg); opacity: 0.92; }
.hero.hero-banner-canvas svg.banner-art .ba-focal { fill: var(--hero-em); }
.hero.hero-banner-canvas svg.banner-art .ba-halo { fill: none; stroke: var(--hero-em); }
.hero.hero-banner-canvas svg.banner-art text { fill: var(--hero-fg); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase; opacity: 0.85; }
.hero.hero-banner-canvas svg.banner-art text.ba-name { fill: var(--hero-fg); font-family: 'Newsreader', serif; font-style: italic; font-size: 13px; letter-spacing: -0.005em; text-transform: none; opacity: 1; }
.hero.hero-banner-canvas svg.banner-art text.ba-em { fill: var(--hero-em); font-family: 'Newsreader', serif; font-style: italic; font-size: 12px; letter-spacing: -0.005em; text-transform: none; }

/* ─────────────────────────────────────────────────
   Deep-art shell · universal pattern for the BIG version of a banner artefact
   that sits in its own section directly below the banner. Modeled on
   methodology's .pqios-graph-shell. Use across pages to create the
   "small in banner · big below it" two-tier structure.
   ───────────────────────────────────────────────── */
.deep-art-shell { padding: 80px 0; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.deep-art-shell .da-h { display: grid; grid-template-columns: 110px 1fr auto; gap: 28px; align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid var(--rule-2); margin-bottom: 32px; }
.deep-art-shell .da-h .num { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.18em; }
.deep-art-shell .da-h h2 { font-family: 'Source Serif 4', serif; font-size: 30px; font-weight: 500; letter-spacing: -0.018em; margin: 0; line-height: 1.15; }
.deep-art-shell .da-h h2 em { font-family: 'Newsreader', serif; font-style: italic; color: var(--accent); }
.deep-art-shell .da-h .sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase; }
.deep-art-shell .da-lead { font-family: 'Source Serif 4', serif; font-size: 17.5px; line-height: 1.7; color: var(--ink-2); max-width: 66ch; margin-bottom: 24px; }
.deep-art-shell .da-lead em { font-family: 'Newsreader', serif; font-style: italic; color: var(--accent); }
.deep-art-shell .deep-art {
  width: 100%; max-width: 1000px; margin: 30px auto 10px;
  overflow: hidden;
  /* Unified translucent container · pronounced pill-shape so it feels like one image */
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent-bg) 36%, transparent) 0%,
    color-mix(in srgb, var(--surface) 75%, transparent) 100%);
  border: 1.5px solid color-mix(in srgb, var(--accent) 32%, var(--rule));
  border-radius: 48px;
  padding: 56px 60px 50px;
  position: relative;
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent) inset,
    0 28px 70px -30px color-mix(in srgb, var(--accent) 26%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.deep-art-shell .deep-art::before {
  /* Subtle inner accent border · echoes the pill shape */
  content: ""; position: absolute; inset: 10px; border-radius: 38px;
  border: 1px dashed color-mix(in srgb, var(--accent) 20%, transparent);
  pointer-events: none;
}
.deep-art-shell .deep-art svg { width: 100%; height: auto; display: block; overflow: visible; position: relative; }
@media (max-width: 880px) {
  .deep-art-shell .deep-art { padding: 32px 22px 28px; border-radius: 32px; }
  .deep-art-shell .deep-art::before { inset: 6px; border-radius: 26px; }
}
.deep-art-shell .da-layer-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; fill: var(--ink-3); text-anchor: middle; }
.deep-art-shell .da-axis { stroke: var(--ink-3); opacity: 0.4; fill: none; }
.deep-art-shell .da-grid { stroke: var(--ink-3); opacity: 0.18; fill: none; stroke-dasharray: 2 4; }
.deep-art-shell .da-curve { stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; }
.deep-art-shell .da-curve-faint { stroke: var(--ink-2); fill: none; stroke-width: 1.4; opacity: 0.55; }
.deep-art-shell .da-fill { fill: var(--accent); opacity: 0.10; }
.deep-art-shell .da-bound { stroke: var(--accent); fill: none; stroke-width: 1; opacity: 0.55; stroke-dasharray: 4 4; }
.deep-art-shell .da-target { stroke: var(--accent); fill: none; stroke-width: 1; opacity: 0.7; stroke-dasharray: 6 4; }
.deep-art-shell .da-node-fill { fill: var(--accent); }
.deep-art-shell .da-node-mid { fill: var(--ink-2); }
.deep-art-shell .da-node-faint { fill: var(--ink-3); opacity: 0.7; }
.deep-art-shell .da-halo { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0.7; }
.deep-art-shell .da-chip { fill: var(--surface); stroke: var(--rule); stroke-width: 1; }
.deep-art-shell .da-chip-active { fill: var(--accent-bg); stroke: var(--accent); stroke-width: 1; }
.deep-art-shell .da-text { fill: var(--ink); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.06em; }
.deep-art-shell .da-text-em { fill: var(--accent); font-family: 'Newsreader', serif; font-style: italic; font-size: 13px; }
.deep-art-shell .da-text-sub { fill: var(--ink-3); font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }
.deep-art-shell .da-text-num { fill: var(--ink-2); font-family: 'JetBrains Mono', monospace; font-size: 10px; }
.deep-art-shell .da-anchor-band { fill: var(--accent); opacity: 0.06; }
.deep-art-shell .da-divider { stroke: var(--rule); fill: none; stroke-width: 1; opacity: 0.5; }
@media (max-width: 880px) {
  .deep-art-shell { padding: 56px 0; }
  .deep-art-shell .da-h { grid-template-columns: 1fr; gap: 8px; }
  .deep-art-shell .da-h h2 { font-size: 24px; }
}

/* ─────────────────────────────────────────────────
   Glass card · used across pages for richer card design
   (replaces flat-colour cards). Auto-adjusts per theme.
   ───────────────────────────────────────────────── */
.glass-card {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: var(--glass-shadow);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.22s, box-shadow 0.28s, background 0.22s;
}
.glass-card::before {
  content: ""; position: absolute; inset: 0; background: var(--glass-tint); pointer-events: none; z-index: 0;
}
.glass-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.4;
  background-image:
    radial-gradient(circle at 14% 20%, color-mix(in srgb, var(--accent) 18%, transparent) 1px, transparent 2px),
    radial-gradient(circle at 86% 80%, color-mix(in srgb, var(--accent) 22%, transparent) 1.4px, transparent 2px),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 14%, transparent) 1px, transparent 1.6px);
}
.glass-card > * { position: relative; z-index: 1; }
.glass-card:hover { transform: translateY(-4px); border-color: var(--glass-bd-strong); box-shadow: var(--glass-shadow-h); background: var(--glass-bg-strong); }
/* Tilt-on-hover variant */
.glass-card.tilt:hover { transform: translateY(-4px) perspective(900px) rotateX(2deg) rotateY(-2deg); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background 0.25s, color 0.25s;
}

.serif { font-family: 'Source Serif 4', 'Iowan Old Style', Georgia, serif; }
.mono  { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.eye {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.muted {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3);
}
.signal-mark {
  display: inline-block; width: 6px; height: 6px;
  background: var(--signal); border-radius: 50%;
  vertical-align: middle; margin-right: 8px;
}

/* theme toggle · positioned inside the nav-inner flex container by JS
   (round 2.19 · was floating fixed-position outside the pill which
   visually overlapped the REGISTER link · now a true flex child).
   The fixed-position rule below is the FALLBACK before JS runs · once
   JS moves it inside .nav-inner, the .nav-inner > .theme-toggle rule
   below resets to static positioning. */
.theme-toggle {
  position: fixed;
  top: 22px;
  right: max(20px, calc((100% - 1250px) / 2 + 16px));
  z-index: 100;
  display: flex; gap: 0; padding: 3px;
  border: 1px solid var(--rule-2); background: var(--surface);
  border-radius: 999px; box-shadow: var(--shadow-1);
}
/* When JS relocates it inside the nav-inner on desktop · sits as a flex
   sibling after .links · static positioning so it's part of the layout
   not an overlay · no overlap with REGISTER or any other nav link */
.nav .nav-inner > .theme-toggle {
  position: static !important;
  top: auto !important;
  right: auto !important;
  box-shadow: none !important;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Focus work header · used by weekly digests, focus articles, and future
   regulatory checkpoint pages. These pages use a centered work title plus
   a compact control cluster on the right, so the theme toggle must be part
   of that cluster rather than the global floating fallback. */
html.w19-page .nav .nav-inner,
html.w20-page .nav .nav-inner,
html.focus-page .nav .nav-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}
html.focus-page .nav .links {
  display: none !important;
}
html.focus-page .nav.open .links {
  position: fixed;
  top: 90px;
  right: max(18px, calc((100% - 1250px) / 2 + 18px));
  left: auto;
  bottom: auto;
  width: min(86vw, 320px);
  max-height: calc(100vh - 110px);
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 12px 14px !important;
  background: var(--surface) !important;
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow:
    0 20px 56px color-mix(in srgb, var(--ink) 28%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
  z-index: 1260;
  overflow-y: auto;
}
html.focus-page .nav.open .links > a {
  display: block;
  width: 100%;
  padding: 11px 12px !important;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent) !important;
  border-radius: 8px;
}
html.w19-page .nav .nav-title,
html.w20-page .nav .nav-title,
html.focus-page .nav .nav-title {
  min-width: 0;
  text-align: center;
  padding: 0 18px;
}
html.focus-page .nav .nav-title .head {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}
html.focus-page .nav .nav-title .head em {
  font-family: 'Newsreader', serif;
  font-style: italic;
  color: var(--accent);
}
html.w19-page .nav .nav-toggle,
html.w20-page .nav .nav-toggle,
html.focus-page .nav .nav-toggle {
  display: inline-flex;
  flex-shrink: 0;
}

html.w19-page .nav .nav-right,
html.w20-page .nav .nav-right,
html.focus-page .nav .nav-right {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}
html.w19-page .nav .nav-right .theme-toggle,
html.w20-page .nav .nav-right .theme-toggle,
html.focus-page .nav .nav-right .theme-toggle {
  position: static !important;
  top: auto !important;
  right: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
  margin: 0 !important;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  html.w19-page .nav .nav-right,
  html.w20-page .nav .nav-right,
  html.focus-page .nav .nav-right {
    gap: 6px;
  }
  html.w19-page .nav .nav-right .theme-toggle button,
  html.w20-page .nav .nav-right .theme-toggle button,
  html.focus-page .nav .nav-right .theme-toggle button {
    font-size: 9px;
    padding: 4px 7px;
  }
  html.focus-page .nav .nav-title {
    padding: 0 6px;
  }
  html.focus-page .nav .nav-title .head {
    font-size: 11px;
  }
}

@media (max-width: 460px) {
  html.focus-page .nav .nav-inner {
    position: relative;
    display: flex !important;
    justify-content: flex-start;
    min-height: 58px;
    gap: 6px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  html.focus-page .nav .brand {
    gap: 6px;
    min-width: 70px;
  }
  html.focus-page .nav .brand .nn11 {
    width: 24px !important;
  }
  html.focus-page .nav .brand .if-mark {
    font-size: 18px !important;
  }
  html.focus-page .nav .nav-title {
    position: absolute;
    left: 86px;
    right: 112px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  html.focus-page .nav .nav-title .head {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  html.focus-page .nav .nav-right {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    gap: 4px;
  }
  html.focus-page .nav .nav-right .theme-toggle {
    width: 70px;
    min-width: 70px;
  }
  html.focus-page .nav .nav-right .theme-toggle button {
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
  }
  html.focus-page .nav .nav-toggle {
    display: inline-flex !important;
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * SECTION HEADER DIVIDER · uniform across every page (round 2.23)
 *
 * Per Sunita: 'you added nice line before starting new section · can
 * you do it for all pages'. The home + a few pages had .sec-h with a
 * border-bottom that visually separated the header from the section
 * content. Other pages used different class names (.cc-h, .kg-h,
 * .topical-h, .tl-h, .engagement-h, .spectrum-h, .top-five-h,
 * .pg-h, .section-block-h, .pricing-h) and most lacked the divider.
 *
 * Below: every section-header pattern across the site gets the same
 * 1px rule-2 divider underneath, with consistent 18px bottom padding
 * and 32px margin-bottom. Result: 'header → divider line → content'
 * rhythm is now uniform on every page.
 * ───────────────────────────────────────────────────────────────────── */
body .sec-h,
body .cc-h,
body .kg-h,
body .topical-h,
body .tl-h,
body .engagement-h,
body .spectrum-h,
body .top-five-h,
body .pg-h,
body .section-block-h,
body .pricing-h,
body .da-h,
body .conn-h,
body .ct-h,
body .pq-h,
body .summary-h,
body .tier-h {
  border-bottom: 1px solid var(--rule-2) !important;
  padding-bottom: 18px !important;
  margin-bottom: 56px !important;   /* round 2.25 · more breathing space below separator (was 32) */
}

/* ─────────────────────────────────────────────────────────────────────
 * TOP HOOD · covers the breathing gap above the floating pill nav
 * (round 2.19 · per Sunita: 'when i scroll, content goes above the top
 * bar, there is very small thing on top bar · contents look from that
 * space it feels like content leaks').
 *
 * Fixed strip at viewport top, height = pill margin-top, page bg color,
 * z-index 49 (below nav at 50, above content), pointer-events none so
 * it never blocks clicks. Caps the scroll-leak window.
 * ───────────────────────────────────────────────────────────────────── */
html::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;                /* desktop · matches .nav top: 10px */
  background: var(--bg);
  z-index: 49;
  pointer-events: none;
}
@media (max-width: 640px) {
  html::before { height: 6px; }   /* mobile · matches .nav top: 6px */
}
.theme-toggle button {
  border: 0; background: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px;
  color: var(--ink-3); cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.theme-toggle button.active { background: var(--ink); color: var(--bg); }
.theme-toggle button:not(.active):hover { color: var(--ink); }
@media (max-width: 960px) {
  /* On mobile the theme toggle is moved into the hamburger panel by site.js.
     Sits as its own row at the bottom of the panel · clearly labeled as theme. */
  .mobile-theme-wrap {
    margin: 0 0 10px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .mobile-theme-wrap::before {
    content: "Theme";
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
  .mobile-theme-wrap .theme-toggle {
    position: static !important;
    top: auto !important;
    right: auto !important;
    box-shadow: none !important;
    transform: none !important;
    background: var(--bg-2) !important;
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 2px;
    display: inline-flex;
  }
  .mobile-theme-wrap .theme-toggle button {
    font-size: 9.5px !important;
    padding: 5px 12px !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * Global sticky filter pattern — applies to any long page that uses the
 * .filter-strip (topic chips), .filter-bar (status / counter row), or
 * .domain-filter (dropdown) classes. Filter controls remain accessible
 * as the user scrolls the gallery / list below.
 *
 * Per-page top values may override (e.g. notes/index.html stacks two
 * sticky bars and uses top: 152px on the second one). Defaults below
 * cover the single-strip case. Background is solid + blurred so content
 * scrolling underneath doesn't bleed through.
 * ───────────────────────────────────────────────────────────────────── */
.filter-strip,
.filter-bar {
  position: sticky;
  top: 80px;
  z-index: 44;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 760px) {
  /* Floating-pill nav (round 2.12) · sits at top:8px with ~58-62px height
     · sticky bars below allow ~12px gap so the pill's shadow has room */
  .filter-strip,
  .filter-bar { top: 78px; }
}
/* Subnav nests under the floating pill nav at the same offset */
@media (max-width: 760px) {
  .subnav { top: 78px !important; }
}

/* generic chip */
.chip {
  display: inline-block; padding: 3px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--rule-2); border-radius: 999px;
  color: var(--ink-2); background: var(--surface);
}
.chip.accent { color: var(--accent); border-color: var(--accent); }
.chip.signal { color: var(--signal); border-color: var(--signal); background: var(--signal-bg); }
.chip.solid  { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ─────────────────────────────────────────────────
   NAV DROPDOWN · v1 (2026-05-02)
   Hover reveals 4 library spaces · click on the parent
   link goes to the library hub.
   Pure CSS, no JS. Mobile collapses to inline list.
   ───────────────────────────────────────────────── */

.nav .has-dropdown { position: relative; }
.nav .has-dropdown .caret {
  display: inline-block;
  margin-left: 5px;
  font-size: 9px;
  color: var(--ink-3);
  transition: transform 0.18s, color 0.18s;
}
.nav .has-dropdown:hover .caret { transform: rotate(180deg); color: var(--accent); }

.nav .dropdown {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  width: max-content;
  padding: 10px 8px;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow:
    0 24px 56px oklch(20% 0.03 250 / 0.32),
    0 4px 12px oklch(20% 0.03 250 / 0.12),
    0 0 0 1px oklch(20% 0.03 250 / 0.04);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 60;
}
:root[data-theme="dark"] .nav .dropdown {
  background: oklch(28% 0.045 210);
  box-shadow:
    0 24px 56px oklch(0% 0 0 / 0.6),
    0 4px 12px oklch(0% 0 0 / 0.4);
}
.nav .has-dropdown:hover .dropdown,
.nav .has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* Specificity bumped via .has-dropdown ancestor — the inline page rule
   `.nav .links a { padding: 6px 0 }` was tying on specificity (0,2,1) and winning
   on source order. Adding .has-dropdown makes us 0,3,1 and we win cleanly. */
.nav .has-dropdown .dropdown a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 44px 11px 32px !important;
  position: relative;
  border: 0 !important;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s;
  margin: 2px 4px;
}
.nav .has-dropdown .dropdown a::before {
  content: "";
  position: absolute;
  left: 12px; top: 11px; bottom: 11px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: center;
  transition: opacity 0.18s, transform 0.22s;
}
.nav .has-dropdown .dropdown a:hover {
  background: var(--accent-bg);
}
.nav .has-dropdown .dropdown a:hover::before {
  opacity: 1;
  transform: scaleY(1);
}
.nav .dropdown a:hover .d-name {
  color: var(--accent);
}
.nav .dropdown a.d-all::before { display: none; }
.nav .dropdown a .d-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.15s;
}
.nav .dropdown a:hover .d-name {
  color: var(--accent);
}
.nav .dropdown a .d-desc {
  font-family: 'Source Serif 4', serif;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.45;
  text-transform: none;
  padding-left: 28px;   /* 1 tab-space shift · text-only, button frame unchanged */
}
.nav .dropdown .d-sep {
  height: 1px;
  background: var(--rule);
  margin: 8px 22px 6px;
}
.nav .dropdown a.d-all { padding: 8px 22px 10px; }
.nav .dropdown a.d-all .d-name {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 13.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.005em;
  color: var(--ink-3);
}
.nav .dropdown a.d-all:hover .d-name {
  color: var(--accent);
}

/* Bridge the gap between parent link and dropdown so hover doesn't drop. */
.nav .has-dropdown::after {
  content: "";
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 12px;
}

/* ─────────────────────────────────────────────────
   NAV BUTTONS · v2 (2026-05-02)
   Desktop: every link styled as a button-pill on hover · accent fill on active.
   Mobile: hamburger button toggles a full panel · proper interactive states.
   ───────────────────────────────────────────────── */

/* Desktop nav links · button-style hover (full pill)
   Round 2.20 · horizontal padding 14 → 10, gap 2 → 0, links cluster
   gets margin-left: auto so it sits hard against the right (next to
   the theme toggle) leaving more breathing space between logo and
   the start of links. Per Sunita: 'reduce space between nav elements
   without touching size and buttons · move to right toward theme
   switcher · so we have some space between logo and nav bar'. */
.nav .links > a,
.nav .has-dropdown > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px !important;
  border-radius: 999px;
  border-bottom: 0 !important;
  transition: background 0.15s, color 0.15s !important;
}
@media (min-width: 961px) {
  .nav .nav-inner > .links {
    gap: 0 !important;
    margin-left: auto !important;  /* push the cluster against the right */
  }
}
.nav .links > a:hover,
.nav .has-dropdown:hover > a,
.nav .has-dropdown > a:focus-visible {
  background: var(--bg-2);
  color: var(--accent);
}
.nav .links > a.current,
.nav .has-dropdown > a.current {
  background: var(--accent-bg);
  color: var(--accent);
}

/* Dropdown items · arrow that slides on hover (button feature) */
.nav .dropdown a::after {
  content: "→";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.18s, transform 0.22s;
  line-height: 1;
}
.nav .dropdown a:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.nav .dropdown a.d-all::after { display: none; }

/* Hamburger button · visible only on mobile · rounded */
.nav .nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  width: 42px; height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.nav .nav-toggle:hover { border-color: var(--accent); background: var(--bg-2); }
.nav .nav-toggle .bar {
  display: block;
  width: 18px; height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: transform 0.22s, opacity 0.22s;
}
.nav .nav-toggle .bar::before,
.nav .nav-toggle .bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s, top 0.22s;
}
.nav .nav-toggle .bar::before { top: -6px; }
.nav .nav-toggle .bar::after  { top:  6px; }
.nav.open .nav-toggle .bar { background: transparent; }
.nav.open .nav-toggle .bar::before { top: 0; transform: rotate(45deg); }
.nav.open .nav-toggle .bar::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  /* Show hamburger, collapse nav-links into a slide-down panel · tablet+mobile. */
  .nav .nav-toggle { display: inline-flex; }
  .nav .nav-inner { padding: 8px 14px !important; gap: 10px; }
  .nav .brand .nn11 { width: 38px !important; }
  .nav .brand .if-mark { font-size: 22px !important; }
  /* Belt-and-braces · sticky must stay sticky on mobile (was being broken
     by the overflow-x: hidden rule earlier · fixed above with clip) */
  .nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: var(--bg) !important;
    transform: none !important;
  }
}

/* Phone nav · floating glass pill with elevation
   Per Sunita's expert-suggestion ask: 'top bar and ifeed logo too small,
   add border slight curve corner, design like its pop up · feels real
   and 3D'. The bar lifts off the page as a rounded card with multi-layer
   shadow, specular top highlight, and brand-toned inner rim. */
@media (max-width: 640px) {
  body .nav {
    margin: 6px 10px 0 !important;
    padding: 0 !important;
    border-radius: 14px !important;
    border: 0 !important;
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 96%, transparent) 0%,
      color-mix(in srgb, var(--bg) 92%, transparent) 100%) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.55),
      inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
      0 1px 2px oklch(15% 0.02 250 / 0.06),
      0 4px 12px oklch(15% 0.02 250 / 0.10),
      0 12px 30px oklch(15% 0.02 250 / 0.14) !important;
    /* Sticky still works through margin · keep transform: none for iOS Safari */
    position: sticky !important;
    top: 6px !important;
  }
  /* Dark theme · keep the highlight subtle */
  :root[data-theme="dark"] body .nav {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.10),
      inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
      0 1px 2px oklch(8% 0.02 250 / 0.32),
      0 4px 12px oklch(8% 0.02 250 / 0.36),
      0 12px 30px oklch(8% 0.02 250 / 0.40) !important;
  }
  /* Tighten inner padding · enlarge logo for better legibility */
  body .nav .nav-inner { padding: 9px 16px !important; gap: 10px !important; }
  body .nav .brand .nn11 { width: 44px !important; }
  body .nav .brand .if-mark { font-size: 26px !important; }
  body .nav .nav-toggle {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  /* Mobile nav · compact rectangular popover · drops from top-right · sized
     to its content (NOT full screen) · rounded corners · solid background
     so page text below doesn't bleed through (no glass-transparency dullness) */
  .nav .links {
    position: fixed;
    top: 80px;             /* below the floating pill nav (round 2.12) */
    right: 12px;
    bottom: auto;
    left: auto;
    width: min(86vw, 300px);
    max-height: calc(100vh - 90px);
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 12px 14px !important;
    background: var(--surface) !important;
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow:
      0 20px 56px oklch(15% 0.02 250 / 0.34),
      0 4px 14px oklch(15% 0.02 250 / 0.10),
      inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
    z-index: 60;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Dark theme · panel uses the dark surface variable for opaque background */
  :root[data-theme="dark"] .nav .links { background: var(--surface) !important; }
  /* Hide the FLOATING theme-toggle while panel is open · but the toggle that
     was relocated INTO the panel (see site.js relocateThemeToggle) remains
     visible. Earlier rule used body:has() which hid the in-panel one too. */
  body:has(.nav.open) > .theme-toggle { display: none; }
  .nav.open .links {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
  }
  /* No body-level backdrop · panel is compact so the page beneath remains
     visible and tappable (tapping outside closes via JS). Page scroll stays
     unlocked too — the panel itself scrolls if its content overflows. */
  .nav .links > a,
  .nav .has-dropdown > a {
    display: block;
    width: 100%;
    padding: 11px 12px !important;
    font-size: 12px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent) !important;
    border-radius: 8px;
  }
  /* Last item in panel · no divider line under it */
  .nav .links > a:last-child,
  .nav .has-dropdown:last-child > a {
    border-bottom: 0 !important;
  }
  .nav .links > a:hover,
  .nav .has-dropdown > a:hover {
    background: color-mix(in srgb, var(--accent-bg) 60%, transparent);
  }
  .nav .links > a.current,
  .nav .has-dropdown > a.current {
    background: var(--accent-bg);
    border-left: 3px solid var(--accent) !important;
  }
  .nav .has-dropdown { width: 100%; }

  /* Dropdown · collapsed by default on mobile · tap caret to expand inside the panel · accordion-style */
  .nav .has-dropdown > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }
  .nav .has-dropdown .caret {
    display: inline-flex !important;
    margin-left: auto;
    transition: transform 0.18s ease;
    color: var(--ink-3);
    font-size: 14px;
  }
  .nav .has-dropdown.is-open .caret { transform: rotate(180deg); color: var(--accent); }
  /* Override every desktop dropdown property so the sub-menu nests INSIDE
     the mobile panel instead of bleeding out absolutely-positioned. */
  .nav .dropdown {
    display: none !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border: 0 !important;
    border-left: 2px solid var(--accent) !important;
    background: color-mix(in srgb, var(--bg-2) 96%, transparent) !important;
    border-radius: 8px !important;
    padding: 6px 0 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 4px 0 8px !important;
  }
  .nav .has-dropdown.is-open .dropdown { display: block !important; }
  .nav .dropdown a {
    display: block !important;
    width: 100% !important;
    padding: 10px 14px 10px 18px !important;
    font-size: 11px !important;
    border-bottom: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }
  .nav .dropdown a::before,
  .nav .dropdown a::after { display: none !important; }
  .nav .dropdown a .d-name {
    font-size: 11px !important;
    letter-spacing: 0.12em !important;
    white-space: normal !important;
  }
  .nav .dropdown a .d-desc { display: none !important; }
  .nav .dropdown .d-sep {
    margin: 4px 14px !important;
    width: auto !important;
  }

  /* Theme toggle on mobile · move smaller, lower-right */
  .theme-toggle {
    top: auto !important;
    bottom: 18px;
    right: 14px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }
}

/* ─────────────────────────────────────────────────
   IN-DOMAIN SECONDARY NAV · v1 (2026-05-02)
   Sticky tab strip that sits BELOW the main nav inside
   any domain space (bioanalytical, BE, CT, governance).
   Visually a single coherent shell · NOT a second nav-bar.
   ───────────────────────────────────────────────── */

.subnav {
  position: sticky;
  top: 80px;            /* sits under main nav */
  z-index: 40;
  background: color-mix(in srgb, var(--bg-2) 95%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  margin: 0 -32px 0;
}
.subnav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav .domain-tag {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  margin-right: 18px;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 14px;
  border-right: 1px solid var(--rule-2);
}
.subnav-inner a {
  display: inline-block;
  padding: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  border-radius: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.subnav-inner a:hover {
  color: var(--ink);
  background: var(--surface);
}
.subnav-inner a.current {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 760px) {
  /* Subnav · sits flush against the main nav (no visible gap), full-bleed
     to screen edges, no border-radius — reads as a continuation of the
     top bar rather than a floating card. Sticky offset matches slim nav. */
  .subnav {
    top: 48px !important;
    margin: 0 !important;
    z-index: 45;
    border-radius: 0;
    border-top: 0;
    border-bottom: 1px solid var(--rule);
  }
  /* Wrap subnav items onto multiple rows · padding matches content rhythm */
  .subnav-inner {
    padding: 10px 14px;
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 4px;
    column-gap: 4px;
  }
  .subnav .domain-tag {
    font-size: 11px;
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
    width: 100%;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule-2);
  }
  .subnav-inner a {
    padding: 5px 9px;
    font-size: 9.5px;
    white-space: nowrap;
  }
  /* Mobile content padding · less aggressive than desktop's 32px so cards
     don't feel choked but subnav still has matching breathing room */
  body .wrap { padding-left: 18px !important; padding-right: 18px !important; }
}

/* Chapter footer · prev / next within a domain */
.chapter-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 60px 0 40px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.chapter-foot a {
  display: block;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.chapter-foot a:hover {
  border-color: var(--accent);
  /* transform removed for stability */
  box-shadow: var(--shadow-1);
  color: inherit;
}
.chapter-foot .dir {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.chapter-foot a.next {
  text-align: right;
}
.chapter-foot .ttl {
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.chapter-foot .ttl em {
  font-family: 'Newsreader', serif;
  font-style: italic;
  color: var(--accent);
}
.chapter-foot a.prev .arrow { display: inline-block; margin-right: 6px; color: var(--accent); }
.chapter-foot a.next .arrow { display: inline-block; margin-left: 6px; color: var(--accent); }
@media (max-width: 600px) {
  .chapter-foot { grid-template-columns: 1fr; }
  .chapter-foot a.next { text-align: left; }
}

/* Mini connection diagram · shows how this domain connects to others */
.mini-graph {
  width: 100%;
  max-width: 540px;
  margin: 30px auto;
}
.mini-graph svg { width: 100%; height: auto; display: block; overflow: visible; }

/* Halo rings/pills · default invisible. Animated only on .current node to mark "firing".
   Animation uses SVG attributes (r for circles, x/y/width/height for rects) — NEVER CSS transform —
   so the phantom-at-top-left bug class cannot return. */
.mini-graph .mg-halo { fill: none; stroke: none; pointer-events: none; }

/* Outer-node halos (circles, base r=40) */
.mini-graph .mg-node.current circle.mg-halo {
  stroke: var(--accent);
  stroke-width: 1.2;
  animation: mg-halo-fire 2.6s ease-out infinite;
}
.mini-graph .mg-node.current circle.mg-halo.h2 { animation-delay: 1.3s; }
@keyframes mg-halo-fire {
  0%   { r: 40; opacity: 0.5; }
  100% { r: 64; opacity: 0; }
}

/* Centre-pill halos (rects, base 130×56 → expand to 184×100, x/y shift to keep centred) */
.mini-graph .mg-node.current.centre rect.mg-halo {
  stroke: var(--accent);
  stroke-width: 1.2;
  animation: mg-halo-fire-pill 2.6s ease-out infinite;
}
.mini-graph .mg-node.current.centre rect.mg-halo.h2 { animation-delay: 1.3s; }
@keyframes mg-halo-fire-pill {
  0%   { x: -65; y: -28; width: 130; height: 56; opacity: 0.5; }
  100% { x: -92; y: -50; width: 184; height: 100; opacity: 0; }
}

/* Main node shapes (visible disc / pill — paint on top of halos) */
.mini-graph .mg-node > circle:not(.mg-halo),
.mini-graph .mg-node > rect:not(.mg-halo) {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 1.5;
  transition: fill 0.18s, stroke 0.18s;
}
.mini-graph .mg-node.current > circle:not(.mg-halo),
.mini-graph .mg-node.current > rect:not(.mg-halo) {
  fill: var(--accent);
}
.mini-graph .mg-node text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  fill: var(--ink-2);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}
.mini-graph .mg-node.current text { fill: var(--bg); font-weight: 600; }   /* light text on accent-filled current node */
.mini-graph .mg-edge { stroke: var(--rule-strong); stroke-width: 1; opacity: 0.45; fill: none; }
.mini-graph .mg-edge.active { stroke: var(--accent); opacity: 1; stroke-width: 1.5; }
.mini-graph a:hover .mg-node circle { fill: var(--accent-bg); stroke: var(--accent-2); }

/* ─────────────────────────────────────────────────
   TACTILE CARD SYSTEM · v1 (2026-05-02)
   Editorial restraint preserved. Warmth added through
   four micro-treatments applied to every card surface:
     1. 4px corner radius — architectural-soft, not pillow-soft
     2. Top accent bar growing left → right on hover
     3. Soft shadow lift on hover
     4. Eyebrow label colour shift to accent on hover
   No glow. No gradient. No noise. Monsoon Steel intact.
   ───────────────────────────────────────────────── */

/* the card cohort — every container that carries content · rounded corners site-wide */
.phase, .note-card, .tri-card, .pil, .pl, .reg-row, .reg-row-mini,
.pcard, .feature-card, .col-card, .rel-card, .matrix, .course, .tl-item,
.article-head, .editors-note, .footnote, .standfirst, .triple,
.connect-cta, .write-cta, .form-shell, .form, .card,
.aud, .ch, .dom, .frm, .quad, .ac, .ip, .rs, .ai-card, .fm, .stake,
.pq-cap, .summary-card, .flow-step, .era, .stack-layer, .pcard, .pl,
.flow, .reg-table, .insp, .topo, .alcoa, .stack {
  border-radius: 10px;
}
.phase, .note-card, .tri-card, .pil, .pl, .reg-row, .reg-row-mini,
.pcard, .feature-card, .col-card, .rel-card, .matrix, .course, .tl-item,
.article-head, .editors-note, .footnote, .standfirst, .triple,
.connect-cta, .write-cta, .form-shell, .form, .card {
  position: relative;
}

/* top accent bar — grows on hover */
.phase, .note-card, .tri-card, .pil, .pl,
.pcard, .feature-card, .col-card, .rel-card, .matrix, .course, .tl-item {
  isolation: isolate;
}
.phase::before, .note-card::before, .tri-card::before, .pil::before, .pl::before,
.pcard::before, .feature-card::before, .col-card::before, .rel-card::before,
.matrix::before, .course::before, .tl-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}
.phase:hover::before, .note-card:hover::before, .tri-card:hover::before,
.pil:hover::before, .pl:hover::before,
.pcard:hover::before, .feature-card:hover::before, .col-card:hover::before,
.rel-card:hover::before, .matrix:hover::before, .course:hover::before,
.tl-item:hover::before {
  transform: scaleX(1);
}

/* shadow lift on hover (anchored on body for specificity over inline page styles) */
body .phase:hover, body .note-card:hover, body .tri-card:hover,
body .pil:hover, body .pl:hover,
body .pcard:hover, body .feature-card:hover, body .col-card:hover,
body .rel-card:hover, body .matrix:hover, body .course:hover,
body .tl-item:hover, body .reg-row:hover {
  box-shadow: var(--shadow-2);
}

/* ─────────────────────────────────────────────────
   STABILITY OVERRIDE · platform-wide
   No element should JUMP on hover — only stroke/colour/shadow change.
   Body-anchored selectors win over inline page-CSS that uses translateY/scale.
   ───────────────────────────────────────────────── */
body .phase:hover, body .note-card:hover, body .tri-card:hover,
body .pil:hover, body .pl:hover, body .reg-row:hover, body .reg-row-mini:hover,
body .pcard:hover, body .feature-card:hover, body .col-card:hover,
body .rel-card:hover, body .matrix:hover, body .course:hover, body .tl-item:hover,
body .article-head:hover, body .editors-note:hover, body .footnote:hover,
body .standfirst:hover, body .triple:hover, body .connect-cta:hover,
body .write-cta:hover, body .form-shell:hover, body .form:hover, body .card:hover,
body .aud:hover, body .ch:hover, body .dom:hover, body .frm:hover, body .quad:hover,
body .ac:hover, body .ip:hover, body .rs:hover, body .ai-card:hover, body .fm:hover,
body .stake:hover, body .pq-cap:hover, body .summary-card:hover, body .flow-step:hover,
body .era:hover, body .stack-layer:hover,
body .read:hover, body .read.draft:hover,
body .summary-tab:hover,
body .pq-hint:hover, body .sh-hint:hover, body .back-to-top:hover {
  transform: none !important;
}

/* IMPORTANT: do NOT add transform:none overrides for SVG <g> nodes (.pq-node, .pq-focal, .cg-node, .mg-node).
   Per CSS spec, a CSS transform property on an SVG element OVERRIDES the SVG transform="translate(x y)" attribute.
   Setting "transform: none !important" on hover would teleport hovered nodes to SVG (0,0) = top-left of viewBox.
   That was the root cause of the phantom-node-at-top-left bug. Graph CSS must NEVER set transform on these elements. */

/* Dropdown items · no transform jitter even when hovering quickly */
body .nav .dropdown a:hover { transform: none !important; }

/* eyebrow / number label shifts to accent on card hover */
.phase:hover .ph-num,
.note-card:hover .meta-r,
.tri-card:hover .tag,
.pil:hover .pn,
.pl:hover .lab,
.pcard:hover .lab,
.feature-card:hover .lab,
.col-card:hover .lab,
.rel-card:hover .lab,
.matrix:hover .lab,
.course:hover .lab,
.tl-item:hover .yr,
.reg-row:hover .cd {
  color: var(--accent);
  transition: color 0.18s ease;
}

/* form inputs · buttons · rounded */
input, textarea, select, button {
  border-radius: 8px;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

/* ─────────────────────────────────────────────────
   SCROLL REVEAL · v1 (2026-05-02)
   Pure CSS via animation-timeline: view().
   Sections, leads, and grids fade-rise as they enter the viewport.
   Fallback: instant visible (Firefox stable doesn't support yet).
   ───────────────────────────────────────────────── */

@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@supports (animation-timeline: view()) {
  .sec-h,
  .lead,
  .phases,
  .notes-grid,
  .triangle,
  .pillars,
  .reg-table,
  .grid-3,
  .matrices,
  .courses,
  .articles,
  .foundation,
  .filter-strip {
    animation: reveal-rise 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    animation-timeline: view();
    animation-range: entry 5% entry 55%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phase::before, .note-card::before, .tri-card::before, .pil::before,
  .pl::before, .pcard::before, .feature-card::before, .col-card::before,
  .rel-card::before, .matrix::before, .course::before, .tl-item::before {
    display: none;
  }
  .sec-h, .lead, .phases, .notes-grid, .triangle, .pillars,
  .reg-table, .grid-3, .matrices, .courses, .articles,
  .foundation, .filter-strip {
    animation: none;
  }
}

/* ─────────────────────────────────────────────────
   SITE-WIDE INTERACTIVE LAYER · v1 (2026-05-02)
   Reading progress · back-to-top · keyboard help ·
   external link affordance · in-page section rail.
   All driven by site.js.
   ───────────────────────────────────────────────── */

/* reading progress bar — top-pinned, scaleX'd by JS */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 200;
  pointer-events: none;
  transition: transform 0.08s linear;
}

/* back-to-top button */
.back-to-top {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  z-index: 90;
  box-shadow: var(--shadow-1);
}
.back-to-top.visible { opacity: 0.92; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
  box-shadow: var(--shadow-2);
}

/* keyboard hint chip · bottom-left */
.sh-hint {
  position: fixed;
  bottom: 22px; left: 22px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
  z-index: 89;
}
.sh-hint:hover {
  opacity: 1;
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

/* shortcut help overlay */
.shortcut-help {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 250;
  opacity: 0;
  transition: opacity 0.18s;
}
.shortcut-help.visible {
  display: flex;
  opacity: 1;
}
.shortcut-help .sh-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 32px 36px;
  min-width: 440px;
  max-width: 560px;
  box-shadow: var(--shadow-2);
}
.shortcut-help .sh-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.shortcut-help .sh-title {
  font-family: 'Source Serif 4', serif;
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.shortcut-help .sh-close {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  transition: color 0.15s, border-color 0.15s;
}
.shortcut-help .sh-close:hover { color: var(--accent); border-color: var(--accent); }
.shortcut-help .sh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}
.shortcut-help .sh-row {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Source Serif 4', serif;
  font-size: 13.5px;
  color: var(--ink-2);
}
.shortcut-help .sh-row span { margin-left: 4px; }
.shortcut-help kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
}

/* external link affordance · the ↗ */
.ext-mark {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.85em;
  color: var(--ink-3);
  transition: color 0.15s;
}
a:hover .ext-mark { color: var(--accent); }

/* in-page section rail (auto on long pages, ≥3 sections) */
.sec-rail {
  position: fixed;
  top: 50%; right: 18px;
  transform: translateY(-50%);
  z-index: 80;
  max-width: 200px;
  pointer-events: auto;
}
.sec-rail ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.sec-rail li { line-height: 1; }
.sec-rail a {
  display: block;
  padding: 6px 0 6px 18px;
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  transition: color 0.18s;
}
.sec-rail a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 8px; height: 1px;
  background: var(--rule-2);
  transform: translateY(-50%);
  transition: width 0.22s, background 0.22s;
}
.sec-rail a:hover { color: var(--accent); }
.sec-rail a:hover::before { background: var(--accent); width: 12px; }
.sec-rail a.current {
  color: var(--accent);
}
.sec-rail a.current::before {
  background: var(--accent);
  width: 14px;
  height: 2px;
}
@media (max-width: 1280px) {
  .sec-rail { display: none; }
}

/* mobile · pull back-to-top + sh-hint corner padding */
@media (max-width: 600px) {
  .back-to-top { bottom: 14px; right: 14px; width: 38px; height: 38px; }
  .sh-hint { bottom: 14px; left: 14px; }
  .shortcut-help .sh-card { min-width: auto; width: calc(100vw - 32px); padding: 24px 22px; }
  .shortcut-help .sh-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────────
 * Global responsive safety nets — applied as a final-source-order layer
 * so they win over per-page inline `<style>` rules without per-page edits.
 *
 * The pattern these address: any page-level CSS that uses fixed track
 * widths (e.g. 200px / 110px / 60px columns + 1fr) starts to squeeze the
 * 1fr column at viewports below desktop, causing text to break per-word
 * vertically. Below: at the common tablet/handheld breakpoints, force
 * those grids to stack so text columns get full width.
 * ───────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Any grid that has a literal pixel-fixed first column should drop to
     a single stacked column at tablet width. The classes below cover the
     known patterns across pages. Add to this list as new ones surface. */
  body .reg-row,
  body .lifecycle,
  body .matrices,
  body .pillars,
  body .era-grid {
    /* These already have their own breakpoint rules — leaving them; the
       safety net below targets less-defended grids. */
  }
  /* Ensure any content inside grid cells doesn't overflow horizontally */
  body .sec [class*="grid"] > * { min-width: 0; max-width: 100%; }
}

/* Prevent ANY element from causing horizontal page scroll at small widths
   (a single overflowing element shifts the whole layout).
   Use `overflow-x: clip` instead of `hidden` so position: sticky still
   works (overflow: hidden on html/body breaks sticky in many browsers). */
@media (max-width: 760px) {
  html, body { overflow-x: clip; max-width: 100%; }
  /* Catch-all · images and SVGs scale to container */
  img, svg { max-width: 100%; height: auto; }
  /* Tables inside content panels scroll inside their own wrapper */
  table { display: block; overflow-x: auto; max-width: 100%; }
  /* Pre/code blocks scroll inside their own box, never break page */
  pre, code { max-width: 100%; overflow-x: auto; }
}

/* Hero band · keep the headline readable at every width.
   Many pages have hero h1 at 50-72px which kills tablet readability. */
@media (max-width: 900px) {
  body .hero h1 { font-size: clamp(28px, 5.5vw, 56px) !important; line-height: 1.05 !important; }
  body .hero h2 { font-size: clamp(24px, 4.5vw, 40px) !important; line-height: 1.1 !important; }
  body .hero p,
  body .hero .lead { font-size: clamp(15px, 2.2vw, 18px) !important; }
}

/* ─────────────────────────────────────────────────────────────────────
 * GLOBAL RESPONSIVE SWEEP · pattern-level fixes for every page
 *
 * These catch the class-name patterns used across the platform without
 * needing per-page edits. Source order at the END of theme.css means
 * we win cleanly over inline-style-block rules for equal specificity.
 * ───────────────────────────────────────────────────────────────────── */

/* CTA bands · text+button stacks vertically on phone so the heading
   isn't squeezed into a half-width column. Covers every banded CTA on
   the platform: .cta-band (home), .waitlist (community), .register-cta
   (academy), .connect-cta (founder), .foundation (12+ chapter pages),
   .method-cta (governance), .accept (BE pages), .bridge (BE substrate).
   Add new CTA class names here as they're introduced. */
@media (max-width: 760px) {
  body .cta-band,
  body .waitlist,
  body .register-cta,
  body .connect-cta,
  body .foundation,
  body .method-cta,
  body .accept,
  body .bridge {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 26px 22px !important;
    text-align: left !important;
    border-radius: 12px !important;
  }
  /* The CTA button (last child <a>) gets full panel width with centered
     label so the call-to-action is unmissable. */
  body .cta-band > a:last-child,
  body .waitlist > a:last-child,
  body .register-cta > a:last-child,
  body .connect-cta > a:last-child,
  body .foundation > a:last-child,
  body .method-cta > a:last-child,
  body .accept > a:last-child,
  body .bridge > a:last-child {
    justify-self: stretch;
    justify-content: center;
    width: 100%;
    padding: 14px 22px !important;
    white-space: normal !important;
  }
}

/* Multi-column row patterns · stack on mobile so the leading fixed-px
   column (date / icon / pill) sits above its description instead of
   stealing 30-50% of the width and squeezing the body text into a slim
   right column. Covers .reg-row, .read (article rows), .tl-item
   (timeline rows), .layer-row, .flow-step, .faculty, .rc-pillar summary,
   .matrices items. Some pages already define their own breakpoint for
   these — this is a belt-and-braces backstop using !important. */
@media (max-width: 760px) {
  body .reg-row,
  body .read,
  body .tl-item,
  body .layer-row,
  body .flow-step,
  body .faculty,
  body .rc-pillar > summary {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: start !important;
  }
  body .read .right { text-align: left !important; }
  body .read,
  body .reg-row { padding: 16px 18px !important; }
}

/* Horizontal-scroll containers that aren't sensible on mobile · convert
   .summary-tabs (library hub) to wrap onto multiple rows like the
   subnav fix. Don't touch .subnav-inner (already wrapping at ≤760px),
   .table, pre, code (those legitimately need horizontal scroll). */
@media (max-width: 760px) {
  body .summary-tabs {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    row-gap: 4px !important;
  }
}

/* Fixed-px hero/banner element heights that overflow narrow viewports —
   most use grid or flex correctly, but some embed mini-graph SVGs that
   keep their authored dimensions. Constrain to 100% width. */
@media (max-width: 760px) {
  body .mini-graph,
  body .mini-graph svg,
  body .hero-viz,
  body .hero-viz svg,
  body .deep-art,
  body .deep-art svg { max-width: 100% !important; height: auto !important; }
}

/* Tap target minimums on mobile · Apple HIG and Google Material both
   recommend ≥44px tap targets. Chips and small buttons are often 16-22px
   tall on desktop which is fine for cursor but cramped for thumbs.
   Bump touch padding ONLY on touch-capable + small-screen devices. */
@media (max-width: 760px) {
  body .chip,
  body .filter-strip .chip,
  body .topics .chip,
  body button,
  body select,
  body .subnav-inner a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    /* Chips remain compact visually but get vertical breathing room for fingers */
  }
  body .chip,
  body .topics .chip,
  body .filter-strip .chip { padding: 6px 12px !important; }
  body .subnav-inner a { padding: 8px 12px !important; }
  /* Ensure clickable links inside dense rows are easy to tap too */
  body a[href] {
    /* No global change · per-component touch targets above handle the
       common cases; bare text links inherit body line-height */
  }
}

/* Form element mobile polish · prevents iOS zoom on focus (font-size <16px
   triggers automatic page zoom on iPhone Safari which is jarring). */
@media (max-width: 760px) {
  body input[type="text"],
  body input[type="email"],
  body input[type="tel"],
  body input[type="search"],
  body input[type="url"],
  body input[type="number"],
  body input[type="password"],
  body select,
  body textarea {
    font-size: 16px !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * TYPOGRAPHY POLISH · long-form readability across the platform
 *
 * Justified paragraphs with proper hyphenation make article-length text
 * read like a printed publication instead of a ragged-right blog post.
 * Applied selectively to long-form content (lead paragraphs, articles,
 * note bodies, methodology prose) — NOT to short UI labels, card meta,
 * or display text where justified would create ugly word spacing.
 *
 * Font rendering tweaks at the body level apply globally for crisp text
 * across browsers without affecting layout.
 * ───────────────────────────────────────────────────────────────────── */

/* Site-wide font rendering polish · cleaner glyphs on Retina + non-Retina */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Long-form paragraph justification · only on viewports wide enough to
   support clean justified spacing without big white-river gaps. Below
   ~620px we revert to left-aligned (ragged right) for readability. */
@media (min-width: 620px) {
  body .lead p,
  body article p,
  body .feature-card p,
  body .note-row p,
  body .pl p,
  body section .body p,
  body .article-body p,
  body .article-content p,
  body .post-body p,
  body .da-lead,
  body .ph-body,
  body .tri-body,
  body .summary-card p,
  body .ch p,
  body .write-cta ul li,
  body .cad p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    /* Avoid orphaned single words on the last line · helps justify look
       balanced rather than awkward at line-end. */
    text-wrap: pretty;
    /* Hyphenation tuning for English · 5-char min before/after hyphen
       so "the" doesn't get hyphenated awkwardly. */
    hyphenate-limit-chars: 9 5 3;
  }
  /* But the page-lead opening paragraph reads better LEFT-aligned
     (it's a positioning statement, not body copy) */
  body .hero p,
  body .hero .lead,
  body .hero .lede {
    text-align: left;
    hyphens: manual;
  }
}

/* Always-left text · short labels and metadata never get justified */
body .lab,
body .meta,
body .eyebrow,
body .num,
body .sub,
body .tag,
body .chip,
body footer p,
body .credits,
body .entity-line,
body .feature-card .lab,
body .feature-card .meta {
  text-align: left;
  hyphens: manual;
}

/* Reading measure · constrain very wide text columns to ~70 characters
   so eyes don't lose place at end of long lines. Already set on .lead
   in some pages (max-width: 60-64ch) · this is a backstop. */
body article p,
body .article-body p,
body .post-body p {
  max-width: 70ch;
}

/* Heading rhythm · ensure H1-H4 don't sit too tight against following
   paragraphs and that they themselves never get justified. */
body h1, body h2, body h3, body h4 {
  text-align: left;
  hyphens: manual;
}
body h1 + p, body h2 + p, body h3 + p, body h4 + p {
  margin-top: 0.6em;
}

/* Punctuation hanging · subtle but iFeed-distinctive · pulls quotes and
   dashes slightly into the margin so the optical edge stays clean. */
body .lead p,
body article p,
body .feature-card p {
  hanging-punctuation: first last;
}

/* ─────────────────────────────────────────────────────────────────────
 * NAV · BRANDED TOP BAR (round 2.11)
 *
 * Per Sunita: "top bar simple rectangle with sharp corner with no
 * background looks so dull · add visuals best across because this is
 * domain identity". The inline-style .nav rule on every page produced
 * a flat dull bar. Replaced here with a centralized brand treatment:
 *
 * - Soft accent-tinted gradient (surface → bg) instead of flat 92% bg
 * - 16px backdrop-blur + 140% saturation = glass effect over content
 * - 2px accent-tinted bottom border (was 1px rule grey)
 * - Inset 1px accent highlight at top edge = subtle brand glow
 * - 4px 18px soft shadow downward = lifts bar above content
 * - Slim heights on every viewport: ~52px desktop, ~48px mobile, ~44px
 *   phone — was 92px desktop / 92px mobile before
 *
 * Specificity: `body .nav` (0,1,1) cleanly wins over inline-style block
 * `.nav` (0,1,0) so we override 100 pages without editing each one.
 * ───────────────────────────────────────────────────────────────────── */
body .nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 92%, transparent) 0%,
      color-mix(in srgb, var(--bg) 94%, transparent) 100%) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 32%, var(--rule)) !important;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent) 18%, transparent),
    0 4px 18px oklch(15% 0.02 250 / 0.06) !important;
  transform: none !important;
}

/* Dark theme · use deeper surface gradient + softer accent border so it
   doesn't glare on a dark page */
:root[data-theme="dark"] body .nav {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 88%, transparent) 0%,
      color-mix(in srgb, var(--bg) 92%, transparent) 100%) !important;
  border-bottom-color: color-mix(in srgb, var(--accent) 26%, var(--rule)) !important;
}

/* Slim heights at every breakpoint */
body .nav .nav-inner {
  padding: 12px 32px !important;
  gap: 14px !important;
}
body .nav .brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  line-height: 1 !important;
}
body .nav .brand .nn11 {
  display: block !important;
  flex: 0 0 auto !important;
  line-height: 0 !important;
}
body .nav .brand .nn11 svg {
  display: block !important;
}
body .nav .brand .if-mark {
  display: block !important;
  line-height: 0.95 !important;
  transform: translateY(-1px);
}
body .nav .brand .nn11 { width: 60px !important; }
body .nav .brand .if-mark { font-size: 30px !important; }
@media (max-width: 960px) {
  body .nav .nav-inner { padding: 8px 16px !important; gap: 10px !important; }
  body .nav .brand .nn11 { width: 38px !important; }
  body .nav .brand .if-mark { font-size: 22px !important; }
}
@media (max-width: 640px) {
  body .nav .nav-inner { padding: 6px 14px !important; gap: 8px !important; }
  body .nav .brand .nn11 { width: 32px !important; }
  body .nav .brand .if-mark { font-size: 20px !important; }
  body .nav .nav-toggle { width: 36px !important; height: 36px !important; padding: 0 !important; }
}

/* Desktop nav-bar height now ~52px so update the breathing-space variable
   to match (was sized for 92px nav). The hero margin-bottom uses this. */
:root { --top-bar-height: 64px; }
@media (max-width: 760px) { :root { --top-bar-height: 12px; } }

/* ─────────────────────────────────────────────────────────────────────
 * MOBILE COLLAPSE PATTERN · for chapter subnav and filter chips.
 *
 * On desktop (>760px) the layout is unchanged · the toggle button is
 * hidden and chapter tabs / topic chips display inline as before.
 * On mobile the wrapped tabs/chips ate 2-4 rows of vertical space; now
 * they collapse into a single-row pill+button strip with a dropdown
 * that opens on tap. Stays sticky on scroll (parent .subnav rule).
 * ───────────────────────────────────────────────────────────────────── */

/* Desktop · keep toggle hidden, menu transparent (links flow inline) */
.subnav-toggle,
.filter-toggle,
.summary-tabs-toggle { display: none; }
.subnav-menu { display: contents; }
.filter-head { display: contents; }

@media (max-width: 760px) {
  /* SUBNAV · pill + toggle button on right · chapter links collapse to dropdown */
  /* CRITICAL · subnav-inner has overflow-x:auto on desktop for horizontal scroll
     of long chapter strips. On mobile the dropdown menu is absolutely-positioned
     BELOW the subnav and was being clipped by this overflow. Force visible so
     the dropdown panel can render outside the inner box. */
  .subnav,
  .subnav-inner {
    overflow: visible !important;
  }
  .subnav-inner {
    flex-wrap: nowrap !important;
    align-items: center !important;
    column-gap: 8px !important;
    position: relative;
  }
  .subnav .domain-tag {
    width: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    flex-shrink: 0;
  }
  /* Hide the originally-inline chapter links · they move into .subnav-menu via JS */
  .subnav-inner > a { display: none !important; }

  /* Toggle button · sits right side of the pill */
  .subnav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    min-height: 32px;
    flex-shrink: 0;
  }
  .subnav-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .subnav-toggle .st-icon {
    transition: transform 0.18s ease;
    font-size: 11px;
    color: var(--ink-3);
  }
  .subnav.is-open .subnav-toggle {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
  }
  .subnav.is-open .subnav-toggle .st-icon {
    transform: rotate(180deg);
    color: var(--accent);
  }

  /* Dropdown menu · positioned absolutely beneath the subnav · panel-style */
  .subnav-menu {
    display: none !important;
    position: absolute;
    top: calc(100% - 1px);
    right: 12px;
    left: 12px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 8px 6px;
    margin-top: 8px;
    box-shadow: 0 18px 48px oklch(15% 0.02 250 / 0.22);
    z-index: 60;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
  }
  .subnav.is-open .subnav-menu { display: flex !important; }
  .subnav-menu a {
    display: block !important;
    width: 100% !important;
    padding: 11px 14px !important;
    font-size: 11px !important;
    letter-spacing: 0.12em !important;
    border-bottom: 0 !important;
    border-radius: 8px;
    text-align: left !important;
    background: transparent !important;
    white-space: normal !important;
  }
  .subnav-menu a:hover {
    background: color-mix(in srgb, var(--accent-bg) 60%, transparent) !important;
  }
  .subnav-menu a.current {
    background: var(--accent-bg) !important;
    color: var(--accent) !important;
    border-left: 3px solid var(--accent) !important;
    padding-left: 11px !important;
  }

  /* FILTER STRIP · compact pill-only row on mobile · label hidden,
     just the Topics pill flush right · ~36px tall */
  .filter-strip {
    padding: 6px 0 !important;
    border-bottom: 0 !important;
  }
  .filter-head {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
  }
  .filter-strip .fl-label {
    display: none !important;
  }
  .filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.15s;
    min-height: 32px;
    flex-shrink: 0;
  }
  .filter-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .filter-toggle .ft-icon { transition: transform 0.18s ease; font-size: 11px; color: var(--ink-3); }
  .filter-strip.is-open .filter-toggle {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
  }
  .filter-strip.is-open .filter-toggle .ft-icon { transform: rotate(180deg); color: var(--accent); }
  /* Chips collapsed by default on mobile · expanded when .is-open */
  .filter-strip .chips {
    display: none !important;
    padding-top: 10px;
  }
  .filter-strip.is-open .chips {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* SUMMARY-TABS · library hub cross-domain lens · button + dropdown
     Same visual language as filter-toggle and subnav-toggle. The button
     sits ABOVE the tabs row; the tabs row collapses to flex-column when
     .is-open so each tab spans full width as a tappable list item. */
  .summary-tabs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 8px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.15s;
    min-height: 36px;
    margin: 0 0 14px;
  }
  .summary-tabs-toggle .stt-pre { color: var(--ink-3); }
  .summary-tabs-toggle .stt-label { color: var(--accent); font-weight: 500; }
  .summary-tabs-toggle .stt-icon { transition: transform 0.18s ease; font-size: 11px; color: var(--ink-3); margin-left: auto; }
  .summary-tabs-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .summary-tabs-toggle.is-open {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
  }
  .summary-tabs-toggle.is-open .stt-icon { transform: rotate(180deg); color: var(--accent); }

  body .summary-tabs {
    display: none !important;
    flex-direction: column !important;
    overflow-x: visible !important;
    border-bottom: 0 !important;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 18px;
  }
  body .summary-tabs.is-open { display: flex !important; }
  body .summary-tabs .summary-tab {
    width: 100%;
    text-align: left;
    border-bottom: 0 !important;
    border-radius: 8px;
    padding: 12px 14px !important;
    font-size: 11px !important;
  }
  body .summary-tabs .summary-tab.active {
    background: var(--accent-bg);
    color: var(--accent) !important;
    border-bottom: 0 !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * Generic responsive 4-column grid for "At a glance" headline blocks.
 * Desktop = 4 columns · tablet = 2 · mobile = 1.
 * Used in place of inline grid-template-columns overrides.
 * ───────────────────────────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .grid-4 { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────────────────────────────
 * .cta-band (newsletter / register CTA) · stacks text-then-button on
 * narrow screens so the heading isn't squeezed into a 50% column.
 * Mobile order: text block first, button below at full width.
 * ───────────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  body .cta-band {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 26px 22px !important;
    text-align: left;
  }
  body .cta-band > a {
    justify-self: stretch;
    justify-content: center;
    width: 100%;
    padding: 14px 22px !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * Section header (.sec-h) cross-page responsiveness
 * Inline rules in each page declare a 3-column grid (110px 1fr auto) which
 * starts squeezing the H2 column at ~900px causing words to break vertical.
 * Below: ensure children can shrink, and stack into a single column
 * (left-aligned, uniform) on narrow screens so the heading reads cleanly.
 * Specificity bumped via `body` so the page-level rules don't override us.
 * ───────────────────────────────────────────────────────────────────── */
/* Global grid-child safety · prevents content from being squeezed below
   its intrinsic min-content (which is what causes H2s to break per-word) */
.sec-h,
.sec-h > * { min-width: 0; max-width: 100%; }

/* Global word-wrap safety nets · headings and lead paragraphs break at
   normal word boundaries, never per-letter-vertical, with hyphenation as
   a last resort. Scopes to the elements that actually had overflow issues. */
.sec-h h2,
.sec-h h3,
.sec-h .num,
.sec-h .sub,
.lead,
.lead p,
.hero h1,
.hero h2,
.hero p,
.pl h4,
.read h4,
.rc-card,
h1, h2, h3, h4 {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
/* But never let a single long token (e.g. a URL) break the layout */
.lead, .lead p, .hero p { overflow-wrap: anywhere; }

/* .sec-h responsive · stacks to single column at ≤1100px (was 900px) so
   the H2 doesn't get squeezed into a narrow middle column at tablet widths.
   Smooth font-size with clamp so it scales between 22px and 30px instead
   of an abrupt drop. */
@media (max-width: 1100px) {
  body .sec-h {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: start !important;
    text-align: left !important;
  }
  body .sec-h h2 {
    font-size: clamp(22px, 3.4vw, 30px) !important;
    text-align: left !important;
    line-height: 1.2 !important;
  }
  body .sec-h h3 {
    font-size: clamp(20px, 3vw, 26px) !important;
    text-align: left !important;
  }
  body .sec-h .num,
  body .sec-h .sub {
    text-align: left !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * Mobile artifact discipline · keep the home banner artifact, hide the
 * second large below-banner artifact on every page EXCEPT methodology
 * (where both are conceptually load-bearing). The banner artifact stays.
 *
 * .deep-art-shell is the secondary "deep-art" wrapper that prev sessions
 * named for the 11 below-banner artefacts. On methodology page we add
 * `body.page-methodology` so the rule below can opt out.
 * ───────────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  /* Hide the second/below-banner artefact on every page EXCEPT the
     methodology page (which needs both) AND the home page (where the
     hero artefact stacks below the banner per Sunita's directive). */
  body:not(.page-methodology):not(.page-home) .deep-art-shell,
  body:not(.page-methodology):not(.page-home) .below-banner-art {
    display: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * DESKTOP BLEND · ROUNDED-CARD VISUAL SYSTEM (round 2.14)
 *
 * Per Sunita: 'also apply same for desktop site'. The mobile rounded-
 * pill rhythm extends to desktop with scaled-up values: floating nav,
 * rounded hero, rounded subnav, rounded footer. Centered max-width
 * matches the .wrap content rhythm (1180px) so cards align cleanly.
 * ───────────────────────────────────────────────────────────────────── */
@media (min-width: 961px) {
  /* DESKTOP NAV · centered floating pill · gap 10px (round 2.19) */
  body .nav {
    margin: 10px auto 0 !important;
    max-width: 1250px !important;
    width: calc(100% - 24px) !important;
    border-radius: 18px !important;
    border: 0 !important;
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 96%, transparent) 0%,
      color-mix(in srgb, var(--bg) 92%, transparent) 100%) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.60),
      inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
      0 1px 2px oklch(15% 0.02 250 / 0.06),
      0 4px 14px oklch(15% 0.02 250 / 0.10),
      0 14px 36px oklch(15% 0.02 250 / 0.14) !important;
    position: sticky !important;
    top: 10px !important;
  }
  :root[data-theme="dark"] body .nav {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.10),
      inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
      0 2px 4px oklch(8% 0.02 250 / 0.32),
      0 8px 18px oklch(8% 0.02 250 / 0.36),
      0 18px 44px oklch(8% 0.02 250 / 0.40) !important;
  }
  /* HERO · global on desktop (round 2.21 · was scoped to body.page-home,
     now applied to every page per Sunita's approval). Card occupies
     most of the first viewport · width matches nav · top hood + theme
     toggle relocation already global from round 2.19. */
  body .hero {
    margin: 28px auto 120px !important;         /* round 2.22 · larger gap below banner (was 80) */
    max-width: 1250px !important;               /* matches nav width */
    width: calc(100% - 24px) !important;
    border-radius: 20px !important;
    overflow: hidden;
    border: 1px solid var(--rule-2);
    box-shadow: 0 6px 18px oklch(15% 0.02 250 / 0.06);
    padding-top: 24px !important;
    padding-bottom: 20px !important;
    /* Card occupies most of first viewport · clean landing (no contamination) */
    min-height: clamp(440px, 76vh, 720px) !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }
  body .hero h1 {
    font-size: clamp(34px, 4vw, 48px) !important;
    line-height: 1.05 !important;
    margin-bottom: 12px !important;
  }
  body .hero .lede,
  body .hero .lead,
  body .hero p {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
  body .hero .eyebrow {
    margin-bottom: 10px !important;
    font-size: 10px !important;
  }
  /* Same gap on banner-canvas heroes · was previously overriding to 32px
     which was the cause of the cramped feel. Now matches the base .hero. */
  body .hero.hero-banner-canvas { margin-bottom: 120px !important; }

  /* DEEP-ART-SHELL · big artifact section · aligned to banner symmetry
     (round 2.27 · per Sunita: 'in all big artifacts we were having size
     and designed which doesn't aligned with banner symmetry'). Now a
     contained rounded card matching the floating hero card exactly:
     same max-width, same lateral inset, same border-radius, same
     border + shadow treatment. Reads as a continuation of the card
     system rather than a full-width band. */
  body section.deep-art-shell {
    margin: 0 auto 80px !important;
    max-width: 1250px !important;
    width: calc(100% - 24px) !important;
    border-radius: 20px !important;
    border: 1px solid var(--rule-2) !important;
    box-shadow: 0 6px 18px oklch(15% 0.02 250 / 0.05) !important;
    padding: 48px 0 !important;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%) !important;
    overflow: hidden;
  }
  /* Tighten internal wrap padding so content uses the card width */
  body section.deep-art-shell .wrap {
    padding-left: 36px !important;
    padding-right: 36px !important;
  }
  /* SUBNAV · matching card */
  body .subnav {
    margin: 12px auto 0 !important;
    max-width: 1212px !important;
    width: calc(100% - 32px) !important;
    border-radius: 16px !important;
    border: 1px solid var(--rule-2) !important;
    overflow: hidden;
    box-shadow: 0 2px 10px oklch(15% 0.02 250 / 0.04);
  }
  /* Subnav inner padding stays · just the wrapper card rounds */
  /* FOOTER · rounded card to bookend desktop too */
  body footer {
    margin: 36px auto 18px !important;
    max-width: 1212px !important;
    width: calc(100% - 32px) !important;
    border-radius: 20px !important;
    background: var(--surface) !important;
    border: 1px solid var(--rule-2);
    overflow: hidden;
    padding: 56px 40px !important;
  }
  /* Sticky offsets rebalanced · subnav/filter sit below the floating nav */
  body .filter-strip,
  body .filter-bar { top: 92px !important; }
  body .subnav[style*="position: sticky"], body .subnav { top: 92px !important; }
}

/* ─────────────────────────────────────────────────────────────────────
 * MOBILE BLEND · ROUNDED-CARD VISUAL SYSTEM (round 2.13)
 *
 * Per Sunita: 'banner is still plane square with sharp corners · blend
 * every visual well'. The floating pill nav (round 2.12) introduced
 * rounded geometry that needs to extend to the rest of the page so the
 * mobile UI reads as one cohesive system.
 *
 * Strategy: lateral 10px inset + 14px corners on hero, subnav, footer ·
 * matches the pill nav exactly. Background sections (.sec) keep flowing
 * but content cards inside already have their own rounded treatments.
 * ───────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  *,
  *::before,
  *::after { box-sizing: border-box; }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body main,
  body .wrap,
  body .hero,
  body .hero.hero-banner-canvas,
  body .hero-grid,
  body .signal-diagram,
  body .hero-viz {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body .hero,
  body .hero.hero-banner-canvas {
    width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
  }

  body .hero-grid,
  body .hero.hero-banner-canvas .hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .hero.hero-banner-canvas {
    display: block !important;
  }

  body .hero h1,
  body .hero.hero-banner-canvas h1 {
    font-size: clamp(28px, 8.4vw, 36px) !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }

  body .signal-diagram svg,
  body .hero-viz svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* HERO BANNER · rounded card with lateral inset matching the pill nav
     Round 2.22 · larger gap below banner on mobile too (proportional) */
  body .hero {
    margin-left: 10px !important;
    margin-right: 10px !important;
    margin-top: 10px !important;
    margin-bottom: 48px !important;             /* round 2.22 · was implicit */
    border-radius: 16px !important;
    overflow: hidden;
    border: 1px solid var(--rule-2);
    box-shadow: 0 4px 14px oklch(15% 0.02 250 / 0.05);
  }
  body .hero.hero-banner-canvas { margin-bottom: 48px !important; }
  /* SUBNAV · rounded card immediately below hero · same inset rhythm */
  body .subnav {
    margin: 8px 10px 0 !important;
    border-radius: 14px !important;
    border: 1px solid var(--rule-2) !important;
    background: color-mix(in srgb, var(--bg-2) 96%, transparent) !important;
    overflow: hidden;
    box-shadow: 0 2px 8px oklch(15% 0.02 250 / 0.04);
  }
  /* FILTER strips · same inset card style */
  body .filter-strip,
  body .filter-bar,
  body .domain-filter {
    margin-left: 10px !important;
    margin-right: 10px !important;
    border-radius: 14px !important;
    border: 1px solid var(--rule-2) !important;
    overflow: hidden;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  /* Stacked filter pairs · second one nests close to the first with tiny gap */
  body .filter-strip + .domain-filter {
    margin-top: 6px !important;
  }
  /* FOOTER · rounded card to bookend the page */
  body footer {
    margin: 16px 10px 12px !important;
    border-radius: 16px !important;
    background: var(--surface) !important;
    border: 1px solid var(--rule-2);
    overflow: hidden;
    padding: 28px 18px 24px !important;
  }
  /* Sections · keep flowing (no inset) so content reads as one column;
     but ensure they have soft top spacing from preceding rounded card */
  body .sec { padding-left: 10px !important; padding-right: 10px !important; }
  /* Cards inside .sec already round, but ensure cta-band and feature-card
     sit cleanly with the inset rhythm */
  body .cta-band,
  body .feature-card,
  body .waitlist,
  body .register-cta,
  body .connect-cta,
  body .foundation,
  body .method-cta,
  body .accept,
  body .bridge {
    border-radius: 14px !important;
  }
  /* Nav margin already at 8 10 0 from round 2.12 · hero margin-top: 10
     leaves a small 2px breathing gap below the nav's drop shadow */
}

/* ─────────────────────────────────────────────────────────────────────
 * MOBILE STICKY NAV CONTRACT · platform-wide · 2026-05-31
 *
 * Applies to Library and all pages using the shared iFeed shell.
 * Use overflow-x: clip, not hidden: hidden creates a body scroll container
 * on mobile browsers and breaks sticky nav/subnav during page scroll.
 * Pages with a .subnav keep both bars fixed; pages without .subnav keep
 * only the main nav fixed.
 * ───────────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  html,
  body {
    overflow-x: clip !important;
    overflow-y: visible !important;
    max-width: 100% !important;
  }

  body .nav,
  html.focus-page body .nav {
    position: sticky !important;
    top: 6px !important;
    z-index: 900 !important;
    transform: none !important;
    will-change: auto !important;
  }

  body .subnav {
    position: sticky !important;
    top: 66px !important;
    z-index: 840 !important;
    overflow: visible !important;
    transform: none !important;
    will-change: auto !important;
  }

  body .subnav-inner {
    overflow: visible !important;
  }

  body:has(.nav.open) .subnav {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

@media (max-width: 640px) {
  body .subnav {
    top: 64px !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * FOCUS-PAGE SECOND NAV CONTRACT · desktop · 2026-05-31
 *
 * Library, Regulations, and AI chapter/workspace pages must use the same
 * second-nav behavior: one row, centered shell, horizontal scroll when
 * labels are long. This overrides older page-local Library styles that
 * allowed wrapping and created a two-row nav card.
 * ───────────────────────────────────────────────────────────────────── */
@media (min-width: 761px) {
  body .subnav {
    position: sticky !important;
    top: 92px !important;
    z-index: 80 !important;
    margin: 12px auto 0 !important;
    max-width: 1212px !important;
    width: calc(100% - 32px) !important;
    border-radius: 16px !important;
    border: 1px solid var(--rule-2) !important;
    background: color-mix(in srgb, var(--bg) 94%, transparent) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px oklch(15% 0.02 250 / 0.04) !important;
  }

  body .subnav-inner {
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 12px 32px !important;
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 10.5px !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
  }

  body .subnav-inner::-webkit-scrollbar { display: none !important; }

  body .subnav .domain-tag {
    position: sticky !important;
    left: 0 !important;
    z-index: 2 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    color: var(--accent) !important;
    background: color-mix(in srgb, var(--bg) 96%, transparent) !important;
    box-shadow: 16px 0 20px color-mix(in srgb, var(--bg) 88%, transparent) !important;
    padding: 8px 16px !important;
    border: 1px solid var(--accent) !important;
    border-radius: 999px !important;
    margin: 0 4px 0 0 !important;
    letter-spacing: 0.03em !important;
    font-family: 'Newsreader', serif !important;
    font-style: italic !important;
    font-size: 15px !important;
    text-transform: none !important;
  }

  body .subnav a,
  body .subnav-inner a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    color: var(--ink-2) !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid transparent !important;
    border-radius: 0 !important;
  }

  body .subnav a:hover,
  body .subnav a.current,
  body .subnav-inner a:hover,
  body .subnav-inner a.current {
    color: var(--accent) !important;
    border-bottom-color: var(--accent) !important;
    background: transparent !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * DESKTOP NAV LAYER CONTRACT · platform-wide · 2026-05-31
 *
 * Main cluster dropdowns (Library / Regulations / AI / Notes once added)
 * must always sit above the second in-workspace nav. Earlier pages gave
 * .subnav a higher stacking layer than the main nav, so dropdown panels
 * visually slipped underneath the chapter bar on Library/Regulations/AI
 * pages. Keep this as the shared layer rule; do not solve per page.
 * ───────────────────────────────────────────────────────────────────── */
@media (min-width: 761px) {
  body .nav {
    z-index: 1200 !important;
    overflow: visible !important;
    isolation: isolate !important;
  }

  body .nav-inner,
  body .nav .links,
  body .nav .has-dropdown {
    overflow: visible !important;
  }

  body .nav .dropdown {
    z-index: 1250 !important;
  }

  body .subnav {
    z-index: 800 !important;
  }
}

/*
 * SPECIALIST DRAWER DROPDOWNS · W20/W21/W22 focus pages · 2026-05-31
 * The titled weekly/checklist nav uses a right-side drawer instead of the
 * full desktop nav. site.js injects the same Library / Regulations / AI /
 * Notes clusters into that drawer, and this keeps them compact and local.
 */
html.w20-page .w20-drawer .has-dropdown,
html.focus-page .w20-drawer .has-dropdown {
  display: block;
}

html.w20-page .w20-drawer .has-dropdown > a,
html.focus-page .w20-drawer .has-dropdown > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html.w20-page .w20-drawer .has-dropdown .caret,
html.focus-page .w20-drawer .has-dropdown .caret {
  font-size: 10px;
  opacity: 0.68;
}

html.w20-page .w20-drawer .has-dropdown .dropdown,
html.focus-page .w20-drawer .has-dropdown .dropdown {
  position: static !important;
  display: none;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0 0 8px 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

html.w20-page .w20-drawer .has-dropdown.is-open .dropdown,
html.focus-page .w20-drawer .has-dropdown.is-open .dropdown {
  display: block;
}

html.w20-page .w20-drawer .has-dropdown .dropdown a,
html.focus-page .w20-drawer .has-dropdown .dropdown a {
  padding: 9px 0;
  border-bottom-color: color-mix(in srgb, var(--rule) 72%, transparent);
  font-size: 10px;
  letter-spacing: 0.11em;
}
