/* ═══════════════════════════════════════════════════════
   D\ Brand Story — Shared Styles
   Expression Infrastructure for Coding Agents
   ═══════════════════════════════════════════════════════ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Brand Palette */
  --signal: #EE8700;
  --signal-light: #F5A63D;
  --signal-dim: rgba(238,135,0,0.10);
  --signal-glow: rgba(238,135,0,0.25);
  --escape: #00C95F;
  --escape-light: #33D47F;
  --escape-dim: rgba(0,201,95,0.08);
  --escape-glow: rgba(0,201,95,0.20);

  /* Dark surfaces — warm charcoal (complements orange, lets green pop) */
  --dark-deep: #1A1614;
  --dark: #252220;
  --dark-elevated: #33302D;
  --dark-border: rgba(238,135,0,0.06);

  /* Light surfaces */
  --paper: #FEFBF5;
  --paper-warm: #F5EFE8;
  --paper-border: rgba(37,22,0,0.06);

  /* Ink */
  --ink: #1A1A18;
  --ink-secondary: #5C5C58;
  --ink-tertiary: #8A8A86;
  --ink-on-dark: #E8E4DE;
  --ink-secondary-on-dark: #A8A49E;
  --ink-tertiary-on-dark: #6E6A64;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Geist', -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing scale — tightened for premium reading density */
  --space-xs: 0.375rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 7rem;

  /* Layout */
  --content-width: 680px;
  --wide-width: 960px;
  --max-width: 1200px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-medium: 400ms;
  --duration-slow: 800ms;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

::selection {
  background: var(--signal);
  color: white;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg { display: block; max-width: 100%; }

/* --- Typography --- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.t-display {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.t-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.t-subhead {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.t-body {
  font-size: 1rem;
  line-height: 1.6;
}

.t-body-lg {
  font-size: 0.9375rem;
  line-height: 1.7;
  letter-spacing: 0.005em;
}

.t-small {
  font-size: 0.875rem;
  line-height: 1.6;
}

.t-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.t-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Page Themes --- */

.theme-dark {
  background: var(--dark);
  color: var(--ink-on-dark);
}

.theme-dark ::selection {
  background: var(--escape);
  color: var(--dark);
}

.theme-dark-deep {
  background: var(--dark-deep);
  color: var(--ink-on-dark);
}

.theme-light {
  background: var(--paper);
  color: var(--ink);
}

.theme-warm {
  background: var(--paper-warm);
  color: var(--ink);
}

/* --- Navigation --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--space-lg);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--dark-deep);
  transition: background var(--duration-medium) var(--ease-out),
              border-color var(--duration-medium) var(--ease-out);
}

.nav.scrolled {
  background: rgba(26, 22, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__logo svg {
  height: 20px;
  width: auto;
}

/* --- Grouped dropdown nav --- */
.nav__groups {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav__group {
  position: relative;
}

.nav__group-trigger {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  text-transform: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav__group-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav__group-trigger svg {
  width: 14px;
  height: 14px;
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.nav__group:hover .nav__group-trigger svg,
.nav__group.active .nav__group-trigger svg {
  opacity: 0.9;
}

.nav__group.active .nav__group-trigger svg:not(.chevron-icon) {
  color: var(--signal);
}

.nav__group-trigger .chevron-icon {
  width: 10px;
  height: 10px;
  opacity: 0.45;
  flex-shrink: 0;
  margin-left: 1px;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.nav__group:hover .nav__group-trigger .chevron-icon,
.nav__group.open .nav__group-trigger .chevron-icon {
  opacity: 0.75;
}

/* Keep the old ::after for backward compat — remove it */
.nav__group-trigger::after {
  content: none;
}

.nav__group:hover .nav__group-trigger {
  color: rgba(255, 255, 255, 0.95);
}

.nav__group.active .nav__group-trigger {
  color: var(--signal);
}

.nav__group.open .nav__group-trigger::after {
  transform: none;
}

/* Dropdown panel */
.nav__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  z-index: 200;
  background: rgba(30, 26, 23, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid var(--signal);
  border-radius: 8px;
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 150ms var(--ease-out),
              transform 150ms var(--ease-out),
              visibility 150ms;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 2px 12px rgba(0, 0, 0, 0.2);
}

.nav__group:hover .nav__dropdown,
.nav__group.open .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out);
}

.nav__dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav__dropdown-item.active {
  background: rgba(238, 135, 0, 0.08);
}

.nav__dropdown-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: lowercase;
  display: block;
}

.nav__dropdown-desc {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  display: block;
  margin-top: 1px;
}

.nav__dropdown-item:hover .nav__dropdown-title {
  color: white;
}

.nav__dropdown-item:hover .nav__dropdown-desc {
  color: rgba(255, 255, 255, 0.55);
}

.nav__dropdown-item.active .nav__dropdown-title {
  color: var(--signal);
}

/* Direct nav link (for single-page groups like Product) */
.nav__direct {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-on-dark);
  transition: color var(--duration-fast) var(--ease-out);
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__direct svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.nav__direct:hover svg {
  opacity: 0.85;
}

.nav__direct:hover,
.nav__direct.active {
  color: white;
}

.nav__direct.active {
  position: relative;
}

.nav__direct.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--signal);
}

/* Nav toggle (mobile) */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  width: 36px;
  height: 36px;
  position: relative;
  flex-shrink: 0;
}

.nav__toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s var(--ease-out);
}

.nav__toggle span:nth-child(1) {
  top: 13px;
}

.nav__toggle span:nth-child(2) {
  top: 22px;
}

/* X morph when open */
.nav__toggle.open span:nth-child(1) {
  top: 17px;
  transform: translateX(-50%) rotate(45deg);
}

.nav__toggle.open span:nth-child(2) {
  top: 17px;
  transform: translateX(-50%) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__badge { margin-right: auto; }
  .nav__cta { display: none; }

  .nav__mobile-cta {
    list-style: none;
    margin-top: var(--space-xl);
    padding: 0;
    border-top: none;
  }

  .nav__cta--mobile {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.65rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--paper);
    background: var(--signal);
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--duration-fast) var(--ease-out);
  }

  .nav__cta--mobile:hover {
    background: var(--signal-light);
  }
  .nav__home { display: none; }
  .nav__toggle { display: block; }

  .nav__groups {
    position: fixed;
    top: 52px;
    left: 0;
    width: 100%;
    height: calc(100vh - 52px);
    height: calc(100svh - 52px);
    z-index: 200;
    background: rgb(26, 22, 20);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: var(--space-lg);
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-medium) var(--ease-out);
    overflow-y: auto;
  }

  .nav__groups.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav__group {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav__group:last-child {
    border-bottom: none;
  }

  .nav__group-trigger {
    font-size: 0.875rem;
    padding: var(--space-sm) var(--space-xs);
    width: 100%;
    justify-content: space-between;
    color: var(--ink-on-dark);
    background: none;
  }

  .nav__group.active .nav__group-trigger {
    background: none;
  }

  /* Hide category icons on mobile, keep only chevron */
  .nav__group-trigger > svg:not(.chevron-icon) {
    display: none;
  }

  /* Mobile: dropdown is inline accordion, not absolute */
  .nav__dropdown {
    position: static;
    transform: none;
    min-width: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 var(--space-sm) var(--space-md);
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: max-height 300ms var(--ease-out), padding 300ms var(--ease-out);
  }

  .nav__group:hover .nav__dropdown {
    /* Disable hover on mobile — only click */
    max-height: 0;
    padding: 0 0 0 var(--space-md);
    opacity: 1;
    transform: none;
  }

  .nav__group.open .nav__dropdown {
    max-height: 500px;
    padding: 0 0 var(--space-sm) var(--space-md);
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__dropdown-title {
    color: var(--ink-on-dark);
  }

  .nav__dropdown-desc {
    color: var(--ink-tertiary-on-dark);
  }

  .nav__dropdown-item:hover {
    background: rgba(255,255,255,0.06);
  }

  .nav__dropdown-item.active .nav__dropdown-title {
    color: var(--signal-light);
  }

  .nav__direct {
    font-size: 0.875rem;
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--ink-on-dark);
  }
}

/* --- Layout --- */

.page-content {
  padding-top: 52px;
}

/* --- Breadcrumbs --- */

.breadcrumb {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg) 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.breadcrumb a {
  color: var(--ink-tertiary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

.breadcrumb__sep {
  color: var(--ink-tertiary);
  opacity: 0.6;
  font-size: 0.6rem;
  user-select: none;
}

.breadcrumb__current {
  color: var(--ink);
  font-weight: 500;
}

.theme-dark .breadcrumb a {
  color: rgba(255,255,255,0.45);
}

.theme-dark .breadcrumb a:hover {
  color: var(--signal-light);
}

.theme-dark .breadcrumb__sep {
  color: rgba(255,255,255,0.5);
  opacity: 0.8;
}

.theme-dark .breadcrumb__current {
  color: var(--ink-on-dark);
}

@media (max-width: 768px) {
  .breadcrumb { display: none; }
}

.section {
  padding: var(--space-2xl) var(--space-lg);
}

.section__inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section__inner--wide {
  max-width: var(--wide-width);
  margin: 0 auto;
}

.section__inner--full {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- Reveal Animations --- */
/* GSAP ScrollTrigger handles .reveal animation on all pages.
   Do NOT set opacity:0 here — it conflicts with gsap.from() which
   reads the computed value as its "to" target. */

.reveal-line {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal-line.visible {
  opacity: 1;
  transform: scaleX(1);
}

/* --- Common Elements --- */

.divider {
  height: 1px;
  background: var(--paper-border);
  border: none;
  margin: var(--space-xl) 0;
}

.theme-dark .divider,
.theme-dark-deep .divider {
  background: var(--dark-border);
}

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: var(--space-md);
  display: block;
}

.theme-dark .label,
.theme-dark-deep .label {
  color: var(--signal);
}

/* Page master label — outlined pill badge */
.label--pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border: 1px solid #CF7900;
  border-radius: 9999px;
  color: #CF7900;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  margin-bottom: var(--space-md);
  background: transparent;
}

.theme-dark .label--pill,
.theme-dark-deep .label--pill {
  border-color: #CF7900;
  color: #CF7900;
}

.prose p + p {
  margin-top: 1.25em;
}

.prose strong {
  font-weight: 600;
}

.theme-dark .prose strong {
  color: white;
}

.theme-light .prose strong,
.theme-warm .prose strong {
  color: var(--ink);
}

blockquote {
  border-left: 2px solid var(--signal);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  font-style: italic;
  color: var(--ink-secondary);
}

.theme-dark blockquote,
.theme-dark-deep blockquote {
  border-left-color: var(--signal);
  color: var(--ink-secondary-on-dark);
}

/* --- Page Header (each page hero) --- */

.page-hero {
  padding: var(--space-2xl) var(--space-lg);
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
}

.page-hero__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
}

.page-hero .label {
  margin-bottom: var(--space-sm);
}

.page-hero__title {
  margin-bottom: var(--space-md);
}

.page-hero__subtitle {
  color: var(--ink-secondary);
  max-width: 540px;
}

.theme-dark .page-hero__subtitle {
  color: var(--ink-secondary-on-dark);
}

/* --- Strategy Hero: integrated dark block flush with nav --- */

.page-hero--strategy {
  background: #000;
  min-height: auto;
  padding: var(--space-md) var(--space-lg) var(--space-xl);
  display: block;
}

.page-hero--strategy .breadcrumb {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 0 var(--space-lg);
}

.page-hero--strategy .breadcrumb a {
  color: rgba(255,255,255,0.45);
}

.page-hero--strategy .breadcrumb a:hover {
  color: var(--signal-light);
}

.page-hero--strategy .breadcrumb__sep {
  color: rgba(255,255,255,0.55);
}

.page-hero--strategy .breadcrumb__current {
  color: rgba(255,255,255,0.7);
}

.page-hero--strategy .breadcrumb__logo path:last-child {
  fill: rgba(255,255,255,0.6);
}

.page-hero--strategy .page-hero__inner {
  padding-top: var(--space-lg);
}

.page-hero--strategy .label {
  color: var(--signal-light);
  border-color: rgba(238,135,0,0.25);
}

.page-hero--strategy .page-hero__title {
  color: #fff;
}

.page-hero--strategy .page-hero__subtitle {
  color: rgba(255,255,255,0.55);
}

/* --- Surface Page Hero --- */

.page-hero--surface {
  background: var(--dark-deep);
  min-height: auto;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: block;
}
.page-hero--surface .breadcrumb {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 0 var(--space-lg);
}
.page-hero--surface .breadcrumb a { color: rgba(255,255,255,0.45); }
.page-hero--surface .breadcrumb a:hover { color: var(--escape-light); }
.page-hero--surface .breadcrumb__sep { color: rgba(255,255,255,0.55); }
.page-hero--surface .breadcrumb__current { color: rgba(255,255,255,0.7); }
.page-hero--surface .breadcrumb__logo path:last-child { fill: rgba(255,255,255,0.7); }
.page-hero--surface .page-hero__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding-top: var(--space-lg);
}
.page-hero--surface .label { color: var(--escape); border-color: rgba(0,201,95,0.3); }
.page-hero--surface .page-hero__title {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-xs);
}
.page-hero--surface .page-hero__subtitle { color: rgba(255,255,255,0.45); }

/* ═══════════════════════════════════════════════════════
   Surface Lightbox Strip — cinematic gallery navigation
   ═══════════════════════════════════════════════════════ */

.surface-lightbox {
  background: var(--dark-deep);
  padding: var(--space-sm) var(--space-lg) var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 52px;
  z-index: 10;
  transition: box-shadow var(--duration-medium) var(--ease-out);
}

.surface-lightbox.stuck {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.surface-lightbox__header {
  max-width: var(--max-width);
  margin: 0 auto var(--space-md);
  display: flex;
  flex-direction: column;
}

.surface-lightbox__header-top {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}

.surface-lightbox__subtitle {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(255,255,255,0.3);
  margin-top: 0.375rem;
  line-height: 1.5;
  max-width: 520px;
}

.surface-lightbox__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--escape);
}

.surface-lightbox__sep {
  color: rgba(255,255,255,0.2);
  font-size: 0.75rem;
}

.surface-lightbox__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
}

.surface-lightbox__thumbs {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.surface-lightbox__thumbs::-webkit-scrollbar {
  display: none;
}

.surface-lightbox__thumb {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 120px;
  padding: var(--space-sm) var(--space-md);
  background: #252220;
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom: 3px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.surface-lightbox__thumb:hover {
  background: #2A2826;
  border-color: rgba(0,201,95,0.15);
  border-bottom-color: rgba(0,201,95,0.3);
}

.surface-lightbox__thumb.active {
  background: #2A2826;
  border-bottom-color: var(--escape);
}

.surface-lightbox__thumb-index {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.25);
  transition: color var(--duration-fast) var(--ease-out);
}

.surface-lightbox__thumb.active .surface-lightbox__thumb-index {
  color: var(--escape);
}

.surface-lightbox__thumb-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-out);
}

.surface-lightbox__thumb.active .surface-lightbox__thumb-label {
  color: rgba(255,255,255,0.85);
}

/* --- Gallery Fold Sections --- */

.gallery-fold {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  scroll-margin-top: 140px;
}

.gallery-fold > .section__inner,
.gallery-fold > .section__inner--wide,
.gallery-fold > .section__inner--full {
  flex: none;
  width: 100%;
}

/* Compact hero for documentation / reference pages */
.page-hero--compact {
  min-height: auto;
  margin-top: -52px;
  padding-top: calc(52px + var(--space-lg));
  padding-bottom: var(--space-xl);
}

.page-hero--compact .breadcrumb {
  padding: 0;
  margin-bottom: var(--space-xl);
}

/* Glossary hero: widen to match glossary-layout grid */
.page-hero--glossary .page-hero__inner {
  max-width: var(--wide-width);
}

.page-hero--glossary .breadcrumb {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* --- Footer --- */

.footer {
  background: var(--dark-deep);
  color: var(--ink-secondary-on-dark);
  padding: var(--space-xl) var(--space-lg);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
}

.footer__brand svg {
  height: 18px;
  margin-bottom: var(--space-sm);
}

.footer__tagline {
  font-size: 0.75rem;
  color: var(--ink-tertiary-on-dark);
  white-space: nowrap;
}

.footer__nav {
  display: flex;
  gap: var(--space-xl);
}

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-tertiary-on-dark);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__col a {
  font-size: 0.875rem;
  color: var(--ink-secondary-on-dark);
  transition: color var(--duration-fast);
}

.footer__col a:hover {
  color: white;
}

.footer__bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--ink-tertiary-on-dark);
}

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
    gap: var(--space-lg);
  }
  .footer__nav {
    flex-direction: column;
    gap: var(--space-lg);
  }
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

/* --- Page navigation (prev/next) --- */

.page-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xl) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.page-nav__item--next {
  text-align: right;
  margin-left: auto;
}

.page-nav__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.theme-dark .page-nav__label {
  color: var(--ink-tertiary-on-dark);
}

.page-nav__title {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color var(--duration-fast);
}

.page-nav__item:hover .page-nav__title {
  color: var(--signal);
}

/* page-nav hover uses signal on light theme */

/* --- Utility --- */

.text-signal { color: var(--signal); }
.text-escape { color: var(--escape); }
.text-secondary { color: var(--ink-secondary); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* --- Responsive --- */

@media (max-width: 768px) {
  :root {
    --space-3xl: 6rem;
    --space-2xl: 4rem;
  }
  .section {
    padding: var(--space-2xl) var(--space-md);
  }
  .page-hero {
    padding: var(--space-2xl) var(--space-md);
    min-height: 50vh;
  }
  .page-hero--strategy {
    padding: var(--space-md) var(--space-md) var(--space-lg);
    min-height: auto;
  }
  .page-hero--strategy .breadcrumb {
    display: flex;
  }
  .page-hero--compact {
    min-height: auto;
    margin-top: 0;
    padding-top: calc(52px + var(--space-md));
    padding-bottom: var(--space-lg);
  }
  .page-hero--surface {
    padding: var(--space-md) var(--space-md) var(--space-lg);
    min-height: auto;
  }
  .page-hero--surface .breadcrumb {
    display: none;
  }
  .page-hero--surface .page-hero__inner {
    padding-top: var(--space-xs);
  }
  .surface-lightbox {
    padding: var(--space-md) var(--space-sm) var(--space-sm);
  }
  .surface-lightbox__thumb {
    min-width: 100px;
    padding: 6px 10px;
  }
  .surface-lightbox__thumb-label {
    font-size: 0.6875rem;
  }
  .gallery-fold {
    min-height: auto;
    scroll-margin-top: 120px;
  }
}

@media (max-width: 480px) {
  :root {
    --space-3xl: 4rem;
    --space-2xl: 3rem;
  }
}

/* --- UI Components: Chips --- */

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: var(--signal-dim);
  color: var(--signal);
  border: 1px solid rgba(238,135,0,0.12);
}

.theme-light .chip,
.theme-warm .chip {
  background: rgba(238,135,0,0.06);
  border-color: rgba(238,135,0,0.10);
}

/* --- UI Components: Cards --- */

.card {
  padding: var(--space-md);
  background: var(--dark-elevated);
  border-radius: 6px;
  border: 1px solid var(--dark-border);
}

.theme-light .card,
.theme-warm .card {
  background: white;
  border-color: var(--paper-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* --- UI Components: Section Divider (faded line) --- */

.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--dark-border), transparent);
  border: none;
  margin: var(--space-2xl) auto;
  max-width: var(--content-width);
}

.theme-light .section-divider,
.theme-warm .section-divider {
  background: linear-gradient(to right, transparent, var(--paper-border), transparent);
}

/* --- Logo Morph (designless → D\) --- */

.nav__logo {
  position: relative;
  overflow: hidden;
}

.nav__wordmark {
  display: block;
  color: white;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.nav__mark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.nav.scrolled .nav__wordmark {
  opacity: 0;
  transform: translateX(-8px);
}

.nav.scrolled .nav__mark {
  opacity: 1;
}

/* --- Nav Badge (Story) --- */

.nav__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.75rem;
  margin-right: auto;
  padding: 0.15rem 0.45rem;
  background: transparent;
  border: 1px solid var(--escape);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.585rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--escape);
  line-height: 1.4;
  white-space: nowrap;
  transition: opacity 0.4s var(--ease-out);
}

.nav.scrolled .nav__badge {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

/* --- Nav External CTA --- */

.nav__cta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  background: var(--signal);
  border: none;
  border-radius: 6px;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  margin-left: var(--space-md);
  flex-shrink: 0;
}

.nav__cta:hover {
  background: var(--signal-light);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(238, 135, 0, 0.3);
}

.nav__cta-arrow {
  display: inline-block;
  margin-left: 0.2em;
  transition: transform var(--duration-fast) var(--ease-out);
}

.nav__cta:hover .nav__cta-arrow {
  transform: translateX(2px);
}

/* --- Nav Home Icon --- */

.nav__home {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary-on-dark);
  transition: color var(--duration-fast) var(--ease-out);
  padding: 4px;
  margin-right: 0.25rem;
  text-decoration: none;
}

.nav__home svg {
  width: 15px;
  height: 15px;
}

.nav__home:hover {
  color: white;
}

.nav__home.active {
  color: white;
}

/* --- Breadcrumb: D\ logo mark --- */

.breadcrumb__logo {
  display: inline-flex;
  align-items: center;
}

.breadcrumb__logo svg {
  width: 20px;
  height: 11px;
}

.breadcrumb__logo path:first-child {
  fill: var(--signal);
}

.breadcrumb__logo path:last-child {
  fill: var(--ink);
}

.theme-dark .breadcrumb__logo path:last-child {
  fill: var(--ink-on-dark);
}

/* --- Breadcrumb: hidden state for index hero --- */

.breadcrumb--hidden {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0 var(--space-lg);
  overflow: hidden;
  transition: opacity 0.3s var(--ease-out), height 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}

.breadcrumb--visible {
  opacity: 1;
  pointer-events: all;
  height: auto;
  padding: var(--space-md) var(--space-lg) 0;
  transition: opacity 0.3s var(--ease-out), height 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}

/* --- SVG Section Decorators --- */

.section-decorator {
  position: absolute;
  pointer-events: none;
  opacity: 0.04;
  z-index: 0;
}

.section-decorator--right {
  right: -5%;
  top: 10%;
}

.section-decorator--left {
  left: -5%;
  top: 15%;
}

.section { position: relative; overflow: hidden; }

/* ═══════════════════════════════════════════════════════
   Standardized Components — Consistent across all pages
   ═══════════════════════════════════════════════════════ */

/* --- Pull Quote (ONE style everywhere) --- */

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
  border-left: 2px solid var(--signal);
  padding-left: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.theme-dark .pull-quote,
.theme-dark-deep .pull-quote {
  color: var(--ink-on-dark);
}

@media (max-width: 768px) {
  .pull-quote {
    padding-left: var(--space-md);
    margin: var(--space-xl) 0;
  }
}

/* --- Section Break (ONE divider style everywhere) --- */

.section-break {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--paper-border), transparent);
  margin: var(--space-3xl) 0;
  position: relative;
}

.section-break::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0.25;
}

.theme-dark .section-break,
.theme-dark-deep .section-break {
  background: linear-gradient(to right, transparent, var(--dark-border), transparent);
}

.theme-dark .section-break::after,
.theme-dark-deep .section-break::after {
  background: var(--signal);
  opacity: 0.35;
}

/* --- CTA Card (standardized) --- */

.cta-card {
  background: var(--paper-warm);
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  margin-top: var(--space-2xl);
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--ink);
}

.cta-card p {
  color: var(--ink-secondary);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  font-size: 1rem;
}

.cta-card a.cta-btn {
  display: inline-block;
  padding: 0.625rem 1.75rem;
  background: var(--signal);
  color: white;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background var(--duration-fast), transform var(--duration-fast);
}

.cta-card a.cta-btn:hover {
  background: var(--signal-light);
  transform: translateY(-1px);
}

/* --- Accent Block (warm background break from text) --- */

.accent-block {
  background: var(--paper-warm);
  border-radius: 8px;
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-2xl) 0;
}

.accent-block--dark {
  background: var(--dark);
  color: var(--ink-on-dark);
  border-radius: 8px;
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-2xl) 0;
}

.accent-block--dark .label { color: var(--signal); }
.accent-block--dark strong { color: white; }
.accent-block--dark p { color: var(--ink-secondary-on-dark); }

/* --- Two Column Layout (break vertical monotony) --- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* --- Persona Shift Grid --- */

.persona-shift {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: var(--space-sm) var(--space-md);
  align-items: baseline;
}

.persona-shift__role {
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--signal);
}

@media (max-width: 768px) {
  .persona-shift {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  .persona-shift .label {
    display: none;
  }
  .persona-shift__role {
    margin-top: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  .persona-shift p::before {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.5;
    display: block;
    margin-bottom: 2px;
  }
  .persona-shift p:nth-of-type(odd)::before {
    content: 'Before';
  }
  .persona-shift p:nth-of-type(even)::before {
    content: 'After';
  }
}

/* --- Stat / Highlight Callout --- */

.callout-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin: var(--space-2xl) 0;
}

.callout-item {
  padding: var(--space-md);
  border-left: 2px solid var(--signal);
}

.callout-item__value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--signal);
  line-height: 1.1;
  margin-bottom: var(--space-xs);
}

.callout-item__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

/* --- Wide Breakout (escape the 680px column) --- */

.breakout {
  max-width: var(--wide-width);
  margin-left: auto;
  margin-right: auto;
}

/* --- Inline Emphasis (large italic statement mid-text) --- */

.emphasis-line {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  margin: var(--space-2xl) auto;
  max-width: 600px;
}

.theme-dark .emphasis-line {
  color: var(--ink-on-dark);
}

/* --- Standard Content Section (consistent padding everywhere) --- */

.content-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

@media (max-width: 768px) {
  .content-section {
    padding: var(--space-xl) var(--space-md);
  }
}

/* ═══════════════════════════════════════════════════════
   Key Insight — border-left accent callout
   ═══════════════════════════════════════════════════════ */

.key-insight {
  position: relative;
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-2xl) 0;
  border-left: 3px solid var(--signal);
  background: rgba(238, 135, 0, 0.03);
  border-radius: 0 6px 6px 0;
}

.key-insight__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: var(--space-sm);
  display: block;
}

.key-insight__text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.theme-dark .key-insight {
  background: rgba(238, 135, 0, 0.05);
}

.theme-dark .key-insight__text {
  color: var(--ink-on-dark);
}

/* ═══════════════════════════════════════════════════════
   Timeline — vertical stepped progression
   ═══════════════════════════════════════════════════════ */

.timeline {
  position: relative;
  padding-left: var(--space-xl);
  margin: var(--space-2xl) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--dark-border);
}

.timeline__step {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline__step:last-child {
  padding-bottom: 0;
}

.timeline__marker {
  position: absolute;
  left: calc(-1 * var(--space-xl) + 0px);
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--signal);
  z-index: 1;
}

.timeline__step--active .timeline__marker {
  background: var(--signal);
}

.timeline__number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--signal);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  display: block;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.timeline__body {
  font-size: 0.975rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  max-width: 560px;
}

.theme-dark .timeline::before {
  background: rgba(255, 255, 255, 0.1);
}

.theme-dark .timeline__marker {
  background: var(--dark);
}

.theme-dark .timeline__title {
  color: var(--ink-on-dark);
}

.theme-dark .timeline__body {
  color: var(--ink-secondary-on-dark);
}

/* ═══════════════════════════════════════════════════════
   Callout Card — signal-bordered emphasis card
   ═══════════════════════════════════════════════════════ */

.callout-card {
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  border: 1px solid rgba(238, 135, 0, 0.2);
  border-radius: 8px;
  background: rgba(238, 135, 0, 0.02);
}

.callout-card__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: var(--space-sm);
  display: block;
}

.callout-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.callout-card__body {
  font-size: 0.975rem;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.callout-card__body p {
  margin-bottom: 0.5rem;
}

.callout-card__body p:last-child {
  margin-bottom: 0;
}

.callout-card + .callout-card {
  margin-top: var(--space-md);
}

.theme-dark .callout-card {
  border-color: rgba(238, 135, 0, 0.15);
  background: rgba(238, 135, 0, 0.04);
}

.theme-dark .callout-card__title {
  color: var(--ink-on-dark);
}

.theme-dark .callout-card__body {
  color: var(--ink-secondary-on-dark);
}

/* ═══════════════════════════════════════════════════════
   VMP Block — Vision / Mission / Purpose cards
   ═══════════════════════════════════════════════════════ */

.vmp-block {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  margin: var(--space-lg) 0;
  border: 1px solid rgba(238, 135, 0, 0.25);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(238, 135, 0, 0.03) 0%, transparent 60%);
}

.vmp-block__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: var(--space-md);
  display: block;
}

.vmp-block__statement {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.vmp-block__detail {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.vmp-block + .vmp-block {
  margin-top: var(--space-md);
}

.theme-dark .vmp-block {
  border-color: rgba(238, 135, 0, 0.2);
  background: linear-gradient(135deg, rgba(238, 135, 0, 0.05) 0%, transparent 60%);
}

.theme-dark .vmp-block__statement {
  color: var(--ink-on-dark);
}

.theme-dark .vmp-block__detail {
  color: var(--ink-secondary-on-dark);
}

.vmp-block--green {
  border-color: rgba(0, 201, 95, 0.25);
  background: linear-gradient(135deg, rgba(0, 201, 95, 0.03) 0%, transparent 60%);
}

.vmp-block--green .vmp-block__label {
  color: #00C95F;
}

/* ═══════════════════════════════════════════════════════
   Section Decorator — SVG abstract section breaks
   ═══════════════════════════════════════════════════════ */

.section-decorator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl) 0;
  opacity: 0.5;
}

.section-decorator svg {
  max-width: 200px;
  height: auto;
}

@media (max-width: 768px) {
  .key-insight {
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-xl) 0;
  }

  .timeline {
    padding-left: var(--space-lg);
  }

  .callout-card {
    padding: var(--space-lg);
  }

  .vmp-block {
    padding: var(--space-lg);
  }
}

/* ═══════════════════════════════════════════════════════
   Glossary — SPA-style sidebar + search
   ═══════════════════════════════════════════════════════ */

.glossary-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-2xl);
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  align-items: start;
}

/* --- Sidebar --- */

.glossary-sidebar {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  padding-right: var(--space-md);
  border-right: 1px solid var(--dark-border);
}

.glossary-search {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--paper-warm);
  border: 1px solid var(--paper-border);
  border-radius: 4px;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  margin-bottom: var(--space-lg);
}

.glossary-search::placeholder {
  color: var(--ink-tertiary);
  opacity: 1;
}

.glossary-search:focus {
  background: #fff;
  border-color: var(--signal);
}

.glossary-sidebar__category {
  margin-bottom: var(--space-md);
}

.glossary-sidebar__cat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 0.35rem;
  padding-left: 0.5rem;
}

.glossary-sidebar__item {
  display: block;
  padding: 0.3rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-secondary);
  text-decoration: none;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.glossary-sidebar__item:hover {
  color: var(--ink);
  background: rgba(238, 135, 0, 0.04);
}

.glossary-sidebar__item.active {
  color: var(--signal);
  border-left-color: var(--signal);
  background: rgba(238, 135, 0, 0.06);
  font-weight: 500;
}

.glossary-sidebar__item.hidden {
  display: none;
}

.glossary-sidebar__category.hidden {
  display: none;
}

/* --- Glossary content pane --- */

.glossary-entries {
  min-width: 0;
}

.glossary-intro {
  max-width: 600px;
  text-align: left;
  padding: 0 0 var(--space-xl);
}

.glossary-intro p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.glossary-entry {
  padding: var(--space-2xl) 0;
  scroll-margin-top: 80px;
}

.glossary-entry + .glossary-entry {
  border-top: 1px solid var(--dark-border);
}

.glossary-entry.hidden {
  display: none;
}

.glossary-entry__term {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--signal);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  display: block;
}

.glossary-entry__body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 600px;
}

.glossary-entry__body p {
  margin-bottom: 0.75rem;
}

.glossary-entry__body p:last-child {
  margin-bottom: 0;
}

.glossary-entry__why {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-left: 2px solid var(--signal);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.glossary-entry__why strong {
  color: var(--ink);
  font-weight: 500;
}

.glossary-no-results {
  padding: var(--space-2xl) 0;
  text-align: center;
  color: var(--ink-tertiary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  display: none;
}

.glossary-no-results.visible {
  display: block;
}

/* --- Glossary mobile --- */

@media (max-width: 768px) {
  .glossary-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: var(--space-md) var(--space-md);
  }

  .glossary-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--dark-border);
    padding-right: 0;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .glossary-sidebar__nav {
    display: none;
  }

  .glossary-intro {
    text-align: center;
    margin: 0 auto;
  }
}
