/*
 * RaceToAutonomy.com — Shared Stylesheet
 * Version: 1.4
 * Date: March 30, 2026
 *
 * v1.1 — Removed announce bar. Nav consolidated to single fixed element,
 *         top: 0, height: 64px, transparency + blur. Updated all offsets.
 * v1.2 — Added phase strip styles. Added shared phase page content block
 *         styles (achievement, contrast, unlocks, dims, phase-nav).
 * v1.3 — Added phase-hero-inner max-width. Added diag-cta section styles.
 * v1.4 — Mobile nav overhaul: backdrop, icon swap, two-column menu with
 *         descriptions, full-row tap targets. Added phase color tokens as
 *         body class scoping (body.phase-*). Absorbed all generated-page
 *         styles from inline blocks: phase-hero, dim-hero, body-section,
 *         dim-nav, systems-grid, transform-table, outcomes-list, and all
 *         related components. Removed !important padding hacks.
 */


/* =============================================================================
   RESET
   ============================================================================= */

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


/* =============================================================================
   DESIGN TOKENS
   ============================================================================= */

:root {
  /* Backgrounds */
  --bg: #fafbfd;
  --bg-alt: #f1f4f9;
  --bg-dark: #0c1222;
  --bg-dark-surface: #131b30;
  --bg-dark-border: #1e2a45;

  /* Text */
  --text: #0f1729;
  --text-secondary: #4a5568;
  --text-muted: #8896ab;

  /* Blue scale */
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;

  /* Accent */
  --accent: #f59e0b;

  /* Neutrals */
  --white: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Typography */
  --heading: 'Newsreader', Georgia, serif;
  --body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shared */
  --radius: 12px;
}


/* =============================================================================
   PHASE COLOR TOKENS
   Applied via body class on generated phase and dimension pages.
   Generator sets e.g. <body class="phase-alignment"> and these vars
   cascade to all phase-color references on the page.
   ============================================================================= */

body.phase-aspiration    { --phase-color: #2563eb; --phase-light: #eff6ff; --phase-border: #dbeafe; }
body.phase-awareness     { --phase-color: #0891b2; --phase-light: #ecfeff; --phase-border: #a5f3fc; }
body.phase-alignment     { --phase-color: #059669; --phase-light: #f0fdf4; --phase-border: #a7f3d0; }
body.phase-acceleration  { --phase-color: #d97706; --phase-light: #fffbeb; --phase-border: #fde68a; }
body.phase-autonomization{ --phase-color: #7c3aed; --phase-light: #f5f3ff; --phase-border: #ddd6fe; }


/* =============================================================================
   BASE
   ============================================================================= */

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}


/* =============================================================================
   NAVIGATION
   ============================================================================= */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 251, 253, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span {
  color: var(--blue-600);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--white) !important;
  background: var(--blue-600);
  padding: 10px 22px;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--blue-500);
}

/* Hamburger — hidden on desktop, shown on mobile */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

/* Mobile-only nav elements — hidden on desktop */
.nav-item-desc,
.nav-mobile-cta,
#nav-backdrop {
  display: none;
}

/* nav-item on desktop — renders as a normal link in the horizontal nav */
.nav-item {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
}


/* =============================================================================
   LAYOUT
   ============================================================================= */

section {
  padding: 100px 48px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
}


/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--heading);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.6px;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 20px;
}


/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--blue-600);
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--blue-500);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--white);
  padding: 14px 28px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.15s;
}

.btn-white:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}


/* =============================================================================
   BREADCRUMB
   ============================================================================= */

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.breadcrumb span {
  margin: 0 8px;
}

.breadcrumb-current {
  font-weight: 700;
  color: var(--text);
}


/* =============================================================================
   CARDS
   ============================================================================= */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  transform: translateY(-3px);
}


/* =============================================================================
   FOOTER
   ============================================================================= */

footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--bg-dark-border);
  padding: 64px 48px 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--bg-dark-border);
}

.footer-brand .brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand .brand-name span {
  color: var(--blue-400);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.35);
  max-width: 240px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}


/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal — toggled by IntersectionObserver in page scripts */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* STATES GRID — dimension page low/high comparison */
.states-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}


/* =============================================================================
   AUTHOR-MIN COMPONENT
   ============================================================================= */

#author-min a:hover {
  color: rgba(255,255,255,0.8) !important;
}

@media (max-width: 768px) {
  #author-min {
    padding: 16px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  #author-min {
    padding: 14px 20px;
  }
  #author-min > div:first-child > div:last-child span:last-child {
    display: none;
  }
}

/* =============================================================================
   RESPONSIVE — 768px
   Hamburger nav, stacking grids, reduced padding
   ============================================================================= */

@media (max-width: 768px) {

  /* Announcement bar layout handled inline in nav.html */

  /* Nav */
  nav {
    padding: 0 24px;
    top: 0;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px 32px;
    gap: 0;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  /* Two-column nav items — entire row is a link */
  .nav-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
  }

  .nav-item:hover .nav-item-label {
    color: var(--blue-600) !important;
  }

  .nav-item-label {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    padding: 0 !important;
    border-bottom: none !important;
    text-decoration: none;
    line-height: 1.4;
  }

  .nav-item-desc {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-top: 1px;
  }

  /* Mobile-only CTA at bottom of menu */
  .nav-mobile-cta {
    display: flex !important;
    justify-content: center;
    margin-top: 20px;
    border-bottom: none !important;
  }

  /* Hide desktop CTA pill on mobile */
  .nav-desktop-cta {
    display: none !important;
  }

  /* Hamburger icon swap — show X when menu is open */
  .icon-close { display: none; }
  .nav-hamburger[aria-expanded="true"] .icon-hamburger { display: none; }
  .nav-hamburger[aria-expanded="true"] .icon-close    { display: block; }

  /* Backdrop overlay */
  #nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 98;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  #nav-backdrop.active {
    display: block;
  }

  .nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Layout */
  section {
    padding: 72px 24px;
  }

  /* Two-column grids stack — shared and generated */
  .hero-inner,
  .states-grid,
  .principles-grid,
  .dims-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Generated dimension pages */
  .dim-hero {
    padding: 160px 24px 60px;
  }

  .body-section {
    padding: 56px 24px;
  }

  .dim-nav {
    padding: 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* Generated phase overview pages */
  .phase-hero {
    padding: 160px 24px 60px;
  }

  .phase-hero h1 {
    font-size: clamp(32px, 8vw, 48px);
  }

  /* Transform table scroll on mobile */
  .transform-table {
    display: block;
    overflow-x: auto;
  }

  /* Systems grid — two columns on tablet */
  .systems-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

}


/* =============================================================================
   RESPONSIVE — 480px
   Tighter padding, single column footer, single column nav items
   ============================================================================= */

@media (max-width: 480px) {

  section {
    padding: 52px 20px;
  }

  .dim-hero {
    padding: 152px 20px 48px;
  }

  .phase-hero {
    padding: 152px 20px 48px;
  }

  .body-section {
    padding: 48px 20px;
  }

  .dim-nav {
    padding: 16px 20px;
  }

  .systems-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

}


/* =============================================================================
   PHASE STRIP
   Sticky navigation strip shown on all five phase pages.
   Active state set dynamically by components.js via setActivePhase().
   ============================================================================= */

.phase-strip {



  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.phase-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}

.phase-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 20px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: border-color 0.15s;
  flex: 1;
}

.phase-strip-item:hover {
  border-bottom-color: var(--blue-100);
}

.phase-strip-item.active {
  border-bottom-color: var(--blue-600);
}

.phase-strip-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.phase-strip-item.active .phase-strip-num {
  color: var(--blue-600);
}

.phase-strip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.phase-strip-item.active .phase-strip-name {
  color: var(--text);
}

@media (max-width: 768px) {
  .phase-strip {
    padding: 0 20px;
  }
}


/* =============================================================================
   PHASE PAGE — NEW CONTENT BLOCKS
   Shared styles for overview, achievement, contrast, and RFA note sections.
   ============================================================================= */

.overview-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.achievement-box {
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.achievement-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.achievement-name {
  font-family: var(--heading);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.achievement-desc {
  font-size: 15px;
  line-height: 1.7;
}

.unlocks-box {
  margin-top: 32px;
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 24px;
  background: var(--white);
}

.unlocks-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.unlocks-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.contrast-intro {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.contrast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.contrast-card {
  border-radius: var(--radius);
  padding: 24px 28px;
  border: 1px solid var(--border);
}

.contrast-card.before {
  background: var(--white);
}

.contrast-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.before .contrast-card-label {
  color: var(--text-muted);
}

.contrast-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.contrast-list li {
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.contrast-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contrast-list li .marker {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.4;
  font-size: 13px;
}

.ref-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid;
  padding-bottom: 2px;
  transition: opacity 0.15s;
}

.rfa-note {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.dims-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.dim-card {
  display: block;
  padding: 22px 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.dim-card:hover {
  transform: translateY(-2px);
}

.dim-phase-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.dim-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
}

.dim-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.dim-explore {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.phase-nav {
  padding: 0 48px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.phase-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
}

.phase-nav a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phase-nav .center-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.phase-nav .prev-link {
  color: var(--text-muted);
  font-weight: 500;
}

@media (max-width: 768px) {
  .contrast-grid { grid-template-columns: 1fr; }
  .dims-grid { grid-template-columns: 1fr; }
  .achievement-box { flex-direction: column; gap: 16px; }
  .phase-nav { padding: 0 24px; }
  .phase-nav-inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 0; }
}

@media (max-width: 480px) {
  .phase-nav { padding: 0 20px; }
}


/* =============================================================================
   PHASE HERO INNER
   ============================================================================= */

.phase-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}


/* =============================================================================
   GENERATED PAGE STYLES
   Phase overview pages and dimension pages. All styles previously in inline
   <style> blocks are defined here. Generator only injects body class + content.
   ============================================================================= */

/* Phase hero */
.phase-hero {
  padding: 160px 48px 80px;
  background: linear-gradient(135deg, var(--phase-light, #eff6ff) 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--phase-border, var(--border));
}

.phase-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--phase-color, var(--blue-600));
  background: var(--phase-light, #eff6ff);
  border: 1px solid var(--phase-border, var(--border));
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.phase-hero-sub {
  font-size: 19px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 36px;
}

/* Dimension hero */
.dim-hero {
  padding: 160px 48px 80px;
  background: linear-gradient(135deg, var(--phase-light, #eff6ff) 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--phase-border, var(--border));
}

.dim-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.dim-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--phase-color, var(--blue-600));
  background: var(--phase-light, #eff6ff);
  border: 1px solid var(--phase-border, var(--border));
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

/* Shared body section */
.body-section {
  padding: 80px 48px;
}

.body-section.alt {
  background: var(--white);
  border-top: 1px solid var(--border);
}

/* Dim nav (prev/next at bottom of dim pages) */
.dim-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

/* Where data lives — system cards */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.system-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.system-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.system-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Transformation table */
.transform-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
}

.transform-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

.transform-table th:nth-child(2) { color: #dc2626; }
.transform-table th:nth-child(3) { color: var(--phase-color, var(--blue-600)); }

.transform-table td {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.transform-table td:first-child {
  font-weight: 600;
  color: var(--text);
  width: 140px;
}

.transform-table tr:last-child td { border-bottom: none; }
.transform-table tr:nth-child(even) td { background: var(--bg-alt); }

/* Example block inside transform table */
.example-block {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--phase-border, var(--border));
  background: var(--phase-light, #eff6ff);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  line-height: 1.65;
  color: #0e7490;
  font-style: italic;
}

/* Outcomes list */
.outcomes-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.outcomes-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.outcome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phase-color, var(--blue-600));
  flex-shrink: 0;
  margin-top: 7px;
}

.outcome-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* FAQ details */
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }


/* =============================================================================
   TEMPLATE COMPONENT CLASSES
   Every repeating inline style pattern from phase.html and dimension.html
   lives here. Change once, updates every generated page.
   ============================================================================= */

/* Section label with phase color */
.section-label-phase {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--phase-color, var(--blue-600));
  margin-bottom: 20px;
}

/* Body prose paragraphs */
.body-lead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.body-lead-narrow {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 640px;
}

/* btn-primary with phase color */
.btn-primary-phase {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--phase-color, var(--blue-600));
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary-phase:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Diagnostic CTA dark section */
.diag-cta-section {
  background: var(--bg-dark);
  padding: 80px 48px;
  text-align: center;
}

.diag-cta-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--phase-color, var(--blue-600));
  margin-bottom: 20px;
}

.diag-cta-heading {
  font-family: var(--heading);
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 500;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: 16px;
}

.diag-cta-sub {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 480px;
  margin: 0 auto 36px;
}

@media (max-width: 768px) {
  .diag-cta-section { padding: 60px 24px; }
}

@media (max-width: 480px) {
  .diag-cta-section { padding: 52px 20px; }
}

/* Dimension hero title and lead */
.dim-hero-title {
  font-family: var(--heading);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.8px;
  color: var(--text);
  margin-bottom: 20px;
}

.dim-hero-lead {
  font-size: 19px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 36px;
}

/* State cards — low/high comparison */
.state-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.state-card-low {
  background: var(--bg-alt);
}

.state-card-high {
  background: var(--phase-light, #eff6ff);
  border-color: var(--phase-border, var(--border));
}

.state-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.state-card-low .state-card-label {
  color: var(--text-muted);
}

.state-card-high .state-card-label {
  color: var(--phase-color, var(--blue-600));
}

.state-card-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Center nav link (All Phases / All Dimensions) */
.nav-center-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-center-link:hover {
  color: var(--text);
}


/* =============================================================================
   DIAGNOSTIC CTA SECTION
   ============================================================================= */

.diag-cta {
  background: var(--bg-dark);
  padding: 80px 48px;
  text-align: center;
}

.diag-cta h2 {
  font-family: var(--heading);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 500;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: 14px;
}

.diag-cta p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  max-width: 440px;
  margin: 0 auto 32px;
}

.diag-cta .eyebrow-white {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .diag-cta { padding: 60px 24px; }
}

@media (max-width: 480px) {
  .diag-cta { padding: 52px 20px; }
}


/* =============================================================================
   TERMINAL BOX (Autonomization phase only)
   ============================================================================= */

.terminal-box {
  margin-top: 32px;
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 24px;
  background: var(--accent-light);
}

.terminal-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.terminal-text {
  font-size: 14px;
  line-height: 1.65;
}