@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ============================================================
   Rational Root — rationalroot.com
   Tokens are lifted from platform/design-system/colors_and_type.css.
   Radii are deliberately larger than the base system: this site
   uses a softer, rounder surface language than the document
   templates do.
   ============================================================ */

:root {
  /* brand */
  --teal-100: #E0F0EF;
  --teal-200: #B4DDDC;
  --teal-300: #5BB8B7;
  --teal-400: #2DA9A7;
  --teal-500: #028482;
  --teal-700: #014A49;
  --teal-800: #002F2E;

  --citron-100: #FAF8DD;
  --citron-200: #F1EE9C;
  --citron-400: #E8E64A;
  --citron-500: #CAC80D;
  --citron-700: #7A7808;

  --paper: #F4F1EA;
  --bone: #FAF8F2;
  --ink: #15201A;
  --white: #FFFFFF;

  --fog: #828883;
  --mist: #BFC2BD;
  --cloud: #E8E6E1;
  --steel: #4D544F;
  --mesh-blue: #B8C7CC;
  --mesh-deep: #6F8088;

  /* semantic */
  --bg: var(--paper);
  --bg-subtle: var(--bone);
  --bg-inverse: var(--teal-800);
  --fg: var(--ink);
  --fg-muted: var(--steel);
  --brand: var(--teal-500);
  --accent: var(--citron-500);

  /* type */
  --font-sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* radii — softer than the document system */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* layout */
  --shell: 1280px;
  --shell-wide: 1560px;
  --measure: 68ch;
  --gutter: clamp(20px, 4vw, 56px);

  /* motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--teal-400);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--teal-800); color: var(--paper);
  padding: 14px 22px; border-radius: 0 0 var(--r-md) 0;
}
.skip:focus { left: 0; }

/* ---------- layout --------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.shell-wide { width: 100%; max-width: var(--shell-wide); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }

.section { padding-block: clamp(64px, 9vw, 132px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.section--bone { background: var(--bg-subtle); }
.section--ink { background: var(--bg-inverse); color: var(--paper); }
.section--ink .eyebrow { color: var(--citron-400); }
.section--ink .lead { color: rgba(244, 241, 234, 0.76); }

/* ---------- type ----------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin-bottom: 20px;
}
.eyebrow--accent { color: var(--citron-700); }

.display {
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.h1 { font-size: clamp(34px, 5vw, 68px); line-height: 1.06; letter-spacing: -0.028em; font-weight: 800; }
.h2 { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.12; letter-spacing: -0.022em; font-weight: 700; }
.h3 { font-size: clamp(20px, 1.7vw, 26px); line-height: 1.25; letter-spacing: -0.012em; font-weight: 650; }
.h4 { font-size: 17px; line-height: 1.35; font-weight: 650; letter-spacing: -0.005em; }

.lead {
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.58;
  color: var(--fg-muted);
  max-width: 62ch;
}
.accent { color: var(--accent); }
.section--ink .accent { color: var(--citron-400); }
.mono { font-family: var(--font-mono); }

/* ---------- buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 15px; letter-spacing: -0.005em;
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--teal-500); color: var(--paper); }
.btn--primary:hover { background: var(--teal-700); }
.btn--ghost { border: 1.5px solid var(--mist); color: var(--fg); }
.btn--ghost:hover { border-color: var(--teal-500); color: var(--teal-500); }
.btn--onDark { background: var(--paper); color: var(--teal-800); }
.btn--onDark:hover { background: var(--white); }
.btn--ghostDark { border: 1.5px solid rgba(244,241,234,.34); color: var(--paper); }
.btn--ghostDark:hover { border-color: var(--citron-400); color: var(--citron-400); }
.btn .arw { transition: transform .18s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- header --------------------------------------------------- */
/* The header overlays the dark hero / page header rather than sitting above it
   in flow. Every page opens with a dark band that has enough top padding to
   clear it. */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-block: 14px;
  transition: background .25s var(--ease), box-shadow .25s var(--ease), padding .25s var(--ease);
}
.header.is-stuck {
  background: rgba(244, 241, 234, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(21, 32, 26, 0.07);
  padding-block: 9px;
}
.header--onDark { color: var(--paper); }
.header--onDark.is-stuck { background: rgba(0, 47, 46, 0.88); box-shadow: 0 1px 0 rgba(255,255,255,.09); }

.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; line-height: 1.02; }
.brand-name b { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-name span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .62; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 15px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav a:hover { background: rgba(2, 132, 130, 0.09); color: var(--teal-500); }
.header--onDark .nav a:hover { background: rgba(244,241,234,.12); color: var(--citron-400); }
.nav a[aria-current="page"] { color: var(--teal-500); font-weight: 650; }
.header--onDark .nav a[aria-current="page"] { color: var(--citron-400); }

.header-cta { display: inline-flex; align-items: center; gap: 12px; }
.header .btn { padding: 11px 21px; font-size: 14px; }

.menu-toggle { display: none; padding: 10px; border-radius: var(--r-sm); }
.menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-toggle span + span { margin-top: 5px; }

@media (max-width: 900px) {
  .nav, .header-cta .btn { display: none; }
  .menu-toggle { display: block; }
  .menu {
    position: fixed; inset: 0; z-index: 99;
    background: var(--teal-800); color: var(--paper);
    display: none; flex-direction: column; justify-content: center;
    padding: var(--gutter); gap: 6px;
  }
  .menu.is-open { display: flex; }
  .menu a {
    font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
    text-decoration: none; padding: 12px 0;
    border-bottom: 1px solid rgba(244,241,234,.14);
  }
  .menu .btn { margin-top: 26px; align-self: flex-start; font-size: 16px; }
}
/* On desktop the nav is a normal flex row; the in-nav CTA is a mobile-only
   duplicate of the one in .header-cta, so it is hidden here. */
@media (min-width: 901px) { .nav > .btn { display: none; } }

/* ============================================================
   HERO — full-bleed, dark, the curve behind
   ============================================================ */
.hero {
  position: relative;
  background: var(--bg-inverse);
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  /* soften the very bottom so the curve doesn't collide with the fold */
  content: ''; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to bottom, rgba(0,47,46,0) 0%, rgba(0,47,46,.92) 78%, var(--bg-inverse) 100%);
  z-index: 1; pointer-events: none;
}
.hero::before {
  /* scrim under the copy — the figure runs the full width, the type stays
     readable over the left of it */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    var(--bg-inverse) 0%, rgba(0,47,46,.92) 26%, rgba(0,47,46,.45) 42%, rgba(0,47,46,0) 58%);
  z-index: 1; pointer-events: none;
}
@media (max-width: 860px) {
  .hero::before { background: linear-gradient(180deg, rgba(0,47,46,.94) 0%, rgba(0,47,46,.72) 60%, rgba(0,47,46,.35) 100%); }
}

.curve-stage {
  position: absolute; inset: 0;
  z-index: 0;
}
.curve-stage .curve-svg { width: 100%; height: 100%; }

/* On desktop the copy holds the left of the frame, so the figure is inset from
   the left — the two lobes (which are the mark) land in open space rather than
   behind the headline. It still bleeds off the right edge, so the full width of
   the viewport is doing work. */
@media (min-width: 861px) {
  .hero .curve-stage { left: 34%; right: -2%; }
}
@media (max-width: 860px) {
  .hero .curve-stage { top: 22%; }
}

.hero-in {
  position: relative; z-index: 2;
  padding-block: clamp(88px, 13vw, 172px) clamp(56px, 7vw, 96px);
}
.hero .display { max-width: 17ch; }
.hero .lead { color: rgba(244, 241, 234, 0.78); max-width: 58ch; margin-top: 26px; }
.hero .btn-row { margin-top: 40px; }

/* ---- curve rendering ------------------------------------------------ */
.curve-axes line { stroke-width: 1; opacity: .5; }

.curve-lines .factor-line {
  fill: none; stroke-width: 2; opacity: 0;
  transition: opacity .5s var(--ease), stroke-width .8s var(--ease);
  vector-effect: non-scaling-stroke;
}
.factor-line[data-factor="governance"] { stroke: var(--teal-300); }
.factor-line[data-factor="managed"]    { stroke: var(--mesh-blue); }
.factor-line[data-factor="agentic"]    { stroke: var(--citron-400); }

.curve-product {
  fill: none; stroke: var(--paper); stroke-width: 3.25;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 14px rgba(224, 240, 239, .28));
}
.curve-lobes .lobe { opacity: 0; transition: opacity 1.1s var(--ease); }
.lobe-teal { fill: var(--teal-400); }
.lobe-citron { fill: var(--citron-500); }
.curve-roots .root-dot {
  fill: var(--citron-400); opacity: 0;
  transition: opacity .7s var(--ease);
}
.curve-roots .root-ring {
  fill: none; stroke: var(--citron-400); stroke-width: 1;
  opacity: 0; transform-box: fill-box; transform-origin: center;
  transform: scale(.4);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

/* draw-on states, driven by main.js */
.curve-stage.draw-governance .factor-line[data-factor="governance"],
.curve-stage.draw-managed    .factor-line[data-factor="managed"],
.curve-stage.draw-agentic    .factor-line[data-factor="agentic"] {
  opacity: .95;
  animation: draw 900ms var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.curve-stage.is-multiplying .factor-line { opacity: .17; stroke-width: 1; }
.curve-stage.is-multiplying .curve-product {
  opacity: 1;
  animation: draw 1500ms var(--ease) forwards;
}
.curve-stage.is-settled .factor-line { opacity: .14; stroke-width: 1; }
.curve-stage.is-settled .curve-product { opacity: 1; stroke-dashoffset: 0 !important; }
.curve-stage.is-settled .lobe { opacity: .22; }
.curve-stage.is-settled .root-dot { opacity: 1; }
.curve-stage.is-settled .root-ring { opacity: .45; transform: scale(1); }

/* reduced motion / no-JS: land on the finished figure */
@media (prefers-reduced-motion: reduce) {
  .curve-stage .factor-line { opacity: .14 !important; stroke-width: 1; animation: none !important; }
  .curve-stage .curve-product { opacity: 1 !important; stroke-dashoffset: 0 !important; animation: none !important; }
  .curve-stage .lobe { opacity: .22 !important; }
  .curve-stage .root-dot { opacity: 1 !important; }
  .curve-stage .root-ring { opacity: .45 !important; transform: scale(1) !important; }
}

/* ambient variant — a faint figure behind inner-page headers */
.curve-stage[data-curve="ambient"] { opacity: .5; }
.curve-stage[data-curve="ambient"] .factor-line { opacity: .1; stroke-width: 1; }
.curve-stage[data-curve="ambient"] .curve-product { opacity: .5; stroke-dashoffset: 0 !important; stroke-width: 2; }
.curve-stage[data-curve="ambient"] .lobe { opacity: .16; }
.curve-stage[data-curve="ambient"] .root-dot { opacity: .7; }
.curve-stage[data-curve="ambient"] .root-ring { opacity: .3; transform: scale(1); }

/* ---- factor legend, synced to the animation ------------------------- */
.legend {
  position: relative; z-index: 2;
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(244, 241, 234, 0.12);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: clamp(48px, 6vw, 76px);
}
.legend-item {
  background: var(--bg-inverse);
  padding: clamp(20px, 2.4vw, 30px);
  opacity: .4;
  transition: opacity .6s var(--ease), background .6s var(--ease);
}
.legend-item.is-lit { opacity: 1; }
.legend .is-lit .legend-swatch { transform: scaleX(1); }
.legend-swatch {
  height: 3px; border-radius: 2px; margin-bottom: 18px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease);
}
.legend-item[data-factor="governance"] .legend-swatch { background: var(--teal-300); }
.legend-item[data-factor="managed"] .legend-swatch { background: var(--mesh-blue); }
.legend-item[data-factor="agentic"] .legend-swatch { background: var(--citron-400); }
.legend-factor { font-family: var(--font-mono); font-size: 12px; color: rgba(244,241,234,.34); margin-bottom: 8px; }
.legend-name { font-size: clamp(17px, 1.5vw, 21px); font-weight: 700; letter-spacing: -0.015em; }
.legend-line { font-size: 14.5px; color: rgba(244,241,234,.62); margin-top: 6px; }

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

/* ---- the multiplication strip -------------------------------------- */
.multiply {
  position: relative; z-index: 2;
  margin-top: 28px;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.3vw, 16px);
  color: rgba(244,241,234,.28);
  opacity: 0; transition: opacity .8s var(--ease);
}
.legend.is-complete + .multiply, .multiply.is-visible { opacity: 1; }
.multiply b { color: rgba(202,200,13,.55); font-weight: 500; }

/* ============================================================
   PAGE HEADERS (inner pages)
   ============================================================ */
.pagehead {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--bg-inverse); color: var(--paper);
}
.pagehead-in { position: relative; z-index: 2; padding-block: clamp(96px, 12vw, 156px) clamp(56px, 7vw, 84px); }
.pagehead .lead { color: rgba(244,241,234,.76); }
.pagehead::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to bottom, rgba(0,47,46,0), var(--bg-inverse));
  z-index: 1; pointer-events: none;
}

/* ============================================================
   CARDS AND GRIDS
   ============================================================ */
.grid { display: grid; gap: clamp(16px, 1.8vw, 26px); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1040px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--r-lg);
  padding: clamp(24px, 2.6vw, 38px);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(21, 32, 26, .09);
  border-color: var(--teal-200);
}
.card__num {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em;
  color: var(--teal-500); margin-bottom: 18px;
}
.card__factor {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--mist); margin-bottom: 6px;
}
.card p { color: var(--fg-muted); margin-top: 12px; font-size: 16px; }
.card h3 + p, .card .h3 + p { margin-top: 14px; }

.card--accent { border-left: 4px solid var(--accent); }

/* practice card */
.practice { display: flex; flex-direction: column; height: 100%; }
.practice .tag {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--teal-100); color: var(--teal-700);
  padding: 6px 12px; border-radius: var(--r-pill); margin-bottom: 20px;
}
.practice ul { margin-top: 22px; display: grid; gap: 11px; }
.practice ul li {
  padding-left: 20px; position: relative;
  font-size: 15.5px; color: var(--fg-muted); line-height: 1.5;
}
.practice ul li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal-300);
}
.practice .outcome {
  margin-top: auto; padding-top: 24px; border-top: 1px solid var(--cloud);
  font-size: 15px; color: var(--fg);
}
.practice .outcome b { color: var(--teal-700); }

/* pair card */
.pair { position: relative; }
.pair__ops {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 13px; color: var(--fog);
  margin-bottom: 18px;
}
.pair__ops .x { color: var(--accent); font-size: 15px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--cloud); border-radius: var(--r-lg); overflow: hidden; }
.section--ink .stats { background: rgba(244,241,234,.16); }
.stat { background: var(--bg); padding: clamp(22px, 2.4vw, 34px); }
.section--ink .stat { background: var(--bg-inverse); }
.section--bone .stat { background: var(--bg-subtle); }
.stat b { display: block; font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--teal-500); }
.section--ink .stat b { color: var(--citron-400); }
.stat span { display: block; margin-top: 12px; font-size: 14px; color: var(--fg-muted); line-height: 1.4; }
.section--ink .stat span { color: rgba(244,241,234,.66); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   LADDER
   ============================================================ */
.ladder { display: grid; gap: clamp(16px, 1.8vw, 22px); grid-template-columns: repeat(3, 1fr); align-items: stretch; }
@media (max-width: 980px) { .ladder { grid-template-columns: 1fr; } }

.rung {
  position: relative;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--r-lg);
  padding: clamp(26px, 2.8vw, 40px);
  display: flex; flex-direction: column;
}
.rung--featured { border-color: var(--teal-500); box-shadow: 0 12px 34px rgba(2, 132, 130, .10); }
.rung__badge {
  position: absolute; top: -12px; left: clamp(26px, 2.8vw, 40px);
  background: var(--teal-500); color: var(--paper);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 13px; border-radius: var(--r-pill);
}
.rung__kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-500); }
.rung__num { font-size: 13px; font-family: var(--font-mono); color: var(--mist); float: right; }
.rung__promise { font-size: clamp(20px, 1.9vw, 27px); font-weight: 700; letter-spacing: -0.02em; margin-top: 16px; line-height: 1.2; }
.rung__name { font-size: 14.5px; color: var(--fog); margin-top: 8px; }
.rung__body { margin-top: 18px; color: var(--fg-muted); font-size: 15.5px; }
.rung__price { margin-top: auto; padding-top: 28px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rung__price b { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.03em; color: var(--teal-700); line-height: 1; }
.rung__price s { color: var(--mist); font-size: 18px; text-decoration-thickness: 1.5px; }
.rung__unit { font-family: var(--font-mono); font-size: 12.5px; color: var(--fog); margin-top: 10px; }

/* ============================================================
   ARTICLES
   ============================================================ */
.artcard { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.artcard .kicker {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal-500);
}
.artcard h3 { margin-top: 14px; }
.artcard .stand { margin-top: 14px; color: var(--fg-muted); font-size: 15.5px; }
.artcard .meta {
  margin-top: auto; padding-top: 24px;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--fog);
}
.artcard .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--mist); }

/* article body */
.article { max-width: var(--measure); }
.article > * + * { margin-top: 26px; }
.article p { font-size: 18px; line-height: 1.68; color: #26312B; }
.article h2 {
  font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.2; margin-top: 56px;
}
.article ul { display: grid; gap: 12px; }
.article ul li { position: relative; padding-left: 24px; font-size: 17.5px; line-height: 1.6; color: #26312B; }
.article ul li::before {
  content: ''; position: absolute; left: 2px; top: 11px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal-300);
}
.article blockquote {
  border-left: 4px solid var(--accent);
  padding: 6px 0 6px 26px;
  font-size: clamp(20px, 2vw, 26px); line-height: 1.35;
  font-weight: 600; letter-spacing: -0.018em; color: var(--teal-700);
}
.article .note {
  background: var(--teal-100); border-radius: var(--r-md);
  padding: 22px 26px; font-size: 16px; color: var(--teal-700);
}
.article .subgrid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .article .subgrid { grid-template-columns: 1fr; } }
.article .subgrid div {
  background: var(--bone); border: 1px solid var(--cloud);
  border-radius: var(--r-md); padding: 22px;
}
.article .subgrid b { display: block; font-size: 15.5px; margin-bottom: 8px; }
.article .subgrid span { font-size: 15px; color: var(--fg-muted); line-height: 1.55; }

/* ============================================================
   MISC BLOCKS
   ============================================================ */
.quote-block {
  border-radius: var(--r-xl);
  background: var(--teal-800); color: var(--paper);
  padding: clamp(38px, 5vw, 76px);
}
.quote-block q {
  display: block; quotes: none;
  font-size: clamp(22px, 2.7vw, 38px); line-height: 1.28;
  letter-spacing: -0.024em; font-weight: 600;
}
.quote-block cite {
  display: block; margin-top: 26px; font-style: normal;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--citron-400);
}
.quote-block p { margin-top: 26px; color: rgba(244,241,234,.72); max-width: 62ch; font-size: 16.5px; }

/* The polynomial is atmosphere, not copy. It sits behind the prose as a
   watermark so the page reads as a page, never as a worked example. */
.mathbox {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--cloud);
  background: var(--bone);
  padding: clamp(30px, 3.6vw, 58px);
}
.mathbox__mark {
  position: absolute; z-index: -1;
  left: clamp(30px, 3.6vw, 58px); top: 50%; transform: translateY(-44%);
  font-family: var(--font-mono);
  font-size: clamp(44px, 8.2vw, 118px);
  line-height: 1; white-space: nowrap; letter-spacing: -0.03em;
  color: var(--teal-500); opacity: .07;
  pointer-events: none; user-select: none;
}
.mathbox__body { position: relative; max-width: 60ch; }
.mathbox__body p { color: var(--fg-muted); font-size: clamp(16.5px, 1.35vw, 19px); }
.mathbox__body .h3 + p { margin-top: 14px; }
.mathbox .roots { margin-bottom: 26px; }

/* The three rational roots — −1, ½ and 2 — as a quiet recurring mark.
   Half is exactly midway between the other two, so they sit evenly on
   their line; the middle one is the crossing between the two lobes. */
.roots { position: relative; display: inline-flex; align-items: center; gap: 16px; }
.roots::before {
  content: ''; position: absolute; left: 3px; right: 3px; top: 50%;
  height: 1px; background: var(--mist);
}
.roots i { position: relative; display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-300); }
.roots i:nth-child(2) { background: var(--accent); }
.footer .roots::before { background: rgba(244,241,234,.24); }
.footer .roots i { background: var(--teal-300); }
.footer .roots i:nth-child(2) { background: var(--citron-400); }

.split { display: grid; gap: clamp(32px, 5vw, 80px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }

.section-head { margin-bottom: clamp(36px, 4.4vw, 64px); }
.section-head .lead { margin-top: 20px; }

.numlist { display: grid; gap: 2px; border-radius: var(--r-lg); overflow: hidden; background: var(--cloud); }
.numlist li { background: var(--white); padding: clamp(22px, 2.2vw, 30px); display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.numlist .n {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal-500); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px;
}
.numlist b { display: block; font-size: 16.5px; margin-bottom: 6px; }
.numlist span { color: var(--fg-muted); font-size: 15.5px; line-height: 1.55; }

.deflist { display: grid; gap: 1px; background: var(--cloud); border-radius: var(--r-lg); overflow: hidden; }
.deflist > div { background: var(--white); padding: clamp(22px, 2.2vw, 30px); }
.deflist b { display: block; font-size: 16px; margin-bottom: 8px; }
.deflist span { color: var(--fg-muted); font-size: 15.5px; line-height: 1.55; }
.deflist a { color: var(--teal-500); }

/* CTA band */
.ctaband { border-radius: var(--r-xl); background: var(--teal-500); color: var(--paper); padding: clamp(38px, 5.4vw, 84px); }
.ctaband .h2 { max-width: 20ch; }
.ctaband p { margin-top: 22px; color: rgba(244,241,234,.86); max-width: 60ch; font-size: 17px; }
.ctaband .btn-row { margin-top: 36px; }
.ctaband .eyebrow { color: var(--citron-200); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--teal-800); color: rgba(244,241,234,.72); padding-block: clamp(52px, 6vw, 84px) 34px; }
.footer a { color: rgba(244,241,234,.72); text-decoration: none; }
.footer a:hover { color: var(--citron-400); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(28px, 3vw, 48px); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--citron-400); margin-bottom: 18px; font-weight: 500; }
.footer ul { display: grid; gap: 11px; font-size: 15px; }
.footer .brand { color: var(--paper); margin-bottom: 20px; }
.footer .blurb { font-size: 15px; max-width: 34ch; line-height: 1.6; }
.footer-base {
  margin-top: clamp(40px, 5vw, 64px); padding-top: 26px;
  border-top: 1px solid rgba(244,241,234,.14);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: rgba(244,241,234,.5);
}

/* ============================================================
   REVEALS
   ============================================================ */
/* The hidden state is gated on .js, set by an inline script in <head>. Without
   scripting — or if the transition never runs — the content is simply visible.
   A reveal must never be the reason someone cannot read the page. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}
