:root {
  --cream: #fdf9f6;
  --cream-warm: #fcf7f2;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5348;
  /* Heading palette (olive + lime from reference) */
  --heading-olive: #3e442c;
  --heading-lime: #d9f27e;
  --line: rgba(26, 26, 26, 0.08);
  --line-strong: rgba(26, 26, 26, 0.14);

  --pastel-pink: #ffdce8;
  --pastel-purple: #e8deff;
  --pastel-yellow: #fff3bf;
  --pastel-green: #d4edd4;

  --accent: #6b4a8f;
  --accent-dark: #52396e;
  --accent-soft: rgba(107, 74, 143, 0.12);

  --shadow-card: 0 12px 40px rgba(45, 42, 38, 0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --max: 1120px;
  --nav-h: 72px;

  --font-heading: "Bodoni Moda", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body-tracking: -0.022em;
  --body-leading: 1.32;
  --heading-tracking: -0.045em;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
  color: var(--text);
  background: var(--cream);
  font-feature-settings: "kern" 1;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: visible;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.page-shell > main,
.page-shell > .footer {
  overflow-x: clip;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.125rem, 4vw, 3rem);
  box-sizing: border-box;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  font-family: var(--font-sans);
  background: rgba(253, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
  overflow-x: visible;
}

.nav.is-menu-open {
  z-index: 50;
  isolation: isolate;
}

.nav.is-menu-open .nav-inner {
  position: relative;
  z-index: 5;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 0;
  background: rgba(26, 26, 26, 0.32);
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav.is-menu-open .nav-backdrop {
  display: block;
}

.nav-inner {
  position: relative;
  z-index: 2;
  min-height: var(--nav-h);
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--heading-olive);
}

.nav-panel {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0.15rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--heading-olive);
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.55);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
  height: 16px;
}
.nav-toggle__bars > span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.nav-toggle.is-open .nav-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cta-pill:hover {
  background: var(--accent-dark);
}

body.is-nav-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 1024px) {
  .nav-inner {
    justify-content: flex-end;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 6;
    margin-left: 0;
  }

  .brand {
    min-width: 0;
    flex-shrink: 1;
  }

  .brand-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-panel {
    position: absolute;
    z-index: 4;
    top: 100%;
    left: auto;
    right: 0;
    width: min(17.5rem, calc(100vw - 2.5rem));
    max-width: 100%;
    transform: none;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin-top: 0.35rem;
    padding: 0.45rem 0 0.55rem;
    overflow: visible;
    background: rgba(253, 249, 246, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s step-end;
  }

  .nav.is-menu-open .nav-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.22s ease, visibility 0s step-start;
  }

  .nav-links {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.1rem;
    padding: 0 0.45rem;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    width: 100%;
  }

  .nav-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0.4rem 0.45rem 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-top: 1px solid var(--line);
  }

  .nav-actions .cta-pill {
    width: 100%;
    min-height: 44px;
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }
}

#story,
#eda-areas,
#data-sources,
#story-title,
#eda-areas-title {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

/* —— Hero split banner —— */
.hero {
  padding: 2.25rem 0 2rem;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  min-height: min(420px, 52vh);
}

.hero-split--single {
  grid-template-columns: 1fr;
}

.hero-split__copy {
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--pastel-green);
}

.hero-split--pink .hero-split__copy {
  background: var(--pastel-pink);
}
.hero-split--purple .hero-split__copy {
  background: var(--pastel-purple);
}
.hero-split--yellow .hero-split__copy {
  background: var(--pastel-yellow);
}

.back-link {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  width: fit-content;
}
.back-link:hover {
  color: var(--text);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.65rem;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* Display serif headings: high contrast, tight tracking (reference style) */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-synthesis: none;
  color: var(--heading-olive);
  letter-spacing: var(--heading-tracking);
}

h1 em,
h2 em,
h3 em,
h4 em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.14em;
  text-decoration-thickness: max(1px, 0.055em);
  text-decoration-skip-ink: none;
}

h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
  font-weight: 600;
}

h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: -0.048em;
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.18;
  letter-spacing: -0.042em;
  font-weight: 600;
}

h4 {
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -0.038em;
}

p {
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

.hero-meta {
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
  color: var(--text-muted);
}

.hero-split__visual {
  position: relative;
  min-height: 280px;
  background: linear-gradient(165deg, #f5f0e8 0%, var(--cream-warm) 45%, #ebe4d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
}

.hero-split__visual--layered {
  min-height: min(440px, 52vh);
  padding: 0;
  display: block;
  background: #dfe2e8;
}

.hero-split__visual--layered .hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-module-overlay {
  position: absolute;
  left: 50%;
  bottom: clamp(0.85rem, 4vw, 1.75rem);
  transform: translateX(-50%);
  width: min(400px, 88%);
  z-index: 2;
  filter: drop-shadow(0 18px 36px rgba(20, 24, 35, 0.22));
  pointer-events: none;
}

.hero-module-overlay img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.hero-copy p.lead {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
  max-width: 52ch;
}

.hero-split--single .hero-copy p.lead {
  max-width: 62ch;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(107, 74, 143, 0.35);
}
.btn.primary:hover {
  background: var(--accent-dark);
}
.btn.secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.secondary:hover {
  background: var(--accent-soft);
}

/* Row under hero: tag */
.hero-subrow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.35rem;
  padding-bottom: 0.25rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Intro-only: stats below hero */
.hero-stats {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.stat {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.stat:nth-child(1) {
  border-top: 4px solid var(--pastel-pink);
}
.stat:nth-child(2) {
  border-top: 4px solid var(--pastel-purple);
}
.stat:nth-child(3) {
  border-top: 4px solid var(--pastel-green);
}
.stat .value {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.stat .label {
  margin-top: 0.45rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

/* —— Sections —— */
.section {
  padding: 3rem 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-head h2 {
  margin-top: 0.5rem;
}
.section-head p {
  color: var(--text-muted);
  max-width: 48ch;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

.section--story {
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 55%);
  border-block: 1px solid var(--line);
}
.section--sources {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 2rem;
  align-items: start;
}
.story-layout--feature {
  grid-template-columns: 1fr;
  grid-template-areas:
    "story-main"
    "story-feature";
}
.story-layout--feature .story-layout__main {
  grid-area: story-main;
}
.story-layout__feature {
  grid-area: story-feature;
  margin-top: clamp(0.25rem, 2vw, 1rem);
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 4vw, 2.75rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--pastel-green) 52%, var(--surface)) 0%,
    color-mix(in srgb, var(--pastel-purple) 28%, var(--surface)) 100%
  );
  border: 1px solid var(--line);
}
.story-layout__feature .eyebrow {
  margin-bottom: clamp(0.85rem, 2vw, 1.25rem);
}
.story-layout__feature-lede {
  margin: 0;
  max-width: min(46ch, 100%);
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 3.6vw, 2.2rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.04em;
  color: var(--heading-olive);
}
.story-layout__feature-lede strong {
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: -0.03em;
}
.story-layout__main {
  min-width: 0;
}
.prose-flow p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: var(--body-tracking);
  line-height: 1.45;
}
.prose-flow p:last-child {
  margin-bottom: 0;
}
.prose-flow strong {
  color: var(--text);
  font-weight: 600;
}
.cite-ref {
  color: var(--accent);
  font-weight: 600;
  margin-left: 0.1em;
  text-decoration: none;
}
.cite-ref:hover {
  text-decoration: underline;
}
.cite-ref sup {
  font-size: 0.7em;
}
.refs-note {
  margin-top: 0.75rem;
  padding: 0.5rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 0.75rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text-muted) 72%, var(--cream));
}
.refs-note cite {
  font-style: italic;
  color: var(--text-muted);
}
.refs-note a {
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.35rem;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text-muted) 35%, transparent);
  text-underline-offset: 0.15em;
}
.refs-note a:hover {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.module-pair {
  align-items: stretch;
}
.module-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.45rem 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.module-card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.module-card h3 {
  font-size: 1.28rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 0;
}
.module-card > p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
  flex: 0 0 auto;
}
.module-card__list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  letter-spacing: var(--body-tracking);
  line-height: 1.45;
}
.module-card__list li {
  margin-bottom: 0.45rem;
}
.module-card__list li:last-child {
  margin-bottom: 0;
}

.source-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.source-card {
  margin: 0;
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--cream-warm);
  border: 1px solid var(--line);
  min-width: 0;
}
.source-card h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.source-card p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

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

/* Resource-style cards */
.resource-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.resource-card__visual {
  height: 160px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.resource-card__visual--pink {
  background: var(--pastel-pink);
}
.resource-card__visual--purple {
  background: var(--pastel-purple);
}
.resource-card__visual--yellow {
  background: var(--pastel-yellow);
}
.resource-card__visual--green {
  background: var(--pastel-green);
}
.resource-card__visual {
  position: relative;
}
.resource-card__doc {
  position: relative;
  width: 52%;
  height: 72%;
  background: var(--surface);
  border-radius: 6px;
  box-shadow: -6px 8px 0 rgba(0, 0, 0, 0.06), 0 12px 28px rgba(0, 0, 0, 0.08);
  transform: rotate(-8deg);
  border: 1px solid var(--line);
}
.resource-card__doc::before {
  content: "";
  position: absolute;
  width: 92%;
  height: 88%;
  left: 18%;
  top: 8%;
  background: linear-gradient(180deg, #fff, var(--cream));
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transform: rotate(12deg);
  z-index: -1;
}
.resource-card__body {
  padding: 1.35rem 1.4rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.resource-card__cat {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.resource-card h3 {
  font-size: 1.18rem;
  line-height: 1.16;
  letter-spacing: -0.042em;
}
.resource-card p {
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
  flex: 1;
}
.resource-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.resource-card__more {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
}
.resource-card__more:hover {
  text-decoration: underline;
}
.resource-card__time {
  font-size: 0.75rem;
  color: #a8a29a;
}

.feature-card,
.content-card,
.metric-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 1.35rem 1.4rem;
}

.grid-4 .metric-card:nth-child(4n + 1) {
  border-top: 4px solid var(--pastel-pink);
}
.grid-4 .metric-card:nth-child(4n + 2) {
  border-top: 4px solid var(--pastel-purple);
}
.grid-4 .metric-card:nth-child(4n + 3) {
  border-top: 4px solid var(--pastel-yellow);
}
.grid-4 .metric-card:nth-child(4n + 4) {
  border-top: 4px solid var(--pastel-green);
}

.feature-card h3,
.content-card h3,
.metric-card h3 {
  font-size: 1.08rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-top: 0.35rem;
}
.feature-card p,
.content-card p,
.metric-card p {
  margin-top: 0.55rem;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

.content-card--accent {
  background: var(--pastel-purple);
  border-color: var(--line);
}
.content-card--accent h3 {
  font-size: 1.38rem;
  line-height: 1.12;
  letter-spacing: -0.048em;
}

.content-card--accent-green {
  background: var(--pastel-green);
  border-color: var(--line);
}
.content-card--accent-green h3 {
  font-size: 1.32rem;
  line-height: 1.12;
  letter-spacing: -0.046em;
}

.icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  margin-bottom: 0.5rem;
}
.grid-3 .feature-card:nth-child(3n + 1) .icon-badge,
.grid-3 .content-card:nth-child(3n + 1) .icon-badge,
.grid-4 .metric-card:nth-child(4n + 1) .icon-badge {
  background: var(--pastel-pink);
  color: var(--accent-dark);
}
.grid-3 .feature-card:nth-child(3n + 2) .icon-badge,
.grid-3 .content-card:nth-child(3n + 2) .icon-badge,
.grid-4 .metric-card:nth-child(4n + 2) .icon-badge {
  background: var(--pastel-purple);
  color: var(--accent-dark);
}
.grid-3 .feature-card:nth-child(3n + 3) .icon-badge,
.grid-3 .content-card:nth-child(3n + 3) .icon-badge,
.grid-4 .metric-card:nth-child(4n + 3) .icon-badge {
  background: var(--pastel-yellow);
  color: var(--accent-dark);
}
.grid-4 .metric-card:nth-child(4n + 4) .icon-badge {
  background: var(--pastel-green);
  color: var(--accent-dark);
}

/* Product demo video (#demo) */
.video-placeholder {
  width: 100%;
  max-width: 100%;
}

.demo-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 2px solid #d8c8ec;
  box-shadow: var(--shadow-card);
  background: var(--pastel-purple);
  vertical-align: top;
  pointer-events: none;
  user-select: none;
}

/* Testimonial / carousel */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.carousel--bare {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.quote-card {
  min-width: 100%;
  padding: 2.5rem 2.75rem 3rem;
  background: #ffc9bc;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-card);
}
.quote-card:nth-child(2) {
  background: var(--pastel-purple);
}
.quote-card:nth-child(3) {
  background: var(--pastel-yellow);
}

.quote-attribution {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 40rem;
  line-height: 1.5;
}

.quote-mark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 0.5;
  color: rgba(62, 68, 44, 0.22);
  margin-bottom: 0.25rem;
}

.quote-card h3 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.048em;
  color: var(--heading-olive);
  font-style: normal;
}

.quote-card p {
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

.quote-meta {
  margin-top: 1.1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.quote-swirl {
  position: absolute;
  right: -8px;
  bottom: -12px;
  width: 140px;
  height: 100px;
  pointer-events: none;
  opacity: 0.55;
}
.quote-swirl path {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.25;
  stroke-linecap: round;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.15rem;
}
.carousel-buttons {
  display: flex;
  gap: 0.5rem;
}
.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.carousel-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dots {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}
.dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.timeline {
  display: grid;
  gap: 1rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  align-items: start;
}
.timeline-index {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--pastel-yellow);
  border: 1px solid var(--line);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.875rem;
  font-family: var(--font-sans);
}

.eda-areas-head {
  margin-bottom: 2.5rem;
  max-width: 52ch;
}
.eda-areas-head h2 {
  margin-top: 0.5rem;
}
.eda-areas-intro {
  margin: 1rem 0 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}
.eda-area {
  padding: 2.5rem 0;
}
.eda-area:first-of-type {
  padding-top: 0;
}
.eda-area--band {
  background: var(--cream-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
}
.grant-profiler-areas-head {
  margin-bottom: 0;
}
.grant-profiler-lead-split {
  margin-top: 1rem;
  align-items: start;
}
.grant-profiler-lead-split__text p.grant-profiler-lead-split__intro {
  margin-top: 0;
  max-width: 62ch;
}
.grant-profiler-arch-block {
  padding-bottom: clamp(3rem, 9vw, 6rem);
}

.grant-nlp-eval.eda-area--band {
  margin-top: clamp(1.75rem, 4vw, 3rem);
  padding-top: clamp(1.75rem, 4vw, 3rem);
}
.grant-nlp-eval h3 {
  margin-bottom: 1.1rem;
  max-width: 48ch;
}
.grant-nlp-eval__table-wrap {
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.grant-nlp-table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
  letter-spacing: var(--body-tracking);
  line-height: 1.35;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.grant-nlp-table__caption {
  caption-side: top;
  text-align: left;
  padding: 0 0.75rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: var(--body-leading);
}
.grant-nlp-table__corner {
  background: #3d3d3d;
  color: #f5f5f5;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.grant-nlp-table__head {
  background: #4a4a4a;
  color: #fafafa;
  font-weight: 600;
  text-align: center;
  padding: 0.55rem 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.grant-nlp-table__head--best {
  background: var(--pastel-purple);
  color: var(--heading-olive);
  border-left-color: var(--line);
}
.grant-nlp-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--heading-olive);
  background: var(--cream-warm);
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
.grant-nlp-table td {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--text-muted);
  vertical-align: top;
}
.grant-nlp-table tbody tr:first-of-type th,
.grant-nlp-table tbody tr:first-of-type td {
  border-top: none;
}
.grant-nlp-table__cell--best {
  background: rgba(232, 222, 255, 0.45);
  color: var(--text);
}
.grant-nlp-eval__footnotes {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: 1.4;
  max-width: 62ch;
}
.grant-nlp-eval__footnotes p + p {
  margin-top: 0.45rem;
}
.grant-nlp-eval__callout {
  margin-top: 1.25rem;
  max-width: 52ch;
}
.grant-nlp-eval__callout p {
  margin: 0;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

@media (max-width: 900px) {
  .grant-nlp-table tbody th {
    white-space: normal;
  }
}

.eda-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}
.eda-split--flip .eda-split__viz {
  order: -1;
}
.eda-split__text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.eda-split__text p {
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
  max-width: 48ch;
}
.eda-split__viz {
  min-width: 0;
}
.eda-figure {
  margin: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.eda-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.chart-box--split {
  height: 280px;
  min-height: 220px;
}

.chart-box {
  height: 320px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.chart-grid {
  position: absolute;
  inset: 1rem;
  background: repeating-linear-gradient(
      0deg,
      rgba(107, 74, 143, 0.05),
      rgba(107, 74, 143, 0.05) 1px,
      transparent 1px,
      transparent 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(107, 74, 143, 0.04),
      rgba(107, 74, 143, 0.04) 1px,
      transparent 1px,
      transparent 56px
    );
  border-radius: var(--radius-sm);
}
.chart-bars {
  position: absolute;
  inset: 1rem;
  display: flex;
  align-items: end;
  justify-content: space-evenly;
  padding: 2rem 0.85rem 0.85rem;
}
.bar {
  width: 10%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(180deg, var(--accent), #9b7ab8);
  transform-origin: bottom center;
}
.chart-labels {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 0.75rem;
  display: flex;
  justify-content: space-evenly;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-sans);
}
.polyline {
  position: absolute;
  inset: 1rem;
}
.polyline svg {
  width: 100%;
  height: 100%;
}
.legend {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.legend::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.4rem;
  background: linear-gradient(135deg, var(--pastel-yellow), var(--accent));
  vertical-align: middle;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.badge {
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  background: var(--cream-warm);
  border: 1px solid var(--line);
}
.badge .big {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-sans);
}
.badge .small {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

.callout {
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius-md);
  background: var(--pastel-green);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.callout p {
  margin-top: 0.65rem;
  color: var(--text-muted);
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

.callout--yellow {
  background: var(--pastel-yellow);
}

.content-card__title-serif {
  margin-top: 0.75rem;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -0.05em;
  color: var(--heading-olive);
}

.footer {
  padding: 2.5rem 0 3rem;
}
.footer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-family: var(--font-sans);
}
.footer-card p {
  color: var(--text-muted);
  margin-top: 0.45rem;
  max-width: 42ch;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-delay="1"] {
  transition-delay: 0.08s;
}
[data-delay="2"] {
  transition-delay: 0.16s;
}
[data-delay="3"] {
  transition-delay: 0.24s;
}

@keyframes rise {
  from {
    transform: scaleY(0.78);
    opacity: 0.45;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}
.animate-bars .bar {
  animation: rise 1s ease both;
}
.animate-bars .bar:nth-child(2) {
  animation-delay: 0.08s;
}
.animate-bars .bar:nth-child(3) {
  animation-delay: 0.16s;
}
.animate-bars .bar:nth-child(4) {
  animation-delay: 0.24s;
}
.animate-bars .bar:nth-child(5) {
  animation-delay: 0.32s;
}

/* Team page */
.team-page-hero {
  background: linear-gradient(180deg, var(--pastel-purple) 0%, #ede6f7 55%, var(--cream) 100%);
  border-bottom: 1px solid var(--line);
}
.team-page-hero__head h1 {
  margin-top: 0.5rem;
}
.team-page-hero__lead {
  margin-top: 1rem;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}
.team-bios__title {
  margin-bottom: 1.75rem;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}
.team-bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1025px) {
  .team-bio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.team-member-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 1.35rem 1.4rem 1.45rem;
}
.team-member-card h3 {
  font-size: 1.22rem;
}
.team-member-card__role {
  margin-top: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.team-member-card__bio {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  letter-spacing: var(--body-tracking);
  line-height: var(--body-leading);
}
.team-member-card__linkedin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.5rem;
  padding: 0.35rem 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.team-member-card__linkedin:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .eda-split,
  .eda-split--flip {
    grid-template-columns: 1fr;
  }
  .eda-split--flip .eda-split__viz {
    order: 0;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding: 1.5rem 0 1.5rem;
  }
  .story-layout {
    grid-template-columns: 1fr;
  }
  .hero-split,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero-split {
    min-height: 0;
    border-radius: var(--radius-md);
  }
  .hero-split__visual {
    min-height: 220px;
  }
  .hero-split__visual--layered {
    min-height: min(260px, 42vh);
  }
  .hero-stats,
  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    padding-inline: clamp(0.875rem, 4vw, 1.25rem);
  }
  .section {
    padding: 2.25rem 0;
  }
  .hero-split__copy {
    padding: 1.5rem 1.25rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    min-height: 48px;
    justify-content: center;
  }
  .btn {
    min-height: 44px;
  }
  .quote-card {
    padding: 1.75rem 1.5rem 2.5rem;
  }
  .hero-stats,
  .badge-grid {
    grid-template-columns: 1fr;
  }
  .footer-card {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-card .btn {
    width: 100%;
    justify-content: center;
  }
  .carousel-controls {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .cta-pill {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.6rem 0.85rem;
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .carousel-track {
    transition: none;
  }
  .animate-bars .bar {
    animation: none;
    opacity: 1;
  }
  .nav-panel {
    transition: none;
  }
  .nav-toggle__bars > span {
    transition: none;
  }
}
