/* ============================================================
   Portfolio — design system
   Inspired by v2.ericsin.com: dark-first, restrained editorial,
   PPNeueMontreal-alike geometric sans, grouped sidebar, grid tiles.
   ============================================================ */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  /* Surfaces (light) */
  --borders-primary: #e8e8ea;
  --bg-primary: #ffffff;
  --bg-secondary: #f9f8f9;
  --bg-tertiary: #eeedef;
  --bg-hover: #eeedef;

  /* Foregrounds (light) */
  --fg-primary: #282a2f;
  --fg-secondary: #3e424b;
  --fg-tertiary: #8c8b8c;

  /* Accents */
  --accent: #5a82ff;

  /* Layout */
  --sidebar-w: 15rem;              /* 240px, matches ericsin reference */
  --content-max: 46.25rem;         /* 740px, matches reference main */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 520ms;

  /* Type */
  --font-sans: "Satoshi", "PP Neue Montreal", "Inter", ui-sans-serif,
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

html.dark {
  --borders-primary: #23252b;
  --bg-primary: #08090a;
  --bg-secondary: #1c1c1f;
  --bg-tertiary: #28282c;
  --bg-hover: #28282c;

  --fg-primary: #ffffff;
  --fg-secondary: #d0d6e0;
  --fg-tertiary: #8a8f98;
}

/* Default to dark before JS to avoid FOUC */
html { background: #08090a; color: #fff; }
html.light { background: #ffffff; color: #282a2f; }

/* ---------- Reset + base ---------- */

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

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

/* Scroll, never see — hide scrollbars across the whole site (every browser
   engine). Native scroll behavior stays intact; only the visible track/thumb
   is suppressed. Applied universally so no nested scroll containers leak. */
html, body, *, *::before, *::after {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg-primary);
  color: var(--fg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Belt-and-suspenders: clamp horizontal scroll on mobile (any rogue full-bleed
     element shouldn't push the page wider than the viewport). */
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--fg-primary);
  color: var(--bg-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout shell ---------- */

.shell {
  min-height: 100vh;
  display: block;
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: fixed;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  width: var(--sidebar-w);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 40;
  background: var(--bg-primary);
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem;
  border-radius: var(--radius-md);
  transition: background-color var(--dur) var(--ease);
}
.brand:hover { background: var(--bg-hover); }

.brand-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--fg-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-avatar svg { width: 0.9rem; height: 0.9rem; color: var(--fg-primary); }
.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Tight face crop: scale into the photo and anchor the zoom on the face,
     which sits slightly above center. .brand-avatar has overflow:hidden so
     the extra 40% doesn't bleed past the rounded square. */
  object-position: 50% 22%;
  transform: scale(1.4);
  transform-origin: 50% 30%;
  display: block;
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}
.brand-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-primary);
}

.nav-group { display: flex; flex-direction: column; gap: 0.25rem; }
.nav-group + .nav-group { margin-top: 0.5rem; }

.nav-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  padding: 0.375rem 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 0.875rem;
  line-height: 1.25rem;
  opacity: 0.5;
  transition: background-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-link:hover { background: var(--bg-hover); opacity: 0.8; }
.nav-link.is-active { background: var(--bg-tertiary); opacity: 1; }

/* Nested section nav (case-study pages). Appears only when the
   active project link has sibling .case-section[data-section-id]
   blocks on the page. Scroll-spy keeps the current section lit. */
.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin: 0.25rem 0 0.5rem 0;
  padding-left: 0;
  border-left: none;
}
.nav-sublink {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 0.875rem;
  line-height: 1.35;
  text-decoration: none;
  opacity: 0.45;
  border: 1px solid transparent;
  background: transparent;
  transition: background-color var(--dur) var(--ease), opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
  /* Each sublink drifts in from a touch above. Long durations with a tight
     stagger (50ms) mean adjacent links overlap heavily — no staircase pop,
     just a continuous cascade. Pure ease-out keeps the motion smooth on both
     ends. will-change avoids subpixel jitter on the transform. */
  animation: navSubLinkIn 780ms cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  will-change: transform, opacity;
}
@keyframes navSubLinkIn {
  from { opacity: 0; transform: translateY(-4px); }
}
.nav-sub > .nav-sublink:nth-child(1) { animation-delay: 100ms; }
.nav-sub > .nav-sublink:nth-child(2) { animation-delay: 150ms; }
.nav-sub > .nav-sublink:nth-child(3) { animation-delay: 200ms; }
.nav-sub > .nav-sublink:nth-child(4) { animation-delay: 250ms; }
.nav-sub > .nav-sublink:nth-child(5) { animation-delay: 300ms; }
.nav-sub > .nav-sublink:nth-child(6) { animation-delay: 350ms; }
.nav-sub > .nav-sublink:nth-child(7) { animation-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .nav-sub, .nav-sublink { animation: none !important; }
}
.nav-sublink:hover { opacity: 0.85; background: var(--bg-hover); }
.nav-sublink.is-active {
  opacity: 1;
  color: var(--fg-primary);
  background: transparent;
  border-color: var(--borders-primary);
}

.nav-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.9;
}

.sidebar-spacer { flex: 1; }

/* Clock */
.clock {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem;
}
.clock-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.clock-readout {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}
.clock-sep { color: var(--fg-tertiary); }

/* Social + theme toggle row */
.sidebar-utils {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem;
}
.icon-btn {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--fg-secondary);
  background: var(--bg-tertiary);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--fg-primary); }
.icon-btn svg { width: 0.8rem; height: 0.8rem; }

.theme-toggle-fixed {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-secondary) 80%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--borders-primary);
}
.theme-toggle-fixed button {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--fg-tertiary);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.theme-toggle-fixed button[aria-pressed="true"] {
  color: var(--fg-primary);
  background: var(--bg-tertiary);
}
.theme-toggle-fixed button:hover { color: var(--fg-secondary); }
.theme-toggle-fixed svg { width: 0.9rem; height: 0.9rem; }

/* ---------- Main / content ---------- */

main {
  margin-left: calc(var(--sidebar-w) + 1.5rem);
  padding: 3rem 2rem 6rem;
  min-height: 100vh;
}

.page {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-wide {
  max-width: 64rem;
}

/* ---------- Type helpers ---------- */

.eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  font-weight: 500;
}

.display {
  font-size: clamp(1.75rem, 2.2vw + 0.8rem, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg-primary);
}

.subtitle {
  font-size: clamp(1.75rem, 2.2vw + 0.8rem, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg-tertiary);
}

.lede {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg-secondary);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  margin: 2rem 0 1rem;
}

/* ---------- Back link ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--fg-tertiary);
  padding: 0.25rem 0;
  transition: color var(--dur) var(--ease);
}
.back-link:hover { color: var(--fg-primary); }
.back-link svg { width: 0.875rem; height: 0.875rem; }

/* ---------- Meta table (project detail) ---------- */

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  padding: 0.5rem 0 0;
}
.meta-cell { display: flex; flex-direction: column; gap: 0.35rem; }
.meta-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-tertiary);
}
.meta-value {
  font-size: 0.875rem;
  color: var(--fg-primary);
  line-height: 1.5;
}

/* ---------- Project hero ---------- */

.hero-tile {
  margin-top: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--borders-primary);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--fg-tertiary);
}
.hero-tile--accent-1 { background: linear-gradient(135deg, #5ab6e8, #0f6fb5); }
.hero-tile--accent-2 { background: linear-gradient(135deg, #111, #1f1f24); }
.hero-tile--accent-3 { background: linear-gradient(135deg, #1a4b4c, #0a2324); }
.hero-tile--accent-4 { background: linear-gradient(135deg, #3a2a5b, #11132b); }
.hero-tile--accent-5 { background: linear-gradient(135deg, #5a3aa8, #2a1d4e); }

/* ---------- Home / overview ---------- */

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.status-card {
  background: var(--bg-secondary);
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-md);
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.status-kicker {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-tertiary);
}
.status-body {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.status-thumb {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.status-text { font-size: 0.85rem; color: var(--fg-primary); line-height: 1.3; }
.status-meta { font-size: 0.7rem; color: var(--fg-tertiary); }

/* Project grid (if overview lists projects) */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: var(--radius-md);
  transition: transform var(--dur) var(--ease);
}
.project-card:hover { transform: translateY(-2px); }

.project-thumb {
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--borders-primary);
  background: var(--bg-secondary);
  display: grid;
  place-items: center;
  color: var(--fg-tertiary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform var(--dur-slow) var(--ease), filter var(--dur) var(--ease);
}
.project-card:hover .project-thumb { filter: brightness(1.05); }
.project-thumb--1 { background: linear-gradient(135deg, #5ab6e8, #0f6fb5); color: #fff; }
.project-thumb--2 { background: linear-gradient(135deg, #111, #1f1f24); color: #9aa; }
.project-thumb--3 { background: linear-gradient(135deg, #1a4b4c, #0a2324); color: #cfe; }
.project-thumb--4 { background: linear-gradient(135deg, #3a2a5b, #11132b); color: #cdf; }

.project-info { display: flex; flex-direction: column; gap: 0.1rem; padding: 0 0.125rem; }
.project-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.005em;
}
.project-sub {
  font-size: 0.75rem;
  color: var(--fg-tertiary);
  letter-spacing: 0.02em;
}

/* ---------- Dividers ---------- */
.rule {
  height: 1px;
  background: var(--borders-primary);
  border: 0;
  width: 100%;
  margin: 0;
}

/* ---------- Footer note ---------- */

.foot {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--borders-primary);
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--fg-tertiary);
  letter-spacing: 0.04em;
}

/* ---------- Entry animations ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  }
  .reveal-stagger.is-in > * { opacity: 1; transform: none; }
  .reveal-stagger.is-in > *:nth-child(1) { transition-delay: 40ms; }
  .reveal-stagger.is-in > *:nth-child(2) { transition-delay: 100ms; }
  .reveal-stagger.is-in > *:nth-child(3) { transition-delay: 160ms; }
  .reveal-stagger.is-in > *:nth-child(4) { transition-delay: 220ms; }
  .reveal-stagger.is-in > *:nth-child(5) { transition-delay: 280ms; }
  .reveal-stagger.is-in > *:nth-child(6) { transition-delay: 340ms; }
}

/* ---------- Focus ---------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

.mobile-toggle { display: none; }

@media (max-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--borders-primary);
    border-radius: 0;
    backdrop-filter: blur(10px);
    background: color-mix(in oklab, var(--bg-primary) 85%, transparent);
  }
  .brand { flex: 1; }
  .sidebar-spacer, .clock, .sidebar-utils, .nav-group { display: none; }
  .nav-group.is-open { display: flex; }
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--borders-primary);
    color: var(--fg-primary);
    font-size: 0.8rem;
  }

  /* Slide-over nav */
  .mobile-nav {
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--borders-primary);
    padding: 0.75rem 1rem 1.25rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 30;
  }
  .mobile-nav.is-open { display: flex; }
  .mobile-nav .nav-label { padding: 0.5rem 0 0.25rem; }

  main {
    margin-left: 0;
    padding: 1.75rem 1.25rem 4rem;
  }

  .project-grid,
  .status-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MetLife case-study extensions
   Scoped via body[data-route="metlife"] so other pages are unaffected.
   ============================================================ */

body[data-route="metlife"] {
  --accent: #8b5cf6;             /* MetLife-purple tilt */
  --accent-soft: #a78bfa;
  --accent-bg: rgba(139, 92, 246, 0.12);
  --metlife-green: #00a94f;      /* used sparingly, matches live UI */
  --metlife-green-soft: rgba(0, 169, 79, 0.14);
}

/* Homepage tile for MetLife — distinct treatment */
.project-thumb--metlife {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(139, 92, 246, 0.55) 0%, transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(0, 169, 79, 0.35) 0%, transparent 55%),
    #0b0a18;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

/* Wider reading column on the case-study page, but still restrained */
body[data-route="metlife"] .page {
  display: block;          /* negative margins on .bleed only work outside flex */
  max-width: 52rem;
}
body[data-route="metlife"] .page > * + * {
  margin-top: 0;           /* rely on .case-section padding for rhythm */
}

.case-section { padding: 3rem 0 1rem; }
.case-section:first-of-type { padding-top: 0.5rem; }
.case-section + .case-section { border-top: 1px solid var(--borders-primary); }
.case-section .eyebrow { margin-bottom: 0.75rem; display: block; }
.case-section h2 { margin: 0 0 0.75rem; }
.case-section .lede + .lede { margin-top: 0.75rem; }

/* Section heading pattern */
.case-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.case-heading .case-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-soft);
  letter-spacing: 0.08em;
}
.case-heading h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-primary);
}

/* Full-bleed panel that breaks out of the reading column — for
   framework embeds and full-width UI captures. */
.bleed {
  /* Break out of .page's 52rem reading column into the full main width.
     Desktop extend = 9rem on each side (52rem + 2×9rem = 70rem cap).
     On narrower viewports we scale down to avoid overflow. */
  width: calc(100% + 18rem);
  margin-left: -9rem;
  margin-right: -9rem;
  max-width: none;
  position: relative;
}
@media (max-width: 1180px) {
  .bleed {
    width: calc(100% + 12rem);
    margin-left: -6rem;
    margin-right: -6rem;
  }
}
@media (max-width: 900px) {
  .bleed {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
@media (max-width: 900px) {
  .bleed {
    width: 100%;
    margin-left: 0;
  }
}

/* ---------- Meta strip (role / client / etc.) ---------- */

.meta-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--borders-primary);
  border-bottom: 1px solid var(--borders-primary);
  margin-top: 1.5rem;
}
.meta-strip .meta-cell { gap: 0.3rem; }
.meta-strip .meta-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}
.meta-strip .meta-value {
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .meta-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Hero with project UI ---------- */

.hero-ui {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--borders-primary);
  background: #0a0a12;
  margin-top: 1.5rem;
  aspect-ratio: 3 / 2;
  position: relative;
}
.hero-ui img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.hero-ui::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 72%, rgba(8,9,10,.4) 100%);
  pointer-events: none;
}

/* ---------- Pain-point list ---------- */

.pain-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.pain-list li {
  padding: 1rem 1.125rem;
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pain-list li strong {
  font-size: 0.875rem;
  color: var(--fg-primary);
  font-weight: 600;
}
.pain-list li span {
  font-size: 0.85rem;
  color: var(--fg-tertiary);
  line-height: 1.5;
}
@media (max-width: 900px) {
  .pain-list { grid-template-columns: 1fr; }
}

/* ---------- Agent cards (strategic response) ---------- */

.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
  margin-top: 1rem;
}
.agent-card {
  padding: 1rem 1.125rem;
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, var(--accent-bg) 0%, transparent 50%),
    var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.agent-card .agent-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-soft);
  letter-spacing: 0.12em;
}
.agent-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-primary);
  margin: 0;
}
.agent-card p {
  font-size: 0.85rem;
  color: var(--fg-tertiary);
  line-height: 1.5;
  margin: 0;
}
@media (max-width: 900px) {
  .agent-grid { grid-template-columns: 1fr; }
}

/* ---------- Design principles ---------- */

.principle-list {
  counter-reset: principle;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}
.principle-list li {
  counter-increment: principle;
  padding: 0.875rem 1.125rem 0.875rem 3rem;
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  position: relative;
}
.principle-list li::before {
  content: '0' counter(principle);
  position: absolute;
  left: 1rem;
  top: 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-soft);
  letter-spacing: 0.1em;
}
.principle-list li strong {
  display: block;
  color: var(--fg-primary);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.principle-list li span {
  color: var(--fg-tertiary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---------- UI callouts (solution walkthrough) ---------- */

.ui-callout {
  padding: 2rem 0;
}
.ui-callout + .ui-callout { border-top: 1px solid var(--borders-primary); }

.ui-callout h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg-primary);
  margin: 0 0 0.5rem;
}
.ui-callout .lede { margin-bottom: 1rem; }
.ui-callout ul {
  padding-left: 1rem;
  margin: 0.5rem 0 0;
  color: var(--fg-tertiary);
  font-size: 0.875rem;
  line-height: 1.55;
}
.ui-callout ul li { margin: 0.2rem 0; }

.ui-shot {
  margin-top: 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--borders-primary);
  background: #0a0a12;
  position: relative;
}
.ui-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.ui-shot-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--borders-primary);
  font-size: 0.75rem;
  color: var(--fg-tertiary);
  background: var(--bg-secondary);
}
.ui-shot-caption .tag {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--metlife-green-soft);
  color: #5ed17e;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
  text-transform: uppercase;
}

/* When a native UI frame is inside .hero-ui / .ui-shot, disable the
   image-era chrome so the frame's own border/radius/caption stand
   alone.  Uses :has() — supported in all modern evergreen browsers. */
.hero-ui:has(.met-frame),
.ui-shot:has(.met-frame) {
  border: none;
  background: transparent;
  overflow: visible;
  aspect-ratio: auto;
  padding-bottom: 2.25rem; /* leaves room for the frame caption */
}
.hero-ui:has(.met-frame)::after { content: none; }
.hero-ui:has(.met-frame) { margin-top: 1.5rem; padding-bottom: 0; }

/* ---------- Scannable problem grid (01/02/03 pattern) ---------- */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.problem-card {
  border-left: 1px solid var(--borders-primary);
  padding-left: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.problem-card .problem-num {
  display: inline-block;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-tertiary);
  padding: 2px 7px;
  border: 1px solid var(--borders-primary);
  border-radius: 4px;
  letter-spacing: 0.08em;
}
.problem-card h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg-primary);
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0;
}
.problem-card p {
  font-size: 0.9375rem;
  color: var(--fg-tertiary);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 880px) {
  .problem-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* Let the case-study page breathe more — reference uses tall sections */
body[data-route="metlife"] .case-section { padding: 5rem 0 1rem; }
body[data-route="metlife"] .case-section:first-of-type { padding-top: 0; }
body[data-route="metlife"] .case-section .eyebrow { margin-bottom: 1.25rem; }
body[data-route="metlife"] .display { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.02em; }
body[data-route="metlife"] .lede { font-size: 1.0625rem; line-height: 1.6; }
body[data-route="metlife"] .ui-callout { padding: 0; }
body[data-route="metlife"] .ui-callout + .ui-callout { border-top: none; padding-top: 0; }

/* Interface section — eyebrow + headline + 1-line lede */
body[data-route="metlife"] .interface-section { padding: 4.5rem 0 0; }
body[data-route="metlife"] .interface-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg-primary);
  margin: 0.75rem 0 0.625rem;
}
body[data-route="metlife"] .interface-section .lede {
  font-size: 1rem;
  margin: 0 0 1.5rem;
  max-width: 46rem;
}

/* Tighter 3-column agent grid for "four agents" section */
body[data-route="metlife"] .agent-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 780px) {
  body[data-route="metlife"] .agent-grid { grid-template-columns: 1fr; }
}
body[data-route="metlife"] .agent-card { padding: 1.25rem 1.375rem; }
body[data-route="metlife"] .agent-card h4 { font-size: 1.0625rem; margin: 0.2rem 0 0.375rem; }
body[data-route="metlife"] .agent-card p { font-size: 0.9375rem; line-height: 1.55; }

/* Clean up stat grid — bigger numbers, less cluttered */
body[data-route="metlife"] .stat-grid { margin-top: 2rem; }


/* ---------- Stats (outcomes) ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.5rem;
  border-top: 1px solid var(--borders-primary);
  border-bottom: 1px solid var(--borders-primary);
}
.stat {
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--borders-primary);
}
.stat:last-child { border-right: 0; }
.stat-big {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-primary);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.stat-big .unit {
  font-size: 1.25rem;
  color: var(--accent-soft);
  font-weight: 500;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--fg-tertiary);
  line-height: 1.4;
}
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--borders-primary); }
  .stat:last-child { border-bottom: 0; }
}

/* ---------- Framework embed wrapper — solid panel backdrop ---------- */

.framework-embed {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 2rem 2.25rem 2.25rem;
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 20px 50px -30px rgba(0, 0, 0, 0.5);
  position: relative;
}
html.light .framework-embed {
  box-shadow:
    0 1px 2px rgba(16, 17, 20, 0.04),
    0 16px 40px -20px rgba(16, 17, 20, 0.12);
}
@media (max-width: 900px) {
  .framework-embed { padding: 1.25rem 1.125rem 1.5rem; }
}
.framework-embed__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--borders-primary);
  background: transparent;
}
.framework-embed__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.framework-embed__title .fe-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.framework-embed__body {
  padding: 0;
  background: transparent;
  overflow: hidden;
}
.framework-embed__body.fe-scale-body {
  position: relative;
}
.fe-scale-target {
  display: block;
  transform-origin: top left;
  will-change: transform;
}

/* Card entry animation — staggered by renderer-supplied --i */
@keyframes framework-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.framework-embed .uni-map__card {
  animation: framework-card-in 460ms cubic-bezier(0.22, 0.7, 0.28, 1) both;
  animation-delay: calc(min(var(--i, 0), 28) * 22ms);
  transition:
    transform 180ms cubic-bezier(0.22, 0.7, 0.28, 1),
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
  will-change: transform;
}
.framework-embed .uni-map__card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--accent-soft) 35%, var(--borders-primary));
  background: color-mix(in oklab, var(--accent-bg) 40%, var(--bg-secondary));
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .framework-embed .uni-map__card {
    animation: none;
    transition: none;
  }
  .framework-embed .uni-map__card:hover { transform: none; }
}

/* ---------- Framework carousel ---------- */

.framework-carousel {
  margin-top: 1.75rem;
  margin-bottom: 1rem;
}
.fc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.fc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  flex: 1 1 auto;
  min-width: 0;
}
.fc-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg-tertiary);
  background: transparent;
  border: 1px solid var(--borders-primary);
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms cubic-bezier(.22,.7,.28,1);
  white-space: nowrap;
}
.fc-tab:hover {
  color: var(--fg-secondary);
  border-color: var(--fg-tertiary);
  transform: translateY(-1px);
}
.fc-tab.is-active {
  color: var(--fg-primary);
  border-color: color-mix(in oklab, var(--accent-soft) 55%, transparent);
  background: color-mix(in oklab, var(--accent-bg) 75%, transparent);
}
.fc-tab__icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent-soft);
  flex-shrink: 0;
}
.fc-tab:not(.is-active) .fc-tab__icon { color: var(--fg-tertiary); }

.fc-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.fc-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--fg-tertiary);
  padding: 0 0.25rem;
}
.fc-nav-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--fg-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--borders-primary);
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.fc-nav-btn:hover {
  color: var(--fg-primary);
  border-color: var(--accent-soft);
  background: color-mix(in oklab, var(--accent-bg) 60%, var(--bg-secondary));
}
.fc-nav-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-slides { position: relative; }
.fc-slide { display: none; }
.fc-slide.is-active {
  display: block;
  animation: fc-slide-in 380ms cubic-bezier(.22,.7,.28,1) both;
}
@keyframes fc-slide-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Universal caption — plain text, same treatment everywhere */
.fc-caption {
  margin: 1.25rem 0 0;
  max-width: 52rem;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--fg-secondary);
}
.fc-caption strong {
  color: var(--fg-primary);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .fc-slide.is-active { animation: none; }
  .fc-tab { transition: none; }
  .fc-tab:hover { transform: none; }
}

/* ---------- UI placeholder (temporary frame for incoming screens) ---------- */

.ui-placeholder {
  width: 100%;
  border-radius: 14px;
  border: 1px dashed var(--borders-primary);
  background: color-mix(in oklab, var(--bg-secondary) 40%, transparent);
  display: grid;
  place-items: center;
  position: relative;
}
.ui-placeholder--hero { aspect-ratio: 3 / 2; }
.ui-placeholder--app  { aspect-ratio: 16 / 10; }
.ui-placeholder__label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.hero-ui:has(.ui-placeholder),
.ui-shot:has(.ui-placeholder) {
  border: none;
  background: transparent;
  overflow: visible;
  aspect-ratio: auto;
  padding-bottom: 0;
}
.hero-ui:has(.ui-placeholder)::after { content: none; }

/* ---------- UniversalMap renderer (our own, uses portfolio tokens) ---------- */

.uni-map {
  display: grid;
  gap: 0.5rem;
}
.uni-map__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-primary);
  margin: 0 0 0.25rem;
}
.uni-map__subtitle {
  font-size: 0.8rem;
  color: var(--fg-tertiary);
  margin-bottom: 0.75rem;
}

/* Grid: [row-label] + N cols. Widths adapt: 2 cols = wide; 6 cols = scrollable. */
.uni-map__grid {
  display: grid;
  gap: 6px;
  grid-template-columns: 130px repeat(var(--cols, 6), minmax(120px, 1fr));
}
.uni-map__grid--no-labels {
  grid-template-columns: repeat(var(--cols, 6), minmax(160px, 1fr));
}
/* When we have 5+ cols the grid becomes too dense — let it scroll horizontally */
.uni-map__grid[style*="--cols:6"],
.uni-map__grid[style*="--cols:7"],
.uni-map__grid[style*="--cols:8"],
.uni-map__grid[style*="--cols:9"] {
  grid-template-columns: 130px repeat(var(--cols), minmax(150px, 1fr));
  min-width: 880px;
}

.uni-map__col-head {
  padding: 0.5rem 0.6rem 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--borders-primary);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.uni-map__col-icon {
  display: inline-flex;
  color: var(--accent-soft);
  flex-shrink: 0;
}
.uni-map__col-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uni-map__col-head--numbered::before {
  content: counter(uni-col);
  counter-increment: uni-col;
  position: absolute;
  top: 0.35rem;
  right: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-soft);
  font-weight: 400;
}
.uni-map__grid { counter-reset: uni-col; }
.uni-map__spacer { /* empty top-left cell */ }

.uni-map__row-label {
  padding: 0.5rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border-radius: var(--radius-sm);
}
.uni-map__row-icon {
  display: inline-flex;
  color: var(--accent-soft);
  flex-shrink: 0;
}
.uni-map__row-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uni-stack__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.uni-stack__head-icon,
.uni-stack__row-icon {
  display: inline-flex;
  color: var(--accent-soft);
  flex-shrink: 0;
}
.uni-stack__head-icon svg,
.uni-stack__row-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uni-stack__row-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.uni-map__row-label .kind {
  margin-left: auto;
  font-size: 0.6rem;
  color: var(--fg-tertiary);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.uni-map__cell {
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 3.5rem;
  border-radius: var(--radius-sm);
  background: transparent;
}
.uni-map__cell:empty::before {
  content: '';
  display: block;
  height: 100%;
  border: 1px dashed var(--borders-primary);
  border-radius: var(--radius-sm);
  opacity: 0.35;
  min-height: 3rem;
}

.uni-map__card {
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--borders-primary);
  background: var(--bg-secondary);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--fg-secondary);
}
.uni-map__card strong { color: var(--fg-primary); font-weight: 600; }
.uni-map__card em.hl {
  font-style: normal;
  background: var(--accent-bg);
  color: var(--accent-soft);
  padding: 0 0.2rem;
  border-radius: 3px;
}

/* Row kind tints — very subtle */
.uni-map__row--emotion .uni-map__cell { background: rgba(139, 92, 246, 0.06); }
.uni-map__row--pain .uni-map__cell,
.uni-map__row--pains .uni-map__cell { background: rgba(239, 68, 68, 0.06); }
.uni-map__row--opportunity .uni-map__cell,
.uni-map__row--gains .uni-map__cell,
.uni-map__row--opportunities .uni-map__cell { background: rgba(34, 197, 94, 0.05); }

/* Emotion curve — overlay line across emotion row */
.uni-map__emotion-curve {
  grid-column: 2 / -1;
  height: 40px;
  position: relative;
  margin: -0.25rem 0 0;
}
.uni-map__emotion-curve svg { width: 100%; height: 100%; }

/* 2x2 matrix layout (cols=2, rows=2) — full quadrant styling */
.uni-map--matrix .uni-map__grid {
  grid-template-columns: 150px repeat(var(--cols), 1fr);
}
.uni-map--matrix .uni-map__cell {
  min-height: 8rem;
  border: 0;
  padding: 0.25rem;
  background: transparent;
}

/* Affinity (no rows) */
.uni-map--affinity .uni-map__cell { min-height: 4rem; }

/* Loading / error states */
.uni-map--loading {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--fg-tertiary);
  font-size: 0.8rem;
}
.uni-map--error {
  min-height: 120px;
  padding: 1rem;
  color: #f99;
  font-size: 0.85rem;
}

/* Vertical column-stack (affinity, JTBD) — reads top-to-bottom on page */
.uni-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.uni-stack__col {
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--bg-primary) 70%, transparent);
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.uni-stack__head {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-weight: 600;
  border-bottom: 1px solid var(--borders-primary);
  padding-bottom: 0.5rem;
}
.uni-stack__row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.uni-stack__row-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.uni-stack__cards {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.uni-stack__row--pains { color: inherit; }
.uni-stack__row--pains .uni-stack__row-label { color: #f99; }
.uni-stack__row--gains .uni-stack__row-label { color: #8fd89b; }
.uni-stack__col--pains { background: rgba(239,68,68,0.05); }
.uni-stack__col--gains { background: rgba(34,197,94,0.05); }

/* Hide kind chip on col headers — most are layout hints anyway */
.uni-map__col-head .kind { display: none; }
.uni-map__row-label .kind { display: none; }

/* Connectors list (below grid) */
.uni-map__connectors {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--borders-primary);
  font-size: 0.75rem;
  color: var(--fg-tertiary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}
.uni-map__connector {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.uni-map__connector::before {
  content: '→';
  color: var(--accent-soft);
}

/* ---------- Reflections block ---------- */

.reflections {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}
.reflections blockquote {
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--accent-soft);
  margin: 0;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--fg-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  font-family: var(--font-body);
}
.reflections blockquote footer {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--fg-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: 0;
  padding: 0;
  display: block;
}

/* ---------- Section tag chip (ericsin-style) ---------- */
/* Additive, uses existing tokens — no design-system changes. */
.case-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--borders-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 1.25rem;
}

/* Breathing room between the section figure (image or carousel) and the caption lede that follows it. */
.case-section .hero-tile + .lede,
.case-section .framework-carousel + .lede {
  margin-top: 1.75rem;
}

/* Headline to figure spacing */
.case-section .section-title + .hero-tile,
.case-section .section-title + .framework-carousel {
  margin-top: 1.5rem;
}

/* ---------- Project 05 (Research Frameworks) case-study overrides ---------- */
/* Declutters per the ericsin reference: no dividers, body font matches the
   site's geometric sans (same family used in headings), more air between
   sections, and figures break out horizontally beyond the reading column. */

/* Widen the page column + switch to block so figures can use negative
   margins to extend past the text-width on both sides (ericsin pattern). */
body[data-route="project-05"] .page {
  display: block;
  max-width: 52rem;
}
body[data-route="project-05"] .page > * + * {
  margin-top: 2rem;
}

/* Extend figures beyond the reading column on each side (hero + section figures) */
body[data-route="project-05"] .hero-tile,
body[data-route="project-05"] .outcome-frame {
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
}
/* Collapse the extension on narrower viewports so nothing overflows `main` */
@media (max-width: 1100px) {
  body[data-route="project-05"] .hero-tile,
  body[data-route="project-05"] .outcome-frame {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* No divider lines between sections */
body[data-route="project-05"] .case-section + .case-section {
  border-top: 0;
}

/* Chapter-level spacing between sections. Combined with .page > * + * margin (2rem),
   total section-to-section gap is ~9rem. The first section after the hero image
   gets the same full spacing, not a tighter one-off. */
body[data-route="project-05"] .case-section {
  padding: 7rem 0 0;
}

/* Section headline — restrained, single readable line */
body[data-route="project-05"] .case-section .section-title {
  margin: 1.5rem 0 2rem;
  font-family: var(--font-sans);
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 46rem;
}

/* Tight space between section-title and the first block element beneath it */
body[data-route="project-05"] .case-section .section-title + .lede,
body[data-route="project-05"] .case-section .section-title + .outcome-frame,
body[data-route="project-05"] .case-section .section-title + .framework-carousel,
body[data-route="project-05"] .case-section .section-title + .overview-pillars,
body[data-route="project-05"] .case-section .section-title + .screen {
  margin-top: 0;
}

/* Lede paragraph followed by an image/carousel/metrics block: breathing room before the visual */
body[data-route="project-05"] .case-section .lede + .outcome-frame,
body[data-route="project-05"] .case-section .lede + .framework-carousel,
body[data-route="project-05"] .case-section .lede + .overview-pillars.outcome-metrics {
  margin-top: 2rem;
}
body[data-route="project-05"] .case-section .lede + .screen {
  margin-top: 2.5rem;
}

/* Body copy: same geometric face as the reference + headings (Satoshi / PP Neue Montreal) */
body[data-route="project-05"] .case-section .lede,
body[data-route="project-05"] .fc-caption {
  font-family: var(--font-sans);
  font-size: 0.9375rem;   /* 15px */
  line-height: 1.7;
  color: var(--fg-secondary);
}
body[data-route="project-05"] .case-section .lede + .lede {
  margin-top: 0.875rem;
}

/* No divider under the framework-embed header */
body[data-route="project-05"] .framework-embed__header {
  border-bottom: 0;
  margin-bottom: 1rem;
  padding-bottom: 0;
}

/* Framework cards render at fit-to-viewport scale. Non-interactive. */
body[data-route="project-05"] .framework-embed__body {
  height: clamp(440px, 60vh, 600px);
  overflow: hidden;
  position: relative;
  background: transparent;
  border: 0;
}
body[data-route="project-05"] .fe-panzoom-target {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* ---------- Outcome-section exhibits (ericsin-style framed UIs) ---------- */
body[data-route="project-05"] .outcome-figure {
  margin: 2rem 0 0;
}
body[data-route="project-05"] .outcome-figure + .outcome-figure {
  margin-top: 2.5rem;
}
body[data-route="project-05"] .outcome-frame {
  /* Always uses the dark-mode shade regardless of page theme — outcome
     exhibits stay in a consistent presentation frame. */
  background: #1c1c1f;
  border-radius: 18px;
  padding: clamp(28px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.28),
    0 4px 12px rgba(0, 0, 0, 0.14);
}
body[data-route="project-05"] .outcome-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.14);
}
body[data-route="project-05"] .outcome-cap {
  margin-top: 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--fg-secondary);
}
body[data-route="project-05"] .outcome-cap strong {
  color: var(--fg-primary);
  font-weight: 600;
}
body[data-route="project-05"] .outcome-cap em {
  color: var(--fg-primary);
  font-style: normal;
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

/* Graceful placeholder when the PNG isn't on disk yet */
body[data-route="project-05"] .outcome-frame img[alt]:not([src])::before,
body[data-route="project-05"] .outcome-frame img:not([src*=".png"])::before {
  content: "Drop PNG at: projects/project-05/assets/outcome/";
}
body[data-route="project-05"] .outcome-frame img::before {
  content: attr(alt);
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 10;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 30, 0.06);
  border: 1px dashed rgba(10, 12, 30, 0.18);
  border-radius: 8px;
  color: rgba(10, 12, 30, 0.45);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2rem;
  text-align: center;
}
body[data-route="project-05"] .outcome-frame--dark img::before {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.55);
}

/* Scroll-reveal: the framed UIs fade + lift into place as they enter the viewport.
   JS adds .is-reveal on load and .is-visible when the element crosses the threshold. */
body[data-route="project-05"] .outcome-frame.is-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
body[data-route="project-05"] .outcome-frame.is-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  body[data-route="project-05"] .outcome-frame.is-reveal,
  body[data-route="project-05"] .outcome-frame.is-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Individual screen block inside the Screens section: design-principle title + body lede above
   a framed UI. Nothing below the frame. */
body[data-route="project-05"] .screen {
  margin-top: 6rem;
}
body[data-route="project-05"] .screen:first-of-type {
  margin-top: 0;
}
body[data-route="project-05"] .case-tag + .screen {
  margin-top: 2.5rem;
}
body[data-route="project-05"] .screen-title {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 42rem;
}
body[data-route="project-05"] .screen-lede {
  margin: 0 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--fg-secondary);
  max-width: 42rem;
}
body[data-route="project-05"] .screen .outcome-frame {
  margin-top: 0;
}
body[data-route="project-05"] .screen .outcome-frame + .outcome-frame {
  margin-top: 1.5rem;
}

/* Overview pillars — three numbered columns under the section intro */
body[data-route="project-05"] .overview-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
body[data-route="project-05"] .overview-pillar {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.25rem 0 0.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
html.light body[data-route="project-05"] .overview-pillar {
  border-left-color: rgba(10, 12, 30, 0.16);
}
body[data-route="project-05"] .pillar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--fg-secondary);
  width: fit-content;
  line-height: 1;
}
html.light body[data-route="project-05"] .pillar-num {
  border-color: rgba(10, 12, 30, 0.2);
}
body[data-route="project-05"] .pillar-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg-primary);
  margin: 0;
  letter-spacing: -0.005em;
}
body[data-route="project-05"] .pillar-body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0;
}
@media (max-width: 820px) {
  body[data-route="project-05"] .overview-pillars {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Impacts metrics row — bigger stat number, no mono chip */
body[data-route="project-05"] .overview-pillars.outcome-metrics {
  margin-top: 2rem;
  gap: 2rem;
}
body[data-route="project-05"] .outcome-metrics .overview-pillar {
  gap: 0.75rem;
}
body[data-route="project-05"] .outcome-metrics .metric-value {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 2.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg-primary);
}
body[data-route="project-05"] .outcome-metrics .pillar-body {
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ===========================================================
   rcm (Meridian) — scoped block, mirrors project-05 pattern.
   =========================================================== */

/* Homepage tile for Meridian */
.project-thumb--meridian {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(56, 189, 248, 0.45) 0%, transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(45, 212, 191, 0.38) 0%, transparent 55%),
    #071018;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

body[data-route="rcm"] .page {
  display: block;
  max-width: 52rem;
}
body[data-route="rcm"] .page > * + * {
  margin-top: 2rem;
}

body[data-route="rcm"] .hero-tile,
body[data-route="rcm"] .outcome-frame {
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
}
@media (max-width: 1100px) {
  body[data-route="rcm"] .hero-tile,
  body[data-route="rcm"] .outcome-frame {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

body[data-route="rcm"] .case-section + .case-section {
  border-top: 0;
}

body[data-route="rcm"] .case-section {
  padding: 7rem 0 0;
}

body[data-route="rcm"] .case-section .section-title {
  margin: 1.5rem 0 2rem;
  font-family: var(--font-sans);
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 46rem;
}

body[data-route="rcm"] .case-section .section-title + .lede,
body[data-route="rcm"] .case-section .section-title + .outcome-frame,
body[data-route="rcm"] .case-section .section-title + .overview-pillars,
body[data-route="rcm"] .case-section .section-title + .screen {
  margin-top: 0;
}

body[data-route="rcm"] .case-section .lede + .outcome-frame,
body[data-route="rcm"] .case-section .lede + .overview-pillars.outcome-metrics {
  margin-top: 2rem;
}
body[data-route="rcm"] .case-section .overview-pillars.outcome-metrics + .lede {
  margin-top: 3.5rem;
}
body[data-route="rcm"] .case-section .lede + .screen {
  margin-top: 2.5rem;
}

body[data-route="rcm"] .case-section .lede {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg-secondary);
}
body[data-route="rcm"] .case-section .lede + .lede {
  margin-top: 0.875rem;
}

/* ---------- Outcome-section exhibits ----------
   rcm UIs are light-themed, so the frame tracks the page theme
   (light cream in light mode, dark in dark mode) instead of the
   hardcoded MetLife shade. Shadows are a single soft, gradient-like
   halo rather than a hard cast — no doubled shadows (frame + image). */
body[data-route="rcm"] .outcome-frame {
  background: var(--bg-secondary);
  border-radius: 18px;
  padding: clamp(28px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 60px 120px -40px rgba(10, 12, 30, 0.14),
    0 10px 24px -8px rgba(10, 12, 30, 0.05);
  border: 1px solid var(--borders-primary);
}
html.dark body[data-route="rcm"] .outcome-frame {
  background: #23242a;
  box-shadow:
    0 60px 120px -40px rgba(0, 0, 0, 0.55),
    0 10px 24px -8px rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
body[data-route="rcm"] .outcome-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  /* No drop shadow on the image itself — the frame's single halo carries
     the elevation. Stacking two shadows reads as a nested frame. */
  box-shadow: none;
}
html.dark body[data-route="rcm"] .outcome-frame img {
  box-shadow: none;
}

/* Explicitly dark exhibits (the journey diagram) always use the dark shade
   regardless of page theme — the image itself is dark-themed. */
body[data-route="rcm"] .outcome-frame--dark {
  background: #23242a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.16);
}
body[data-route="rcm"] .outcome-frame--dark img {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.14);
}

body[data-route="rcm"] .outcome-frame img[alt]:not([src])::before,
body[data-route="rcm"] .outcome-frame img:not([src*=".png"])::before {
  content: "Drop PNG at: projects/rcm/";
}
body[data-route="rcm"] .outcome-frame img::before {
  content: attr(alt);
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 10;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 30, 0.06);
  border: 1px dashed rgba(10, 12, 30, 0.18);
  border-radius: 8px;
  color: rgba(10, 12, 30, 0.45);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2rem;
  text-align: center;
}
body[data-route="rcm"] .outcome-frame--dark img::before {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.55);
}

/* Scroll-reveal */
body[data-route="rcm"] .outcome-frame.is-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
body[data-route="rcm"] .outcome-frame.is-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  body[data-route="rcm"] .outcome-frame.is-reveal,
  body[data-route="rcm"] .outcome-frame.is-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Screens */
body[data-route="rcm"] .screen {
  margin-top: 6rem;
}
body[data-route="rcm"] .screen:first-of-type {
  margin-top: 0;
}
body[data-route="rcm"] .case-tag + .screen {
  margin-top: 2.5rem;
}
body[data-route="rcm"] .screen-title {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 42rem;
}
body[data-route="rcm"] .screen-lede {
  margin: 0 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--fg-secondary);
  max-width: 42rem;
}
body[data-route="rcm"] .screen .outcome-frame {
  margin-top: 0;
}

/* Overview pillars */
body[data-route="rcm"] .overview-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
body[data-route="rcm"] .overview-pillar {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.25rem 0 0.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
html.light body[data-route="rcm"] .overview-pillar {
  border-left-color: rgba(10, 12, 30, 0.16);
}
body[data-route="rcm"] .pillar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--fg-secondary);
  width: fit-content;
  line-height: 1;
}
html.light body[data-route="rcm"] .pillar-num {
  border-color: rgba(10, 12, 30, 0.2);
}
body[data-route="rcm"] .pillar-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg-primary);
  margin: 0;
  letter-spacing: -0.005em;
}
body[data-route="rcm"] .pillar-body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0;
}
@media (max-width: 820px) {
  body[data-route="rcm"] .overview-pillars {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Impacts metrics */
body[data-route="rcm"] .overview-pillars.outcome-metrics {
  margin-top: 2rem;
  gap: 2rem;
}
body[data-route="rcm"] .outcome-metrics .overview-pillar {
  gap: 0.75rem;
}
body[data-route="rcm"] .outcome-metrics .metric-value {
  font-family: var(--font-sans);
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--fg-primary);
  white-space: nowrap;
}
body[data-route="rcm"] .outcome-metrics .pillar-body {
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Framework embed: allow body to grow to match scaled content (carousel
   script sets inline height). No fixed cap, no vertical centering. */
body[data-route="rcm"] .framework-embed__body {
  height: auto;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  background: transparent;
  border: 0;
}
body[data-route="rcm"] .fe-panzoom-target {
  position: relative;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  display: block;
}

/* Decorative chrome SVG banner rendered above the grid. Sits inside the
   uni-map container, absolutely layered behind the grid's header row so
   the framework's identity (venn, concentric, diamond, funnel, kano) reads
   without interfering with card content. */
body[data-route="rcm"] .uni-map {
  position: relative;
}
body[data-route="rcm"] .uni-map__chrome {
  display: block;
  width: 100%;
  height: 180px;
  margin: 0 0 -80px;
  pointer-events: none;
  opacity: 0.85;
}
body[data-route="rcm"] .uni-map__chrome svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* Concentric chrome (persona portrait) gets a square aspect. */
body[data-route="rcm"] .uni-map--chrome-concentric .uni-map__chrome {
  height: 240px;
  margin-bottom: -120px;
}
body[data-route="rcm"] .uni-map--chrome-concentric .uni-map__chrome svg {
  max-width: 320px;
  margin: 0 auto;
}

/* ===========================================================
   project-03 (Mahogany) — scoped block, mirrors rcm pattern
   with added video treatment for interaction exhibits.
   =========================================================== */

/* Homepage tile for Mahogany. Warm wood tones matching the name. */
.project-thumb--mahogany {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(180, 83, 48, 0.55) 0%, transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(92, 43, 22, 0.58) 0%, transparent 60%),
    #2a140a;
  color: rgba(255, 248, 240, 0.94);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

body[data-route="project-03"] .page {
  display: block;
  max-width: 52rem;
}
body[data-route="project-03"] .page > * + * {
  margin-top: 2rem;
}

body[data-route="project-03"] .hero-tile,
body[data-route="project-03"] .outcome-frame {
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
}
@media (max-width: 1100px) {
  body[data-route="project-03"] .hero-tile,
  body[data-route="project-03"] .outcome-frame {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

body[data-route="project-03"] .case-section + .case-section {
  border-top: 0;
}

body[data-route="project-03"] .case-section {
  padding: 7rem 0 0;
}

body[data-route="project-03"] .case-section .section-title {
  margin: 1.5rem 0 2rem;
  font-family: var(--font-sans);
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 46rem;
}

body[data-route="project-03"] .case-section .section-title + .lede,
body[data-route="project-03"] .case-section .section-title + .outcome-frame,
body[data-route="project-03"] .case-section .section-title + .framework-carousel,
body[data-route="project-03"] .case-section .section-title + .overview-pillars,
body[data-route="project-03"] .case-section .section-title + .screen {
  margin-top: 0;
}

body[data-route="project-03"] .case-section .lede + .outcome-frame,
body[data-route="project-03"] .case-section .lede + .framework-carousel,
body[data-route="project-03"] .case-section .lede + .overview-pillars.outcome-metrics {
  margin-top: 2rem;
}
body[data-route="project-03"] .case-section .lede + .screen {
  margin-top: 2.5rem;
}

body[data-route="project-03"] .case-section .lede {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg-secondary);
}
body[data-route="project-03"] .case-section .lede + .lede {
  margin-top: 0.875rem;
}

/* Inline callouts: code-ish terms flagged with <em>, same treatment as rcm
   so product vocabulary (search_products, emit_story, affiliation:FDA) reads
   as a technical anchor rather than italic emphasis. */
body[data-route="project-03"] .lede em,
body[data-route="project-03"] .screen-lede em {
  color: var(--fg-primary);
  font-style: normal;
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  letter-spacing: 0.01em;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
}

/* ---------- Outcome-section exhibits ----------
   Light-themed UIs live in frames that track the page theme (cream in light
   mode, dark in dark). Video exhibits get the same frame as images. */
body[data-route="project-03"] .outcome-frame {
  background: var(--bg-secondary);
  border-radius: 18px;
  padding: clamp(28px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 60px 120px -40px rgba(10, 12, 30, 0.14),
    0 10px 24px -8px rgba(10, 12, 30, 0.05);
  border: 0;
}
html.dark body[data-route="project-03"] .outcome-frame {
  background: #1c1c1f;
  box-shadow:
    0 60px 120px -40px rgba(0, 0, 0, 0.5),
    0 10px 24px -8px rgba(0, 0, 0, 0.22);
  border: 0;
}
body[data-route="project-03"] .outcome-frame img,
body[data-route="project-03"] .outcome-frame video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: none;
  object-fit: cover;
  background: rgba(10, 12, 30, 0.04);
}
html.dark body[data-route="project-03"] .outcome-frame img,
html.dark body[data-route="project-03"] .outcome-frame video {
  background: rgba(255, 255, 255, 0.03);
}

body[data-route="project-03"] .outcome-frame--hero {
  padding: 0;
}
body[data-route="project-03"] .outcome-frame--hero video,
body[data-route="project-03"] .outcome-frame--hero img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
}

/* Explicitly dark exhibits (process timeline, mission agent loop, story detail)
   always use the dark shade regardless of page theme. */
body[data-route="project-03"] .outcome-frame--dark {
  background: #1c1c1f;
  border-color: transparent;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.28),
    0 4px 12px rgba(0, 0, 0, 0.14);
}
body[data-route="project-03"] .outcome-frame--dark img,
body[data-route="project-03"] .outcome-frame--dark video {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.14);
}

/* Placeholder rendering when the asset isn't on disk yet. alt text shows as
   a monospace caption inside a dashed frame so the missing asset is
   obvious during build without breaking layout. */
body[data-route="project-03"] .outcome-frame img[alt]:not([src])::before,
body[data-route="project-03"] .outcome-frame img:not([src*=".png"])::before,
body[data-route="project-03"] .outcome-frame video:not([src*=".mp4"])::before {
  content: "Drop asset at: projects/project-03/assets/outcome/";
}
body[data-route="project-03"] .outcome-frame img::before,
body[data-route="project-03"] .outcome-frame video::before {
  content: attr(alt);
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 10;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 30, 0.06);
  border: 1px dashed rgba(10, 12, 30, 0.18);
  border-radius: 8px;
  color: rgba(10, 12, 30, 0.45);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2rem;
  text-align: center;
}
body[data-route="project-03"] .outcome-frame--dark img::before,
body[data-route="project-03"] .outcome-frame--dark video::before {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.55);
}

/* Scroll-reveal */
body[data-route="project-03"] .outcome-frame.is-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
body[data-route="project-03"] .outcome-frame.is-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  body[data-route="project-03"] .outcome-frame.is-reveal,
  body[data-route="project-03"] .outcome-frame.is-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Screens */
body[data-route="project-03"] .screen {
  margin-top: 6rem;
}
body[data-route="project-03"] .screen:first-of-type {
  margin-top: 0;
}
body[data-route="project-03"] .case-tag + .screen {
  margin-top: 2.5rem;
}
body[data-route="project-03"] .screen-title {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 42rem;
}
body[data-route="project-03"] .screen-lede {
  margin: 0 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--fg-secondary);
  max-width: 42rem;
}
body[data-route="project-03"] .screen .outcome-frame {
  margin-top: 0;
}

/* Overview pillars */
body[data-route="project-03"] .overview-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
body[data-route="project-03"] .overview-pillar {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.25rem 0 0.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
html.light body[data-route="project-03"] .overview-pillar {
  border-left-color: rgba(10, 12, 30, 0.16);
}
body[data-route="project-03"] .pillar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--fg-secondary);
  width: fit-content;
  line-height: 1;
}
html.light body[data-route="project-03"] .pillar-num {
  border-color: rgba(10, 12, 30, 0.2);
}
body[data-route="project-03"] .pillar-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg-primary);
  margin: 0;
  letter-spacing: -0.005em;
}
body[data-route="project-03"] .pillar-body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0;
}
@media (max-width: 820px) {
  body[data-route="project-03"] .overview-pillars {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Overview pillar icons — lo-fi one-idea marks */
body[data-route="project-03"] .overview-pillars--visual .overview-pillar {
  gap: 1rem;
}
body[data-route="project-03"] .pillar-icon {
  width: 40px;
  height: 40px;
  color: var(--fg-secondary);
  opacity: 0.85;
}
body[data-route="project-03"] .pillar-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
body[data-route="project-03"] .pillar-icon .pi-accent {
  stroke: #b45330;
}
body[data-route="project-03"] .pillar-icon .pi-accent-fill {
  fill: rgba(180, 83, 48, 0.18);
  stroke: #b45330;
}
body[data-route="project-03"] .pillar-icon .pi-waterline {
  stroke: #b45330;
  opacity: 0.6;
}

/* Impacts metrics */
body[data-route="project-03"] .overview-pillars.outcome-metrics {
  margin-top: 2rem;
  gap: 2rem;
}
body[data-route="project-03"] .outcome-metrics .overview-pillar {
  gap: 0.75rem;
}
body[data-route="project-03"] .outcome-metrics .metric-value {
  font-family: var(--font-sans);
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #5bd39a;
  white-space: nowrap;
}
body[data-route="project-03"] .outcome-metrics .pillar-body {
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Framework embed: same treatment as rcm — allow body to grow with scaled
   content so frameworks fill the div end to end. */
body[data-route="project-03"] .framework-embed__header {
  border-bottom: 0;
  margin-bottom: 1rem;
  padding-bottom: 0;
}
body[data-route="project-03"] .framework-embed__body {
  height: auto;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  background: transparent;
  border: 0;
}
body[data-route="project-03"] .fe-panzoom-target {
  position: relative;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  display: block;
}

/* Decorative chrome SVG on frameworks (venn, concentric, funnel, diamond). */
body[data-route="project-03"] .uni-map {
  position: relative;
}
body[data-route="project-03"] .uni-map__chrome {
  display: block;
  width: 100%;
  height: 180px;
  margin: 0 0 -80px;
  pointer-events: none;
  opacity: 0.85;
}
body[data-route="project-03"] .uni-map__chrome svg {
  width: 100%;
  height: 100%;
  display: block;
}
body[data-route="project-03"] .uni-map--chrome-concentric .uni-map__chrome {
  height: 240px;
  margin-bottom: -120px;
}
body[data-route="project-03"] .uni-map--chrome-concentric .uni-map__chrome svg {
  max-width: 320px;
  margin: 0 auto;
}

/* ===========================================================
   project-03 (Mahogany) — Process timeline (inline SVG)
   =========================================================== */

body[data-route="project-03"] .process-timeline {
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
  margin-top: 3rem;
  padding: 1rem 0;
  color: var(--fg-secondary);
  overflow: visible;
}
@media (max-width: 1100px) {
  body[data-route="project-03"] .process-timeline {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
body[data-route="project-03"] .process-timeline svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Phase cards (floating, subtle fill, drop-shadow elevation) */
body[data-route="project-03"] .pt-card {
  filter: drop-shadow(0 1px 1px rgba(10, 12, 30, 0.05))
          drop-shadow(0 6px 20px rgba(10, 12, 30, 0.06));
}
html.dark body[data-route="project-03"] .pt-card {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45))
          drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}
body[data-route="project-03"] .pt-card-bg {
  fill: rgba(10, 12, 30, 0.025);
  stroke: rgba(10, 12, 30, 0.04);
  stroke-width: 1;
}
html.dark body[data-route="project-03"] .pt-card-bg {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(255, 255, 255, 0.05);
}

/* Inflection phase (Apr 9) card: warm accent, larger shadow */
body[data-route="project-03"] .pt-card--accent {
  filter: drop-shadow(0 1px 2px rgba(180, 83, 48, 0.2))
          drop-shadow(0 12px 32px rgba(180, 83, 48, 0.25));
}
body[data-route="project-03"] .pt-card-bg--accent {
  fill: rgba(180, 83, 48, 0.1);
  stroke: rgba(180, 83, 48, 0.45);
  stroke-width: 1.5;
}
html.dark body[data-route="project-03"] .pt-card-bg--accent {
  fill: rgba(180, 83, 48, 0.14);
  stroke: rgba(205, 118, 76, 0.55);
}

/* Card typography */
body[data-route="project-03"] .pt-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  fill: var(--fg-primary);
  letter-spacing: -0.005em;
}
body[data-route="project-03"] .pt-title--accent {
  fill: #b45330;
  font-size: 16px;
}
html.dark body[data-route="project-03"] .pt-title--accent {
  fill: #e48a5f;
}
body[data-route="project-03"] .pt-sub {
  font-family: var(--font-sans);
  font-size: 11.5px;
  fill: var(--fg-secondary);
  opacity: 0.82;
}
body[data-route="project-03"] .pt-sub--alt {
  font-family: var(--font-sans);
  font-size: 11.5px;
  fill: var(--fg-secondary);
  opacity: 0.95;
}
html.dark body[data-route="project-03"] .pt-sub--alt {
  fill: #e9ccb8;
  opacity: 1;
}
body[data-route="project-03"] .pt-eyebrow {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 9.5px;
  fill: #b45330;
  letter-spacing: 0.16em;
  font-weight: 600;
}
html.dark body[data-route="project-03"] .pt-eyebrow {
  fill: #e48a5f;
}

/* Connector lines between card bottom and rail dot */
body[data-route="project-03"] .pt-connector {
  stroke: currentColor;
  stroke-width: 1;
  stroke-opacity: 0.2;
  stroke-dasharray: 2 3;
}
body[data-route="project-03"] .pt-connector--accent {
  stroke: #b45330;
  stroke-opacity: 0.55;
  stroke-width: 1.25;
  stroke-dasharray: 2 2;
}

/* Dots on the rail */
body[data-route="project-03"] .pt-dot {
  fill: var(--bg-primary);
  stroke: var(--fg-secondary);
  stroke-width: 2;
  stroke-opacity: 0.55;
}
html.dark body[data-route="project-03"] .pt-dot {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.4);
}
body[data-route="project-03"] .pt-dot--inflection {
  fill: #b45330;
  stroke: rgba(180, 83, 48, 0.25);
  stroke-width: 6;
  animation: pt-inflect 2.4s ease-in-out infinite;
}
@keyframes pt-inflect {
  0%, 100% { stroke-width: 5; stroke-opacity: 0.2; }
  50%      { stroke-width: 12; stroke-opacity: 0.45; }
}
body[data-route="project-03"] .pt-dot-inner {
  fill: #fff4ec;
  opacity: 0.98;
}

/* Dates below the rail */
body[data-route="project-03"] .pt-date {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 10px;
  fill: var(--fg-secondary);
  opacity: 0.6;
  letter-spacing: 0.12em;
  font-weight: 500;
}
body[data-route="project-03"] .pt-date--inflection {
  fill: #b45330;
  opacity: 1;
  font-weight: 700;
}
html.dark body[data-route="project-03"] .pt-date--inflection {
  fill: #e48a5f;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body[data-route="project-03"] .pt-dot--inflection { animation: none; }
}

/* ===========================================================
   project-03 (Mahogany) — Architecture diagram
   =========================================================== */

body[data-route="project-03"] .architecture-diagram {
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--borders-primary);
  border-radius: 18px;
  color: var(--fg-secondary);
  box-shadow:
    0 60px 120px -40px rgba(10, 12, 30, 0.14),
    0 10px 24px -8px rgba(10, 12, 30, 0.05);
}
html.dark body[data-route="project-03"] .architecture-diagram {
  background: #18181c;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 60px 120px -40px rgba(0, 0, 0, 0.5),
    0 10px 24px -8px rgba(0, 0, 0, 0.22);
}
@media (max-width: 1100px) {
  body[data-route="project-03"] .architecture-diagram {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
body[data-route="project-03"] .arch-svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--fg-secondary);
}

/* Column background panels — echo the UI panel treatment */
body[data-route="project-03"] .arch-col-bg {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}
html.light body[data-route="project-03"] .arch-col-bg {
  fill: rgba(10, 12, 30, 0.03);
  stroke: rgba(10, 12, 30, 0.08);
}
body[data-route="project-03"] .arch-col-bg--storage {
  fill: rgba(255, 255, 255, 0.015);
}
html.light body[data-route="project-03"] .arch-col-bg--storage {
  fill: rgba(10, 12, 30, 0.02);
}

/* Column headers: quieter, less shouty. */
body[data-route="project-03"] .arch-col-head {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--fg-secondary);
  opacity: 0.55;
}

/* Floating card rects: no visible stroke, subtle fill carrying elevation,
   SVG drop-shadow filter gives the floating feel without heavy borders. */
body[data-route="project-03"] .arch-source-group,
body[data-route="project-03"] .arch-tier,
body[data-route="project-03"] .arch-agent {
  filter: drop-shadow(0 1px 1px rgba(10, 12, 30, 0.06))
          drop-shadow(0 8px 24px rgba(10, 12, 30, 0.08));
}
html.dark body[data-route="project-03"] .arch-source-group,
html.dark body[data-route="project-03"] .arch-tier,
html.dark body[data-route="project-03"] .arch-agent {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5))
          drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}
body[data-route="project-03"] .arch-source-group rect,
body[data-route="project-03"] .arch-tier rect,
body[data-route="project-03"] .arch-agent rect {
  fill: rgba(10, 12, 30, 0.03);
  stroke: none;
}
html.dark body[data-route="project-03"] .arch-source-group rect,
html.dark body[data-route="project-03"] .arch-tier rect,
html.dark body[data-route="project-03"] .arch-agent rect {
  fill: rgba(255, 255, 255, 0.035);
  stroke: none;
}
body[data-route="project-03"] .arch-group-label,
body[data-route="project-03"] .arch-tier-label,
body[data-route="project-03"] .arch-agent-label {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  fill: var(--fg-primary);
  letter-spacing: -0.005em;
}
body[data-route="project-03"] .arch-group-count {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 11px;
  fill: #b45330;
  letter-spacing: 0.06em;
  font-weight: 600;
}
body[data-route="project-03"] .arch-chip {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 11px;
  fill: var(--fg-secondary);
  opacity: 0.85;
}
body[data-route="project-03"] .arch-chip-mono {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  fill: #b45330;
  font-weight: 600;
}

/* Tier labels / subs */
body[data-route="project-03"] .arch-tier-sub {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: var(--fg-secondary);
  opacity: 0.85;
}
body[data-route="project-03"] .arch-tier-cost {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 11px;
  fill: #b45330;
  letter-spacing: 0.04em;
  font-weight: 600;
}
body[data-route="project-03"] .arch-tier-detail {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--fg-secondary);
  opacity: 0.75;
}

/* Agent boxes */
body[data-route="project-03"] .arch-agent-sub {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: var(--fg-secondary);
  opacity: 0.85;
}
body[data-route="project-03"] .arch-agent-detail {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--fg-secondary);
  opacity: 0.8;
}

/* Decision diamond (significance gate) */
body[data-route="project-03"] .arch-decision {
  transform-origin: center;
  transform-box: fill-box;
  animation: arch-pulse 2.4s ease-in-out infinite;
}
body[data-route="project-03"] .arch-decision polygon {
  fill: var(--bg-primary);
  stroke: #b45330;
  stroke-width: 2;
}
html.dark body[data-route="project-03"] .arch-decision polygon {
  fill: rgba(180, 83, 48, 0.08);
}
body[data-route="project-03"] .arch-decision-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  fill: var(--fg-primary);
}
@keyframes arch-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* Archive fork (dimmed) */
body[data-route="project-03"] .arch-archive-label {
  font-family: var(--font-sans);
  font-size: 10px;
  fill: var(--fg-secondary);
  opacity: 0.5;
  letter-spacing: 0.04em;
}

/* Flow paths: softer, thinner, for a sleeker read. */
body[data-route="project-03"] .flow-path {
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-opacity: 0.32;
  stroke-dasharray: 3 7;
  animation: arch-flow 3s linear infinite;
  fill: none;
}
body[data-route="project-03"] .flow-path--accent {
  stroke: #b45330;
  stroke-opacity: 1;
  stroke-width: 2;
  stroke-dasharray: 5 6;
  animation: arch-flow-accent 1.8s linear infinite;
}
body[data-route="project-03"] .flow-path--archive {
  stroke-opacity: 0.28;
  animation: none;
  stroke-dasharray: 3 5;
}
body[data-route="project-03"] .flow-path--storage {
  stroke-opacity: 0.35;
  stroke-dasharray: 3 6;
  animation: arch-flow 4s linear infinite;
}
@keyframes arch-flow {
  to { stroke-dashoffset: -36; }
}
@keyframes arch-flow-accent {
  to { stroke-dashoffset: -33; }
}

/* Storage pills: same floating treatment, slightly tighter shadow. */
body[data-route="project-03"] .arch-storage-pill {
  filter: drop-shadow(0 1px 1px rgba(10, 12, 30, 0.06))
          drop-shadow(0 4px 12px rgba(10, 12, 30, 0.06));
}
html.dark body[data-route="project-03"] .arch-storage-pill {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5))
          drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
body[data-route="project-03"] .arch-storage-pill rect {
  fill: rgba(10, 12, 30, 0.03);
  stroke: none;
}
html.dark body[data-route="project-03"] .arch-storage-pill rect {
  fill: rgba(255, 255, 255, 0.04);
  stroke: none;
}
body[data-route="project-03"] .arch-storage-label {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 11px;
  font-weight: 600;
  fill: var(--fg-primary);
  letter-spacing: 0.04em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body[data-route="project-03"] .flow-path,
  body[data-route="project-03"] .flow-path--accent,
  body[data-route="project-03"] .flow-path--storage,
  body[data-route="project-03"] .arch-decision,
  body[data-route="project-03"] .pt-dot--inflection {
    animation: none;
  }
}

/* ===========================================================
   project-03 — Tech detail cards (under architecture)
   =========================================================== */

body[data-route="project-03"] .tech-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
body[data-route="project-03"] .tech-card {
  border: 1px solid var(--borders-primary);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
html.dark body[data-route="project-03"] .tech-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}
body[data-route="project-03"] .tech-num {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #b45330;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(180, 83, 48, 0.3);
  border-radius: 4px;
  width: fit-content;
  line-height: 1;
}
body[data-route="project-03"] .tech-title {
  margin: 0.25rem 0 0.25rem;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
}
body[data-route="project-03"] .tech-body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-secondary);
}
@media (max-width: 1000px) {
  body[data-route="project-03"] .tech-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  body[data-route="project-03"] .tech-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   project-03 — Sub-section eyebrow (Orchestration / Stack)
   =========================================================== */
body[data-route="project-03"] .sub-eyebrow {
  margin: 3rem 0 1rem;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-secondary);
}

/* ===========================================================
   project-03 — Architecture orchestration diagram
   Three layered iter SVGs (v3 / v1 / v2). Flowing arrows.
   v3 = green accent, v2 = orange, v1 = neutral.
   =========================================================== */

:root {
  --ao-green: #36a880;
  --ao-orange: #b45330;
}

body[data-route="project-03"] .arch-orchestra {
  margin-top: 2.5rem;
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
  border: 1px solid var(--borders-primary);
  border-radius: 18px;
  padding: 1.75rem 2rem 2rem;
  background: var(--bg-secondary);
  box-shadow:
    0 60px 120px -40px rgba(10, 12, 30, 0.14),
    0 10px 24px -8px rgba(10, 12, 30, 0.05);
}
html.dark body[data-route="project-03"] .arch-orchestra {
  background: #18181c;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 60px 120px -40px rgba(0, 0, 0, 0.5),
    0 10px 24px -8px rgba(0, 0, 0, 0.22);
}
@media (max-width: 1100px) {
  body[data-route="project-03"] .arch-orchestra {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

body[data-route="project-03"] .arch-orchestra__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
body[data-route="project-03"] .arch-orchestra__tabs {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
body[data-route="project-03"] .ao-tab {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--fg-secondary);
  border-radius: 999px;
  padding: 0.4rem 0.75rem 0.4rem 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
html.light body[data-route="project-03"] .ao-tab {
  border-color: rgba(10, 12, 30, 0.15);
}
body[data-route="project-03"] .ao-tab:hover {
  color: var(--fg-primary);
  border-color: rgba(54, 168, 128, 0.5);
}
body[data-route="project-03"] .ao-tab.is-active {
  color: var(--fg-primary);
}
/* v3 active — green */
body[data-route="project-03"] .ao-tab:nth-child(1).is-active {
  border-color: var(--ao-green);
  background: rgba(54, 168, 128, 0.08);
}
/* v1/v2 active — orange */
body[data-route="project-03"] .ao-tab:nth-child(2).is-active,
body[data-route="project-03"] .ao-tab:nth-child(3).is-active {
  border-color: var(--ao-orange);
  background: rgba(180, 83, 48, 0.08);
}
body[data-route="project-03"] .ao-tab__num {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 0.125rem 0.3rem;
  line-height: 1;
}
html.light body[data-route="project-03"] .ao-tab__num {
  border-color: rgba(10, 12, 30, 0.18);
}
body[data-route="project-03"] .ao-tab__num--current {
  color: var(--ao-green);
  border-color: rgba(54, 168, 128, 0.45);
}

body[data-route="project-03"] .arch-orchestra__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
body[data-route="project-03"] .ao-counter {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--fg-secondary);
}
body[data-route="project-03"] .ao-playpause {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--fg-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}
html.light body[data-route="project-03"] .ao-playpause {
  border-color: rgba(10, 12, 30, 0.15);
}
body[data-route="project-03"] .ao-playpause:hover {
  color: var(--fg-primary);
  border-color: rgba(54, 168, 128, 0.45);
}
body[data-route="project-03"] .ao-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}
body[data-route="project-03"] .ao-playpause .ao-icon--play  { display: none; }
body[data-route="project-03"] .ao-playpause .ao-icon--pause { display: block; }
body[data-route="project-03"] .ao-playpause.is-paused .ao-icon--play  { display: block; }
body[data-route="project-03"] .ao-playpause.is-paused .ao-icon--pause { display: none; }

/* ---- Stage: three stacked iter SVGs ---- */
body[data-route="project-03"] .arch-orchestra__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 320;
  max-height: 380px;
  min-height: 240px;
}
body[data-route="project-03"] .ao-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
body[data-route="project-03"] .ao-iter {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  color: var(--fg-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}
body[data-route="project-03"] .arch-orchestra__stage.is-iter-0 .ao-iter--v3,
body[data-route="project-03"] .arch-orchestra__stage.is-iter-1 .ao-iter--v1,
body[data-route="project-03"] .arch-orchestra__stage.is-iter-2 .ao-iter--v2 {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Row labels ---- */
body[data-route="project-03"] .ao-row-label {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 9px;
  letter-spacing: 0.18em;
  fill: var(--fg-secondary);
  opacity: 0.55;
}

/* ---- Nodes ---- */
body[data-route="project-03"] .ao-node {
  /* Nothing here — cross-fade handled at .ao-iter level. */
}
body[data-route="project-03"] .ao-node__rect {
  fill: rgba(255, 255, 255, 0.025);
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-opacity: 0.55;
}
html.light body[data-route="project-03"] .ao-node__rect {
  fill: rgba(10, 12, 30, 0.025);
}
body[data-route="project-03"] .ao-node__label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  fill: var(--fg-primary);
  dominant-baseline: middle;
}
body[data-route="project-03"] .ao-node__mono {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 8.5px;
  fill: var(--fg-secondary);
  opacity: 0.75;
}
body[data-route="project-03"] .ao-node__sub {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 8px;
  letter-spacing: 0.18em;
  fill: var(--fg-secondary);
  opacity: 0.55;
}

/* Accent variants */
body[data-route="project-03"] .ao-node--accent .ao-node__rect {
  stroke: var(--ao-green);
  stroke-opacity: 0.95;
  fill: rgba(54, 168, 128, 0.06);
}
body[data-route="project-03"] .ao-node--hero .ao-node__rect {
  stroke: var(--ao-green);
  stroke-opacity: 1;
  stroke-width: 1.6;
  fill: rgba(54, 168, 128, 0.12);
}
body[data-route="project-03"] .ao-node__sub--accent {
  fill: var(--ao-green);
  opacity: 0.9;
}
body[data-route="project-03"] .ao-node--accent-orange .ao-node__rect {
  stroke: var(--ao-orange);
  stroke-opacity: 0.95;
  fill: rgba(180, 83, 48, 0.06);
}
body[data-route="project-03"] .ao-node__sub--orange {
  fill: var(--ao-orange);
  opacity: 0.9;
}
body[data-route="project-03"] .ao-node--warn .ao-node__rect {
  stroke: rgba(200, 150, 50, 0.85);
  fill: rgba(200, 150, 50, 0.05);
}
body[data-route="project-03"] .ao-node__sub--warn {
  fill: rgba(200, 150, 50, 0.9);
}

/* ---- Tool chips (mission agent row) ---- */
body[data-route="project-03"] .ao-tool-chip rect {
  fill: rgba(255, 255, 255, 0.02);
  stroke: currentColor;
  stroke-opacity: 0.3;
  stroke-width: 0.8;
}
html.light body[data-route="project-03"] .ao-tool-chip rect {
  fill: rgba(10, 12, 30, 0.02);
  stroke-opacity: 0.25;
}
body[data-route="project-03"] .ao-tool-chip text {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 9px;
  fill: var(--fg-secondary);
}
body[data-route="project-03"] .ao-tool-note {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 8.5px;
  fill: var(--fg-secondary);
  opacity: 0.55;
}

/* ---- Failure/banner text ---- */
body[data-route="project-03"] .ao-failure {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--fg-secondary);
  opacity: 0.65;
  font-style: italic;
}

/* ---- Edges — dashed, flowing ---- */
body[data-route="project-03"] .ao-edge {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-opacity: 0.5;
  stroke-dasharray: 4 4;
}
body[data-route="project-03"] .ao-edge--dim {
  stroke-opacity: 0.3;
}
body[data-route="project-03"] .ao-edge--accent {
  stroke: var(--ao-green);
  stroke-opacity: 0.85;
}
body[data-route="project-03"] .ao-edge--accent-orange {
  stroke: var(--ao-orange);
  stroke-opacity: 0.85;
}
body[data-route="project-03"] .ao-arrow-head { fill: currentColor; opacity: 0.65; }
body[data-route="project-03"] .ao-arrow-head--green  { fill: var(--ao-green); opacity: 0.95; }
body[data-route="project-03"] .ao-arrow-head--orange { fill: var(--ao-orange); opacity: 0.95; }

/* Flow only on the active iter */
@keyframes ao-flow {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -16; }
}
body[data-route="project-03"] .arch-orchestra__stage.is-iter-0 .ao-iter--v3 .ao-edge,
body[data-route="project-03"] .arch-orchestra__stage.is-iter-1 .ao-iter--v1 .ao-edge,
body[data-route="project-03"] .arch-orchestra__stage.is-iter-2 .ao-iter--v2 .ao-edge {
  animation: ao-flow 1.6s linear infinite;
}

/* Hero accent on iter activation — fade-in only, no scale.
   The .ao-iter opacity transition already delivers the reveal. */

/* ---- Caption ---- */
body[data-route="project-03"] .arch-orchestra__caption {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
body[data-route="project-03"] .ao-caption__label {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ao-green);
  opacity: 0.95;
}
body[data-route="project-03"] .arch-orchestra__stage.is-iter-1 ~ .arch-orchestra__caption .ao-caption__label,
body[data-route="project-03"] .arch-orchestra__stage.is-iter-2 ~ .arch-orchestra__caption .ao-caption__label {
  color: var(--ao-orange);
}
body[data-route="project-03"] .ao-caption__body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0;
  max-width: 68ch;
  /* Reserve enough height for the longest caption (v3, 3 lines at 68ch)
     so swapping between iterations does not reflow the page. */
  min-height: 4.65em;
}

/* Reduced motion: no flow, no crossfade animation */
@media (prefers-reduced-motion: reduce) {
  body[data-route="project-03"] .ao-iter,
  body[data-route="project-03"] .ao-edge {
    transition: none;
    animation: none !important;
  }
}

@media (max-width: 820px) {
  body[data-route="project-03"] .arch-orchestra__stage {
    aspect-ratio: 960 / 360;
    max-height: 400px;
  }
}
@media (max-width: 640px) {
  body[data-route="project-03"] .ao-tab span:not(.ao-tab__num) {
    display: none;
  }
}

/* ===========================================================
   project-03 — Stack pills + Source cluster graph
   =========================================================== */

/* Stack diagram — pills */
body[data-route="project-03"] .stack-pill rect {
  fill: rgba(255, 255, 255, 0.025);
  stroke: currentColor;
  stroke-width: 1;
  stroke-opacity: 0.45;
}
html.light body[data-route="project-03"] .stack-pill rect {
  fill: rgba(10, 12, 30, 0.03);
  stroke-opacity: 0.35;
}
body[data-route="project-03"] .stack-pill--accent rect {
  stroke: #b45330;
  stroke-opacity: 0.85;
  fill: rgba(180, 83, 48, 0.06);
}
body[data-route="project-03"] .stack-pill--storage rect {
  fill: rgba(255, 255, 255, 0.015);
  stroke-opacity: 0.3;
}
html.light body[data-route="project-03"] .stack-pill--storage rect {
  fill: rgba(10, 12, 30, 0.02);
}
body[data-route="project-03"] .stack-pill__label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  fill: var(--fg-primary);
  dominant-baseline: middle;
}
body[data-route="project-03"] .stack-pill__count {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 12px;
  font-weight: 500;
  fill: #b45330;
  dominant-baseline: middle;
}
body[data-route="project-03"] .stack-pill--infra rect {
  stroke-opacity: 0.32;
}
body[data-route="project-03"] .stack-divider {
  stroke: currentColor;
  stroke-opacity: 0.08;
  stroke-dasharray: 2 6;
  stroke-width: 1;
}
body[data-route="project-03"] .arch-flow {
  stroke: currentColor;
  stroke-width: 1;
  stroke-opacity: 0.4;
  stroke-dasharray: 4 4;
}
body[data-route="project-03"] .arch-flow--dim {
  stroke-opacity: 0.22;
}

/* Source cluster graph — panel */
body[data-route="project-03"] .source-map {
  margin-top: 2.5rem;
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
  padding: 2rem 2rem;
  border: 1px solid var(--borders-primary);
  border-radius: 18px;
  background: var(--bg-secondary);
  box-shadow:
    0 60px 120px -40px rgba(10, 12, 30, 0.14),
    0 10px 24px -8px rgba(10, 12, 30, 0.05);
}
html.dark body[data-route="project-03"] .source-map {
  background: #18181c;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 60px 120px -40px rgba(0, 0, 0, 0.5),
    0 10px 24px -8px rgba(0, 0, 0, 0.22);
}
@media (max-width: 1100px) {
  body[data-route="project-03"] .source-map {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
body[data-route="project-03"] .cluster-graph {
  display: block;
  width: 100%;
  height: auto;
  color: var(--fg-secondary);
}
body[data-route="project-03"] .cluster__divider {
  stroke: currentColor;
  stroke-opacity: 0.08;
  stroke-dasharray: 2 6;
  stroke-width: 1;
}
body[data-route="project-03"] .cluster__label {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--fg-secondary);
  opacity: 0.7;
}

/* Cluster pills — same visual language as orchestration nodes */
body[data-route="project-03"] .cluster__pill rect {
  fill: rgba(180, 83, 48, 0.05);
  stroke: rgba(180, 83, 48, 0.55);
  stroke-width: 1;
  transition: stroke-opacity 240ms ease, fill 240ms ease;
}
body[data-route="project-03"] .cluster__pill text {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  fill: var(--fg-primary);
  dominant-baseline: middle;
}
body[data-route="project-03"] .cluster__pill {
  animation: cluster-pulse 5s ease-in-out infinite;
}
@keyframes cluster-pulse {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1;    }
}
@media (prefers-reduced-motion: reduce) {
  body[data-route="project-03"] .cluster__pill { animation: none; opacity: 0.9; }
}

/* ===========================================================
   project-03 — Research findings-to-features grid
   =========================================================== */

body[data-route="project-03"] .findings-title {
  margin: 5rem 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 42rem;
}
body[data-route="project-03"] .findings-lede {
  margin: 0 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--fg-secondary);
  max-width: 42rem;
}
/* Findings table — first slide of the research carousel. Plain table,
   three columns. Third column (the answer) is accent-tinted so the
   eye lands on what Mahogany shipped. */
body[data-route="project-03"] .findings-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  table-layout: fixed;
}
body[data-route="project-03"] .findings-table thead th {
  text-align: left;
  padding: 0 1rem 0.875rem;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  border-bottom: 1px solid var(--borders-primary);
}
body[data-route="project-03"] .findings-table thead th {
  padding: 0.625rem 1rem;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
body[data-route="project-03"] .findings-table thead th:first-child {
  color: #7aa7ff;
  background: color-mix(in oklab, #4a7bd1 12%, transparent);
}
body[data-route="project-03"] .findings-table thead th:nth-child(2) {
  color: #e88a85;
  background: color-mix(in oklab, #c15a55 12%, transparent);
}
body[data-route="project-03"] .findings-table thead th:last-child {
  color: #7fc896;
  background: color-mix(in oklab, #4fa56d 12%, transparent);
}
body[data-route="project-03"] .findings-table tbody td {
  padding: 1.125rem 1rem;
  vertical-align: top;
  color: var(--fg-primary);
  border-bottom: 1px solid var(--borders-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
body[data-route="project-03"] .findings-table tbody td:first-child {
  width: 24%;
  font-weight: 600;
  color: var(--fg-primary);
  background: color-mix(in oklab, #4a7bd1 6%, transparent);
}
body[data-route="project-03"] .findings-table tbody td:nth-child(2) {
  width: 36%;
  color: var(--fg-secondary);
  background: color-mix(in oklab, #c15a55 6%, transparent);
}
body[data-route="project-03"] .findings-table tbody td:last-child {
  width: 40%;
  color: var(--fg-primary);
  background: color-mix(in oklab, #4fa56d 6%, transparent);
}
body[data-route="project-03"] .findings-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 6px;
}
body[data-route="project-03"] .findings-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 6px;
}
body[data-route="project-03"] .findings-table tbody tr:last-child td { border-bottom: 0; }
html.dark body[data-route="project-03"] .findings-table thead th,
html.dark body[data-route="project-03"] .findings-table tbody td {
  border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 820px) {
  /* Stacked card layout: each row becomes a vertical triplet of labeled
     cells that actually fills the available width. Drops table-layout so
     display:block on each element behaves predictably. */
  body[data-route="project-03"] .findings-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
  }
  body[data-route="project-03"] .findings-table thead { display: none; }
  body[data-route="project-03"] .findings-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    width: 100%;
  }
  body[data-route="project-03"] .findings-table tbody tr {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 0;
    gap: 0;
    background: transparent;
    border: 1px solid var(--borders-primary);
    border-radius: 10px;
    overflow: hidden;
  }
  body[data-route="project-03"] .findings-table tbody tr:last-child {
    border-bottom: 1px solid var(--borders-primary);
  }
  body[data-route="project-03"] .findings-table tbody td {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0.75rem 0.9rem 0.875rem;
    border: 0;
    border-radius: 0;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  body[data-route="project-03"] .findings-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.3rem;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-tertiary);
  }
  body[data-route="project-03"] .findings-table tbody td:first-child {
    width: 100%;
    font-weight: 600;
    color: var(--fg-primary);
    background: color-mix(in oklab, #4a7bd1 12%, transparent);
  }
  body[data-route="project-03"] .findings-table tbody td:first-child::before { color: #7aa7ff; }
  body[data-route="project-03"] .findings-table tbody td:nth-child(2) {
    width: 100%;
    color: var(--fg-secondary);
    background: color-mix(in oklab, #c15a55 10%, transparent);
  }
  body[data-route="project-03"] .findings-table tbody td:nth-child(2)::before { color: #e88a85; }
  body[data-route="project-03"] .findings-table tbody td:last-child {
    width: 100%;
    color: var(--fg-primary);
    background: color-mix(in oklab, #4fa56d 10%, transparent);
  }
  body[data-route="project-03"] .findings-table tbody td:last-child::before { color: #7fc896; }
  /* Reset desktop rounded-corner overrides on individual cells; the card
     itself owns the corners now via overflow: hidden on the tr. */
  body[data-route="project-03"] .findings-table tbody tr:last-child td:first-child,
  body[data-route="project-03"] .findings-table tbody tr:last-child td:last-child {
    border-radius: 0;
  }
}

/* ===========================================================
   project-03 — Results section (user testimonials)
   =========================================================== */

body[data-route="project-03"] .results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
body[data-route="project-03"] .result-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem 1.75rem;
  border: 1px solid var(--borders-primary);
  border-radius: 14px;
  background: var(--bg-secondary);
}
html.dark body[data-route="project-03"] .result-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}
body[data-route="project-03"] .result-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}
body[data-route="project-03"] .result-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", monospace);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 248, 240, 0.95);
}
body[data-route="project-03"] .result-avatar--edwards {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(180, 83, 48, 0.55) 0%, transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(92, 43, 22, 0.58) 0%, transparent 60%),
    #2a140a;
}
body[data-route="project-03"] .result-avatar--vc {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(84, 136, 204, 0.55) 0%, transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(32, 58, 96, 0.72) 0%, transparent 60%),
    #0e1c2f;
}
body[data-route="project-03"] .result-avatar--beone {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(136, 110, 84, 0.55) 0%, transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(60, 42, 28, 0.68) 0%, transparent 60%),
    #1a130c;
}
body[data-route="project-03"] .result-meta {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
body[data-route="project-03"] .result-name {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
body[data-route="project-03"] .result-role {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--fg-secondary);
  line-height: 1.4;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--borders-primary);
}
html.dark body[data-route="project-03"] .result-role {
  border-top-color: rgba(255, 255, 255, 0.06);
}
body[data-route="project-03"] .result-context {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--fg-secondary);
  opacity: 0.7;
  line-height: 1.3;
  margin-top: 0.125rem;
}
body[data-route="project-03"] .result-quote {
  margin: 0 0 1.25rem;
  padding: 0 0 0 0.875rem;
  border-left: 2px solid #b45330;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--fg-primary);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.005em;
}
body[data-route="project-03"] .result-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--borders-primary);
  border-bottom: 1px solid var(--borders-primary);
  margin-bottom: 1rem;
}
body[data-route="project-03"] .result-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
body[data-route="project-03"] .result-metric-num {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--fg-primary);
  white-space: nowrap;
}
body[data-route="project-03"] .result-metric-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--fg-secondary);
}
body[data-route="project-03"] .result-details {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fg-secondary);
}
@media (max-width: 1100px) {
  body[data-route="project-03"] .results-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   davidgeffen — scoped block, mirrors project-05 pattern.
   =========================================================== */

/* Homepage tile for David Geffen Hall */
.project-thumb--davidgeffen {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(230, 200, 120, 0.32) 0%, transparent 58%),
    radial-gradient(120% 120% at 100% 100%, rgba(170, 60, 40, 0.45) 0%, transparent 60%),
    #1a0e08;
  color: rgba(255, 244, 228, 0.94);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

body[data-route="davidgeffen"] .page {
  display: block;
  max-width: 52rem;
}
body[data-route="davidgeffen"] .page > * + * {
  margin-top: 2rem;
}

body[data-route="davidgeffen"] .hero-tile,
body[data-route="davidgeffen"] .outcome-frame {
  width: calc(100% + 8rem);
  max-width: none;
  margin-left: -4rem;
  margin-right: -4rem;
}
@media (max-width: 1100px) {
  body[data-route="davidgeffen"] .hero-tile,
  body[data-route="davidgeffen"] .outcome-frame {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

body[data-route="davidgeffen"] .case-section + .case-section {
  border-top: 0;
}

body[data-route="davidgeffen"] .case-section {
  padding: 7rem 0 0;
}

body[data-route="davidgeffen"] .case-section .section-title {
  margin: 1.5rem 0 2rem;
  font-family: var(--font-sans);
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 46rem;
}

body[data-route="davidgeffen"] .case-section .section-title + .lede,
body[data-route="davidgeffen"] .case-section .section-title + .outcome-frame,
body[data-route="davidgeffen"] .case-section .section-title + .overview-pillars,
body[data-route="davidgeffen"] .case-section .section-title + .screen {
  margin-top: 0;
}

body[data-route="davidgeffen"] .case-section .lede + .outcome-frame,
body[data-route="davidgeffen"] .case-section .lede + .overview-pillars.outcome-metrics {
  margin-top: 2rem;
}
body[data-route="davidgeffen"] .case-section .lede + .screen {
  margin-top: 2.5rem;
}

body[data-route="davidgeffen"] .case-section .lede {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg-secondary);
}
body[data-route="davidgeffen"] .case-section .lede + .lede {
  margin-top: 0.875rem;
}

/* Outcome frame — same dark presentation shade as other projects */
body[data-route="davidgeffen"] .outcome-frame {
  background: #1c1c1f;
  border-radius: 18px;
  padding: clamp(28px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.28),
    0 4px 12px rgba(0, 0, 0, 0.14);
}
body[data-route="davidgeffen"] .outcome-frame img,
body[data-route="davidgeffen"] .outcome-frame video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.14);
  background: #000;
}

/* Hero video frame — generous padding so the recording sits inside the frame */
body[data-route="davidgeffen"] .outcome-frame--hero.outcome-frame--video {
  padding: clamp(32px, 6vw, 72px);
}

/* Photo frame — minimal padding, photo fills the frame */
body[data-route="davidgeffen"] .outcome-frame--photo {
  padding: 0;
  background: #0d0d0f;
}
body[data-route="davidgeffen"] .outcome-frame--photo img {
  border-radius: 18px;
  box-shadow: none;
  width: 100%;
}

/* Two-up portrait videos side by side inside one frame */
body[data-route="davidgeffen"] .outcome-frame--portrait-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  padding: clamp(48px, 7vw, 104px);
}
body[data-route="davidgeffen"] .outcome-frame--portrait-pair video {
  width: 100%;
  height: auto;
  max-height: min(72vh, 720px);
  object-fit: contain;
  border-radius: 14px;
  background: #000;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.16);
}
@media (max-width: 720px) {
  body[data-route="davidgeffen"] .outcome-frame--portrait-pair {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Scroll-reveal on non-hero frames */
body[data-route="davidgeffen"] .outcome-frame.is-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
body[data-route="davidgeffen"] .outcome-frame.is-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  body[data-route="davidgeffen"] .outcome-frame.is-reveal,
  body[data-route="davidgeffen"] .outcome-frame.is-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

body[data-route="davidgeffen"] .screen {
  margin-top: 6rem;
}
body[data-route="davidgeffen"] .screen:first-of-type {
  margin-top: 0;
}
body[data-route="davidgeffen"] .case-tag + .screen {
  margin-top: 2.5rem;
}
body[data-route="davidgeffen"] .screen-title {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  max-width: 42rem;
}
body[data-route="davidgeffen"] .screen-lede {
  margin: 0 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--fg-secondary);
  max-width: 42rem;
}
body[data-route="davidgeffen"] .screen .outcome-frame {
  margin-top: 0;
}

body[data-route="davidgeffen"] .overview-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
body[data-route="davidgeffen"] .overview-pillar {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.25rem 0 0.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
html.light body[data-route="davidgeffen"] .overview-pillar {
  border-left-color: rgba(10, 12, 30, 0.16);
}
@media (max-width: 820px) {
  body[data-route="davidgeffen"] .overview-pillars {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

body[data-route="davidgeffen"] .overview-pillars.outcome-metrics {
  margin-top: 2rem;
  gap: 2rem;
}
body[data-route="davidgeffen"] .outcome-metrics .overview-pillar {
  gap: 0.75rem;
}
body[data-route="davidgeffen"] .outcome-metrics .metric-value {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 2.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg-primary);
}
body[data-route="davidgeffen"] .outcome-metrics .pillar-body {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0;
}

/* ============================================================
   Shared case-study section rhythm.
   Applies across every project template (project-05, rcm,
   project-03, davidgeffen). Bigger top padding for more
   breathing room between sections. Scoped so it only affects
   case-study pages, not the home.
   ============================================================ */

body[data-route="project-05"] .case-section,
body[data-route="rcm"] .case-section,
body[data-route="project-03"] .case-section,
body[data-route="davidgeffen"] .case-section {
  padding-top: clamp(7rem, 12vw, 11rem);
}

/* ============================================================
   Videos fill their outcome-frame end-to-end. Overrides the
   per-project padding and aspect-height treatment so the video
   extends to the full height and width of its container.
   ============================================================ */
.outcome-frame:has(video) {
  padding: 0 !important;
}
.outcome-frame > video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

/* ============================================================
   MOBILE-ONLY (≤ 768px)
   Floating ⌘ menu trigger + slide-up drawer, in the spirit of
   v2.ericsin.com. The desktop layout is untouched — every rule
   below is gated by the breakpoint or by selectors that only
   exist when sidebar.js renders the mobile elements.
   ============================================================ */

/* Hide the new mobile components on desktop. */
.mobile-menu-trigger,
.mobile-drawer,
.mobile-top-actions { display: none; }

@media (max-width: 768px) {
  /* Existing 900px topbar makes way for the drawer. The top-right theme
     toggle stays — we just nudge it next to the new mobile top actions. */
  .sidebar { display: none !important; }
  .theme-toggle-fixed {
    top: 0.875rem;
    right: 0.875rem;
    z-index: 60;
  }

  main {
    margin-left: 0;
    /* Top padding leaves clearance for the floating ⌘ trigger (~52px tall). */
    padding: 3.75rem 1rem 4rem;
  }

  /* Floating ⌘ trigger, top-left. */
  .mobile-menu-trigger {
    position: fixed;
    top: 0.875rem;
    left: 0.875rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--borders-primary);
    background: color-mix(in oklab, var(--bg-primary) 88%, transparent);
    color: var(--fg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 120ms ease;
  }
  .mobile-menu-trigger:active { transform: scale(0.94); }
  .mobile-menu-trigger svg { width: 18px; height: 18px; }
  .mobile-menu-trigger .cmd-glyph {
    font-family: ui-monospace, "SF Mono", Menlo, "Roboto Mono", monospace;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
  }

  /* Slide-up drawer. Hidden by default; .is-open animates it in. */
  .mobile-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
  }
  .mobile-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 220ms ease;
  }
  .mobile-drawer__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 86vh;
    overflow-y: auto;
    padding: 1.25rem 1.25rem 1.5rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--borders-primary);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    transform: translateY(101%);
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.28);
  }
  .mobile-drawer.is-open { pointer-events: auto; }
  .mobile-drawer.is-open .mobile-drawer__backdrop { opacity: 1; }
  .mobile-drawer.is-open .mobile-drawer__panel { transform: translateY(0); }

  .mobile-drawer__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem 1rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--borders-primary);
    color: inherit;
    text-decoration: none;
  }
  .mobile-drawer__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--fg-primary);
  }
  .mobile-drawer__avatar svg { width: 20px; height: 20px; }
  .mobile-drawer__avatar {
    overflow: hidden;
  }
  .mobile-drawer__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 22%;
    transform: scale(1.4);
    transform-origin: 50% 30%;
    display: block;
  }
  .mobile-drawer__brand-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }
  .mobile-drawer__brand-name {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--fg-primary);
  }
  .mobile-drawer__brand-role {
    margin-top: 0.25rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-tertiary);
  }

  .mobile-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }
  /* Override the 900px topbar rule which hides .nav-group globally. */
  .mobile-drawer__nav .nav-group {
    display: flex !important;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0;
  }
  .mobile-drawer__nav .nav-label {
    display: block;
    padding: 0.25rem 0.25rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-tertiary);
  }
  .mobile-drawer__nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.625rem 0.5rem;
    font-size: 1rem;
    color: var(--fg-primary);
    opacity: 0.7;
    text-decoration: none;
    border-radius: 10px;
  }
  .mobile-drawer__nav .nav-link.is-active,
  .mobile-drawer__nav .nav-link:hover { opacity: 1; }

  .mobile-drawer__footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--borders-primary);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
  }
  .mobile-drawer__clock {
    display: block;
  }
  .mobile-drawer__clock .clock-label {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-tertiary);
  }
  .mobile-drawer__clock .clock-readout {
    margin-top: 0.2rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    color: var(--fg-secondary);
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
  }
  .mobile-drawer__row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
  }
  .mobile-drawer__theme {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid var(--borders-primary);
  }
  .mobile-drawer__theme button {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--fg-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.55;
  }
  .mobile-drawer__theme button[aria-pressed="true"] {
    background: var(--bg-secondary);
    opacity: 1;
  }
  .mobile-drawer__socials {
    display: inline-flex;
    gap: 0.4rem;
  }
  .mobile-drawer__socials .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--borders-primary);
    color: var(--fg-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.mobile-drawer-locked {
    overflow: hidden;
    touch-action: none;
  }

  /* Top-right action row — sits next to the theme toggle. Houses the Agent
     trigger on project pages (revealed via :has() when the dock mounts). */
  .mobile-top-actions {
    position: fixed;
    top: 0.875rem;
    /* Theme toggle is ~74px wide; sit just to the left of it. */
    right: calc(0.875rem + 74px + 0.5rem);
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-agent-trigger {
    display: none;
    align-items: center;
    gap: 0.4rem;
    height: 38px;
    padding: 0 0.7rem 0 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--borders-primary);
    background: color-mix(in oklab, var(--bg-primary) 88%, transparent);
    color: var(--fg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.78rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
  .mobile-agent-trigger:active { transform: scale(0.96); }
  .mobile-agent-trigger svg { width: 14px; height: 14px; }

  /* Reveal the Agent trigger only on routes where the dock is mounted. */
  body:has([data-agent-dock]) .mobile-agent-trigger { display: inline-flex; }

  /* On project pages, the floating bottom-right Agent trigger is redundant
     once it lives in the top-right action row — hide it. */
  body:has([data-agent-dock]) .agent-dock__trigger { display: none; }

  /* Tighter case-study spacing at small widths. */
  .case-section { padding: 2rem 0 0.75rem; }

  /* Outcome frames — mobile-friendly padding so videos don't dwarf the screen. */
  body[data-route="davidgeffen"] .outcome-frame,
  body[data-route="rcm"] .outcome-frame,
  body[data-route="project-05"] .outcome-frame,
  body[data-route="project-03"] .outcome-frame {
    padding: clamp(12px, 4vw, 20px);
    border-radius: 14px;
  }
  body[data-route="davidgeffen"] .outcome-frame--portrait-pair {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: clamp(12px, 4vw, 20px);
  }
  body[data-route="davidgeffen"] .outcome-frame--hero.outcome-frame--video {
    padding: clamp(12px, 4vw, 20px);
  }
}

/* Below 480px — extra-tight content padding so long-form text breathes. */
@media (max-width: 480px) {
  main { padding: 3.5rem 0.875rem 3rem; }
  .case-section { padding: 1.5rem 0 0.5rem; }
}
