/*
  Hassana Labs – Anthropic-inspired design system
  - Editorial typography with Anthropic Sans/Serif
  - Mega-dropdown navigation
  - Product spotlight hero
  - Asymmetric bento grids
  - Quote blocks
  - CTA bands
  - Multi-column footer
*/

/* ==========================================================================
   FONTS
   ========================================================================== */

@font-face {
  font-family: "Jetbrains Mono";
  src: url("https://cdn.prod.website-files.com/67ce28cfec624e2b733f8a52/691cda762a35b6bc5a28ffaa_JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Anthropic Sans";
  src: url("https://cdn.prod.website-files.com/67ce28cfec624e2b733f8a52/6931e8a95706378cf227c83d_AnthropicSans-Roman-Web.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Anthropic Sans";
  src: url("https://cdn.prod.website-files.com/67ce28cfec624e2b733f8a52/6931e8a96f4a2fb0fac5769d_AnthropicSans-Italic-Web.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Anthropic Serif";
  src: url("https://cdn.prod.website-files.com/67ce28cfec624e2b733f8a52/6931e8aa15739b7c09d56ee1_AnthropicSerif-Roman-Web.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Anthropic Serif";
  src: url("https://cdn.prod.website-files.com/67ce28cfec624e2b733f8a52/6931e8aaff2421cbb9f4cebe_AnthropicSerif-Italic-Web.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  --bg: #faf9f5;
  --ink: #141413;
  --muted: #5e5d59;
  --muted-2: #87867f;
  --accent: #c6613f;
  --accent-2: #d97757;
  --accent-soft: rgba(198, 97, 63, 0.12);
  --grad-1: linear-gradient(135deg, #c6613f 0%, #e88a5a 100%);
  --grad-2: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  --grad-3: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  --line: rgba(20, 20, 19, 0.1);
  --line-strong: rgba(20, 20, 19, 0.18);
  --surface: #f0eee6;
  --surface-2: #ffffff;
  --footer-bg: #141413;
  --footer-ink: #faf9f5;
  --footer-muted: rgba(250, 249, 245, 0.6);
  --site-margin: clamp(1.5rem, 1rem + 3.9vw, 5rem);
  --nav-height: 4rem;
  --max-width: min(72rem, calc(100vw - var(--site-margin) * 2));
  --max-width-narrow: min(56rem, calc(100vw - 4rem));
  --section-pad: clamp(5rem, 8vw, 10rem);
  --section-pad-compact: clamp(3rem, 5vw, 6rem);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --fs-body: 15px;
  --fs-small: 13px;
  --font-base: "Anthropic Serif", Georgia, serif;
  --font-display: "Anthropic Sans", system-ui, sans-serif;
  --font-mono: "Jetbrains Mono", ui-monospace, monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video { max-width: 100%; height: auto; display: block; }

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--site-margin);
}
.container.narrow { max-width: var(--max-width-narrow); }
.section { padding: var(--section-pad) 0; }
.section.compact { padding: var(--section-pad-compact) 0; }
section[id] { scroll-margin-top: calc(var(--nav-height) + 2rem); }

/* ==========================================================================
   STAGE 1: MEGA NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--site-margin);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand:hover { color: var(--ink); text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links-primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links-primary > a,
.nav-dropdown-toggle {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.nav-links-primary > a:hover,
.nav-dropdown-toggle:hover {
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-dropdown { position: static; }

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown-icon {
  font-size: 10px;
  transition: transform var(--duration-fast) ease;
}
.nav-dropdown:hover .nav-dropdown-icon { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 2rem var(--site-margin);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              visibility 0s linear var(--duration-normal);
  z-index: 99;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.nav-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-dropdown-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  margin-bottom: 0.25rem;
}

.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem 0;
}
.nav-dropdown-item:hover { opacity: 0.7; }

.nav-dropdown-item-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.nav-dropdown-item-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin: 0 0 1rem; color: var(--muted); }

.lead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 48ch;
}

.section-kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

/* ==========================================================================
   STAGE 2: PRODUCT SPOTLIGHT HERO
   ========================================================================== */

.hero { padding: clamp(4rem, 8vw, 8rem) 0; }

.hero-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-badge {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--surface-2);
  background: var(--accent);
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-sm);
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.3;
  color: var(--muted);
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-media {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
}

.hero-media-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-media-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--r-lg);
  padding: 1rem;
}

.hero-product-card {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.hero-product-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.hero-product-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

/* Announcement Banner */
.announcement-banner {
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 0;
  font-family: var(--font-display);
  font-size: 14px;
}

.announcement-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.announcement-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-sm);
}

.announcement-text { opacity: 0.9; }

.announcement-link {
  color: var(--bg);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.announcement-link:hover { color: var(--bg); opacity: 0.8; }

.announcement-close {
  background: transparent;
  border: 0;
  color: var(--bg);
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
  opacity: 0.6;
  font-size: 1.25rem;
  line-height: 1;
}
.announcement-close:hover { opacity: 1; }

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

.btn {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}
.btn:hover {
  border-color: var(--line-strong);
  background: #fff;
  text-decoration: none;
}

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn.primary:hover {
  background: #2d2d2b;
  border-color: #2d2d2b;
}

.btn.secondary { background: transparent; }
.btn.small { padding: 0.5rem 0.875rem; font-size: 13px; }

/* ==========================================================================
   PILLS
   ========================================================================== */

.pill {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.pill-accent, .pill-light {
  background: var(--accent-soft);
  border-color: rgba(198, 97, 63, 0.2);
  color: var(--accent);
}

.pill-link {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.pill-link:hover { color: var(--accent); text-decoration: none; }
.pill-link::after {
  content: '→';
  transition: transform var(--duration-fast) ease;
}
.pill-link:hover::after { transform: translateX(3px); }

/* ==========================================================================
   STAGE 3: ASYMMETRIC BENTO GRID
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.bento-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-fast) ease;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.bento-card.w-2 { grid-column: span 4; }
.bento-card.w-4 { grid-column: span 4; }
.bento-card.w-6 { grid-column: span 6; }
.bento-card.w-8 { grid-column: span 8; }
.bento-card.w-12 { grid-column: span 12; }
.bento-card.h-2 { grid-row: span 2; }

.bento-card.featured {
  grid-column: span 8;
  grid-row: span 2;
  padding: 2rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}
.bento-card.featured::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.bento-card.featured h3 { font-size: 1.5rem; }
.bento-card.featured p { font-size: 1rem; max-width: 48ch; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.card-toggle {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.card-toggle:hover { background: var(--surface); color: var(--ink); }

.card-body {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.card h3, .card p { margin: 0; }
.teaser { margin: 0; }

.grid { display: grid; gap: 1.25rem; }
.grid.thirds { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ==========================================================================
   PUBLICATIONS LIST (Compact Table Style)
   ========================================================================== */

.pub-list {
  display: flex;
  flex-direction: column;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.pub-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 3rem 1.5rem;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background var(--duration-fast) ease,
              transform var(--duration-normal) var(--ease-out);
}

.pub-row:last-child {
  border-bottom: none;
}

.pub-row:hover {
  background: var(--surface);
  transform: translateX(4px);
}

.pub-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pub-cat {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.375rem 0.625rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.pub-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.pub-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-summary {
  font-family: var(--font-base);
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
}

.pub-arrow {
  font-size: 1.125rem;
  color: var(--muted-2);
  transition: transform var(--duration-fast) ease,
              color var(--duration-fast) ease;
}

.pub-row:hover .pub-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* Publications List Responsive */
@media (max-width: 900px) {
  .pub-row {
    grid-template-columns: 6.5rem 1fr 1.5rem;
    gap: 1rem;
  }

  .pub-year {
    display: none;
  }
}

@media (max-width: 640px) {
  .pub-row {
    grid-template-columns: 1fr auto;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }

  .pub-cat {
    display: none;
  }

  .pub-name {
    white-space: normal;
    font-size: 0.9375rem;
  }

  .pub-summary {
    white-space: normal;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .pub-row {
    padding: 0.875rem 1rem;
  }

  .pub-info {
    gap: 0.125rem;
  }

  .pub-name {
    font-size: 0.875rem;
  }

  .pub-summary {
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   STAGE 4: QUOTE BLOCKS
   ========================================================================== */

.quote-section {
  padding: var(--section-pad) 0;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.quote-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(198, 97, 63, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.quote-wrapper {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 4rem;
}

.quote-decoration {
  position: absolute;
  font-family: var(--font-base);
  font-size: clamp(6rem, 12vw, 10rem);
  font-weight: 400;
  color: var(--accent);
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.quote-decoration--left {
  top: -1.5rem;
  left: 0;
}

.quote-decoration--right {
  bottom: -3rem;
  right: 0;
}

.quote-block {
  max-width: 48ch;
  margin: 0 auto;
  text-align: center;
  padding: 0;
  border: 0;
  position: relative;
  z-index: 1;
}

.quote-block p {
  font-family: var(--font-base);
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.quote-block p strong {
  font-weight: 600;
  color: var(--accent);
}

.quote-attribution {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2rem;
  font-style: normal;
}

.quote-source {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.quote-source::after {
  content: '·';
  margin-left: 0.5rem;
  color: var(--muted-2);
  font-weight: 400;
}

.quote-meta {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.quote-accent-line {
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin: 2rem auto 0;
  border-radius: 2px;
}

/* Quote section responsive */
@media (max-width: 768px) {
  .quote-section::before {
    width: 400px;
    height: 400px;
  }

  .quote-wrapper {
    padding: 2rem 1.5rem;
  }

  .quote-decoration {
    font-size: clamp(4rem, 10vw, 6rem);
  }

  .quote-decoration--left {
    top: -0.5rem;
    left: 0.5rem;
  }

  .quote-decoration--right {
    bottom: -1rem;
    right: 0.5rem;
  }

  .quote-block p {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
  }

  .quote-attribution {
    flex-direction: column;
    gap: 0.25rem;
  }

  .quote-source::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .quote-section::before {
    width: 300px;
    height: 300px;
  }

  .quote-wrapper {
    padding: 1.5rem 1rem;
  }

  .quote-decoration {
    font-size: 3.5rem;
    opacity: 0.08;
  }

  .quote-decoration--left {
    top: -0.25rem;
    left: 0.25rem;
  }

  .quote-decoration--right {
    bottom: -0.5rem;
    right: 0.25rem;
  }

  .quote-block p {
    font-size: 1rem;
  }

  .quote-accent-line {
    width: 2rem;
    margin-top: 1.5rem;
  }
}

/* ==========================================================================
   MISSION SNAPSHOT
   ========================================================================== */

.mission-snapshot {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mission-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.mission-story {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mission-quote {
  font-family: var(--font-serif, var(--font-base));
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
}

.mission-quote strong {
  font-weight: 600;
  color: var(--accent);
  font-style: normal;
}

.mission-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.mission-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap var(--duration-fast) ease;
}

.mission-link:hover {
  gap: 0.75rem;
  color: var(--accent-2);
}

.mission-link span {
  transition: transform var(--duration-fast) ease;
}

.mission-link:hover span {
  transform: translateX(2px);
}

.mission-pill {
  background: var(--accent-soft);
  border: 1px solid rgba(198, 97, 63, 0.2);
  border-radius: 1.5rem;
  padding: 1rem;
}

.mission-pill-inner {
  background: var(--surface-2);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
}

.mission-pill-text {
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.7;
  text-align: left;
}

@media (max-width: 900px) {
  .mission-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .mission-pill {
    padding: 0.75rem;
    border-radius: 1.25rem;
  }

  .mission-pill-inner {
    padding: 1.25rem;
    border-radius: 0.75rem;
  }
}

@media (max-width: 480px) {
  .mission-quote {
    font-size: 1.125rem;
    padding-left: 1rem;
  }

  .mission-pill-text {
    font-size: 0.9375rem;
  }
}

/* ==========================================================================
   STAGE 5: BLOG/NEWS CARDS
   ========================================================================== */

.blog-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.blog-card-category {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.blog-card-date { font-size: 13px; color: var(--muted-2); }
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
}
.blog-card-excerpt { font-size: 14px; color: var(--muted); margin: 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ==========================================================================
   BLOG INDEX (Ghost-style hierarchy)
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.blog-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.post-reading .tag-row {
  display: none;
}

.post-reading .blog-topbar {
  margin-top: 1rem;
  justify-content: flex-start;
}

.search-toggle {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-fast) ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.search-toggle:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.search-toggle-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-panel {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.search-panel-inner {
  display: grid;
  gap: 0.75rem;
}

.search-input-wrap {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-close {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.search-results {
  display: grid;
  gap: 0.5rem;
}

.search-result {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--ink);
}
.search-result:hover {
  border-color: var(--line);
  text-decoration: none;
}
.search-result-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 0.25rem;
}
.search-result-meta {
  font-size: 12px;
  color: var(--muted-2);
}

.featured-row:empty {
  display: none;
}

.featured-row {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

.post-card {
  grid-column: span 2;
  display: grid;
  gap: 1rem;
  text-decoration: none;
  color: var(--ink);
}

.post-card-featured {
  grid-column: span 6;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.post-card-media {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: block;
}
.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card-media-empty {
  min-height: 160px;
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(198, 97, 63, 0.18), transparent 60%),
    repeating-linear-gradient(135deg, rgba(198, 97, 63, 0.08) 0px, rgba(198, 97, 63, 0.08) 2px, transparent 2px, transparent 10px),
    linear-gradient(180deg, rgba(250, 248, 245, 0.9), rgba(250, 248, 245, 0.6));
}
.post-card-media-empty::after {
  content: 'HASSANA LABS';
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(11, 11, 11, 0.55);
}
.post-card-featured .post-card-media {
  grid-column: span 2;
  min-height: 320px;
}

.post-card-body {
  display: grid;
  gap: 0.5rem;
}

.post-card-meta {
  color: var(--muted-2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.post-card-featured .post-card-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.05;
}

.post-card-excerpt {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  max-width: 720px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-featured .post-card-excerpt {
  -webkit-line-clamp: 3;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.post-card-tags .pill {
  background: rgba(198, 97, 63, 0.12);
  border-color: rgba(198, 97, 63, 0.3);
  color: var(--ink);
}

.post-byline {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.byline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.byline-tags .pill {
  font-size: 12px;
  background: rgba(198, 97, 63, 0.12);
  border-color: rgba(198, 97, 63, 0.35);
  color: var(--ink);
}


/* ==========================================================================
   STAGE 6: CTA BANDS
   ========================================================================== */

.cta-band {
  background: var(--ink);
  color: var(--bg);
  padding: var(--section-pad-compact) 0;
}
.cta-band .container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.cta-band h2 { color: var(--bg); margin: 0; }
.cta-band p { color: rgba(250, 249, 245, 0.7); margin: 0; max-width: 48ch; }

.cta-band-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-band .btn.primary {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--ink);
}
.cta-band .btn.primary:hover { background: #fff; }
.cta-band .btn.secondary {
  background: transparent;
  border-color: rgba(250, 249, 245, 0.3);
  color: var(--bg);
}
.cta-band .btn.secondary:hover {
  background: rgba(250, 249, 245, 0.1);
  border-color: rgba(250, 249, 245, 0.5);
}

/* ==========================================================================
   STAGE 7: FOOTER
   ========================================================================== */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  margin-top: var(--section-pad);
}

.footer-top { padding: 4rem 0 3rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
}

.footer-brand { max-width: 280px; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--footer-ink);
  margin-bottom: 1rem;
}
.footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: var(--footer-muted);
  margin: 0;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--footer-muted);
  margin: 0 0 1rem;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--footer-ink);
  padding: 0.375rem 0;
  transition: opacity var(--duration-fast) ease;
}
.footer-col a:hover { opacity: 0.7; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--footer-muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--footer-ink);
  transition: opacity var(--duration-fast) ease;
}
.footer-links a:hover { opacity: 0.7; text-decoration: none; }

/* ==========================================================================
   STAGE 8: ANIMATIONS
   ========================================================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
[data-animate-stagger].visible > *:nth-child(1) { transition-delay: 0s; }
[data-animate-stagger].visible > *:nth-child(2) { transition-delay: 0.1s; }
[data-animate-stagger].visible > *:nth-child(3) { transition-delay: 0.1s; }
[data-animate-stagger].visible > *:nth-child(4) { transition-delay: 0.15s; }
[data-animate-stagger].visible > *:nth-child(5) { transition-delay: 0.2s; }
[data-animate-stagger].visible > *:nth-child(6) { transition-delay: 0.25s; }
[data-animate-stagger].visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   FEATURE SECTIONS
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.feature-media-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
}
.feature-media {
  height: 260px;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(198, 97, 63, 0.1) 100%);
}
.feature-media-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feature-title { font-size: clamp(1.5rem, 2.5vw, 2rem); margin: 0; }

.feature-list {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.feature-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.feature-item:last-child { padding-bottom: 0; border-bottom: 0; }
.feature-item-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.feature-item p { margin: 0; font-size: 14px; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat { padding: 2rem 1rem; }
.stat-number-wrapper {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.stat-label { font-size: 14px; color: var(--muted); margin: 0 auto; max-width: 24ch; }

/* Publications */
.pub-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.pub-table td {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.pub-table tr:first-child td { border-top: 1px solid var(--line); }
.pub-table tr:hover td { background: var(--surface); }
.pub-year {
  width: 5rem;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.pub-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.pub-content p { margin: 0; font-size: 14px; }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.filter-tab {
  font-family: var(--font-display);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}
.filter-tab:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Section gradient */
.section-gradient {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.accent-dot::before {
  content: '●';
  color: var(--accent);
  margin-right: 0.5rem;
}

/* Forms */
label {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font: inherit;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: center;
}
.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 1px solid var(--line);
}
.team-card h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.team-card .role { font-size: 13px; color: var(--muted); margin-bottom: 0.75rem; }
.team-card p { font-size: 13px; margin: 0; }

/* Prose */
.prose { color: var(--muted); line-height: 1.7; }
.prose h2 { margin: 2rem 0 1rem; font-size: 1.25rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin: 0.5rem 0; }

/* Blog post */
.post-view { max-width: 720px; margin: 0 auto; }
.post-header { position: relative; }
.post-title { font-size: 40px; line-height: 1.1; margin: 0 0 0.75rem; }
.post-subtitle { font-size: 19px; line-height: 28px; color: var(--muted); margin: 0 0 1.25rem; }
.post-content { font-size: 1.05rem; line-height: 1.6; }
.post-content p { color: rgba(20, 20, 19, 0.85); margin: 0 0 1.35rem; }
.post-content h2, .post-content h3 { margin: 2.25rem 0 0.85rem; line-height: 1.25; }
.post-content pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
.post-content code { font-family: var(--font-mono); font-size: 0.9em; }
.post-content :not(pre) > code {
  background: var(--surface);
  padding: 0.125rem 0.375rem;
  border-radius: var(--r-sm);
}
.post-content blockquote {
  position: relative;
  margin: 1.75rem 0;
  padding: 1.35rem 1.75rem 1.35rem 2.5rem;
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(198, 97, 63, 0.12), rgba(250, 248, 245, 0.9));
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  box-shadow: var(--shadow-sm);
}
.post-content blockquote::before {
  content: '“';
  position: absolute;
  left: 0.9rem;
  top: 0.6rem;
  font-size: 2.25rem;
  color: rgba(198, 97, 63, 0.45);
  line-height: 1;
}
.post-content .pullquote {
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  padding: 1.5rem 0;
  margin: 2rem 0;
  text-align: center;
  font-style: italic;
  font-weight: 600;
}
.post-content img {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

.post-figure {
  margin: 1.75rem auto;
}
.post-figure figcaption {
  font-size: 13px;
  color: var(--muted-2);
  text-align: center;
  margin-top: 0.5rem;
}

.img-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}
.img-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.img-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.callout {
  position: relative;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(198, 97, 63, 0.18), rgba(250, 248, 245, 0.92));
  border-radius: var(--r-lg);
  padding: 1.1rem 1.25rem 1.1rem 2.6rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}
.callout::before {
  content: '✦';
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 0.95rem;
  color: rgba(198, 97, 63, 0.8);
}
.callout-note { border-left-color: rgba(46, 124, 246, 0.75); }
.callout-warn { border-left-color: rgba(240, 82, 48, 0.75); }

.post-no-cover .post-header {
  background:
    radial-gradient(circle at top right, rgba(198, 97, 63, 0.18), transparent 60%),
    repeating-linear-gradient(135deg, rgba(198, 97, 63, 0.06) 0px, rgba(198, 97, 63, 0.06) 2px, transparent 2px, transparent 8px),
    linear-gradient(180deg, rgba(250, 248, 245, 0.98), rgba(250, 248, 245, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}
.post-no-cover .post-header::after {
  content: '';
  display: block;
  height: 3px;
  width: 72px;
  margin-top: 1rem;
  background: var(--accent);
  opacity: 0.65;
  border-radius: 999px;
}

.footer-fade {
  height: 110px;
  background: linear-gradient(180deg, rgba(250, 248, 245, 0) 0%, rgba(10, 11, 12, 0.08) 65%, rgba(10, 11, 12, 0.18) 100%);
}

.related-posts {
  margin-top: 2.5rem;
  padding: 1.75rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.related-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.related-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.related-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.related-title-link {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.35rem;
}
.related-title-link:hover { color: var(--accent); }
.related-meta { font-size: 12px; color: var(--muted); }

.blog-endcap {
  margin-top: 2.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(250, 248, 245, 0.92), rgba(250, 248, 245, 0.7));
  padding: 1.5rem;
}
.blog-endcap-inner {
  display: grid;
  gap: 0.75rem;
  max-width: 560px;
}
.blog-endcap-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.blog-endcap-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.blog-endcap-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-spotlight { grid-template-columns: 1fr; gap: 3rem; }
  .hero-media { order: 1; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .bento-card.w-2, .bento-card.w-4, .bento-card.w-6, .bento-card.w-8 { grid-column: span 6; }
  .bento-card.featured { grid-column: span 12; grid-row: span 1; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card { grid-column: span 1; }
  .post-card-featured { grid-column: span 2; grid-template-columns: repeat(2, 1fr); }
  .post-card-featured .post-card-media { grid-column: span 2; min-height: 240px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem var(--site-margin);
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-out);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links-primary { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links-primary > a, .nav-dropdown-toggle {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 1rem 0 1rem 1rem;
    display: none;
    background: transparent;
  }
  .nav-dropdown:focus-within .nav-dropdown-menu { display: grid; }
  .nav-actions { flex-direction: column; padding-top: 1rem; }
  .nav-actions .btn { width: 100%; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.w-2, .bento-card.w-4, .bento-card.w-6, .bento-card.w-8, .bento-card.w-12, .bento-card.featured { grid-column: span 1; }
  .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
  .stat { padding: 1.5rem 1rem; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
  .cta-band-actions { flex-direction: column; width: 100%; }
  .cta-band-actions .btn { width: 100%; }
  .pub-table tr { display: block; }
  .pub-table td { display: block; padding: 0.75rem 0; }
  .pub-year { margin-bottom: 0.5rem; }
  .blog-topbar { flex-direction: row; justify-content: flex-start; }
  .search-toggle-label { display: none; }
  .search-panel { padding: 0.85rem; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card-featured { grid-template-columns: 1fr; }
  .post-card-featured .post-card-media { min-height: 200px; }
  .img-grid-2, .img-grid-3 { grid-template-columns: 1fr; }
  .post-content h2 { margin-top: 2.75rem; }
  .post-content h3 { margin-top: 2.25rem; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-fade { height: 48px; }
}


/* ============================================
   TOOLS BENTO GRID
   ============================================ */

.tools-bento {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tools-featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.tools-supporting {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  border-color: var(--accent);
}

.tool-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light, #d4a574));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover .tool-card-accent {
  opacity: 1;
}

.tool-card-number {
  font-family: var(--font-mono, 'SF Mono', 'Monaco', monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.tool-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tool-card-subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.tool-card-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.tool-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tool-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  background: rgba(196, 164, 132, 0.1);
  color: var(--accent);
  border-radius: 2rem;
  border: 1px solid rgba(196, 164, 132, 0.2);
}

/* Featured cards - larger with more content */
.tool-card-featured {
  padding: 2.5rem;
  min-height: 320px;
}

.tool-card-featured .tool-card-title {
  font-size: 1.75rem;
}

.tool-card-featured .tool-card-desc {
  font-size: 1.0625rem;
}

/* Compact cards - smaller, essentials only */
.tool-card-compact {
  padding: 1.5rem;
}

.tool-card-compact .tool-card-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.tool-card-compact .tool-card-desc {
  font-size: 0.9375rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .tools-supporting {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tools-featured {
    grid-template-columns: 1fr;
  }
  .tools-supporting {
    grid-template-columns: 1fr;
  }
  .tool-card-featured {
    min-height: auto;
  }
}

/* Tool cards on dark background */
.section-dark .tool-card {
  background: rgba(250, 249, 245, 0.06);
  border-color: rgba(250, 249, 245, 0.12);
}

.section-dark .tool-card:hover {
  background: rgba(250, 249, 245, 0.1);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.section-dark .tool-card-number {
  color: var(--accent);
}

.section-dark .tool-card-title {
  color: var(--bg);
}

.section-dark .tool-card-subtitle {
  color: var(--accent);
}

.section-dark .tool-card-desc {
  color: rgba(250, 249, 245, 0.7);
}

.section-dark .tool-tag {
  background: rgba(250, 249, 245, 0.08);
  color: rgba(250, 249, 245, 0.8);
  border-color: rgba(250, 249, 245, 0.15);
}

.section-dark .section-kicker {
  color: var(--accent);
}


/* ============================================
   HORIZONTAL SCROLL SHOWCASE
   ============================================ */

.section-intro {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 3rem;
}

.showcase-scroll {
  position: relative;
  margin-top: 2rem;
}

.showcase-track {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 1rem 0 2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.showcase-track::-webkit-scrollbar {
  display: none;
}

/* Calculate card width to show peek of adjacent cards */
.showcase-card {
  flex: 0 0 calc(100% - 6rem);
  max-width: 480px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

@media (min-width: 768px) {
  .showcase-card {
    flex: 0 0 calc(50% - 2rem);
    max-width: 520px;
  }
}

@media (min-width: 1024px) {
  .showcase-card {
    flex: 0 0 calc(33.333% - 1.5rem);
    max-width: 440px;
  }
  
  .showcase-track {
    overflow-x: visible;
    justify-content: center;
  }
  
  .showcase-nav {
    display: none;
  }
}

.showcase-card-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem;
  height: 100%;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.showcase-card-inner:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.12);
  border-color: var(--accent);
}

.showcase-icon {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(196, 164, 132, 0.15), rgba(196, 164, 132, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.showcase-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.showcase-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.showcase-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.showcase-metrics {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.showcase-metric {
  display: flex;
  flex-direction: column;
}

.showcase-metric-value {
  font-family: var(--font-mono, 'SF Mono', monospace);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.showcase-metric-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.showcase-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.showcase-features li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

.showcase-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Navigation */
.showcase-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.showcase-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.showcase-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196, 164, 132, 0.1);
}

.showcase-dots {
  display: flex;
  gap: 0.5rem;
}

.showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.showcase-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--accent);
}


/* ============================================
   STORY PAGE STYLES
   ============================================ */

/* Story Hero */
.story-hero {
  padding: clamp(6rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 6rem);
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.story-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  max-width: 18ch;
  margin: 0 auto 1.5rem;
}

.story-hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* Story Sections */
.story-section {
  padding: var(--section-pad) 0;
}

.story-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* Split Cards - Factual vs Procedural */
.story-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.story-failure-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.story-failure-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-failure-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.story-failure-card .failure-type {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.story-failure-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.story-failure-card .failure-example {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--r-md);
  margin-top: 1.25rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Insight Section */
.story-insight {
  padding: var(--section-pad) 0;
  background: var(--surface);
}

.story-insight-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 48ch;
  margin: 0 0 2rem;
}

.story-insight-quote .highlight {
  color: var(--accent);
}

.story-insight-explanation {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 64ch;
}

/* Metrics Grid */
.story-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.story-metric-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.story-metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-metric-symbol {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.story-metric-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.story-metric-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* EDFL Section */
.story-edfl {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
  border-radius: var(--r-xl);
  margin-top: 3rem;
}

.story-edfl .story-section-title {
  color: var(--bg);
}

.story-edfl-intro {
  font-size: 1.125rem;
  color: rgba(250, 249, 245, 0.7);
  max-width: 56ch;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.story-formula {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.375rem);
  background: rgba(250, 249, 245, 0.08);
  border: 1px solid rgba(250, 249, 245, 0.15);
  border-radius: var(--r-lg);
  padding: 2rem;
  overflow-x: auto;
  color: var(--bg);
  letter-spacing: 0.02em;
  line-height: 1.8;
}

.story-formula .formula-var {
  color: var(--accent-2);
}

/* Research Threads */
.story-threads {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.story-thread {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  position: relative;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.story-thread:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-thread-number {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
}

.story-thread h4 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
  padding-right: 2rem;
}

.story-thread p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Methodology */
.story-methodology {
  padding: 0;
}

.story-methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.story-methodology-item {
  background: rgba(250, 249, 245, 0.08);
  border: 1px solid rgba(250, 249, 245, 0.15);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.story-methodology-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  background: rgba(250, 249, 245, 0.12);
}

.story-methodology-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-2);
}

.story-methodology-item h4 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--bg);
  margin-bottom: 0.75rem;
}

.story-methodology-item p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(250, 249, 245, 0.7);
  margin: 0;
}

/* North Star */
.story-northstar {
  padding: var(--section-pad) 0;
  text-align: center;
}

.story-northstar-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 42ch;
  margin: 0 auto;
}

.story-northstar-text .highlight {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 1024px) {
  .story-threads {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .story-split {
    grid-template-columns: 1fr;
  }
  
  .story-metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .story-methodology-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================
   STORY PAGE - MISSING STYLES FIX
   ============================================ */

/* Page Wrapper */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation Additions */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--site-margin);
  height: var(--nav-height);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav-logo:hover {
  color: var(--ink);
  text-decoration: none;
}

/* Section Dark Variant */
.section-dark {
  background: var(--ink);
  color: var(--bg);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--bg);
}

.section-dark p {
  color: rgba(250, 249, 245, 0.7);
}

/* Story Hero Additions */
.story-hero-content {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
}

.story-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}

/* Story Split Additions */
.story-split-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.story-split-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .story-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }
  
  .story-split-cards {
    gap: 1.5rem;
  }
}

/* Story Failure Card Additions */
.story-failure-card-accent {
  background: linear-gradient(135deg, var(--surface-2) 0%, rgba(198, 97, 63, 0.05) 100%);
  border-color: var(--accent);
}

.story-failure-card-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.story-failure-card {
  position: relative;
}

.story-failure-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1rem;
}

.story-failure-card-accent .story-failure-icon {
  background: var(--accent-soft);
}

/* Story Insight Additions */
.story-insight-content {
  max-width: 42rem;
}

.story-insight-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.story-insight-content p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1rem;
}

.story-insight-content p:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .story-insight {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
  }
}

/* Story EDFL Additions */
.story-edfl-content {
  max-width: 48rem;
}

.story-edfl-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bg);
  margin-bottom: 1rem;
}

.story-edfl-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(250, 249, 245, 0.7);
  margin-bottom: 1.5rem;
}

/* Story Thread Additions */
.story-thread-content {
  flex: 1;
}

.story-thread-content h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.story-thread-content p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.story-thread {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* Story Methodology Additions */
.story-methodology-intro {
  font-size: 1.125rem;
  color: rgba(250, 249, 245, 0.7);
  max-width: 48ch;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.story-methodology h2 {
  color: var(--bg);
  margin-bottom: 1rem;
}

/* Story North Star Additions */
.story-northstar-content {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.story-northstar-content h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-weight: 600;
}

/* Story Text Utilities */
.story-text {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1rem;
}

.story-text:last-child {
  margin-bottom: 0;
}

.story-text-small {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.story-tagline {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

/* Footer on story page */
.footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  margin-top: auto;
  padding-top: 3rem;
}

.footer .footer-grid {
  padding-bottom: 2rem;
}

.footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
}

.footer .footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: var(--footer-muted);
}


/* ============================================
   STORY PAGE - MOBILE RESPONSIVE FIXES
   ============================================ */

/* Tablet breakpoint (max-width: 1024px) */
@media (max-width: 1024px) {
  .story-hero {
    padding: clamp(4rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4rem);
  }
  
  .story-hero-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    max-width: 16ch;
  }
  
  .story-insight {
    gap: 2rem;
  }
  
  .story-insight-quote {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  }
  
  .story-edfl-content {
    max-width: 100%;
  }
  
  .story-formula {
    font-size: 1rem;
    padding: 1.5rem;
  }
  
  .story-northstar-text {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  }
}

/* Mobile breakpoint (max-width: 768px) */
@media (max-width: 768px) {
  /* Hero Section */
  .story-hero {
    padding: 3rem 0 2rem;
  }
  
  .story-hero-content {
    max-width: 100%;
    padding: 0;
  }
  
  .story-hero-bg {
    opacity: 0.5;
  }
  
  .story-hero-title {
    font-size: 1.75rem;
    max-width: 100%;
    line-height: 1.2;
  }
  
  .story-hero-subtitle {
    font-size: 1rem;
    max-width: 100%;
  }
  
  /* Split Section - stack vertically */
  .story-split {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  .story-split-content {
    text-align: left;
  }
  
  .story-split-cards {
    gap: 1rem;
  }
  
  /* Failure Cards */
  .story-failure-card {
    padding: 1.5rem;
  }
  
  .story-failure-card h3 {
    font-size: 1.125rem;
  }
  
  .story-failure-card-accent::before {
    height: 2px;
  }
  
  .story-failure-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
  }
  
  .story-failure-icon svg {
    width: 24px;
    height: 24px;
  }
  
  /* Insight Section */
  .story-insight {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  .story-insight-quote {
    font-size: 1.25rem;
    margin-bottom: 0;
  }
  
  .story-insight-quote blockquote {
    margin: 0;
    padding: 0;
  }
  
  .story-insight-content {
    max-width: 100%;
  }
  
  .story-insight-content h2 {
    font-size: 1.25rem;
  }
  
  .story-insight-content p {
    font-size: 1rem;
  }
  
  /* Metrics Grid - single column */
  .story-metrics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .story-metric-card {
    padding: 1.5rem;
  }
  
  .story-metric-symbol {
    font-size: 2rem;
  }
  
  .story-metric-card h3 {
    font-size: 1rem;
  }
  
  .story-metric-card p {
    font-size: 0.875rem;
  }
  
  /* EDFL Section */
  .story-edfl {
    padding: clamp(3rem, 6vw, 5rem) 0;
  }
  
  .story-edfl-content {
    max-width: 100%;
  }
  
  .story-edfl-content h3 {
    font-size: 1.125rem;
  }
  
  .story-edfl-content p {
    font-size: 0.9375rem;
  }
  
  .story-formula {
    font-size: 0.875rem;
    padding: 1.25rem;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  /* Research Threads - single column */
  .story-threads {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .story-thread {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
  }
  
  .story-thread-number {
    position: static;
    font-size: 0.75rem;
  }
  
  .story-thread-content h3 {
    font-size: 1rem;
    padding-right: 0;
  }
  
  .story-thread-content p {
    font-size: 0.875rem;
  }
  
  /* Methodology Section */
  .story-methodology {
    padding: clamp(3rem, 6vw, 5rem) 0;
  }
  
  .story-methodology h2 {
    font-size: 1.5rem;
  }
  
  .story-methodology-intro {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .story-methodology-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .story-methodology-item {
    padding: 1.5rem;
  }
  
  .story-methodology-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .story-methodology-item h4 {
    font-size: 1rem;
  }
  
  .story-methodology-item p {
    font-size: 0.875rem;
  }
  
  /* North Star */
  .story-northstar {
    padding: clamp(3rem, 6vw, 5rem) 0;
  }
  
  .story-northstar-content {
    max-width: 100%;
  }
  
  .story-northstar-content h2 {
    font-size: 1.125rem;
  }
  
  .story-northstar-text {
    font-size: 1.25rem;
  }
  
  .story-tagline {
    font-size: 1rem;
    margin-top: 1rem;
  }
  
  /* Text Utilities */
  .story-text {
    font-size: 1rem;
  }
  
  .story-text-small {
    font-size: 0.875rem;
  }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
  .story-hero-title {
    font-size: 1.5rem;
  }
  
  .story-hero-subtitle {
    font-size: 0.9375rem;
  }
  
  .story-failure-card {
    padding: 1.25rem;
  }
  
  .story-insight-quote {
    font-size: 1.125rem;
  }
  
  .story-metric-card {
    padding: 1.25rem;
  }
  
  .story-metric-symbol {
    font-size: 1.75rem;
  }
  
  .story-formula {
    font-size: 0.8125rem;
    padding: 1rem;
  }
  
  .story-thread {
    padding: 1.25rem;
  }
  
  .story-methodology-item {
    padding: 1.25rem;
  }
  
  .story-northstar-text {
    font-size: 1.125rem;
  }
}


/* ==========================================================================
   TOOLS ACCORDION
   ========================================================================== */

.tools-accordion {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
}

.accordion-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--duration-fast) ease,
              box-shadow var(--duration-normal) var(--ease-out);
}

.accordion-item[open] {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(198, 97, 63, 0.08);
}

.accordion-item:not([open]):hover {
  border-color: var(--line-strong);
}

.accordion-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--duration-fast) ease;
}

.accordion-header::-webkit-details-marker {
  display: none;
}

.accordion-header:hover {
  background: var(--surface);
}

.accordion-number {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  min-width: 2rem;
}

.accordion-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.accordion-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.accordion-subtitle {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.accordion-stat {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.accordion-icon {
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
  flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--muted);
  transition: transform var(--duration-fast) ease,
              opacity var(--duration-fast) ease;
}

.accordion-icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.accordion-icon::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
}

.accordion-item[open] .accordion-icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.accordion-item[open] .accordion-icon::before {
  background: var(--accent);
}

.accordion-content {
  padding: 0 2rem 2rem 5.5rem;
  animation: accordionSlide 0.3s var(--ease-out);
}

@keyframes accordionSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accordion-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 56ch;
}

.accordion-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.accordion-features li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.accordion-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Connector between accordion items */
.accordion-connector {
  width: 2px;
  height: 1.5rem;
  background: linear-gradient(180deg, var(--line) 0%, var(--accent) 50%, var(--line) 100%);
  margin: 0 auto;
  position: relative;
}

.accordion-connector::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Accordion Responsive */
@media (max-width: 768px) {
  .accordion-header {
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
  }

  .accordion-stat {
    display: none;
  }

  .accordion-title {
    font-size: 1.125rem;
  }

  .accordion-content {
    padding: 0 1.5rem 1.5rem 4rem;
  }

  .accordion-features {
    flex-direction: column;
    gap: 0.5rem;
  }

  .accordion-connector {
    height: 1rem;
  }
}

@media (max-width: 480px) {
  .accordion-header {
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .accordion-number {
    font-size: 0.75rem;
  }

  .accordion-title {
    font-size: 1rem;
  }

  .accordion-subtitle {
    font-size: 0.6875rem;
  }

  .accordion-content {
    padding: 0 1.25rem 1.25rem 3.25rem;
  }

  .accordion-desc {
    font-size: 0.9375rem;
  }

  .accordion-features li {
    font-size: 0.875rem;
  }
}

/* Accordion on dark background */
.section-dark .accordion-item {
  background: rgba(250, 249, 245, 0.06);
  border-color: rgba(250, 249, 245, 0.12);
}

.section-dark .accordion-item[open] {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(198, 97, 63, 0.15);
}

.section-dark .accordion-item:not([open]):hover {
  border-color: rgba(250, 249, 245, 0.2);
}

.section-dark .accordion-header:hover {
  background: rgba(250, 249, 245, 0.08);
}

.section-dark .accordion-title {
  color: var(--bg);
}

.section-dark .accordion-subtitle {
  color: rgba(250, 249, 245, 0.5);
}

.section-dark .accordion-stat {
  background: rgba(250, 249, 245, 0.08);
  color: rgba(250, 249, 245, 0.7);
}

.section-dark .accordion-icon::before,
.section-dark .accordion-icon::after {
  background: rgba(250, 249, 245, 0.5);
}

.section-dark .accordion-item[open] .accordion-icon::before {
  background: var(--accent);
}

.section-dark .accordion-desc {
  color: rgba(250, 249, 245, 0.7);
}

.section-dark .accordion-features li {
  color: rgba(250, 249, 245, 0.7);
}

.section-dark .accordion-connector {
  background: linear-gradient(180deg, rgba(250, 249, 245, 0.12) 0%, var(--accent) 50%, rgba(250, 249, 245, 0.12) 100%);
}


/* ==========================================================================
   MEMORIAL PAGE STYLES - In Memory of Hassana
   ========================================================================== */

/* Memorial Hero with Rotating Background Images + Blur Backdrop */
.memorial-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #0a0a0a;
}

.memorial-hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Each slide has blur backdrop + sharp foreground */
.memorial-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: memorialFade 24s linear infinite;
}

.memorial-hero-slide:nth-child(1) { animation-delay: 0s; }
.memorial-hero-slide:nth-child(2) { animation-delay: 6s; }
.memorial-hero-slide:nth-child(3) { animation-delay: 12s; }
.memorial-hero-slide:nth-child(4) { animation-delay: 18s; }

/* Blurred backdrop - fills entire area */
.memorial-hero-slide .backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(30px) saturate(1.2);
  transform: scale(1.1); /* Prevent blur edge artifacts */
}

/* Sharp foreground - contained, centered */
.memorial-hero-slide .foreground {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* Image assignments */
.memorial-hero-slide:nth-child(1) .backdrop,
.memorial-hero-slide:nth-child(1) .foreground {
  background-image: url('./memorial/hassana-1.webp');
}

.memorial-hero-slide:nth-child(2) .backdrop,
.memorial-hero-slide:nth-child(2) .foreground {
  background-image: url('./memorial/hassana-2.webp');
}

.memorial-hero-slide:nth-child(3) .backdrop,
.memorial-hero-slide:nth-child(3) .foreground {
  background-image: url('./memorial/hassana-3.webp');
}

.memorial-hero-slide:nth-child(4) .backdrop,
.memorial-hero-slide:nth-child(4) .foreground {
  background-image: url('./memorial/hassana-4.webp');
}

/* Crossfade keyframes: 4 images, 6s each = 24s total */
@keyframes memorialFade {
  0% { opacity: 0; }
  4% { opacity: 1; }
  25% { opacity: 1; }
  29% { opacity: 0; }
  100% { opacity: 0; }
}

.memorial-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.5) 50%,
    rgba(10, 10, 10, 0.8) 100%
  );
  z-index: 1;
}

.memorial-hero-content {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(6rem, 12vw, 10rem) var(--gutter);
}

.memorial-hero-title {
  font-family: var(--font-base);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.memorial-hero-dedication {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* Memorial Sections */
.memorial-section {
  padding: var(--section-pad-compact) 0;
}

.memorial-section--surface {
  background: var(--surface);
}

.memorial-section--closing {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}

/* Memorial Prose */
.memorial-prose {
  max-width: 38rem;
  margin: 0 auto;
}

.memorial-prose p {
  font-family: var(--font-base);
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  line-height: 1.8;
  color: rgba(20, 20, 19, 0.85);
  margin: 0 0 1.5rem;
}

.memorial-prose p:last-child {
  margin-bottom: 0;
}

.memorial-prose--emotional p {
  font-size: clamp(1.125rem, 2.2vw, 1.25rem);
  line-height: 1.85;
}

.memorial-prose--light p {
  color: rgba(250, 249, 245, 0.85);
}

.memorial-accomplishments-text {
  margin-top: 3rem;
}

/* Drop Cap */
.memorial-drop-cap::first-letter {
  font-family: var(--font-base);
  font-size: 4.5em;
  font-weight: 500;
  float: left;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.1em;
  color: var(--accent);
}

/* Pull Quotes */
.memorial-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.4;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  max-width: 32ch;
}

.memorial-pull-quote--light {
  color: var(--accent-2);
  border-left-color: var(--accent-2);
}

/* Inline Highlights */
.memorial-highlight {
  color: var(--ink);
  font-weight: 500;
}

.memorial-highlight--emphasis {
  color: var(--accent);
  font-weight: 600;
}

.memorial-prose--light .memorial-highlight {
  color: var(--bg);
  font-weight: 600;
}

/* Memorial Divider / Pivot */
.memorial-divider {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--surface);
  text-align: center;
}

.memorial-pivot {
  position: relative;
  padding: 3rem 2rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  max-width: 32rem;
  margin: 0 auto;
}

.memorial-pivot::before,
.memorial-pivot::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 3rem;
  background: var(--accent);
}

.memorial-pivot::before {
  top: -3rem;
}

.memorial-pivot::after {
  bottom: -3rem;
}

.memorial-pivot p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Accomplishments Grid */
.memorial-accomplishments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.memorial-stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.memorial-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.memorial-stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.memorial-stat-label {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

/* Closing Statement */
.memorial-closing {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.memorial-closing-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 1.5rem;
}

.memorial-closing-text strong {
  color: var(--accent);
  font-weight: 700;
}

.memorial-closing-promise {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}

/* ==========================================================================
   MEMORIAL PAGE - RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .memorial-accomplishments {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .memorial-hero {
    min-height: 70vh;
  }

  .memorial-hero-content {
    padding: clamp(4rem, 8vw, 6rem) var(--gutter);
  }

  .memorial-hero-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }

  .memorial-drop-cap::first-letter {
    font-size: 3.5em;
  }

  .memorial-pull-quote {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    margin: 1.5rem 0;
    max-width: 100%;
  }

  .memorial-accomplishments {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .memorial-stat {
    padding: 1.5rem;
  }

  .memorial-pivot {
    padding: 2rem 1.5rem;
  }

  .memorial-pivot::before,
  .memorial-pivot::after {
    height: 2rem;
  }

  .memorial-pivot::before {
    top: -2rem;
  }

  .memorial-pivot::after {
    bottom: -2rem;
  }

  .memorial-closing-text {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
  }

  .memorial-closing-promise {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
  }
}

@media (max-width: 480px) {
  .memorial-drop-cap::first-letter {
    font-size: 3em;
    padding-right: 0.375rem;
  }

  .memorial-prose p {
    font-size: 1rem;
    line-height: 1.75;
  }

  .memorial-stat {
    padding: 1.25rem;
  }

  .memorial-stat-value {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   STRAWBERRY SHOWCASE SECTION
   ========================================================================== */

.strawberry-showcase {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
}

/* Lead link */
.section-dark .lead-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.section-dark .lead-link:hover {
  opacity: 0.8;
}

/* Tool Cards Row */
.strawberry-tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.strawberry-tool-card {
  background: rgba(250, 249, 245, 0.06);
  border: 1px solid rgba(250, 249, 245, 0.12);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  transition: transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-fast) ease,
              background var(--duration-fast) ease;
}

.strawberry-tool-card:hover {
  transform: translateY(-4px);
  background: rgba(250, 249, 245, 0.1);
}

.strawberry-tool-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.strawberry-tool-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.strawberry-tool-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.strawberry-tool-icon.primary {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.strawberry-tool-icon.secondary {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.strawberry-tool-icon.accent {
  background: rgba(198, 97, 63, 0.15);
  color: var(--accent);
}

.strawberry-tool-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg);
  margin: 0 0 0.2rem;
}

.strawberry-tool-subtitle {
  font-size: 0.85rem;
  color: rgba(250, 249, 245, 0.6);
  margin: 0;
}

.strawberry-tool-features {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.strawberry-tool-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(250, 249, 245, 0.7);
  margin-bottom: 0.4rem;
}

.strawberry-tool-features .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.strawberry-tool-features .dot.primary { background: #10b981; }
.strawberry-tool-features .dot.secondary { background: #f59e0b; }

.strawberry-tool-code {
  background: #0d1117;
  border: 1px solid rgba(250, 249, 245, 0.1);
  border-radius: var(--r-md);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: #8b949e;
  overflow-x: auto;
  margin: 0 0 0.75rem;
}

.strawberry-tool-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.strawberry-tool-badge.primary {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.strawberry-tool-badge.secondary {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.strawberry-tool-badge.accent {
  background: rgba(198, 97, 63, 0.15);
  color: var(--accent);
}

/* Link card */
a.strawberry-tool-link {
  text-decoration: none;
  border-color: var(--accent);
  display: flex;
  flex-direction: column;
}

a.strawberry-tool-link:hover {
  border-color: var(--accent);
  background: rgba(198, 97, 63, 0.12);
}

.strawberry-tool-cta-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(250, 249, 245, 0.7);
  margin: 0 0 auto;
  padding-bottom: 1rem;
}

/* Terminal - Right Column */
.strawberry-terminal-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.strawberry-terminal {
  background: #0d1117;
  border: 1px solid rgba(250, 249, 245, 0.15);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.strawberry-terminal-header {
  background: #161b22;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #30363d;
}

.strawberry-terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.strawberry-terminal-dot.red { background: #ff5f56; }
.strawberry-terminal-dot.yellow { background: #ffbd2e; }
.strawberry-terminal-dot.green { background: #27ca40; }

.strawberry-terminal-title {
  margin-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #8b949e;
}

.strawberry-terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  min-height: 280px;
  position: relative;
  transition: opacity 0.3s ease;
}

.strawberry-terminal-body.transitioning {
  opacity: 0;
}

/* Terminal Line Types */
.terminal-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.terminal-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.terminal-line-prompt {
  color: #3fb950;
  flex-shrink: 0;
}

.terminal-line-command {
  color: #e6edf3;
}

.terminal-line-output {
  color: #8b949e;
}

.terminal-line-success {
  color: #3fb950;
}

.terminal-line-warning {
  color: var(--accent);
}

.terminal-line-dim {
  color: #6e7681;
  font-size: 0.8125rem;
}

.terminal-line-metric {
  color: #8b949e;
  font-size: 0.8125rem;
}

.terminal-line-attachment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-attachment-badge {
  background: rgba(198, 97, 63, 0.2);
  color: var(--accent);
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-sm);
  font-size: 0.75rem;
}

.terminal-cursor {
  color: #3fb950;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
  .strawberry-tools {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .strawberry-tool-card {
    padding: 1rem;
  }

  .strawberry-tool-header {
    gap: 0.625rem;
    margin-bottom: 0.625rem;
  }

  .strawberry-tool-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .strawberry-tool-icon svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  .strawberry-tool-name {
    font-size: 0.9rem;
  }

  .strawberry-tool-subtitle {
    font-size: 0.8rem;
  }

  .strawberry-tool-features {
    margin-bottom: 0.625rem;
  }

  .strawberry-tool-features li {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .strawberry-tool-code {
    font-size: 0.7rem;
    padding: 0.625rem;
    margin-bottom: 0.625rem;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .strawberry-tool-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.625rem;
  }
}

@media (max-width: 768px) {
  .strawberry-terminal-body {
    min-height: 240px;
    padding: 1rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .strawberry-tool-card {
    padding: 0.875rem;
  }

  .strawberry-tool-code {
    font-size: 0.65rem;
    padding: 0.5rem;
  }
}

/* ==========================================================================
   FAQ PAGE
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(198, 97, 63, 0.08);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: '−';
  color: var(--accent);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  line-height: 1.7;
}

.faq-answer p {
  margin: 0 0 1rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
}

.faq-answer li {
  margin-bottom: 0.5rem;
}

.faq-answer code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-2);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.faq-answer a {
  color: var(--accent);
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   USE CASES: STICKY SCROLL REVEAL
   ========================================================================== */

.use-cases-section {
  background: var(--bg);
  /* overflow: clip breaks sticky positioning - removed */
}

.use-cases-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto var(--section-pad-compact);
}

.use-cases-header .lead {
  color: var(--muted);
}

/* ---- Scroll Wrapper (Two Panels) ---- */

.use-cases-scroll-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  min-height: 100vh;
}

/* ---- Left Panel: Sticky Diagram ---- */

.use-cases-diagram-panel {
  position: sticky;
  top: calc(var(--nav-height, 4rem) + 3rem);
  height: fit-content;
  min-height: 400px;
  min-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.use-cases-diagram-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  min-height: 400px;
  aspect-ratio: 1;
}

/* ---- SVG Diagram Styles ---- */

.use-cases-diagram {
  width: 100%;
  height: 100%;
  min-width: 300px;
  min-height: 300px;
  display: block;
}

/* Hub (center) */
.diagram-hub {
  fill: var(--ink);
  transition: transform 0.4s var(--ease-out);
}

.diagram-hub-text {
  fill: var(--bg);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Spokes (connecting lines) */
.diagram-spoke {
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  transition: stroke 0.4s var(--ease-out), stroke-dasharray 0.4s var(--ease-out);
}

/* Nodes (use case circles) */
.diagram-node-circle {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 2;
  transition: fill 0.4s var(--ease-out),
              stroke 0.4s var(--ease-out),
              transform 0.4s var(--ease-out);
  transform-origin: center;
}

.diagram-node-icon path,
.diagram-node-icon line {
  transition: stroke 0.4s var(--ease-out);
}

.diagram-node-label {
  transition: fill 0.4s var(--ease-out);
}

/* Active state for nodes */
.diagram-node.active .diagram-node-circle {
  fill: var(--accent);
  stroke: var(--accent);
  transform: scale(1.15);
}

.diagram-node.active .diagram-spoke {
  stroke: var(--accent);
  stroke-dasharray: none;
}

.diagram-node.active .diagram-node-icon path,
.diagram-node.active .diagram-node-icon line {
  stroke: white;
}

.diagram-node.active .diagram-node-label {
  fill: var(--accent);
  font-weight: 600;
}

/* Inactive/dimmed state */
.diagram-node.dimmed .diagram-node-circle {
  fill: var(--surface);
  stroke: var(--line);
  opacity: 0.4;
}

.diagram-node.dimmed .diagram-spoke {
  opacity: 0.3;
}

.diagram-node.dimmed .diagram-node-icon path,
.diagram-node.dimmed .diagram-node-icon line {
  opacity: 0.4;
}

.diagram-node.dimmed .diagram-node-label {
  opacity: 0.4;
}

/* ---- Animated Elements ---- */

.diagram-animation {
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.diagram-animation.active {
  opacity: 1;
}

/* Animation 1: Particles flowing (hallucination) */
.diagram-particle {
  fill: var(--accent);
}

.diagram-animation-1.active .diagram-particle {
  animation: particleUp 1.2s ease-in-out infinite;
}

.diagram-animation-1.active .p2 { animation-delay: 0.2s; }
.diagram-animation-1.active .p3 { animation-delay: 0.4s; }

@keyframes particleUp {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-60px);
    opacity: 0;
  }
}

/* Pulse ring for verification */
.diagram-animation-1.active .pulse-ring {
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    r: 30;
    opacity: 0.6;
  }
  100% {
    r: 50;
    opacity: 0;
  }
}

/* Animation 2: Wrapper serialization probing (injection) */
.diagram-animation-2.active .wrapper-pulse {
  animation: wrapperPulse 2.4s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.diagram-animation-2.active .w2 { animation-delay: 0.4s; }
.diagram-animation-2.active .w3 { animation-delay: 0.8s; }

@keyframes wrapperPulse {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  20% {
    opacity: 0.6;
  }
  60% {
    opacity: 0.3;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Probe lines reaching in from different angles */
.diagram-animation-2.active .probe-line {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: probeIn 1.2s ease-out infinite;
}

.diagram-animation-2.active .probe2 { animation-delay: 0.3s; }
.diagram-animation-2.active .probe3 { animation-delay: 0.6s; }

@keyframes probeIn {
  0% {
    stroke-dashoffset: 20;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  60% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  80% {
    stroke-dashoffset: 0;
    opacity: 0.5;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

/* Animation 3: Token budget allocation (√n scaling) */
.diagram-animation-3.active .budget-bar-fill {
  animation: budgetFill 2s ease-out forwards;
}

@keyframes budgetFill {
  0% {
    width: 0;
  }
  60% {
    width: 14px;
  }
  80% {
    width: 10px;
  }
  100% {
    width: 12px;
  }
}

.diagram-animation-3.active .transform-arrow {
  animation: arrowPulse 2s ease-out infinite;
}

@keyframes arrowPulse {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.diagram-animation-3.active .formula-hint {
  animation: formulaReveal 0.6s ease-out 1.2s forwards;
}

@keyframes formulaReveal {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 0.8;
    transform: translateY(0);
  }
}

/* Token bar growing animation */
.diagram-animation-3.active .token-bar {
  animation: tokenGrow 1.5s ease-out forwards;
  transform-origin: bottom;
}

.diagram-animation-3.active .t2 { animation-delay: 0.2s; }
.diagram-animation-3.active .t3 { animation-delay: 0.4s; }

@keyframes tokenGrow {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* ---- Progress Bar ---- */

.use-cases-progress {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.use-cases-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}

/* ---- Right Panel: Scrolling Content ---- */

.use-cases-content-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.use-case-item {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.use-case-item:first-child {
  padding-top: 0;
}

.use-case-item:last-child {
  min-height: 60vh;
}

.use-case-item-inner {
  opacity: 0.4;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.use-case-item.active .use-case-item-inner {
  opacity: 1;
  transform: translateY(0);
}

/* Use Case Number */
.use-case-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* Use Case Title */
.use-case-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.use-case-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.use-case-title a:hover {
  color: var(--accent);
}

/* Use Case Description */
.use-case-description {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 36rem;
}

/* Use Case Features List */
.use-case-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.use-case-features li {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-left: 1.25rem;
  position: relative;
}

.use-case-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.use-case-features strong {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.use-case-features span {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted);
}

/* Use Case Metric Box */
.use-case-metric {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem 1.25rem;
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.use-case-metric-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.use-case-metric-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.use-case-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.use-case-link:hover {
  opacity: 0.8;
}

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

@media (max-width: 1024px) {
  .use-cases-scroll-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .use-cases-diagram-panel {
    position: relative;
    top: 0;
    order: -1;
    margin-bottom: 2rem;
  }

  .use-cases-diagram-container {
    max-width: 280px;
    margin: 0 auto;
  }

  .use-case-item {
    min-height: auto;
    padding: 2rem 0;
  }

  .use-case-item-inner {
    opacity: 1;
    transform: none;
  }

  .use-cases-progress {
    display: none;
  }
}

@media (max-width: 640px) {
  .use-cases-header {
    text-align: left;
  }

  .use-case-title {
    font-size: 1.375rem;
  }

  .use-case-description {
    font-size: 1rem;
  }

  .use-case-features li {
    padding-left: 1rem;
  }
}

/* ---- Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {
  .diagram-particle,
  .diagram-attack,
  .diagram-gauge-fill,
  .pulse-ring,
  .attack-line,
  .spark,
  .gauge-needle,
  .gauge-fill,
  .gauge-value {
    animation: none !important;
  }

  .use-case-item-inner,
  .diagram-node-circle,
  .diagram-spoke,
  .diagram-animation {
    transition-duration: 0.01ms !important;
  }
}


/* ==================================================
   PROMPT INJECTION AUDIT PAGE
   ================================================== */

/* ---- Attack Family Grid ---- */

.attack-family-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 1024px) {
  .attack-family-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .attack-family-grid {
    grid-template-columns: 1fr;
  }
}

.attack-family-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
  display: block;
  position: relative;
}

.attack-family-card:hover,
.attack-family-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.attack-family-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.attack-family-icon {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
}

.attack-family-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.attack-family-card > p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.attack-family-examples {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attack-family-examples li {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--muted-2);
  background: var(--surface);
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

/* Attack card hint */
.attack-card-hint {
  display: block;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.attack-family-card:hover .attack-card-hint,
.attack-family-card:focus-visible .attack-card-hint {
  opacity: 1;
}

/* ---- Attack Family Modal ---- */
.attack-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.attack-modal[hidden] {
  display: none;
}

.attack-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 19, 0.8);
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease-out;
}

.attack-modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.attack-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.attack-modal-close:hover,
.attack-modal-close:focus-visible {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.attack-modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.attack-modal-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: white;
}

.attack-modal-icon svg {
  width: 28px;
  height: 28px;
}

.attack-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}

.attack-modal-body {
  margin-bottom: 1.5rem;
}

.attack-modal-subtitle {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.attack-modal-points {
  margin: 0 0 1.25rem 0;
  padding: 0;
  display: grid;
  gap: 0.875rem;
}

.attack-modal-points dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.attack-modal-points dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  padding-left: 0;
}

.attack-modal-insight {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--r-md);
  border-left: 3px solid var(--accent);
  margin: 0;
}

.attack-modal-insight strong {
  color: var(--ink);
}

.attack-modal-examples {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attack-modal-examples li {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--accent);
  background: rgba(198, 97, 63, 0.1);
  padding: 0.375rem 0.75rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(198, 97, 63, 0.2);
}

@media (max-width: 640px) {
  .attack-modal-content {
    padding: 1.5rem;
    max-height: 90vh;
  }

  .attack-modal-title {
    font-size: 1.25rem;
    padding-right: 2rem;
  }
}

/* ---- Avoid Grid (Dark Section) ---- */

.avoid-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .avoid-grid {
    grid-template-columns: 1fr;
  }
}

.avoid-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: all var(--duration-normal) var(--ease-out);
}

.avoid-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.avoid-icon {
  width: 48px;
  height: 48px;
  background: rgba(198, 97, 63, 0.15);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
}

.avoid-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg);
  margin-bottom: 0.75rem;
}

.avoid-card p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

/* ---- Feature Grid (Agent Gating) ---- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.feature-content .section-title {
  margin-bottom: 1.5rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: all var(--duration-normal) var(--ease-out);
}

.feature-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(198, 97, 63, 0.1);
}

.feature-item-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.feature-item-content h4 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.feature-item-content p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- PI Diagram Animations ---- */

.pi-diagram .pi-stage {
  transition: opacity 0.4s var(--ease-out);
}

.pi-diagram .pi-stage.dimmed {
  opacity: 0.3;
}

.pi-diagram .pi-stage.active {
  opacity: 1;
}

/* Variant pulse animation */
@keyframes piVariantPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.pi-audit-section[data-active="2"] .pi-variant {
  animation: piVariantPulse 1.5s ease-in-out infinite;
}

.pi-variant.v1 { animation-delay: 0s; }
.pi-variant.v2 { animation-delay: 0.2s; }
.pi-variant.v3 { animation-delay: 0.4s; }
.pi-variant.v4 { animation-delay: 0.6s; }
.pi-variant.v5 { animation-delay: 0.8s; }
.pi-variant.v6 { animation-delay: 1s; }

/* Processing dots animation */
@keyframes piDotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.pi-audit-section[data-active="3"] .pi-dot {
  animation: piDotPulse 0.8s ease-in-out infinite;
}

.pi-dot.d1 { animation-delay: 0s; }
.pi-dot.d2 { animation-delay: 0.15s; }
.pi-dot.d3 { animation-delay: 0.3s; }
.pi-dot.d4 { animation-delay: 0.45s; }
.pi-dot.d5 { animation-delay: 0.6s; }

/* Bar fill animation */
@keyframes piBarFill {
  from { width: 0; }
  to { width: var(--fill-width); }
}

.pi-audit-section[data-active="4"] .qbar-fill {
  --fill-width: 22px;
  animation: piBarFill 1s ease-out forwards;
}

.pi-audit-section[data-active="4"] .qlo-fill {
  --fill-width: 17px;
  animation: piBarFill 1s ease-out 0.3s forwards;
}

/* Pulse ring */
@keyframes piPulseRing {
  0% { r: 50; opacity: 0.6; }
  100% { r: 80; opacity: 0; }
}

.pi-audit-section[data-active="4"] .pi-pulse-ring {
  animation: piPulseRing 2s ease-out infinite;
}

/* Particle flow animation */
@keyframes piParticleFlow {
  0% { cx: 130; cy: 165; opacity: 0; }
  20% { opacity: 1; }
  50% { cx: 200; cy: 165; }
  80% { opacity: 1; }
  100% { cx: 280; cy: 165; opacity: 0; }
}

.pi-audit-section[data-active="2"] .pi-particle,
.pi-audit-section[data-active="3"] .pi-particle {
  animation: piParticleFlow 2s ease-in-out infinite;
}

.pi-particle.pp1 { animation-delay: 0s; }
.pi-particle.pp2 { animation-delay: 0.5s; }
.pi-particle.pp3 { animation-delay: 1s; }

/* Stage highlight transitions */
.pi-node rect,
.pi-llm rect,
.pi-output rect {
  transition: all 0.4s var(--ease-out);
}

.pi-audit-section[data-active="1"] .pi-stage-1 rect {
  stroke-width: 3;
}

.pi-audit-section[data-active="2"] .pi-distribution ellipse {
  stroke-width: 3;
  stroke: var(--accent);
}

.pi-audit-section[data-active="3"] .pi-llm rect {
  filter: drop-shadow(0 0 8px rgba(198, 97, 63, 0.4));
}

.pi-audit-section[data-active="4"] .pi-output rect {
  stroke-width: 3;
  stroke: var(--accent);
}

/* Reduced motion for PI animations */
@media (prefers-reduced-motion: reduce) {
  .pi-variant,
  .pi-dot,
  .pi-bar-fill,
  .pi-pulse-ring,
  .pi-particle {
    animation: none !important;
  }

  .pi-audit-section[data-active="4"] .qbar-fill {
    width: 22px;
  }

  .pi-audit-section[data-active="4"] .qlo-fill {
    width: 17px;
  }
}

/* ---- PI Page Illustrations ---- */

/* Hero Illustration */
.pi-hero {
  position: relative;
}

.pi-hero-illustration {
  margin-top: 3rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.pi-hero-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Attack probe animation */
@keyframes probeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.attack-probe {
  animation: probeFloat 2s ease-in-out infinite;
}

.attack-probe.ap1 { animation-delay: 0s; }
.attack-probe.ap2 { animation-delay: 0.2s; }
.attack-probe.ap3 { animation-delay: 0.4s; }
.attack-probe.ap4 { animation-delay: 0.1s; }
.attack-probe.ap5 { animation-delay: 0.3s; }
.attack-probe.ap6 { animation-delay: 0.5s; }
.attack-probe.ap7 { animation-delay: 0.15s; }
.attack-probe.ap8 { animation-delay: 0.35s; }
.attack-probe.ap9 { animation-delay: 0.55s; }
.attack-probe.ap10 { animation-delay: 0.25s; }
.attack-probe.ap11 { animation-delay: 0.45s; }
.attack-probe.ap12 { animation-delay: 0.65s; }

/* Penetration pulse */
@keyframes penetrationPulse {
  0%, 100% { opacity: 0.5; r: 2; }
  50% { opacity: 0.8; r: 4; }
}

.penetration {
  animation: penetrationPulse 1.5s ease-in-out infinite;
}

.penetration.p1 { animation-delay: 0s; }
.penetration.p2 { animation-delay: 0.5s; }
.penetration.p3 { animation-delay: 1s; }

/* Problem Comparison Illustration */
.pi-comparison-illustration {
  margin-bottom: 3rem;
  overflow-x: auto;
}

.pi-comparison-illustration svg {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Attack Surface Explosion Illustration */
.pi-explosion-illustration {
  margin: 2.5rem 0 3rem;
  overflow-x: auto;
  padding: 1rem 0;
}

.pi-explosion-illustration svg {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Variant dots animation */
@keyframes variantPop {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.2); }
}

.variant-dots circle {
  animation: variantPop 2s ease-in-out infinite;
}

.variant-dots circle:nth-child(odd) { animation-delay: 0s; }
.variant-dots circle:nth-child(even) { animation-delay: 0.3s; }
.variant-dots circle:nth-child(3n) { animation-delay: 0.6s; }

/* Broken Defenses Illustration */
.pi-broken-defenses {
  margin: 2rem 0 2.5rem;
  overflow-x: auto;
}

.pi-broken-defenses svg {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Broken defense shake animation */
@keyframes defenseShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.broken-defense:hover {
  animation: defenseShake 0.3s ease-in-out;
}

/* Responsive adjustments for illustrations */
@media (max-width: 768px) {
  .pi-hero-illustration {
    margin-top: 2rem;
    max-width: 100%;
  }

  .pi-comparison-illustration svg,
  .pi-explosion-illustration svg,
  .pi-broken-defenses svg {
    min-width: 500px;
  }

  .pi-explosion-illustration,
  .pi-broken-defenses,
  .pi-comparison-illustration {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 480px) {
  .pi-hero-illustration svg {
    height: 200px;
  }
}

/* Reduced motion for illustrations */
@media (prefers-reduced-motion: reduce) {
  .attack-probe,
  .penetration,
  .variant-dots circle,
  .broken-defense {
    animation: none !important;
  }
}

/* ================================================
   INFORMATION OPTIMAL COT PAGE
   ================================================ */

/* ---- Hero Example (Strawberry in Hero) ---- */
.cot-hero-example {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.cot-hero-example .section-kicker {
  margin-bottom: 0.5rem;
}

.cot-example-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.cot-example-lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Strawberry Demo ---- */
.cot-strawberry-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--surface-2);
  border-radius: var(--r-xl);
  margin: 0 auto 2rem;
  max-width: 720px;
  width: 100%;
}

.strawberry-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.strawberry-prompt {
  text-align: center;
}

.strawberry-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.strawberry-prompt p {
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0;
}

.strawberry-prompt .highlight-r {
  color: var(--accent);
  font-weight: 600;
}

.strawberry-prompt .highlight-word {
  font-family: var(--font-mono);
  background: rgba(198, 97, 63, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: var(--r-sm);
}

.strawberry-word {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.strawberry-word .letter {
  width: 2.5rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
}

.strawberry-word .letter-r {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
}

.strawberry-answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.strawberry-count {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  transition: color 0.3s ease;
}

/* ---- Chain Length Control ---- */
.chain-control {
  width: 100%;
  max-width: 320px;
}

.chain-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chain-endpoint {
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
}

.chain-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  appearance: none;
  cursor: pointer;
}

.chain-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(198, 97, 63, 0.3);
  transition: transform 0.15s ease;
}

.chain-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.chain-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ---- Chain Output (Simulated Reasoning) ---- */
.chain-output {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink);
  text-align: left;
  min-height: 4.5rem;
}

.chain-step {
  display: none;
}

.chain-step.visible {
  display: block;
  animation: fadeSwap 0.25s ease;
}

@keyframes fadeSwap {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chain-step mark {
  background: rgba(198, 97, 63, 0.2);
  color: var(--accent);
  padding: 0 0.125rem;
  border-radius: 2px;
}

.chain-step strong {
  color: var(--accent);
  font-weight: 600;
}

/* ---- Stats Competition Visualization ---- */
.stats-competition {
  width: 100%;
}

.stats-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  margin: 0 0 0.75rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.stat-card.winner {
  border-color: currentColor;
  background: rgba(255,255,255,0.7);
}

.stat-card.competing {
  border-style: dashed;
}

.stat-card.competing .stat-value {
  animation: valuePulse 1s ease-in-out infinite;
}

@keyframes valuePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.stat-word { color: #22c55e; }
.stat-total { color: var(--accent); }
.stat-suffix { color: #e88a5a; }

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.375rem;
}

.stat-name {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.stat-desc {
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* ---- Final Answer States ---- */
.strawberry-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.answer-text {
  font-size: 0.9375rem;
  color: var(--ink);
}

.answer-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  transition: color 0.3s ease;
}

.answer-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.status-icon {
  width: 14px;
  height: 14px;
}

.answer-status.correct {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.answer-status.unstable {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.answer-status.wrong {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Color the answer value to match status */
.cot-strawberry-demo[data-level="0"] .answer-value,
.cot-strawberry-demo[data-level="1"] .answer-value {
  color: #22c55e;
}

.cot-strawberry-demo[data-level="2"] .answer-value {
  color: #f59e0b;
}

.cot-strawberry-demo[data-level="3"] .answer-value {
  color: #ef4444;
}


/* ---- COT Insight Box ---- */
.cot-insight-box {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  margin: 0 auto;
  max-width: 600px;
  text-align: left;
}

.cot-hero-example .cot-insight-box {
  margin-top: 0;
}

.cot-insight-lead {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.cot-insight-box p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- Statistics Grid ---- */
.cot-statistics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .cot-statistics-grid {
    grid-template-columns: 1fr;
  }
}

.cot-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  position: relative;
  text-align: center;
}

.cot-stat-badge {
  position: absolute;
  top: -0.625rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-full);
}

.cot-stat-target .cot-stat-badge {
  background: #22c55e;
  color: white;
}

.cot-stat-competitor .cot-stat-badge {
  background: var(--accent);
  color: white;
}

.cot-stat-card h3 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}

.cot-stat-target h3 {
  color: #22c55e;
}

.cot-stat-competitor h3 {
  color: var(--accent);
}

.cot-stat-card p {
  font-size: 0.9375rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.cot-stat-note {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
}

/* ---- Mechanism Box ---- */
.cot-mechanism-box {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--r-xl);
  padding: 2rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .cot-mechanism-box {
    grid-template-columns: 1fr;
  }
}

.cot-mechanism-visual svg {
  width: 100%;
  height: auto;
}

.cot-mechanism-text p:first-child {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.cot-mechanism-text p:last-child {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* ---- Fix Callout ---- */
.cot-fix-callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}

.cot-fix-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #22c55e;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.cot-fix-content p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}

/* ---- Solutions List ---- */
.cot-solutions-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2.5rem;
}

.cot-solution-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 2rem;
}

@media (max-width: 640px) {
  .cot-solution-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.cot-solution-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  opacity: 0.5;
}

.cot-solution-content h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.cot-solution-problem {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.cot-solution-move {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.cot-solution-move-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.cot-solution-move ul {
  margin: 0;
  padding-left: 1.25rem;
}

.cot-solution-move li {
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 0.375rem;
}

.cot-solution-move li:last-child {
  margin-bottom: 0;
}

.cot-solution-move code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-2);
  padding: 0.125rem 0.375rem;
  border-radius: var(--r-sm);
  color: var(--accent);
}

/* Solution Illustrations */
.cot-solution-illustration {
  margin: 1.25rem 0 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}

.cot-solution-illustration svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.cot-solution-illustration-wide svg {
  max-width: 480px;
}

@media (max-width: 640px) {
  .cot-solution-illustration {
    margin: 1rem -0.5rem 1.25rem;
    padding: 1rem;
    overflow-x: auto;
  }

  .cot-solution-illustration svg {
    min-width: 340px;
    max-width: none;
  }

  .cot-solution-illustration-wide svg {
    min-width: 420px;
  }
}

.cot-solution-note {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ---- Solution Comparison (for Solution 2) ---- */
.cot-solution-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .cot-solution-comparison {
    grid-template-columns: 1fr;
  }
}

.cot-failure-type {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1rem;
}

.cot-failure-type h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.375rem;
}

.cot-failure-type p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.cot-failure-fix {
  display: block;
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
}

/* ---- Solution Formula (for Solution 4) ---- */
.cot-solution-formula {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.cot-solution-formula .formula {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--ink);
}

.cot-solution-formula .formula-note {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---- Planner Flow (Dark Section) ---- */
.cot-planner-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0;
}

.cot-planner-step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
}

.cot-planner-step-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.cot-planner-step p {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
}

.cot-planner-arrow {
  color: rgba(255, 255, 255, 0.3);
}

.cot-planner-step-branch {
  flex-direction: column;
  align-items: flex-start;
}

.cot-planner-step-branch > p {
  margin-bottom: 1rem;
}

.cot-planner-branches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

.cot-planner-branch {
  flex: 1;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  text-align: center;
}

.cot-planner-branch .branch-condition {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.cot-planner-branch .branch-action {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.cot-planner-summary {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--r-lg);
}

.cot-planner-summary p:first-child {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.cot-planner-summary p:last-child {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* ---- Responsive adjustments ---- */
@media (max-width: 640px) {
  .strawberry-word .letter {
    width: 2rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }

  .strawberry-count {
    font-size: 2.5rem;
  }

  .cot-strawberry-demo {
    padding: 1.25rem 1rem;
  }

  .strawberry-top {
    flex-direction: column;
    gap: 1rem;
  }

  .chain-output {
    font-size: 0.75rem;
    padding: 0.75rem 1rem;
    min-height: 5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
  }

  .stat-header {
    margin-bottom: 0;
  }

  .stat-desc {
    grid-column: 1 / -1;
  }

  .chain-endpoint {
    font-size: 0.625rem;
  }

  .cot-planner-step {
    padding: 1rem 1.25rem;
  }

  .cot-planner-branches {
    flex-direction: column;
  }

  .cot-planner-branch {
    min-width: 100%;
  }
}
