/* ============================================================
   Paul Takisaki - "Operator Cinematic II" design system
   Canonical site stylesheet (served from /css/operator.css).
   Dark, editorial, image-led. Palette + type locked to the
   redesign-2026 art direction. See docs/DESIGN-SYSTEM.md.
   Sections: tokens -> base -> landing components -> interior /
   long-form components (page-hero, breadcrumbs, prose, article).
   ============================================================ */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* Grounds (near-black, never pure #000) */
  --bg:        #0a0a0a;
  --bg-1:      #111111;
  --bg-2:      #161616;
  --bg-3:      #1d1d1d;
  --line:      rgba(245, 245, 243, 0.10);
  --line-2:    rgba(245, 245, 243, 0.18);

  /* Text */
  --ink:       #f5f5f3;
  --ink-soft:  rgba(245, 245, 243, 0.66);
  --ink-mute:  rgba(245, 245, 243, 0.50); /* >=4.5:1 on --bg for small labels (WCAG AA) */

  /* Single accent - brick-brass (no second accent anywhere) */
  --accent:        #b34951;
  --accent-bright: #c75d65;
  --accent-deep:   #8b2f37;
  --accent-tint:   rgba(179, 73, 81, 0.12);

  /* Type */
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Fluid type scale */
  --t-eyebrow: 0.78rem;
  --t-body:    clamp(1rem, 0.96rem + 0.25vw, 1.15rem);
  --t-lead:    clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem);
  --t-h3:      clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --t-h2:      clamp(2.2rem, 1.5rem + 3vw, 4rem);
  --t-h1:      clamp(2.8rem, 1.6rem + 5.4vw, 6.5rem);
  --t-mega:    clamp(3rem, 1.4rem + 7vw, 8rem);

  /* Shape system: showcases 20px, inputs 10px, buttons pill */
  --r-lg:   20px;
  --r-md:   14px;
  --r-sm:   10px;
  --r-pill: 999px;

  /* Rhythm */
  --section-y: clamp(5rem, 3rem + 9vw, 11rem);
  --gutter:    clamp(1.25rem, 0.5rem + 3vw, 3rem);
  --maxw:      1240px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur:  0.7s;
}

/* ---- Reset / base ----------------------------------------- */
*, *::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(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* Atmosphere: faint film grain over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Typography ------------------------------------------- */
.display { font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: -0.01em; }
.display em { font-style: italic; color: var(--accent-bright); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
}

h1, h2, h3 { margin: 0; font-weight: 400; }
h1 { font-family: var(--display); font-size: var(--t-h1); line-height: 1.0; letter-spacing: -0.015em; }
h2 { font-family: var(--display); font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.01em; }
h3 { font-family: var(--display); font-size: var(--t-h3); line-height: 1.1; }

.lead { font-size: var(--t-lead); color: var(--ink-soft); line-height: 1.5; max-width: 46ch; }
p { margin: 0; }
.muted { color: var(--ink-soft); }

/* ---- Layout primitives ------------------------------------ */
.wrap { width: min(100% - calc(var(--gutter) * 2), var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.stack > * + * { margin-top: 1.4rem; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: #fff; }
/* Hover keeps the AA-safe base accent (white-on-accent ~5.27:1); feedback via
   lift + accent-hue glow. Brightening to --accent-bright would drop to ~4.05:1. */
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 26px -10px rgba(179, 73, 81, 0.6); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); transform: translateY(-2px); }

.textlink {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.textlink:hover { color: var(--accent-bright); gap: 0.75rem; }
.textlink .arrow { transition: transform 0.25s var(--ease); }
.textlink:hover .arrow { transform: translateX(3px); }

/* ---- Header / nav ----------------------------------------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 72px;
  display: flex; align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.scrolled {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { font-family: var(--display); font-size: 1.4rem; letter-spacing: -0.01em; }
.brand b { font-weight: 400; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft);
  transition: color 0.2s var(--ease); position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }
.nav-cta { padding: 0.6rem 1.1rem; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: 0.3s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--ink); transition: 0.3s var(--ease); }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* Mobile drawer */
/* Closed drawer is visibility:hidden so its links leave the tab order and the
   a11y tree (not just moved offscreen). visibility hide is delayed until the
   slide-up finishes; on open it flips visible immediately. */
.drawer { position: fixed; inset: 0; z-index: 49; background: rgba(10,10,10,0.96); backdrop-filter: blur(8px); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; padding: var(--gutter); transform: translateY(-100%); visibility: hidden; transition: transform 0.45s var(--ease), visibility 0s linear 0.45s; }
.drawer.open { transform: translateY(0); visibility: visible; transition: transform 0.45s var(--ease), visibility 0s; }
.drawer a { font-family: var(--display); font-size: 2rem; color: var(--ink); }
.drawer a:hover { color: var(--accent-bright); }

/* ---- HERO ------------------------------------------------- */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-canvas, .hero-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 66% center; z-index: 0;
}
.hero-canvas { display: block; }
/* Left scrim for copy contrast + bottom fade so the frame blends into the page ground */
.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,10,10,0.93) 0%, rgba(10,10,10,0.55) 36%, rgba(10,10,10,0) 66%),
    linear-gradient(180deg, rgba(10,10,10,0.5) 0%, transparent 24%, transparent 52%, rgba(10,10,10,0.88) 90%, var(--bg) 100%),
    radial-gradient(150% 120% at 70% 42%, transparent 58%, rgba(10,10,10,0.45) 100%);
}
@media (max-width: 860px) {
  .hero-canvas, .hero-fallback { object-position: 62% 16%; }
  .hero-veil { background:
    linear-gradient(180deg, rgba(10,10,10,0.35) 0%, transparent 30%, rgba(10,10,10,0.4) 58%, rgba(10,10,10,0.92) 86%, var(--bg) 100%); }
}
.hero-inner { position: relative; z-index: 2; padding-bottom: clamp(4rem, 8vh, 9rem); padding-top: 90px; }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.scroll-hint { position: absolute; left: 50%; bottom: 1.6rem; z-index: 2; transform: translateX(-50%); width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); opacity: 0.6; }

/* ---- Showcase (contained rounded image card) -------------- */
.showcase { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.showcase img { width: 100%; height: 100%; object-fit: cover; }
.showcase.tall { aspect-ratio: 4 / 3; }
.showcase.wide { aspect-ratio: 16 / 9; }
.showcase .parallax { will-change: transform; }
.showcase::after { content: ""; position: absolute; inset: 0; z-index: 2; box-shadow: inset 0 0 120px rgba(10,10,10,0.6); pointer-events: none; }
/* Scroll-scrubbed showcase (canvas over poster) */
.scrub-poster { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s var(--ease); }
.scrub-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }

/* ---- Track record / stats --------------------------------- */
.track-head { max-width: 24ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 2.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); padding-top: 2.5rem; }
.stat .n { font-family: var(--display); font-size: clamp(2.4rem, 1.4rem + 3vw, 4rem); line-height: 1; color: var(--ink); }
.stat .n em { font-style: normal; color: var(--accent-bright); }
.stat .k { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); margin-top: 0.7rem; max-width: 18ch; line-height: 1.5; }

/* ---- Split (image + content) ------------------------------ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split.reverse > .split-media { order: 2; }
.split-media { position: sticky; top: 96px; }
.split-body { max-width: 38ch; }

/* ---- Engagements list ------------------------------------- */
.ways { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.way { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); transition: padding-left 0.3s var(--ease); }
.way:hover { padding-left: 0.6rem; }
.way .idx { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); padding-top: 0.4rem; }
.way h3 { font-size: 1.5rem; }
.way p { color: var(--ink-soft); margin-top: 0.4rem; max-width: 40ch; }
.way .tag { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-mute); }

/* ---- Full-bleed editorial band + quote -------------------- */
.band { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
.band-bg { position: absolute; inset: 0; z-index: 0; }
.band-bg img { width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.band-veil { position: absolute; inset: 0; z-index: 1; background:
  radial-gradient(110% 90% at 30% 50%, transparent 30%, rgba(10,10,10,0.6) 80%, var(--bg) 100%),
  linear-gradient(90deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.4) 45%, transparent 75%); }
.band .wrap { position: relative; z-index: 2; }
.band-body { max-width: 40ch; }

.pullquote { margin-top: 2.4rem; padding-left: 1.4rem; border-left: 2px solid var(--accent); max-width: 44ch; }
.pullquote p { font-family: var(--display); font-size: var(--t-lead); line-height: 1.35; color: var(--ink); }
.pullquote cite { display: block; margin-top: 0.9rem; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mute); font-style: normal; }

/* ---- Proof manifesto -------------------------------------- */
.manifesto { text-align: center; }
.manifesto h2 { font-size: var(--t-mega); max-width: 16ch; margin-inline: auto; }
.manifesto h2 em { font-style: normal; color: var(--accent-bright); }
.manifesto .lead { margin: 1.8rem auto 0; text-align: center; max-width: 48ch; }
.manifesto .showcase { margin-top: clamp(2.5rem, 6vw, 5rem); aspect-ratio: 21 / 9; }

/* ---- Products bento --------------------------------------- */
.products-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.6rem; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(190px, auto); gap: 1rem; }
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.8rem; display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease); position: relative; overflow: hidden; }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); background: var(--bg-2); }
.card .ph { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: 1.6rem; margin-top: 0.8rem; }
.card p { color: var(--ink-soft); margin-top: 0.5rem; font-size: 0.96rem; }
.card .go { margin-top: 1.4rem; }
.card .status { color: var(--ink-mute); }
/* feature cell = CredibilityOS */
.card.feature { grid-column: span 3; grid-row: span 2; min-height: 380px; justify-content: flex-end; background:
  linear-gradient(180deg, rgba(10,10,10,0.1) 0%, rgba(10,10,10,0.82) 70%, rgba(10,10,10,0.95) 100%),
  var(--bg-2); }
.card.feature h3 { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.8rem); }
.card.feature p { max-width: 34ch; font-size: 1.05rem; }
.card.c2, .card.c3, .card.c4, .card.c5 { grid-column: span 3; }

/* ---- Endorsements band ------------------------------------ */
.endorse { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.endorse-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.2rem; margin-bottom: 2.6rem; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.quote p { color: var(--ink); line-height: 1.55; }
.quote cite { display: block; margin-top: 1.1rem; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-mute); font-style: normal; }
.quote .who { color: var(--accent-bright); }

/* ---- Writing / newsletter --------------------------------- */
.note-form { margin-top: 2rem; }
.note-form .row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.note-form input[type="text"], .note-form input[type="email"] {
  flex: 1 1 180px; min-width: 0; padding: 0.85rem 1.1rem; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink);
  font-family: var(--sans); font-size: 0.96rem; transition: border-color 0.25s var(--ease);
}
.note-form input::placeholder { color: var(--ink-mute); }
.note-form input:focus { outline: none; border-color: var(--accent); }
.note-form .hp { position: absolute; left: -9999px; opacity: 0; }
.note-form .help { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-mute); margin-top: 0.9rem; }
.note-links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.8rem; }
.note-msg { margin-top: 1rem; color: var(--accent-bright); font-family: var(--mono); font-size: 0.8rem; min-height: 1em; }

/* ---- Closing ---------------------------------------------- */
.closing { position: relative; min-height: 96vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.closing-bg { position: absolute; inset: 0; z-index: 0; }
.closing-bg img { width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.closing-veil { position: absolute; inset: 0; z-index: 1; background:
  radial-gradient(100% 80% at 50% 60%, transparent 20%, rgba(10,10,10,0.55) 70%, var(--bg) 100%),
  linear-gradient(180deg, var(--bg) 0%, transparent 30%, transparent 60%, rgba(10,10,10,0.9) 100%); }
.closing .inner { position: relative; z-index: 2; max-width: 17ch; }
.closing h2 { font-size: clamp(2.6rem, 1.5rem + 4.4vw, 5.4rem); }
.closing .lead { margin: 1.6rem auto 2.4rem; text-align: center; }

/* ---- Footer ----------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 5rem) 2.5rem; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.foot-brand .blurb { color: var(--ink-soft); max-width: 32ch; margin-top: 1rem; }
.foot-col h4 { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); margin: 0 0 1.1rem; font-weight: 400; }
.foot-col a { display: block; color: var(--ink-soft); padding: 0.32rem 0; transition: color 0.2s var(--ease); }
.foot-col a:hover { color: var(--accent-bright); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--ink-mute); text-transform: uppercase; }
.foot-bottom a:hover { color: var(--accent-bright); }

/* ---- Scroll reveal ---------------------------------------- */
/* Hidden initial state applies ONLY when scripting is enabled, so no-JS
   users (and non-rendering crawlers) always see content. operator.js adds
   .in on scroll; reduced-motion forces visible below. Progressive enhancement. */
@media (scripting: enabled) {
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .reveal.d1 { transition-delay: 0.08s; }
  .reveal.d2 { transition-delay: 0.16s; }
  .reveal.d3 { transition-delay: 0.24s; }
}
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .card.feature { grid-column: span 4; grid-row: auto; min-height: 320px; }
  .card.c2 { grid-column: span 4; }
  .card.c3, .card.c4, .card.c5 { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .split { grid-template-columns: 1fr; }
  .split.reverse > .split-media { order: 0; }
  .split-media { position: relative; top: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .quotes { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .card.feature, .card.c2, .card.c3, .card.c4, .card.c5 { grid-column: 1 / -1; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: 1fr; }
}

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .parallax, .band-bg img, .closing-bg img { transform: none !important; }
  .btn:hover, .card:hover { transform: none !important; }
}

/* ============================================================
   INTERIOR + LONG-FORM COMPONENTS
   For every page that is not the full-bleed homepage. Reuses the
   same tokens, type, color, motion and shape language. Interior
   pages start <main> with a .page-hero so content clears the
   72px fixed header (which renders solid on heroless pages).
   ============================================================ */

/* ---- Breadcrumbs ------------------------------------------ */
.crumbs {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin: 0 0 1.6rem;
}
.crumbs a { color: var(--ink-mute); transition: color 0.2s var(--ease); }
.crumbs a:hover { color: var(--accent-bright); }
.crumbs .sep { color: var(--line-2); }
.crumbs [aria-current="page"] { color: var(--ink-soft); }

/* ---- Interior page hero (no full-bleed image) ------------- */
.page-hero {
  position: relative;
  padding-top: calc(72px + clamp(2.5rem, 5vw, 5.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { margin-top: 1.4rem; }
.page-hero .page-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.page-hero.center { text-align: center; }
.page-hero.center h1, .page-hero.center .lead { margin-inline: auto; }
.page-hero.center .crumbs, .page-hero.center .page-cta { justify-content: center; }
.page-hero.bordered { border-bottom: 1px solid var(--line); }

/* ---- Article / essay header ------------------------------- */
.article-head { max-width: 72ch; }
.article-head h1 {
  font-size: clamp(2.3rem, 1.6rem + 3.2vw, 4.2rem); line-height: 1.04;
  max-width: 22ch;
}
.article-head .dek {
  font-size: var(--t-lead); color: var(--ink-soft);
  line-height: 1.45; margin-top: 1.2rem; max-width: 54ch;
}
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 1rem;
  margin-top: 1.6rem; font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-mute);
}
.byline a { color: var(--ink-soft); transition: color 0.2s var(--ease); }
.byline a:hover { color: var(--accent-bright); }
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

/* ---- Prose: long-form reading typography ------------------ */
.prose { max-width: 68ch; color: var(--ink-soft); font-size: var(--t-body); line-height: 1.75; }
.prose > * + * { margin-top: 1.3em; }
.prose > :first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); }
.prose .lead, .prose > p.lead:first-child { color: var(--ink); font-size: var(--t-lead); line-height: 1.5; max-width: none; }

.prose h2 {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1.15;
  letter-spacing: -0.01em; margin-top: 2.4em; margin-bottom: 0;
}
.prose h3 {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.7rem); line-height: 1.2;
  margin-top: 1.9em; margin-bottom: 0;
}
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose h2 em, .prose h3 em { font-style: italic; color: var(--accent-bright); }

.prose a {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
.prose a:hover { color: var(--accent-bright); text-decoration-color: var(--accent-bright); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--accent); }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin-top: 0.5em; }

.prose blockquote {
  margin: 1.6em 0; padding-left: 1.4rem; border-left: 2px solid var(--accent);
  font-family: var(--display); font-size: var(--t-lead); line-height: 1.4; color: var(--ink);
}
.prose blockquote p { color: var(--ink); }
.prose blockquote cite {
  display: block; margin-top: 0.9rem; font-family: var(--mono); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mute); font-style: normal;
}

.prose code {
  font-family: var(--mono); font-size: 0.88em; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 0.12em 0.4em;
}
.prose pre {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 1.1rem 1.2rem; overflow-x: auto; font-family: var(--mono);
  font-size: 0.86rem; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.6em; }

.prose figure { margin: 1.8em 0; }
.prose figure img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); }
.prose figcaption {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-mute); margin-top: 0.7rem;
}

/* ---- Callout (highlighted aside inside prose) ------------- */
.callout {
  background: var(--bg-1); border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: var(--r-sm); padding: 1.2rem 1.4rem; color: var(--ink-soft);
}
.callout > * + * { margin-top: 0.7em; }
.callout .callout-k {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent); display: block;
}

/* ---- Generic editorial list (hubs: posts, lessons) -------- */
.entries { border-top: 1px solid var(--line); }
.entry {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem 1.6rem;
  align-items: baseline; padding: 1.7rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
.entry:hover { padding-left: 0.6rem; }
.entry .idx { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.entry h3 { font-size: 1.5rem; }
.entry h3 a:hover { color: var(--accent-bright); }
.entry p { color: var(--ink-soft); margin-top: 0.4rem; max-width: 60ch; }
.entry .meta { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-mute); white-space: nowrap; }
@media (max-width: 640px) {
  .entry { grid-template-columns: 1fr; gap: 0.4rem; }
  .entry .meta { order: -1; }
}

/* ---- Narrow content column (for centered prose pages) ----- */
.content-narrow { width: min(100% - calc(var(--gutter) * 2), 760px); margin-inline: auto; }

/* ---- Product / card grid (interior pages, not the homepage bento) */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.product-grid .card h3 { font-size: 1.4rem; margin-top: 0.6rem; }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr; } }

/* ---- Full forms (contact, etc.) --------------------------- */
.form { max-width: 560px; }
.form .field + .field { margin-top: 1.2rem; }
.form label { display: block; margin-bottom: 0.5rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.form label .req { color: var(--accent); }
.form input, .form select, .form textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink);
  font-family: var(--sans); font-size: 0.96rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.form textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.form input::placeholder, .form textarea::placeholder { color: var(--ink-mute); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.form select {
  appearance: none; padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b0b0ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.form select option { background: var(--bg-1); color: var(--ink); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form button[type="submit"] { width: 100%; margin-top: 1.4rem; justify-content: center; }
.form-status { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; min-height: 1em; }
.form-status.ok { color: var(--accent-bright); }
.form-status.err { color: #d98a8a; }
.form-note { margin-top: 0.9rem; font-size: 0.82rem; color: var(--ink-mute); }

/* ---- FAQ accordion (native <details>, no JS required) ------ */
.faq { display: grid; gap: 0.7rem; }
.faq details { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-family: var(--sans); font-size: 1rem; font-weight: 500; margin: 0; flex: 1; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 1.25rem; line-height: 1; color: var(--accent); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 1.3rem 1.2rem; margin: 0; color: var(--ink-soft); line-height: 1.7; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-md); }

/* ---- Inline text link (accent underline) in body copy ----- */
.link { color: var(--accent-bright); text-decoration: underline; text-decoration-color: rgba(199, 93, 101, 0.5); text-underline-offset: 3px; transition: text-decoration-color 0.2s var(--ease); }
.link:hover { text-decoration-color: var(--accent-bright); }

/* ---- Feature list (bullets inside service cards) ---------- */
.feature-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.feature-list li { display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.9rem; color: var(--ink-soft); }
.feature-list li::before { content: "\2192"; color: var(--accent); flex-shrink: 0; }

/* ---- Two-column content layout (e.g. ways-in + form) ------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---- Pills (tags / labels) -------------------------------- */
.pill { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 0.35rem 0.75rem; display: inline-block; }

/* ---- Panel (form / content container) --------------------- */
.panel { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.2rem); }

/* ---- Endorsement reading list ----------------------------- */
.endorse-list { border-top: 1px solid var(--line); max-width: 760px; }
.endorse-item { padding: 2.6rem 0; border-bottom: 1px solid var(--line); }
.endorse-item .q { font-family: var(--display); font-weight: 400; font-size: clamp(1.25rem, 1.05rem + 0.95vw, 1.6rem); line-height: 1.42; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.endorse-item .q::before { content: ""; display: block; width: 28px; height: 1px; background: var(--accent); margin-bottom: 1.5rem; }
.endorse-item .who { margin-top: 1.5rem; }
.endorse-item .who .name { font-weight: 600; color: var(--ink); display: block; }
.endorse-item .who .role { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-mute); display: block; margin-top: 0.35rem; }
.endorse-item .who .textlink { margin-top: 0.9rem; }

/* ---- Card grids ------------------------------------------- */
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 860px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .cards-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cards-3 { grid-template-columns: 1fr; } }

/* ---- Media card (image thumb + body): tools, hubs --------- */
.media-card { display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease); }
.media-card:hover { border-color: var(--line-2); transform: translateY(-3px); background: var(--bg-2); }
.media-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.media-card:hover .thumb img { transform: scale(1.04); }
.media-card .body { padding: 1.4rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.media-card .kicker { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.media-card .kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.media-card h3 { font-size: 1.55rem; margin-bottom: 0.5rem; }
.media-card .blurb { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.2rem; }
.media-card .meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); }
.media-card .meta .go { color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.4rem; transition: gap 0.25s var(--ease), color 0.25s var(--ease); }
.media-card:hover .meta .go { gap: 0.7rem; color: var(--accent-bright); }

/* ---- Video frame (click-to-play demo) --------------------- */
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; cursor: pointer; border: 0; background: radial-gradient(ellipse at center, rgba(10,10,10,0.1), rgba(10,10,10,0.55)); transition: opacity 0.4s var(--ease); }
.video-overlay.is-hidden { opacity: 0; pointer-events: none; }
.video-play { width: 80px; height: 80px; border-radius: 50%; background: rgba(245,245,243,0.96); display: flex; align-items: center; justify-content: center; transition: transform 0.3s var(--ease), background 0.3s var(--ease); }
.video-overlay:hover .video-play { transform: scale(1.08); background: #fff; }
.video-play svg { width: 26px; height: 26px; margin-left: 4px; color: #0a0a0a; }
.video-cap { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; display: inline-flex; align-items: center; gap: 0.6rem; }
.video-cap .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.video-duration { position: absolute; right: 14px; bottom: 14px; font-family: var(--mono); font-size: 0.7rem; color: #fff; background: rgba(10,10,10,0.55); padding: 4px 9px; border-radius: 6px; pointer-events: none; }
.video-overlay.is-hidden ~ .video-duration { opacity: 0; }

/* ---- Portrait frame --------------------------------------- */
.portrait { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.portrait img { display: block; width: 100%; height: auto; }
.portrait::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(10,10,10,0.35) 100%); }

@media (prefers-reduced-motion: reduce) {
  .media-card:hover, .video-play { transform: none !important; }
  .media-card:hover .thumb img { transform: none !important; }
}

/* No-JS: the click-to-play overlay can't work without JS, so hide it and let
   the native <video controls> show through for those users. */
@media (scripting: none) {
  .video-overlay { display: none; }
}

/* Visually-hidden but accessible to screen readers (heading structure, etc.) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================================
   BATCH 3 ADDITIONS - course landings + blog index
   Additive only: no existing rule is modified, so a browser still
   holding an older immutable /css/operator.css?v=1 keeps rendering
   prior pages correctly. (Bump ?v=N site-wide at merge/promotion.)
   ============================================================ */

/* ---- Lesson path (numbered course timeline) --------------- */
/* A sequential, guided course path: number badge + poster thumb +
   title/desc/meta, with a hairline spine threading the badges. */
.lesson-path { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; position: relative; display: grid; gap: 0.55rem; }
.lesson-path::before {
  content: ""; position: absolute; left: 18px; top: 1.7rem; bottom: 1.7rem; width: 1px;
  background: linear-gradient(to bottom, var(--line-2), var(--line)); z-index: 0;
}
.lesson-step { display: flex; align-items: flex-start; gap: 1.1rem; position: relative; }
.lesson-n {
  flex-shrink: 0; position: relative; z-index: 1; box-sizing: border-box;
  width: 36px; height: 36px; border-radius: 50%; margin-top: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.85rem; color: #fff;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.lesson-card {
  flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 1.2rem;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
a.lesson-card:hover { background: var(--bg-2); border-color: var(--line-2); transform: translateY(-2px); }
a.lesson-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lesson-thumb {
  width: 152px; flex-shrink: 0; aspect-ratio: 16 / 9; border-radius: var(--r-sm);
  object-fit: cover; background: var(--bg-3); border: 1px solid var(--line);
}
.lesson-text { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.lesson-text h3 { font-size: 1.3rem; line-height: 1.15; }
a.lesson-card:hover .lesson-text h3 { color: var(--accent-bright); }
.lesson-text p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }
.lesson-meta { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin-top: 0.15rem; }
@media (max-width: 560px) {
  .lesson-card { flex-direction: column; }
  .lesson-thumb { width: 100%; }
  .lesson-path::before { left: 16px; }
  .lesson-n { width: 32px; height: 32px; margin-top: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { a.lesson-card:hover { transform: none !important; } }

/* ---- Filter bar (index category filters) ------------------ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.filter-pill {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); background: transparent; border: 1px solid var(--line-2);
  border-radius: var(--r-pill); padding: 0.5rem 1rem; display: inline-flex; align-items: center; gap: 0.5rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.filter-pill:hover { color: var(--ink); border-color: var(--accent); }
.filter-pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-pill .count { color: var(--ink-mute); font-size: 0.66rem; }
.filter-pill[aria-pressed="true"] .count { color: #fff; }
.filter-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Filterable cards set their own display (flex), so a plain [hidden]
   attribute would not hide them; force it for the filter contract. */
.filterable[hidden] { display: none !important; }

/* ---- Pipeline empty state (no items in a filtered category) */
.filter-empty { color: var(--ink-mute); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 1.6rem 0; }

/* ---- Prose data tables (article ledgers, spec tables) ----- */
/* The one long-form primitive .prose lacked. Wrap wide tables in
   .table-wrap for horizontal scroll on narrow screens. */
.prose .table-wrap { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.prose .table-wrap table { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; }
.prose thead th {
  text-align: left; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-bright); font-weight: 500; white-space: nowrap;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-2);
}
.prose tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody td:first-child { color: var(--ink); font-weight: 600; }

/* ---- Author card (article foot) --------------------------- */
.author-card { display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap; }
.author-card .pfp { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line-2); }
.author-card .who { flex: 1; min-width: 220px; }
.author-card .who h3 { font-size: 1.3rem; }
.author-card .who p { color: var(--ink-soft); margin-top: 0.5rem; font-size: 0.95rem; line-height: 1.6; }
.author-card .who .links { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* ============================================================
   BATCH 5 ADDITIONS - course lesson reading pages
   For /learn/<course>/<lesson>/ pages converted from the legacy
   warm "reading room" (Fraunces + light paper) to Operator
   Cinematic II. Additive only: no rule above is modified, so a
   browser still holding an older immutable ?v=1 keeps rendering
   prior pages. (Bump ?v=N site-wide at merge/promotion.)
   Everything is scoped under .lesson (set on <main>) so generic
   class names (.quiz, .compare, .stage, .diagram) never collide
   site-wide. The reading body itself is operator .prose; this adds
   the lesson-only primitives shared across all 10 lessons. A page's
   ONE bespoke widget keeps its original markup + JS and is restyled
   in a small page-local <style> (also scoped under .lesson).
   ============================================================ */

/* ---- Lesson scope + legacy-token compat ------------------- */
/* The preserved inline SVG diagrams + widget CSS still reference the
   legacy reading-room variable names. Remap them to the dark palette
   ONCE here so the diagrams render correctly with no per-SVG edits.
   (Panels that used --ink as a *background* are inverted by hand in
   markup, since --ink is light here.) */
.lesson {
  --serif:     var(--display);
  /* legacy widgets/SVGs used --accent-deep as readable text on light paper;
     on near-black it is too dark, so remap to the bright accent for legibility */
  --accent-deep: var(--accent-bright);
  --paper:     var(--bg-1);
  --paper-2:   var(--bg-2);
  --paper-3:   var(--bg-3);
  --rule:      var(--line);
  --rule-2:    var(--line-2);
  --ink-faint: var(--ink-mute);
  --hi:        var(--accent-tint);
  --good:      #5fb389;   /* working / correct state (graphic + border) */
  --good-deep: #93d7ad;   /* correct text on dark (AA on dark surfaces) */
  --bad:       #d98a8a;   /* weak / wrong state (matches .form-status.err) */
  --bad-deep:  #e6a9a9;
}

/* ---- Lesson kicker (mono dot-separated meta line) --------- */
.lesson .lesson-kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0 0 1rem;
}
.lesson .lesson-kicker .seg-1 { color: var(--accent); }
.lesson .lesson-kicker .dot { color: var(--line-2); }

/* ---- Lesson progress (segmented jump bar) ----------------- */
.lesson .lesson-progress {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute); margin: 1.6rem 0 0;
}
.lesson .lesson-progress .now { white-space: nowrap; }
.lesson .lesson-progress .track { display: flex; gap: 0.45rem; align-items: center; }
.lesson .lesson-progress .seg {
  display: block; width: 1.9rem; height: 0.42rem; border-radius: 3px;
  background: var(--line-2);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  transform-origin: center;
}
.lesson .lesson-progress a.seg:hover, .lesson .lesson-progress a.seg:focus-visible {
  transform: scale(1.4); background: var(--accent);
  box-shadow: 0 0 12px -1px var(--accent); outline: none;
}
.lesson .lesson-progress .seg.on { background: var(--accent); }

/* ---- Lesson body: prose tweaks ---------------------------- */
.lesson .lesson-body h2 .n { font-family: var(--mono); font-size: 0.6em; color: var(--accent); margin-right: 0.5rem; vertical-align: 0.2em; letter-spacing: 0.04em; }
.lesson .lesson-body .lede { color: var(--ink); }
.lesson .lesson-body hr.rule { border: 0; border-top: 1px solid var(--line); margin-block: 2.6em; }
.lesson .lesson-body mark { background: var(--accent-tint); color: var(--ink); padding: 0.02em 0.22em; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lesson .lesson-body .end { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-mute); text-align: center; margin: 2.4rem 0 0; letter-spacing: 0.08em; text-transform: lowercase; }

/* ---- Objectives ("what you'll be able to do") ------------- */
.lesson .objectives { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.2rem 1.4rem; }
.lesson .objectives .objectives-k { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.6rem; display: block; }
.lesson .objectives ul { margin: 0; padding-left: 1.1rem; }
.lesson .objectives li { margin: 0.4rem 0; color: var(--ink-soft); }
.lesson .objectives li::marker { color: var(--accent); }
.lesson .objectives strong { color: var(--ink); }

/* ---- Answer-up-front block -------------------------------- */
.lesson .answerblock { position: relative; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.7rem 1.7rem 1.4rem; }
.lesson .answerblock .label { position: absolute; top: -0.7rem; left: 1.1rem; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.22rem 0.6rem; border-radius: 5px; }
.lesson .answerblock p { color: var(--ink-soft); }
.lesson .answerblock strong { color: var(--ink); }

/* ---- Big idea (emphasis statement panel) ------------------ */
.lesson .bigidea { background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r-md); padding: 1.8rem 1.9rem; }
.lesson .bigidea .eyebrow { margin: 0 0 0.5rem; }
.lesson .bigidea .huge { font-family: var(--display); font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.4rem); line-height: 1.12; letter-spacing: -0.015em; color: var(--ink); margin: 0.2rem 0 0.6rem; }
.lesson .bigidea p { color: var(--ink-soft); }
.lesson .bigidea strong { color: var(--ink); }
.lesson .bigidea .fine { font-size: 0.92rem; color: var(--ink-mute); margin-top: 0.7rem; }

/* ---- Compare (weak vs strong cards) ----------------------- */
.lesson .compare { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.6em 0; }
@media (min-width: 40rem) { .lesson .compare { grid-template-columns: 1fr 1fr; } }
.lesson .cmp { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.2rem; }
.lesson .cmp.weak { border-top: 3px solid var(--bad); }
.lesson .cmp.strong { border-top: 3px solid var(--good); }
.lesson .cmp .tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.5rem; font-weight: 500; }
.lesson .cmp.weak .tag { color: var(--bad); }
.lesson .cmp.strong .tag { color: var(--good-deep); }
.lesson .cmp p { font-size: 0.95rem; color: var(--ink-soft); margin: 0.35rem 0; line-height: 1.5; }
.lesson .cmp strong { color: var(--ink); }
.lesson .cmp .note { font-size: 0.82rem; color: var(--ink-mute); margin-top: 0.7rem; border-top: 1px dotted var(--line-2); padding-top: 0.6rem; }

/* ---- Pipeline / numbered stages --------------------------- */
.lesson .pipeline { counter-reset: stage; margin: 1.8em 0; border-left: 2px solid var(--line-2); padding-left: 0; list-style: none; }
.lesson .stage { position: relative; padding: 0 0 1.9rem 3.3rem; margin-left: 0.2rem; }
.lesson .stage::before { counter-increment: stage; content: counter(stage); position: absolute; left: -1.05rem; top: -0.1rem; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--mono); font-weight: 500; font-size: 0.9rem; border-radius: 50%; box-shadow: 0 0 0 5px var(--bg); }
.lesson .stage:last-child { padding-bottom: 0; }
.lesson .stage h3 { font-family: var(--display); font-size: 1.25rem; margin: 0.1rem 0 0.25rem; }
.lesson .stage .role { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 0.35rem; }
.lesson .stage p { font-size: 0.96rem; color: var(--ink-soft); margin: 0.4rem 0; }
.lesson .stage .takeaway { margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-soft); background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.6rem 0.8rem; }
.lesson .stage .takeaway b { color: var(--accent); font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 0.15rem; }
@media (max-width: 40rem) { .lesson .pipeline { margin-left: 1.1rem; } }

/* ---- Concept diagram (preserved inline SVG figure) -------- */
.lesson .diagram { margin: 1.8em 0; padding: 1.25rem; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); }
.lesson .diagram svg { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.lesson .diagram figcaption { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-mute); margin-top: 0.8rem; line-height: 1.5; text-align: center; }

/* ---- Lesson video (native controls, no-JS safe) ----------- */
.lesson .lesson-video { margin: 1.8em 0; }
.lesson .lesson-video .cap { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 0.6rem; }
.lesson .lesson-video video { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; border-radius: var(--r-lg); border: 1px solid var(--line); background: #000; }

/* ---- Interactive lab (bespoke widget container) ----------- */
.lesson .lab { background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.5rem 1.5rem 1.3rem; margin: 1.8em 0; }
.lesson .lab > .eyebrow { margin: 0 0 0.3rem; }
.lesson .lab h3 { font-family: var(--display); font-size: 1.45rem; margin: 0 0 0.3rem; }
.lesson .lab .intro { font-size: 0.95rem; color: var(--ink-soft); margin: 0 0 1.1rem; }
.lesson .lab strong { color: var(--ink); }

/* ---- Quiz (shared JS: .opt -> .correct/.wrong, .fb.show) --- */
.lesson .quiz { background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.6rem 1.6rem 1.4rem; margin: 1.8em 0; }
.lesson .quiz h3 { font-family: var(--display); font-size: 1.35rem; margin: 0 0 0.2rem; }
.lesson .quiz .intro { font-size: 0.92rem; color: var(--ink-soft); margin: 0 0 1.1rem; }
.lesson .quiz .q { margin: 0 0 1.5rem; padding: 0 0 1.3rem; border-bottom: 1px dotted var(--line-2); }
.lesson .quiz .q:last-of-type { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.lesson .quiz .qtext { font-weight: 600; color: var(--ink); margin: 0 0 0.8rem; font-size: 1rem; }
.lesson .quiz .qn { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; margin-right: 0.45rem; }
.lesson .quiz .opt { display: block; width: 100%; text-align: left; font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0.7rem 0.9rem; margin: 0.45rem 0; cursor: pointer; transition: border-color 0.15s var(--ease), color 0.15s var(--ease); line-height: 1.45; }
.lesson .quiz .opt:hover { border-color: var(--accent); color: var(--ink); }
.lesson .quiz .opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.lesson .quiz .opt:disabled { cursor: default; }
.lesson .quiz .opt.correct { border-color: var(--good); background: rgba(95, 179, 137, 0.13); color: var(--good-deep); font-weight: 500; }
.lesson .quiz .opt.wrong { border-color: var(--bad); background: rgba(217, 138, 138, 0.13); color: var(--bad-deep); }
.lesson .quiz .fb { font-size: 0.88rem; color: var(--ink-soft); margin: 0.6rem 0 0; padding: 0.7rem 0.9rem; border-radius: var(--r-sm); background: var(--bg-2); display: none; line-height: 1.55; }
.lesson .quiz .fb.show { display: block; }
.lesson .quiz .fb b, .lesson .quiz .fb strong { color: var(--ink); }
.lesson .quiz .score { font-family: var(--mono); font-size: 0.9rem; text-align: center; margin: 1rem 0 0; color: var(--accent-bright); min-height: 1.3em; font-weight: 500; }

/* ---- Callout variants for lessons ------------------------- */
.lesson .callout.warn { border-left-color: var(--bad); background: rgba(217, 138, 138, 0.06); }
.lesson .callout.warn .callout-k { color: var(--bad-deep); }
.lesson .callout.caveat { border-style: dashed; border-left-style: solid; }

/* ---- Next-up box ------------------------------------------ */
.lesson .lesson-next { background: var(--bg-1); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--r-sm); padding: 1.2rem 1.4rem; color: var(--ink-soft); }
.lesson .lesson-next b { color: var(--ink); }
.lesson .lesson-next em { color: var(--accent-bright); font-style: italic; }

/* ---- Footnotes / sources ---------------------------------- */
.lesson .lesson-body sup.cite { font-family: var(--mono); font-size: 0.62rem; color: var(--accent); font-weight: 600; }
.lesson .lesson-body sup.cite a { text-decoration: none; scroll-margin-top: 6rem; }
.lesson .lesson-body sup.cite a:target { background: var(--accent-tint); border-radius: 3px; padding: 0 0.15em; }
.lesson .footnotes { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line-2); font-size: 0.82rem; color: var(--ink-soft); }
.lesson .footnotes h3 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 0.8rem; }
.lesson .footnotes ol { margin: 0; padding-left: 1.3rem; }
.lesson .footnotes li { margin: 0.55rem 0; line-height: 1.5; scroll-margin-top: 5rem; border-radius: 5px; transition: background 0.35s ease; }
.lesson .footnotes li::marker { color: var(--accent); }
.lesson .footnotes li:target { background: var(--accent-tint); box-shadow: 0 0 0 0.4rem var(--accent-tint); }
.lesson .footnotes a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; word-break: break-word; }
.lesson .footnotes a:hover { color: var(--accent-bright); }
.lesson .footnotes .backref { text-decoration: none; color: var(--accent); font-family: var(--mono); margin-left: 0.4rem; }

/* ---- Lesson prev/next nav --------------------------------- */
.lesson .lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.lesson .lesson-nav a { color: var(--ink-soft); transition: color 0.2s var(--ease); }
.lesson .lesson-nav a:hover { color: var(--accent-bright); }
@media (max-width: 560px) { .lesson .lesson-nav { flex-direction: column; align-items: stretch; gap: 0.6rem; text-align: center; } }

/* ---- Reduced motion (lesson interactions) ----------------- */
@media (prefers-reduced-motion: reduce) {
  .lesson .lesson-progress a.seg:hover, .lesson .lesson-progress a.seg:focus-visible { transform: none; }
}

/* ============================================================
   BATCH 5b ADDITIONS - GEO course data-viz + scorer widget
   Recurring components across /learn/geo/ lessons: a data board
   (bar chart + stat tiles), a numbered place map, and the off-site
   "scorer" meter widget (cb / ac / vs share these class names; only
   the inline JS ids differ). Additive + .lesson-scoped, like Batch 5.
   ============================================================ */

/* ---- Data board (bar chart + stat tiles) ------------------ */
.lesson .board { margin: 1.8em 0; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.3rem 1.4rem; }
.lesson .board h3 { font-family: var(--display); font-size: 1.25rem; margin: 0 0 0.2rem; }
.lesson .board .sub { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-mute); margin: 0 0 1.1rem; }
.lesson .board .row { display: grid; grid-template-columns: 9rem 1fr; gap: 0.8rem; align-items: center; margin: 0.6rem 0; }
/* .lab doubles as the interactive-container class; reset it here for the row-label use */
.lesson .board .row .lab { font-size: 0.95rem; font-weight: 600; text-align: right; color: var(--ink); background: none; border: 0; padding: 0; border-radius: 0; margin: 0; }
.lesson .bar-wrap { position: relative; height: 34px; background: var(--bg-3); border-radius: 8px; overflow: hidden; }
.lesson .bar { height: 100%; border-radius: 8px; display: flex; align-items: center; justify-content: flex-end; padding-right: 0.6rem; font-family: var(--mono); font-size: 0.82rem; font-weight: 600; color: #fff; }
.lesson .bar.big { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.lesson .bar.small { background: linear-gradient(90deg, var(--bg-3), var(--line-2)); color: var(--ink-mute); }
.lesson .statrow { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.lesson .stat { flex: 1; min-width: 9rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.8rem; text-align: center; }
.lesson .stat .big { font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--accent-bright); line-height: 1; }
.lesson .stat .cap { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-mute); margin-top: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Place map (numbered ranked list) --------------------- */
.lesson .map { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin: 1.8em 0; }
.lesson .place { display: flex; gap: 0.9rem; align-items: flex-start; background: var(--bg-1); border: 1px solid var(--line); border-radius: 11px; padding: 0.9rem 1.1rem; }
.lesson .place .pn { flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: 8px; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }
.lesson .place b { color: var(--ink); }
.lesson .place .d { font-size: 0.93rem; color: var(--ink-soft); }
.lesson .place .d .pct { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-bright); background: var(--accent-tint); padding: 0.06rem 0.4rem; border-radius: 5px; margin-left: 0.3rem; }

/* ---- Off-site "scorer" meter widget (cb / ac / vs) -------- */
.lesson .srcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1.1rem; }
@media (max-width: 34rem) { .lesson .srcgrid { grid-template-columns: 1fr; } }
.lesson .src { display: flex; align-items: center; gap: 0.7rem; text-align: left; font-family: var(--sans); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 0.7rem 0.8rem; cursor: pointer; color: var(--ink-soft); transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.lesson .src:hover { border-color: var(--accent); }
.lesson .src:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lesson .src.on { background: rgba(95, 179, 137, 0.13); border-color: var(--good); color: var(--ink); }
.lesson .src .box { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 15px; font-family: var(--mono); }
.lesson .src.on .box { background: var(--good); border-color: var(--good); color: #08130d; }
.lesson .src .t { font-size: 0.92rem; font-weight: 600; line-height: 1.2; }
.lesson .src .t small { display: block; font-weight: 400; font-family: var(--mono); font-size: 0.68rem; color: var(--ink-mute); margin-top: 2px; }
.lesson .src.on .t small { color: var(--good-deep); }
.lesson .meter-top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 0.8rem; margin-bottom: 0.4rem; color: var(--ink-soft); }
.lesson .meter-top .verdict { font-weight: 600; }
.lesson .meter { height: 16px; background: var(--bg-3); border-radius: 8px; overflow: hidden; }
/* width + traffic-light color are set inline by the widget JS (red->amber->green) */
.lesson .meter-fill { height: 100%; width: 8%; border-radius: 8px; transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s; }
.lesson .cbfb-wrap { font-size: 0.86rem; color: var(--ink-soft); min-height: 3.4em; margin: 0.8rem 0 0; padding: 0.7rem 0.85rem; background: var(--bg-2); border-radius: 9px; }
.lesson .cbfb { display: none; }
.lesson .cbfb.show { display: block; }
.lesson .cbfb b { color: var(--accent-bright); }
.lesson .lab-hint { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-mute); margin-top: 0.8rem; }

/* ---- Data-board bar variants + labelled rows -------------- */
.lesson .board .row .lab small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--ink-mute); font-family: var(--mono); }
.lesson .bar.pos { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.lesson .bar.top { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); box-shadow: inset 0 0 0 2px var(--accent-tint); }
.lesson .bar.neg { background: linear-gradient(90deg, #6e2a2a, #9a3f3f); color: #fff; }
.lesson .boardnote { font-size: 0.88rem; color: var(--ink-mute); margin-top: 0.7rem; }
.lesson .boardnote strong { color: var(--accent-bright); }

/* ---- Numbered recipe (lighter than .pipeline) ------------- */
.lesson .recipe { counter-reset: step; margin: 1.6em 0; }
.lesson .recipe .step { position: relative; padding: 0.7rem 0 0.7rem 3rem; border-bottom: 1px dotted var(--line-2); }
.lesson .recipe .step:last-child { border-bottom: none; }
.lesson .recipe .step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0.7rem; width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 0.85rem; border-radius: 50%; }
.lesson .recipe .step b { color: var(--ink); }
/* display:inline resets the place-map .map grid for this inline annotation */
.lesson .recipe .step .map { display: inline; margin: 0 0 0 0.3rem; font-family: var(--mono); font-size: 0.72rem; color: var(--accent-bright); }
