/* ============================================================
   SimVida: Base styles
   Reset, typography, layout primitives.
   Brand-agnostic (reads from tokens.css). Survives brand swap.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* sticky nav height + breathing room */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

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

a {
  color: inherit;
  text-decoration-color: var(--brand-rule);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--brand-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: #2A2A2A;
  line-height: 1.15;
  margin: 0 0 var(--sp-4) 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p  { margin: 0 0 var(--sp-4) 0; }
ul { margin: 0 0 var(--sp-4) 0; padding-left: var(--sp-5); }

small { font-size: var(--fs-sm); color: var(--brand-ink-soft); }

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: var(--sp-12) 0; }
section + section { border-top: 1px solid var(--brand-rule); }

.section-tight  { padding: var(--sp-10) 0; }
.section-dim    {
  background: linear-gradient(135deg, #F8FBF0 0%, #F8FBFF 50%, #FDF7FB 100%);
}
.section-ink    {
  background: linear-gradient(135deg, #FFF6E8 0%, #FFF0F3 55%, #F1FBE4 100%);
  color: #2A2A2A;
  position: relative;
  overflow: hidden;
}
.section-ink > .container { position: relative; z-index: 1; }
.section-ink h1,
.section-ink h2,
.section-ink h3,
.section-ink h4 { color: #2A2A2A; }
.section-ink .lead { color: #3a3a3a !important; }

/* Section aurora (warm palette for encouragement panel) */
.section-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.section-aurora .aurora-blob { filter: blur(90px); }
.section-aurora .aurora-blob-1 {
  width: 42vw; height: 38vw;
  top: -16vw; left: -10vw;
  background: radial-gradient(circle, #F6C357 0%, #F6E2B1 40%, transparent 70%);
  opacity: 0.55;
  animation: aurora-drift-1 28s ease-in-out infinite alternate;
}
.section-aurora .aurora-blob-2 {
  width: 38vw; height: 34vw;
  top: -8vw; right: -12vw;
  background: radial-gradient(circle, #DB624F 0%, #F0A995 40%, transparent 70%);
  opacity: 0.35;
  animation: aurora-drift-2 32s ease-in-out infinite alternate;
}
.section-aurora .aurora-blob-3 {
  width: 36vw; height: 32vw;
  bottom: -14vw; left: 28%;
  background: radial-gradient(circle, #C850AF 0%, #E6B8DB 40%, transparent 70%);
  opacity: 0.35;
  animation: aurora-drift-3 26s ease-in-out infinite alternate;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }

@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: var(--sp-6); }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  section { padding: var(--sp-10) 0; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--r-btn);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 60ms ease, background 120ms ease, box-shadow 120ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, #9CCA49 0%, #7DA635 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(156, 202, 73, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #8BB83E 0%, #6E9A2D 100%);
  box-shadow: 0 4px 14px rgba(156, 202, 73, 0.45);
}
.btn-primary:active { background: var(--brand-primary-active); }

.btn-secondary {
  background: transparent;
  color: var(--brand-ink);
  border-color: var(--brand-rule);
}
.btn-secondary:hover { border-color: var(--brand-ink); }

.btn-ghost {
  background: transparent;
  color: var(--brand-ink);
}
.btn-ghost:hover { text-decoration: underline; }

.btn-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--brand-bg);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, #9CCA49 0%, #3BB1DB 33%, #A9247F 66%, #DB624F 100%);
  opacity: 0.55;
  pointer-events: none;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-4) 0;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
}
.nav-logo img {
  display: block;
  height: 52px;
  width: auto;
}
.footer .nav-logo img {
  height: 36px;
}
.nav-links {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  flex-wrap: nowrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color 120ms ease;
}
.nav-links a:not(.btn) {
  color: var(--brand-ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:not(.btn):hover {
  color: var(--brand-ink);
  border-bottom-color: var(--brand-rule);
}
.nav-links a:not(.btn).active {
  color: var(--brand-ink);
  font-weight: 600;
  border-bottom-color: var(--brand-ink);
  white-space: nowrap;
}
.nav-links a:not(.btn) { white-space: nowrap; }

/* Stabilise the primary CTA so it doesn't change width between pages
   (Start free on client pages, Request a demo on advisor page). Min
   width sized for the longest label so nav items stop shifting. */
.nav-links a.btn {
  min-width: 148px;
  text-align: center;
  white-space: nowrap;
}

/* Hamburger toggle — injected by effects.js at runtime. Hidden on desktop. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--r-sm);
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand-ink);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 160ms ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible {
  outline: 2px solid var(--brand-primary, #9CCA49);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .nav-inner > nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-rule);
    box-shadow: 0 12px 32px rgba(18, 32, 54, 0.10);
    max-height: 0;
    overflow: hidden;
    transition: max-height 260ms ease;
  }
  .nav-inner > nav.is-open { max-height: 80vh; overflow-y: auto; }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-4) var(--sp-5) var(--sp-5);
  }
  .nav-links li {
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  .nav-links li:last-child { border-bottom: 0; padding-top: var(--sp-3); }
  .nav-links a:not(.btn) {
    display: block;
    padding: var(--sp-3) 0;
    border-bottom: 0;
    font-size: var(--fs-md);
  }
  .nav-links a:not(.btn).active {
    border-bottom: 0;
    color: var(--brand-primary, #9CCA49);
  }
  .nav-links a.btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: var(--sp-3) var(--sp-5) !important;
    font-size: var(--fs-md) !important;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: var(--sp-16) 0 var(--sp-12) 0;
  position: relative;
  overflow: hidden;
}
.hero > .container {
  position: relative;
  z-index: 1;
}

/* ---------- Aurora ---------- */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  will-change: transform;
}

.aurora-blob-1 {
  width: 52vw;
  height: 52vw;
  top: -22vw;
  left: -14vw;
  background: radial-gradient(circle, #9CCA49 0%, #D1E3AA 40%, transparent 70%);
  opacity: 0.40;
  animation: aurora-drift-1 25s ease-in-out infinite alternate;
}
.aurora-blob-2 {
  width: 46vw;
  height: 42vw;
  top: -10vw;
  right: -16vw;
  background: radial-gradient(circle, #3BB1DB 0%, #A9D6EA 40%, transparent 70%);
  opacity: 0.28;
  animation: aurora-drift-2 30s ease-in-out infinite alternate;
}
.aurora-blob-3 {
  width: 40vw;
  height: 36vw;
  bottom: -18vw;
  left: 22%;
  background: radial-gradient(circle, #F6C357 0%, #F6E2B1 40%, transparent 70%);
  opacity: 0.22;
  animation: aurora-drift-3 22s ease-in-out infinite alternate;
}
.aurora-blob-4 {
  width: 38vw;
  height: 34vw;
  bottom: -14vw;
  right: 12%;
  background: radial-gradient(circle, #C850AF 0%, #DAA9D4 40%, transparent 70%);
  opacity: 0.18;
  animation: aurora-drift-4 28s ease-in-out infinite alternate;
}

@keyframes aurora-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
}
@keyframes aurora-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, 15px) scale(1.03); }
}
@keyframes aurora-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 25px) scale(1.04); }
}
@keyframes aurora-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-15px, -30px) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none !important; }
}
.hero h1 {
  font-size: var(--fs-4xl);
  max-width: 14ch;
  margin-bottom: var(--sp-5);
  animation: hero-reveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.hero h1 .fuzzy {
  display: inline-block;
  filter: blur(var(--fuzzy-blur, 2px));
  transition: filter 200ms ease-out;
  will-change: filter;
}
.hero h1 .sharp {
  background-image: linear-gradient(135deg, #9CCA49 0%, #3BB1DB 45%, #C850AF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Gradient text utility for brand moments */
.gradient-text {
  background-image: linear-gradient(135deg, #9CCA49 0%, #3BB1DB 50%, #C850AF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}
.gradient-text.warm {
  background-image: linear-gradient(135deg, #F6C357 0%, #DB624F 50%, #C850AF 100%);
}
.gradient-text.cool {
  background-image: linear-gradient(135deg, #9CCA49 0%, #3BB1DB 100%);
}

/* Learn topic cards rotate through the brand palette */
.grid-3 .card:nth-child(6n+1) .pillar-num { color: #DB624F; }
.grid-3 .card:nth-child(6n+2) .pillar-num { color: #D49A00; }
.grid-3 .card:nth-child(6n+3) .pillar-num { color: #9CCA49; }
.grid-3 .card:nth-child(6n+4) .pillar-num { color: #3BB1DB; }
.grid-3 .card:nth-child(6n+5) .pillar-num { color: #A9247F; }
.grid-3 .card:nth-child(6n+6) .pillar-num { color: #C850AF; }

/* Three pillars on the main page: See / Know / Grow */
#how .grid-3 .card:nth-child(1) .pillar-num { color: #9CCA49; }
#how .grid-3 .card:nth-child(2) .pillar-num { color: #3BB1DB; }
#how .grid-3 .card:nth-child(3) .pillar-num { color: #C850AF; }

/* Three pillars on the advisors page: See / Run / Collaborate */
#features .grid-3 .card:nth-child(1) .pillar-num { color: #9CCA49; }
#features .grid-3 .card:nth-child(2) .pillar-num { color: #3BB1DB; }
#features .grid-3 .card:nth-child(3) .pillar-num { color: #A9247F; }
@keyframes hero-reveal {
  0%   { filter: blur(8px); opacity: 0.35; }
  100% { filter: blur(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 { animation: none; }
  .hero h1 .fuzzy { filter: none; }
}
.hero-lede {
  font-size: var(--fs-md);
  color: var(--brand-ink);
  max-width: 52ch;
  margin-bottom: var(--sp-6);
  font-weight: 500;
}

@media (max-width: 820px) {
  .hero { padding: var(--sp-10) 0; }
  .hero h1 { font-size: var(--fs-2xl); max-width: none; }
}

/* ---------- Cards ---------- */

.card {
  background: var(--brand-bg);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* Gradient arrow for ghost-button CTAs */
.gradient-arrow {
  background-image: linear-gradient(135deg, #9CCA49 0%, #3BB1DB 50%, #C850AF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  font-weight: 800;
  margin-left: 2px;
}
.card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}
.card p:last-child { margin-bottom: 0; }

.pillar-num {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  letter-spacing: 0;
  text-transform: none;
  display: block;
  margin-bottom: var(--sp-2);
}

/* ---------- Fee comparison ---------- */

.fee-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.fee-col {
  padding: var(--sp-6);
}
.fee-col + .fee-col { border-left: 1px solid var(--brand-rule); }
.fee-col.highlight {
  background: var(--brand-bg-alt);
}
.fee-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--brand-ink-soft);
  margin-bottom: var(--sp-3);
}
.fee-big {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--sp-3);
}
.fee-sub {
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
}
.fee-gap-callout {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border-left: 3px solid var(--brand-ink);
  background: var(--brand-bg-alt);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

@media (max-width: 820px) {
  .fee-compare { grid-template-columns: 1fr; }
  .fee-col + .fee-col { border-left: none; border-top: 1px solid var(--brand-rule); }
}

/* ---------- FAQ ---------- */

.faq details {
  border-bottom: 1px solid var(--brand-rule);
  padding: var(--sp-4) 0;
}
.faq details[open] summary { font-weight: 600; }
.faq summary {
  cursor: pointer;
  font-size: var(--fs-md);
  list-style: none;
  padding-right: var(--sp-6);
  position: relative;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  font-family: var(--font-mono);
  color: var(--brand-ink-soft);
}
.faq details[open] summary::after { content: "–"; }
.faq-body {
  padding-top: var(--sp-3);
  color: var(--brand-ink-soft);
  max-width: 72ch;
}

/* ---------- Placeholder image block ---------- */

.placeholder {
  background: var(--brand-bg-dim);
  border: 1px dashed var(--brand-rule);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--brand-ink-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  min-height: 220px;
  padding: var(--sp-5);
}

/* "You've probably had the feeling" section — typographic beat layout.
   Three pain points stepped out, muted bridge, gradient resolution line. */
.feeling-section {
  padding: var(--sp-12) 0;
}
.feeling-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.feeling-headline {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-3);
}
.feeling-subhead {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--brand-ink-soft);
  letter-spacing: -0.01em;
  line-height: 1.35;
  max-width: 640px;
  margin: 0 auto var(--sp-8);
}
.feeling-bridge {
  font-size: var(--fs-md);
  color: var(--brand-ink-soft);
  max-width: 58ch;
  margin: 0 auto var(--sp-5);
  line-height: 1.7;
}
.feeling-bridge:last-of-type { margin-bottom: var(--sp-10); }
.feeling-resolve {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  background-image: linear-gradient(135deg, #9CCA49 0%, #3BB1DB 50%, #C850AF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@media (max-width: 820px) {
  .feeling-section { padding: var(--sp-10) 0; }
  .feeling-headline { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
  .feeling-subhead { font-size: var(--fs-md); margin-bottom: var(--sp-6); }
  .feeling-resolve { font-size: var(--fs-3xl); }
}

/* Soft colour wash for otherwise-plain white sections. Applied to
   #how, #chart (chart playground sits on top of this), and the learn
   preview on the main page. Very low opacity, decorative only. */
.section-wash {
  position: relative;
  isolation: isolate;
}
.section-wash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% 10%, rgba(156, 202, 73, 0.16), transparent 70%),
    radial-gradient(50% 45% at 92% 20%, rgba(59, 177, 219, 0.14), transparent 70%),
    radial-gradient(55% 55% at 85% 95%, rgba(200, 80, 175, 0.12), transparent 70%),
    radial-gradient(45% 45% at 5% 95%, rgba(212, 154, 0, 0.12), transparent 70%);
}

/* ---------- Real product screenshots ---------- */

.shot {
  display: block;
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--brand-rule);
  box-shadow: 0 6px 24px rgba(18, 32, 54, 0.08), 0 1px 2px rgba(18, 32, 54, 0.04);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--brand-bg);
}
.shot--pillar { margin-top: var(--sp-4); }
.shot--wide { aspect-ratio: 16 / 9; }
.shot--article {
  aspect-ratio: 16 / 10;
  margin-bottom: var(--sp-4);
  box-shadow: none;
  border-color: transparent;
}

/* ---------- Breadcrumb navigation ---------- */

.breadcrumb {
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--brand-ink-soft);
  text-decoration: none;
  transition: color 140ms ease;
}
.breadcrumb a:hover {
  color: var(--brand-ink);
}
.breadcrumb .sep {
  color: var(--brand-ink-soft);
  opacity: 0.5;
  font-family: var(--font-mono);
}
.breadcrumb [aria-current="page"] {
  color: var(--brand-ink);
  font-weight: 500;
}

/* ---------- Article body typography ---------- */

.article-body {
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--brand-ink);
  max-width: 64ch;
}
.article-body > p { margin-bottom: var(--sp-5); }
.article-body h2 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xl);
  line-height: 1.2;
}
.article-body h3 {
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-lg);
}
.article-body ul, .article-body ol {
  margin-bottom: var(--sp-5);
  padding-left: var(--sp-5);
}
.article-body li {
  margin-bottom: var(--sp-2);
}
.article-body blockquote {
  border-left: 3px solid var(--brand-primary, #9CCA49);
  padding: 0 0 0 var(--sp-5);
  margin: var(--sp-6) 0;
  color: var(--brand-ink-soft);
  font-style: italic;
}
.article-body a {
  color: var(--brand-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-body a:hover {
  color: var(--brand-primary);
}
.article-header {
  max-width: 64ch;
  margin-bottom: var(--sp-7);
}
.article-header h1 {
  margin: var(--sp-3) 0 var(--sp-4);
}
.article-header .lead {
  font-size: var(--fs-lg);
  color: var(--brand-ink-soft);
  line-height: 1.5;
  max-width: 56ch;
}

/* Category cards (Learn index): the whole card is a link. */
a.card {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.card h3 { color: var(--brand-ink); }
.category-card {
  --cat-color: #9CCA49;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--cat-color) 7%, var(--brand-bg)) 0%,
      var(--brand-bg) 55%);
}
.category-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--cat-color),
    color-mix(in srgb, var(--cat-color) 55%, white));
  border-radius: var(--r-card) var(--r-card) 0 0;
}
.category-card h3 {
  color: var(--brand-ink);
  transition: color 160ms ease;
}
.category-card:hover h3 {
  color: color-mix(in srgb, var(--cat-color) 80%, black);
}
.category-card .count {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: color-mix(in srgb, var(--cat-color) 75%, black);
  background: color-mix(in srgb, var(--cat-color) 14%, transparent);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  margin-top: var(--sp-4);
  letter-spacing: 0.02em;
}
.category-card::after {
  content: "→";
  position: absolute;
  right: var(--sp-5);
  bottom: var(--sp-5);
  font-family: var(--font-mono);
  color: var(--cat-color);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.category-card:hover::after {
  opacity: 1;
  transform: none;
}

/* Per-category colour assignments (matches eyebrow colours on category pages). */
.grid-4 > .category-card:nth-child(1) { --cat-color: #DB624F; }
.grid-4 > .category-card:nth-child(2) { --cat-color: #3BB1DB; }
.grid-4 > .category-card:nth-child(3) { --cat-color: #C850AF; }
.grid-4 > .category-card:nth-child(4) { --cat-color: #9CCA49; }

/* Pillar cards: flex column so the screenshot pins to the bottom,
   giving all three cards a shared vertical alignment plane. */
#how .card,
#features .card {
  display: flex;
  flex-direction: column;
}
#how .card > .shot-crop,
#features .card > .shot-crop { margin-top: auto; }

/* Cropped, zoomable screenshot.
   Per-instance tuning via CSS custom properties on the element:
     --shot-scale (default 1.75)
     --shot-x / --shot-y (translate in % of image width/height) */
.shot-crop {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-top: var(--sp-5);
  padding: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--brand-rule);
  background: var(--brand-bg);
  box-shadow: 0 6px 24px rgba(18, 32, 54, 0.08), 0 1px 2px rgba(18, 32, 54, 0.04);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 200ms ease, box-shadow 200ms ease;
  font: inherit;
  color: inherit;
  text-align: left;
}
.shot-crop:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(18, 32, 54, 0.14), 0 2px 4px rgba(18, 32, 54, 0.06);
}
.shot-crop:focus-visible {
  outline: 2px solid var(--brand-primary, #9CCA49);
  outline-offset: 3px;
}
.shot-crop img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: top left;
  transform:
    translate(var(--shot-x, 0%), var(--shot-y, 0%))
    scale(var(--shot-scale, 1.75));
}
.shot-crop::after {
  content: "";
  position: absolute;
  inset: auto 10px 10px auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(18, 32, 54, 0.18);
  background-image:
    radial-gradient(circle at 40% 40%, transparent 5px, #3a4455 5px, #3a4455 6px, transparent 6px),
    linear-gradient(135deg, transparent 45%, #3a4455 45%, #3a4455 55%, transparent 55%);
  background-repeat: no-repeat;
  background-size: 16px 16px, 6px 6px;
  background-position: 5px 5px, 16px 16px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.shot-crop:hover::after,
.shot-crop:focus-visible::after {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .shot-crop { transition: none; }
  .shot-crop:hover { transform: none; }
}

/* ---------- Forms (contact + general) ---------- */

.form-grid {
  display: grid;
  gap: var(--sp-4);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.form-label {
  font-size: var(--fs-sm);
  color: var(--brand-ink);
  font-weight: 500;
}
.form-input,
.form-textarea,
.form-select {
  font: inherit;
  font-size: var(--fs-md);
  padding: 12px 14px;
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-sm);
  background: var(--brand-bg);
  color: var(--brand-ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand-primary, #9CCA49);
  box-shadow: 0 0 0 3px rgba(156, 202, 73, 0.18);
}
.form-textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}
.form-help {
  font-size: var(--fs-xs);
  color: var(--brand-ink-soft);
}
.form-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--brand-ink-soft) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--brand-ink-soft) 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.form-success {
  padding: var(--sp-4);
  border-radius: var(--r-sm);
  background: rgba(156, 202, 73, 0.14);
  border: 1px solid rgba(156, 202, 73, 0.4);
  color: #4a6a1e;
  font-size: var(--fs-sm);
  display: none;
}
.form-success.is-shown { display: block; }
.form-success.is-error {
  background: rgba(214, 82, 62, 0.10);
  border-color: rgba(214, 82, 62, 0.4);
  color: #8a2f22;
}
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Contact-specific: side-by-side layout, stacks on mobile */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.contact-details {
  background: var(--brand-bg);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.contact-details h3 {
  font-size: var(--fs-md);
  margin: 0 0 var(--sp-2);
}
.contact-details h3 + p { margin-top: 0; }
.contact-details .detail-block + .detail-block {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--brand-rule);
}
.contact-details a { word-break: break-all; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(10, 14, 22, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 9999;
  cursor: zoom-out;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: scale(0.97);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lightbox.is-open img { transform: none; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
body.lightbox-open { overflow: hidden; }

/* ---------- Cookie consent banner (injected by effects.js) ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: var(--sp-5);
  transform: translateX(-50%) translateY(calc(100% + var(--sp-5)));
  max-width: 720px;
  width: calc(100% - var(--sp-5) * 2);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-md);
  box-shadow: 0 20px 48px rgba(18, 32, 54, 0.18);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 260ms ease;
  overflow: hidden;
}
.cookie-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #9CCA49, #3BB1DB, #C850AF, #DB624F);
  opacity: 0.55;
  pointer-events: none;
}
.cookie-banner.is-open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5);
}
.cookie-banner-body strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--fs-md);
  color: var(--brand-ink);
}
.cookie-banner-body p {
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  margin: 0;
  line-height: 1.5;
}
.cookie-banner-body .cookie-meta {
  font-size: var(--fs-xs);
  margin-top: 6px;
}
.cookie-banner-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.cookie-banner-actions .btn {
  min-width: 150px;
  padding: 10px 14px;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    border-radius: var(--r-md) var(--r-md) 0 0;
    transform: translateY(100%);
  }
  .cookie-banner.is-open { transform: translateY(0); }
  .cookie-banner-inner { grid-template-columns: 1fr; padding: var(--sp-4); gap: var(--sp-4); }
  .cookie-banner-actions { flex-direction: row; }
  .cookie-banner-actions .btn { flex: 1; min-width: 0; }
}

/* ---------- Hero kicker / tagline chip ---------- */
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--brand-rule);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-5);
  letter-spacing: 0;
}
.hero-kicker strong { color: var(--brand-ink); font-weight: 600; }

/* ---------- Trust ribbon under primary CTAs ---------- */
.trust-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brand-ink-soft);
  letter-spacing: 0.02em;
}
.trust-ribbon .dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 999px;
  background: var(--brand-ink-soft);
  opacity: 0.5;
}
.btn-row + .trust-ribbon { margin-top: var(--sp-3); }

/* ---------- SA retirement stat: big quiet number ---------- */
.stat-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-6);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.stat-callout .stat-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin-bottom: 4px;
  line-height: 1;
}
.stat-callout .stat-big {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  background-image: linear-gradient(135deg, #DB624F 0%, #A9247F 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-callout .stat-copy {
  font-size: var(--fs-md);
  color: var(--brand-ink);
  line-height: 1.5;
  margin: 0;
}
.stat-callout .stat-copy small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--brand-ink-soft);
  margin-top: 6px;
}
@media (max-width: 640px) {
  .stat-callout { grid-template-columns: 1fr; text-align: center; }
}

/* ---------- Two-paths section ---------- */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  max-width: 960px;
  margin: 0 auto;
}
.path-card {
  padding: var(--sp-6);
  border-radius: var(--r-card);
  background: var(--brand-bg);
  border: 1px solid var(--brand-rule);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.path-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--path-color, #9CCA49);
}
.path-card:nth-child(1) { --path-color: #9CCA49; }
.path-card:nth-child(2) { --path-color: #3BB1DB; }
.path-card .path-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--path-color);
  margin-bottom: var(--sp-2);
  font-weight: 500;
}
.path-card h3 {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-lg);
}
.path-card ol, .path-card ul {
  padding-left: var(--sp-5);
  margin: var(--sp-3) 0 0;
  color: var(--brand-ink-soft);
  line-height: 1.7;
}
@media (max-width: 820px) {
  .paths-grid { grid-template-columns: 1fr; }
}

/* ---------- Testimonial ---------- */
.testimonial {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-6);
  text-align: center;
  position: relative;
}
.testimonial-quote {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--brand-ink);
  margin: 0 0 var(--sp-5);
}
.testimonial-quote::before {
  content: "“";
  display: block;
  font-size: 64px;
  line-height: 0.4;
  color: var(--brand-primary, #9CCA49);
  margin-bottom: var(--sp-3);
}
.testimonial-attrib {
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  font-family: var(--font-mono);
  letter-spacing: 0;
}
.testimonial-attrib strong { color: var(--brand-ink); font-weight: 500; }

/* ---------- Article table-of-contents (auto-injected) ---------- */
.article-toc {
  max-width: 64ch;
  margin: 0 0 var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--brand-bg-alt);
  border-left: 3px solid var(--brand-rule);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-sm);
}
.article-toc-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brand-ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: block;
}
.article-toc ol {
  margin: 0;
  padding-left: var(--sp-5);
  color: var(--brand-ink-soft);
  line-height: 1.8;
}
.article-toc a {
  color: var(--brand-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 140ms ease;
}
.article-toc a:hover {
  border-bottom-color: var(--brand-ink);
}

/* ---------- Shot-crop subtle breathe animation ---------- */
@keyframes shot-breathe {
  0%, 100% { transform: translate(var(--shot-x, 0%), var(--shot-y, 0%)) scale(var(--shot-scale, 1.75)); }
  50%      { transform: translate(calc(var(--shot-x, 0%) - 1.5%), var(--shot-y, 0%)) scale(calc(var(--shot-scale, 1.75) * 1.015)); }
}
.shot-crop img {
  animation: shot-breathe 22s ease-in-out infinite;
}
.shot-crop:hover img {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .shot-crop img { animation: none; }
}

/* ---------- Legal pages plain-English callout ---------- */
.legal-tldr {
  padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(135deg,
    rgba(156, 202, 73, 0.10) 0%,
    rgba(59, 177, 219, 0.08) 100%);
  border-left: 3px solid var(--brand-primary, #9CCA49);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--sp-5) 0 var(--sp-7);
  max-width: 64ch;
}
.legal-tldr-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brand-primary, #9CCA49);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-2);
}
.legal-tldr p { margin: 0; font-size: var(--fs-md); color: var(--brand-ink); line-height: 1.55; }

/* ---------- Updates (rendered from Contentful by scripts/build_updates.py) ---------- */
.update { margin-bottom: var(--sp-6); scroll-margin-top: 96px; }
.update h3 { margin-top: var(--sp-2); }
.update-media {
  display: block;
  width: 100%;
  height: auto;
  margin: var(--sp-4) 0;
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-md);
  background: var(--brand-bg-alt);
}
.update-body > :last-child { margin-bottom: 0; }
.update-body li > p { margin: 0; }
.update-body ul, .update-body ol { margin: 0 0 var(--sp-3); }
.updates-heading { font-size: var(--fs-xl); margin: 0 0 var(--sp-5); }
.updates-upcoming { margin-bottom: var(--sp-10); }
.update-upcoming { border-style: dashed; background: var(--brand-bg-alt); }
.update-upcoming p { margin: 0; }

/* ---------- Legal pages: full documents ---------- */
/* The binding text, reproduced verbatim from the signed PDFs in assets/legal/.
   Clause numbers stay literal text so cross-references ("see 3.1") still land. */
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
}
.legal-toc {
  margin: var(--sp-6) 0 0;
  padding: var(--sp-5) var(--sp-6);
  background: var(--brand-bg-alt);
  border-radius: var(--r-md);
}
.legal-toc h2 { font-size: var(--fs-sm); margin: 0 0 var(--sp-3); color: var(--brand-ink-soft); }
.legal-toc ol { list-style: none; margin: 0; padding: 0; columns: 2 24ch; column-gap: var(--sp-6); }
.legal-toc li { font-size: var(--fs-sm); padding: 2px 0; break-inside: avoid; }
.legal-doc { font-size: var(--fs-base); line-height: 1.65; color: var(--brand-ink); }
.legal-doc h2 {
  font-size: var(--fs-lg);
  margin: var(--sp-8) 0 var(--sp-4);
  scroll-margin-top: 96px;
}
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { font-size: var(--fs-md); margin: var(--sp-5) 0 var(--sp-3); }
.legal-doc p { margin: 0 0 var(--sp-3); }
.legal-doc .clause {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-3);
}
.legal-doc .clause > .clause-num { font-variant-numeric: tabular-nums; color: var(--brand-ink-soft); }
.legal-doc .clause > div > :last-child { margin-bottom: 0; }
.legal-doc .clause .clause { margin-top: var(--sp-3); }
.legal-doc table { width: 100%; border-collapse: collapse; margin: var(--sp-4) 0 var(--sp-5); font-size: var(--fs-sm); }
.legal-doc th, .legal-doc td { border: 1px solid var(--brand-rule); padding: var(--sp-2) var(--sp-3); text-align: left; vertical-align: top; }
.legal-doc th { background: var(--brand-bg-alt); font-weight: 600; }
.legal-table-wrap { overflow-x: auto; }
.legal-entity {
  margin-top: var(--sp-8);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--brand-rule);
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
}
@media (max-width: 640px) {
  .legal-doc .clause { grid-template-columns: 1fr; gap: 0; }
  .legal-doc .clause .clause { padding-left: var(--sp-4); }
}

/* ---------- Platform-not-FSP chip ---------- */
.platform-chip {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--brand-ink-soft);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  margin-top: var(--sp-4);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-pill);
}

/* ---------- Mobile chart fine-tuning ---------- */
@media (max-width: 640px) {
  .chart-controls {
    gap: var(--sp-4);
  }
  .control input[type="range"] {
    height: 36px; /* bigger tap target */
  }
  .control-value {
    font-size: var(--fs-lg);
  }
  .chart-wrap svg {
    min-height: 200px;
  }
  .chart-result {
    font-size: var(--fs-md);
  }
}

/* ---------- Scroll-triggered reveals ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 110ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 220ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 330ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 440ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 550ms; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 660ms; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 770ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Explainer video player ----------
   Self-hosted <video>. Poster shows until play (preload="none" → zero
   bytes downloaded until the visitor chooses), then native controls.
   The custom play disc only appears when JS is ready; the no-JS
   fallback is the native control bar (the <video> keeps its controls
   attribute until effects.js removes it). */
.video-section { padding: var(--sp-10) 0; }

.video-player {
  position: relative;
  max-width: 940px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);
  overflow: hidden;
  background: #0e1116;
  border: 1px solid var(--brand-rule);
  box-shadow: 0 18px 48px rgba(18, 32, 54, 0.16), 0 2px 6px rgba(18, 32, 54, 0.06);
}
.video-player .video-el {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0e1116;
}

.video-play {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(14, 17, 22, 0) 60%, rgba(14, 17, 22, 0.16) 100%);
  -webkit-tap-highlight-color: transparent;
}
html.js-ready .video-player.is-idle .video-play { display: flex; }

.video-play .play-disc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(18, 32, 54, 0.28);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease;
}
.video-play:hover .play-disc,
.video-play:focus-visible .play-disc {
  transform: scale(1.06);
  box-shadow: 0 14px 38px rgba(18, 32, 54, 0.34);
}
.video-play:focus-visible { outline: none; }
.video-play:focus-visible .play-disc {
  outline: 3px solid var(--brand-primary, #9CCA49);
  outline-offset: 4px;
}
.video-play .play-disc svg {
  width: 30px;
  height: 30px;
  margin-left: 5px; /* optical centering of the triangle */
}

.video-caption {
  max-width: 940px;
  margin: var(--sp-4) auto 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .video-play .play-disc { transition: none; }
}
@media (max-width: 640px) {
  .video-section { padding: var(--sp-8) 0; }
  .video-play .play-disc { width: 68px; height: 68px; }
  .video-play .play-disc svg { width: 24px; height: 24px; }
}

/* ---------- Article mood thumbnails (background imagery) ---------- */

.article-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.article-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 40%, rgba(18,32,54,0.10) 100%);
  pointer-events: none;
}

/* ---------- Hero background image layer ---------- */

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.7;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 32%, rgba(0,0,0,0.55) 58%, rgba(0,0,0,1) 100%);
          mask-image: linear-gradient(100deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 32%, rgba(0,0,0,0.55) 58%, rgba(0,0,0,1) 100%);
}

/* ---------- Proof / team ---------- */

.team-member {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.avatar {
  width: 72px; height: 72px;
  border-radius: var(--r-pill);
  background: var(--brand-bg-dim);
  border: 1px dashed var(--brand-rule);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.avatar--photo {
  border: none;
  background: var(--brand-bg);
  box-shadow:
    0 0 0 3px var(--brand-bg),
    0 0 0 5px var(--avatar-ring, #9CCA49),
    0 10px 24px rgba(18, 32, 54, 0.12);
}
.avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  background: var(--avatar-fill, linear-gradient(135deg, #9CCA49 0%, #3BB1DB 100%));
  border: none;
  box-shadow:
    0 0 0 3px var(--brand-bg),
    0 0 0 5px var(--avatar-ring, #3BB1DB),
    0 10px 24px rgba(18, 32, 54, 0.12);
}

/* Colour each team member's ring with a different brand accent. */
.team-member:nth-child(4n+1) { --avatar-ring: #9CCA49; --avatar-fill: linear-gradient(135deg, #9CCA49 0%, #3BB1DB 100%); }
.team-member:nth-child(4n+2) { --avatar-ring: #3BB1DB; --avatar-fill: linear-gradient(135deg, #3BB1DB 0%, #A9247F 100%); }
.team-member:nth-child(4n+3) { --avatar-ring: #C850AF; --avatar-fill: linear-gradient(135deg, #C850AF 0%, #D49A00 100%); }
.team-member:nth-child(4n+4) { --avatar-ring: #D49A00; --avatar-fill: linear-gradient(135deg, #D49A00 0%, #DB624F 100%); }
.team-role {
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--brand-bg-alt);
  padding: var(--sp-8) 0;
  color: var(--brand-ink-soft);
  font-size: var(--fs-sm);
  border-top: 1px solid rgba(0,0,0,0.04);
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, #DB624F 0%, #A9247F 33%, #3BB1DB 66%, #9CCA49 100%);
  opacity: 0.55;
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-6);
}
.footer h4 {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--brand-ink);
  margin-bottom: var(--sp-3);
  position: relative;
  padding-bottom: 8px;
}
.footer h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--footer-accent, #9CCA49);
}
.footer-grid > div:nth-child(1) { --footer-accent: #9CCA49; }
.footer-grid > div:nth-child(2) { --footer-accent: #3BB1DB; }
.footer-grid > div:nth-child(3) { --footer-accent: #C850AF; }
.footer-grid > div:nth-child(4) { --footer-accent: #D49A00; }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: var(--sp-2); }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

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

/* ---------- Prototype badge ---------- */

.proto-badge {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  background: var(--brand-ink);
  color: var(--brand-bg);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 100;
}

/* ---------- Utility ---------- */

.muted { color: var(--brand-ink-soft); }
.lead  { font-size: var(--fs-md); color: var(--brand-ink-soft); max-width: 64ch; }
.center { text-align: center; }
.max-prose { max-width: 64ch; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--sp-6); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--brand-ink-soft);
  margin-bottom: var(--sp-3);
}

.big-stat {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  background-image: linear-gradient(135deg, var(--stat-a, #9CCA49) 0%, var(--stat-b, #3BB1DB) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.grid-4 > div:nth-child(4n+1) .big-stat { --stat-a: #9CCA49; --stat-b: #3BB1DB; }
.grid-4 > div:nth-child(4n+2) .big-stat { --stat-a: #3BB1DB; --stat-b: #A9247F; }
.grid-4 > div:nth-child(4n+3) .big-stat { --stat-a: #C850AF; --stat-b: #DB624F; }
.grid-4 > div:nth-child(4n+4) .big-stat { --stat-a: #D49A00; --stat-b: #DB624F; }

/* ---------- Chart playground (How are you doing?) ---------- */

.chart-playground {
  margin-top: var(--sp-7);
  padding: var(--sp-7);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lg);
}

/* Aurora wash inside #chart so the glass card has something to blur */
#chart {
  position: relative;
  overflow: hidden;
}
#chart > .container { position: relative; z-index: 1; }
#chart::before,
#chart::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
}
#chart::before {
  width: 45vw; height: 42vw;
  top: 6vw; left: -18vw;
  background: radial-gradient(circle, #9CCA49 0%, #D1E3AA 40%, transparent 70%);
  opacity: 0.28;
}
#chart::after {
  width: 40vw; height: 38vw;
  bottom: -12vw; right: -14vw;
  background: radial-gradient(circle, #3BB1DB 0%, #A9D6EA 40%, transparent 70%);
  opacity: 0.22;
}

.chart-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

.control label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
  margin-bottom: var(--sp-2);
}

.control-value {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
  color: var(--brand-primary-active);
}

/* Each slider gets a distinctive accent on its label */
.chart-controls .control:nth-child(1) label { color: #DB624F; }
.chart-controls .control:nth-child(2) label { color: #7DA635; }
.chart-controls .control:nth-child(3) label { color: #227AA0; }
.chart-controls .control:nth-child(4) label { color: #A9247F; }
.chart-controls .control label {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* Real range sliders */
.control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 0;
  padding: 6px 0;
  outline: none;
  cursor: pointer;
}
.control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--brand-accent-soft);
  border-radius: var(--r-pill);
}
.control input[type="range"]::-moz-range-track {
  height: 6px;
  background: var(--brand-accent-soft);
  border-radius: var(--r-pill);
  border: none;
}
.control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--brand-primary);
  border-radius: 50%;
  margin-top: -6px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(156, 202, 73, 0.45);
  cursor: pointer;
}
.control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--brand-primary);
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(156, 202, 73, 0.45);
  cursor: pointer;
}
.control input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--brand-bg-dim);
}
.control input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--brand-bg-dim);
}

/* Chart SVG */
.chart-wrap {
  margin: var(--sp-5) 0;
  background: var(--brand-bg);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-md);
  padding: var(--sp-4);
}
#projection-chart {
  width: 100%;
  height: auto;
  display: block;
  font-family: var(--font-body);
}
#projection-chart .grid {
  stroke: var(--brand-rule);
  stroke-width: 1;
  stroke-dasharray: 1 4;
  opacity: 0.7;
}
#projection-chart .axis {
  stroke: var(--brand-ink-soft);
  stroke-width: 1;
  opacity: 0.5;
}
#projection-chart .retirement-line {
  stroke: var(--brand-ink-soft);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
#projection-chart .retire-label {
  font-size: 12px;
  font-weight: 600;
  fill: #A9247F;
}
#projection-chart .tick-label {
  font-size: 11px;
  fill: var(--brand-ink-soft);
}
#projection-chart .retirement-line {
  stroke: #A9247F;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.55;
}
#projection-chart .legend-label {
  font-size: 12px;
  fill: var(--brand-ink);
}
#projection-chart .series-current {
  fill: none;
  stroke: var(--brand-ink-soft);
  stroke-width: 2;
  stroke-dasharray: 5 3;
}
#projection-chart .series-improved {
  fill: none;
  stroke: var(--brand-primary-active);
  stroke-width: 2.5;
}
#projection-chart .legend-swatch {
  stroke-dasharray: inherit;
}
#projection-chart .area-current {
  fill: var(--brand-ink-soft);
  opacity: 0.04;
  stroke: none;
}
#projection-chart .area-improved {
  fill: var(--brand-primary);
  opacity: 0.14;
  stroke: none;
}

.chart-result {
  margin-top: var(--sp-5);
  padding: var(--sp-5);
  background: var(--brand-bg);
  border-radius: var(--r-md);
  border: 1px solid var(--brand-rule);
}

.chart-result p { max-width: none; }
.chart-result p:last-child { margin-bottom: 0; }

/* Result-box label colours */
.chart-result .result-label-current {
  color: var(--brand-ink-soft);
}
.chart-result .result-label-lever {
  background-image: linear-gradient(135deg, #9CCA49 0%, #3BB1DB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
}
.chart-result .diff-highlight {
  color: var(--brand-primary-active);
}

@media (max-width: 820px) {
  .chart-controls { grid-template-columns: repeat(2, 1fr); }
  .chart-playground { padding: var(--sp-5); }
}

/* Obvious placeholder-token marker */
.tk {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--brand-bg-dim);
  padding: 0 6px;
  border-radius: var(--r-sm);
  color: var(--brand-ink);
}

/* ==========================================================================
   Learn: reading progress
   All of this is painted by assets/learn-progress.js from localStorage, so
   none of it exists server-side. A reader with no progress, or with JS off,
   sees clean pages rather than empty meters.
   ========================================================================== */

/* --- shared bar ---------------------------------------------------------- */

.progress-track {
  position: relative;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--brand-bg-dim);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #9CCA49, #3BB1DB, #C850AF);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- shared ring --------------------------------------------------------- */

.progress-ring-track { stroke: var(--brand-rule); }
.progress-ring-arc {
  stroke: var(--brand-primary);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-ring-tick { stroke: var(--brand-primary); }

/* --- the big one, on the Learn index ------------------------------------- */

.progress-hero {
  margin-top: var(--sp-8);
  max-width: 620px;
  padding: var(--sp-6);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-card);
  background: linear-gradient(180deg, var(--brand-bg-alt) 0%, var(--brand-bg) 60%);
  box-shadow: var(--shadow-sm);
}
.progress-hero-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.progress-hero-stat { display: flex; align-items: baseline; gap: var(--sp-3); }
.progress-hero-num {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}
.progress-hero-of { font-size: var(--fs-md); color: var(--brand-ink-soft); }
.progress-hero-pct {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}
.progress-hero-note {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-sm);
  color: var(--brand-ink-soft);
}
.progress-hero.is-empty .progress-hero-num,
.progress-hero.is-empty .progress-hero-pct { color: var(--brand-ink-soft); }
.progress-hero.is-empty .progress-track { opacity: 0.6; }

/* --- category cards on the index ----------------------------------------- */

/* Only the heading sits behind the ring, so only the heading needs the
   clearance. Giving the whole card a right padding squeezed the state pill
   onto two lines. */
.category-card h3 { padding-right: 52px; }
.category-card .count { white-space: nowrap; }
.category-card .progress-badge {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  line-height: 0;
}
.category-card.is-untouched .progress-ring-track { stroke: var(--brand-rule); }
.category-card.is-untouched .count {
  color: var(--brand-ink-soft);
  background: var(--brand-bg-dim);
}
.category-card.is-complete {
  border-color: color-mix(in srgb, var(--cat-color) 45%, var(--brand-rule));
}
.category-card.is-complete .progress-ring-arc,
.category-card.is-complete .progress-ring-tick { stroke: var(--cat-color); }
.category-card.is-started .progress-ring-arc { stroke: var(--cat-color); }

/* --- pillar page header -------------------------------------------------- */

.pillar-progress {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  max-width: 560px;
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-card);
  background: var(--brand-bg-alt);
}
.pillar-progress .progress-ring { flex: 0 0 auto; }
.pillar-progress-body { flex: 1 1 auto; min-width: 0; }
.pillar-progress-line {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  color: var(--brand-ink);
}
.pillar-progress.is-empty .pillar-progress-line { color: var(--brand-ink-soft); }
.pillar-progress .progress-fill {
  background: linear-gradient(90deg,
    var(--cat-color),
    color-mix(in srgb, var(--cat-color) 55%, white));
}

/* --- a lesson card that has been read ------------------------------------ */

a.card.is-read {
  border-color: color-mix(in srgb, var(--brand-ok) 40%, var(--brand-rule));
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--brand-ok) 8%, var(--brand-bg)) 0%,
      var(--brand-bg) 70%);
}
a.card.is-read h3 { color: color-mix(in srgb, var(--brand-ok) 30%, var(--brand-ink)); }
a.card .lesson-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand-ok) 75%, black);
  background: color-mix(in srgb, var(--brand-ok) 16%, transparent);
  padding: 5px 12px;
  border-radius: var(--r-pill);
}
a.card .lesson-done-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-ok);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

/* --- the lesson page itself ---------------------------------------------- */

.lesson-state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-card);
  background: var(--brand-bg-alt);
  font-size: var(--fs-sm);
}
.lesson-state .progress-track { flex: 1 1 160px; min-width: 120px; }
.lesson-state.is-read {
  border-color: color-mix(in srgb, var(--brand-ok) 40%, var(--brand-rule));
  background: var(--brand-success-bg);
}
.lesson-state-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-ok);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}
.lesson-state-text { font-weight: 700; color: color-mix(in srgb, var(--brand-ok) 70%, black); }
.lesson-state-context {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--brand-ink-soft);
}
.lesson-state.just-read { animation: lesson-read-in 1600ms ease; }

@keyframes lesson-read-in {
  0%   { transform: scale(0.98); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-ok) 45%, transparent); }
  35%  { transform: scale(1); box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand-ok) 0%, transparent); }
  100% { transform: scale(1); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .progress-ring-arc { transition: none; }
  .lesson-state.just-read { animation: none; }
}

@media (max-width: 640px) {
  .progress-hero { padding: var(--sp-5); }
  .progress-hero-num { font-size: var(--fs-2xl); }
  .pillar-progress { gap: var(--sp-4); padding: var(--sp-4); }
}

/* The self-mark control. Quiet by default: detection is the main path and
   this is the escape hatch for "I read it on my phone". */
.lesson-state-toggle {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--brand-ink-soft);
  background: transparent;
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.lesson-state-toggle:hover {
  color: var(--brand-ink);
  border-color: var(--brand-ink-soft);
  background: var(--brand-bg);
}
.lesson-state-toggle:focus-visible {
  outline: 2px solid var(--brand-info);
  outline-offset: 2px;
}
.lesson-state.is-read .lesson-state-toggle {
  border-color: color-mix(in srgb, var(--brand-ok) 35%, var(--brand-rule));
}

/* Lesson audio. Present only on lessons that have been narrated. */
.lesson-audio {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--brand-rule);
  border-radius: var(--r-card);
  background: var(--brand-bg-alt);
}
.lesson-audio-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-ink-soft);
  flex: 0 0 auto;
}
.lesson-audio audio {
  flex: 1 1 260px;
  min-width: 0;
  height: 36px;
}
