/* Formula Health — design tokens */
:root {
  --bg: #eef5f0;
  --bg-deep: #1e4a3c;
  --bg-mid: #3d7a66;
  --surface: #f7fbf8;
  --ink: #1a2e28;
  --ink-soft: #4a635a;
  --line: rgba(30, 74, 60, 0.12);
  --accent: #4f9a7c;
  --accent-deep: #3a7a60;
  --atom-food: #c45c26;
  --atom-move: #4f9a7c;
  --atom-breath: #4a8fad;
  --glow: rgba(79, 154, 124, 0.28);
  --hero-1: #6fad93;
  --hero-2: #5a9a82;
  --hero-3: #7eb89a;
  --hero-4: #a8d4be;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --radius: 1.35rem;
  --radius-hero: 1.85rem;
  --max: 84rem;
  --nav-h: 4.75rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

/* Smooth page reveal (avoids FOUC / font flicker) */
html.js body {
  opacity: 0;
}

html.js body.is-ready {
  opacity: 1;
  transition: opacity 0.45s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html.js body,
  html.js body.is-ready {
    opacity: 1;
    transition: none;
  }
}


body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 8% -8%, rgba(79, 154, 124, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 0%, rgba(74, 143, 173, 0.1), transparent 50%),
    linear-gradient(180deg, #e7f2eb 0%, var(--bg) 40%, #f5faf7 100%);
  min-height: 100vh;
}

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

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--atom-food);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  background: rgba(247, 251, 248, 0.88);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bg-deep);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 560;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--bg-deep);
}

.nav-item.has-sub {
  position: relative;
}

.nav-item.has-sub > a::after {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin-left: 0.35em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg);
  opacity: 0.65;
  vertical-align: middle;
}

.nav-item.has-sub.is-active > a {
  color: var(--bg-deep);
}

.nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 11.5rem;
  margin: 0;
  padding: 0.55rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 14px 32px rgba(15, 42, 36, 0.12);
  z-index: 40;
}

.nav-sub a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 0.55rem;
  white-space: nowrap;
}

.nav-sub a:hover,
.nav-sub a[aria-current="page"] {
  background: rgba(79, 154, 124, 0.12);
  color: var(--bg-deep);
}

.nav-item.has-sub:hover > .nav-sub,
.nav-item.has-sub:focus-within > .nav-sub {
  display: block;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0.6rem;
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    inset: var(--nav-h) 1rem auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 18px 40px rgba(15, 42, 36, 0.12);
    z-index: 50;
  }

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

  .nav-item.has-sub > a::after {
    display: none;
  }

  .nav-sub {
    display: grid;
    position: static;
    transform: none;
    min-width: 0;
    margin: 0.35rem 0 0.15rem 0.75rem;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    gap: 0.35rem;
  }

  .nav-sub a {
    padding: 0.35rem 0;
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem 1.65rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

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

.btn-primary {
  background: var(--bg-deep);
  color: #f3faf6;
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--bg-deep);
  border-color: rgba(15, 42, 36, 0.25);
}

.btn-ghost:hover {
  border-color: var(--bg-deep);
  color: var(--bg-deep);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.85rem;
}

/* —— Hero —— */
.hero {
  position: relative;
  margin: 1rem 1.25rem 0;
  border-radius: var(--radius-hero);
  min-height: calc(100vh - var(--nav-h) - 2rem);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 22% 40%, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at 78% 70%, rgba(196, 92, 38, 0.08), transparent 45%),
    linear-gradient(145deg, var(--hero-1) 0%, var(--hero-2) 38%, var(--hero-3) 72%, var(--hero-4) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.5rem 3.5rem;
  align-items: center;
  padding: 3.25rem 0 3.75rem;
}

@media (max-width: 960px) {
  .hero {
    margin: 0.75rem 0.85rem 0;
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2rem 0 2.5rem;
  }
}

.hero-copy {
  position: relative;
  color: #f4fbf7;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 0.94;
  margin: 0 0 1.15rem;
  color: #fff;
}

.brand-mark em {
  font-style: italic;
  font-weight: 450;
  color: #e7f7ef;
}

.hero-lead {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  max-width: 34rem;
  color: rgba(244, 251, 247, 0.9);
  margin: 0;
  line-height: 1.55;
}

.hero-lead a {
  color: #f4fbf7;
  text-decoration-color: rgba(244, 251, 247, 0.55);
  text-underline-offset: 0.22em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.hero-lead a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.hero .btn-primary {
  background: #f4fbf7;
  color: var(--bg-deep);
}

.hero .btn-primary:hover {
  background: #fff;
  color: var(--bg-deep);
}

.hero .btn-ghost {
  color: #f4fbf7;
  border-color: rgba(244, 251, 247, 0.4);
}

.hero .btn-ghost:hover {
  border-color: #f4fbf7;
  color: #fff;
}

/* Molecule */
.molecule-wrap {
  position: relative;
  width: min(100%, 42rem);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  min-height: min(58vw, 32rem);
  max-height: min(82vh, 42rem);
  touch-action: none;
  overflow: visible;
}

.molecule-svg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 0.55s var(--ease);
  z-index: 1;
}

.molecule-svg .molecule {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.molecule-wrap.is-3d-ready .molecule-svg {
  opacity: 0;
  pointer-events: none;
}

.molecule-wrap.is-svg-only .molecule-svg {
  opacity: 1;
  pointer-events: auto;
}


.molecule-svg.is-gone,
.molecule-svg[hidden] {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.molecule-canvas,
.molecule-labels {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s var(--ease);
}

.molecule-wrap.is-3d-ready .molecule-canvas {
  opacity: 1;
  pointer-events: auto;
}

.molecule-wrap.is-3d-ready .molecule-labels {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .molecule-svg,
  .molecule-canvas,
  .molecule-labels {
    transition: none;
  }
}


.molecule {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mol-bond {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

.mol-core {
  fill: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 0 18px rgba(159, 217, 192, 0.55));
}

.mol-atom {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
  transform-origin: center;
  transform-box: fill-box;
}

.mol-atom--food {
  fill: var(--atom-food);
}

.mol-atom--move {
  fill: var(--atom-move);
}

.mol-atom--breath {
  fill: var(--atom-breath);
}

.mol-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  letter-spacing: 0.02em;
  paint-order: stroke fill;
  stroke: rgba(15, 42, 36, 0.35);
  stroke-width: 3px;
}

.molecule a:focus-visible .mol-atom,
.molecule a:hover .mol-atom {
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 3;
}

.mol-orbit {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 4 10;
}

/* Motions */
@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes draw-bond {
  from {
    stroke-dashoffset: 120;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.mol-atom--food {
  animation: float-y 5.5s var(--ease) infinite;
}

.mol-atom--move {
  animation: float-y 6.2s var(--ease) 0.4s infinite;
}

.mol-atom--breath {
  animation: float-y 5.8s var(--ease) 0.85s infinite;
}

.mol-core-pulse {
  animation: pulse-soft 3.8s ease-in-out infinite;
}

.mol-bond {
  stroke-dasharray: 120;
  animation: draw-bond 1.4s var(--ease) forwards;
}

.hero-copy,
.hero-visual {
  opacity: 1;
}

html.js body:not(.is-ready) .hero-copy,
html.js body:not(.is-ready) .hero-visual {
  opacity: 0;
}

html.js body.is-ready .hero-copy {
  animation: rise-in 0.75s var(--ease) both;
}

html.js body.is-ready .hero-visual {
  animation: rise-in 0.9s var(--ease) 0.08s both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  color: var(--bg-deep);
}

.section-head p {
  color: var(--ink-soft);
  margin: 0;
}

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

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

.pillar {
  position: relative;
  padding: 2rem 1.85rem 1.85rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 42, 36, 0.1);
  color: inherit;
}

.pillar-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.pillar--food .pillar-dot {
  background: var(--atom-food);
}

.pillar--move .pillar-dot {
  background: var(--atom-move);
}

.pillar--breath .pillar-dot {
  background: var(--atom-breath);
}

.pillar h3 {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
  color: var(--bg-deep);
}

.pillar p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 1.08rem;
}

.pillar-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--accent-deep);
}

/* Content page */
.page-hero {
  padding: 3.75rem 0 1.75rem;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  color: var(--bg-deep);
  margin-bottom: 0.5rem;
}

.page-hero p {
  max-width: 46rem;
  color: var(--ink-soft);
  margin: 0;
  font-size: 1.15rem;
}

.prose {
  max-width: 48rem;
  font-size: 1.12rem;
}

.prose h2 {
  font-size: 1.55rem;
  margin-top: 2rem;
  color: var(--bg-deep);
}

/* Content slots / placeholders */
.slot {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 10rem;
  padding: 1.5rem;
  border: 1.5px dashed rgba(15, 42, 36, 0.28);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(15, 42, 36, 0.03) 8px,
      rgba(15, 42, 36, 0.03) 16px
    ),
    rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
}

.slot strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--bg-deep);
  font-weight: 550;
}

.slot small {
  font-size: 0.85rem;
  opacity: 0.85;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
}

.slot--video {
  min-height: 12rem;
  aspect-ratio: 16 / 9;
}

.slot--portrait {
  aspect-ratio: 3 / 4;
  min-height: 0;
}

.slot--wide {
  min-height: 14rem;
}

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.list-plain a {
  display: block;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  text-decoration: none;
  color: var(--bg-deep);
  font-weight: 600;
}

.list-plain a:hover {
  border-color: rgba(45, 138, 106, 0.45);
}

.list-plain span {
  display: block;
  margin-top: 0.25rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--bg-deep);
}


/* —— Author / brand assets —— */
.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--bg-deep);
}

.logo-mark img {
  width: 3.1rem;
  height: auto;
  flex-shrink: 0;
}

.logo-mark .logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.logo-mark .logo-text span {
  color: var(--accent);
}

.author {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: 1.75rem 2.25rem;
  align-items: center;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

@media (max-width: 700px) {
  .author {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.author-photo {
  width: min(100%, 14rem);
  border-radius: 0.85rem;
  overflow: hidden;
  background: #d7e5dc;
}

.author-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.author-name {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  color: var(--bg-deep);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.author-titles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.author-titles li {
  position: relative;
  padding-left: 1rem;
}

.author-titles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 700px) {
  .author-titles li {
    padding-left: 0;
  }
  .author-titles li::before {
    display: none;
  }
}


.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.eyebrow a {
  text-decoration: none;
  font-weight: 600;
}

.exercise-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.exercise-item img {
  width: 100%;
  height: auto;
  display: block;
}

.prose ul {
  padding-left: 1.2rem;
  margin: 0 0 1em;
}

.prose li {
  margin: 0.25em 0;
}


.molecule-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.molecule-labels {
  position: absolute !important;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.mol-label-3d {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.55rem 1rem;
  background: transparent;
  color: #f3faf6 !important;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  border: none;
  text-shadow: 0 1px 10px rgba(15, 42, 36, 0.45);
  transition: color 0.25s var(--ease), text-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
  white-space: nowrap;
}

.mol-label-3d:hover {
  color: #fff !important;
  text-shadow: 0 2px 14px rgba(15, 42, 36, 0.55);
}

.molecule-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #eef7f2;
  text-align: center;
  padding: 1rem;
}

.molecule-fallback a {
  color: #eef7f2;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Hero author */
.hero-author {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.15rem 1.35rem;
  align-items: start;
  margin-top: 2.35rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(244, 251, 247, 0.22);
  max-width: 36rem;
}

.hero-author-photo {
  border-radius: 0.85rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(30, 74, 60, 0.18);
}

.hero-author-photo img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-author-name {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}

.hero-author-titles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  color: rgba(244, 251, 247, 0.88);
  font-size: 1.02rem;
  line-height: 1.4;
}

.hero-author-titles li {
  position: relative;
  padding-left: 0.95rem;
}

.hero-author-titles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #e7f7ef;
}

@media (max-width: 960px) {
  .hero-author {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .hero-author {
    grid-template-columns: 5.5rem 1fr;
  }

  .hero-author-name {
    font-size: 1.15rem;
  }

  .hero-author-titles {
    font-size: 0.92rem;
  }
}


/* Exercises */
.toc-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--bg-deep);
  margin: 2.5rem 0 1rem;
}

.exercise-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.exercise-toc a {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--bg-deep);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.exercise-toc a:hover {
  border-color: rgba(79, 154, 124, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 74, 60, 0.08);
  color: var(--bg-deep);
}

.toc-num {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(79, 154, 124, 0.15);
  color: var(--accent-deep);
  font-size: 0.95rem;
  font-weight: 700;
}

.exercise-layout .exercise-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: 2rem 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .exercise-layout .exercise-section {
    grid-template-columns: 1fr;
  }
  .exercise-side { order: -1; position: static; }
}

.exercise-side {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.exercise-side-title {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--bg-deep);
  font-size: 0.95rem;
}

.exercise-side-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.exercise-side-toc a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.35;
}

.exercise-side-toc a:hover,
.exercise-side-toc a[aria-current="page"] {
  background: rgba(79, 154, 124, 0.12);
  color: var(--bg-deep);
}

.exercise-gallery { margin-top: 1.75rem; }

.exercise-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.pager-link {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--bg-deep);
}

.pager-link span {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.pager-link strong {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
}

.pager-next { text-align: right; }

.pager-link:hover {
  border-color: rgba(79, 154, 124, 0.45);
  color: var(--bg-deep);
}

@media (max-width: 640px) {
  .exercise-pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
}


/* Legal info under "i" icon */
.legal-info {
  position: relative;
  display: inline-block;
  margin: 0 0 1.25rem;
  z-index: 5;
}

.page-hero .legal-info,
.hero-copy .legal-info {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
}

.page-hero {
  position: relative;
  padding-right: 3rem;
}

.legal-info-btn {
  list-style: none;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--bg-deep);
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(15, 42, 36, 0.08);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.legal-info-btn::-webkit-details-marker { display: none; }

.legal-info-btn:hover,
.legal-info[open] > .legal-info-btn {
  background: var(--bg-deep);
  border-color: var(--bg-deep);
  color: #f4fbf7;
}

.page-hero .legal-info .legal-info-panel,
.hero-copy .legal-info .legal-info-panel {
  left: auto;
  right: 0;
}

.legal-info-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: min(28rem, calc(100vw - 2.5rem));
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 16px 36px rgba(15, 42, 36, 0.14);
}

.legal-info-panel p { margin: 0 0 0.65em; }
.legal-info-panel p:last-child { margin-bottom: 0; }

.legal-info--strong > .legal-info-btn {
  border-color: rgba(196, 92, 38, 0.45);
  color: #8a3d14;
}

.legal-info--strong[open] > .legal-info-btn,
.legal-info--strong > .legal-info-btn:hover {
  background: #8a3d14;
  border-color: #8a3d14;
  color: #fff7f2;
}

.legal-info--strong .legal-info-panel {
  border-color: rgba(196, 92, 38, 0.35);
  background: #fffaf6;
  color: var(--ink);
}

/* Video section */
.video-list {
  display: grid;
  gap: 1.75rem;
  max-width: 52rem;
}

.video-card {
  display: grid;
  gap: 0.85rem;
}

.video-card h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.video-card p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #12352c;
  box-shadow: 0 18px 40px rgba(15, 42, 36, 0.12);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* —— Mobile polish —— */
@media (max-width: 860px) {
  .site-header .nav {
    position: relative;
  }

  .nav-links {
    max-height: min(70vh, 28rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links a {
    padding: 0.35rem 0;
    font-size: 1.05rem;
  }

  .molecule-wrap {
    touch-action: pan-y;
    min-height: min(72vw, 22rem);
    max-height: 26rem;
    width: min(100%, 22rem);
  }

  .hero {
    overflow: visible;
  }

  .hero-grid {
    justify-items: center;
  }

  .hero-copy {
    width: 100%;
    padding-right: 2.5rem;
  }

  .hero-visual {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .cta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
  }

  .cta-row .btn {
    width: 100%;
    text-align: center;
  }

  .brand-mark {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }

  .hero-lead {
    font-size: 1.08rem;
  }

  .legal-info-panel {
    width: min(20.5rem, calc(100vw - 1.75rem));
    font-size: 0.86rem;
  }

  .page-hero {
    padding-right: 2.75rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .wrap {
    width: min(100% - 1.5rem, var(--max));
  }
}

@media (max-width: 480px) {
  .hero {
    margin: 0.55rem 0.55rem 0;
    border-radius: 1.25rem;
  }

  .molecule-wrap {
    min-height: 16.5rem;
    max-height: 20rem;
  }

  .logo-text {
    font-size: 1rem;
  }
}

/* Coarse pointer: allow page scroll over molecule */
@media (pointer: coarse) {
  .molecule-wrap {
    touch-action: pan-y;
  }
}
