/* ============================================================
   AI BUILD LAB — Card Detail Page Shared Styles
   Used by every card under /agent-native-os/portal/cards/<slug>/
   Card-specific overrides (e.g. Cairns pyramid SVG, tier color
   cards) stay inline in each card's own <style> block.
   ============================================================ */

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

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

/* Anchor-scroll offset: leave room for the sticky nav so anchor jumps don't bury the heading. */
html { scroll-padding-top: 80px; }
.section[id], h2[id], h3[id] { scroll-margin-top: 80px; }

:root {
  --black: #0a0a0a; --dark: #111; --dark-2: #161616; --dark-3: #1f1f1f; --dark-4: #2a2a2a;
  --neon: #DBFB6B; --neon-dim: rgba(219,251,107,0.14); --neon-glow: rgba(219,251,107,0.35);
  --blue: #00D4FF; --blue-dim: rgba(0,212,255,0.14);
  --teal: #4ECDC4; --teal-dim: rgba(78,205,196,0.14);
  --coral: #FF6B6B; --coral-dim: rgba(255,107,107,0.14);
  --purple: #A78BFA; --purple-dim: rgba(167,139,250,0.14);
  --violet: #8B5CF6; --violet-dim: rgba(139,92,246,0.14);
  --amber: #FFB347; --amber-dim: rgba(255,179,71,0.14);
  --rose: #F472B6; --rose-dim: rgba(244,114,182,0.14);
  --white: #f5f5f5; --gray: #999; --gray-dim: #666; --gray-dark: #2a2a2a;
  --inset: clamp(24px, 6vw, 96px);  /* aligned to field-manual.css so terminal content width matches FM */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --read-width: 760px;

  /* Field-manual token names the shared rail (lib/nav.js) reads. On card pages
     field-manual.css is disabled in Terminal (full swap to this sheet), so the
     rail would fall back to LIGHT defaults without these — giving a cream rail
     next to dark content. Define the dark values here so the rail matches. */
  --cream: #0a0a0a; --cream-2: #161616; --grid: rgba(245,245,245,.035); --cream-border: rgba(245,245,245,.12);
  --surface: #111111; --surface-2: #161616;
  --ink: #f5f5f5; --ink-2: #b3b3b3; --ink-3: #8a8a8a;
  --on-accent: #111111;
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--black); color: var(--white); line-height: 1.65; overflow-x: hidden; }
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.02;
  background-image:
    linear-gradient(var(--blue) 1px, transparent 1px),
    linear-gradient(90deg, var(--blue) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* === Nav === */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,10,10,0.78);
  border-bottom: 1px solid var(--dark-3);
  padding: 14px var(--inset);
  display: flex; justify-content: space-between; align-items: center;
}
.nav-left { display: flex; align-items: center; gap: 14px; }
.nav-logo {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px;
  color: var(--white); text-decoration: none; letter-spacing: -0.5px;
}
.nav-logo span { color: var(--neon); }
.nav-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--blue); letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--blue-dim); border-radius: 4px;
}
.nav-right { display: flex; gap: 28px; align-items: center; }
.nav-right a { font-size: 13px; color: var(--gray); text-decoration: none; transition: color .2s var(--ease); }
.nav-right a:hover { color: var(--white); }
.nav-right a.active { color: var(--neon); }

/* === Breadcrumb === */
.crumb {
  padding: 24px var(--inset) 0;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--gray-dim); letter-spacing: 2px; text-transform: uppercase;
  display: flex; gap: 12px; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.crumb a { color: var(--gray); text-decoration: none; transition: color .2s var(--ease); }
.crumb a:hover { color: var(--neon); }
.crumb .sep { color: var(--gray-dark); }
.crumb .current { color: var(--white); }

/* Back bar (Terminal): prominent return to the Library + breadcrumb trail. */
.card-backbar { padding: 22px var(--inset) 0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.card-backbar .crumb { padding: 0; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--white);
  text-decoration: none; background: var(--dark-2);
  border: 1.5px solid var(--dark-4); border-radius: 8px; padding: 8px 14px;
  transition: border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease);
}
.back-btn:hover { top: -2px; left: -2px; border-color: var(--neon); color: var(--neon); box-shadow: 0 0 18px var(--neon-glow); }
.back-btn svg { width: 16px; height: 16px; }
.card-bottom-back { padding: 8px var(--inset) 44px; position: relative; z-index: 1; }

/* === Hero === */
.hero {
  padding: 32px var(--inset) 56px;
  position: relative;  /* overflow:hidden removed (Option A): lets the hero-glow feather instead of hard-clipping at the hero's top edge */
  display: grid; grid-template-columns: 1fr 380px;
  gap: 64px; align-items: start;
}
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(140px);
  opacity: 0.15; pointer-events: none; z-index: 0;
  width: 600px; height: 600px; top: -200px; left: -180px;
  background: var(--neon);
}
.hero-glow.g-neon   { background: var(--neon); }
.hero-glow.g-blue   { background: var(--blue); }
.hero-glow.g-teal   { background: var(--teal); opacity: 0.18; }
.hero-glow.g-coral  { background: var(--coral); }
.hero-glow.g-purple { background: var(--purple); }
.hero-glow.g-violet { background: var(--violet); }
.hero-glow.g-amber  { background: var(--amber); }
.hero-glow.g-rose   { background: var(--rose); }
.hero-glow.g-clay   { background: #D97757; }
/* Brand glows (Wade 07-12). g-slack uses the #E01E5A petal: aubergine at 0.15
   opacity is invisible on the black canvas; the petal red is the visible Slack tone. */
.hero-glow.g-yt    { background: #FF0000; }
.hero-glow.g-gws   { background: #4285F4; }
.hero-glow.g-zoom  { background: #2D8CFF; }
.hero-glow.g-slack { background: #E01E5A; }
.hero-glow.g-n8n   { background: #EA4B71; }

/* Wider than the shared reading column: the hero H1 (short titles, big type) can
   take more room than body prose before wrapping — this only affects the hero,
   not .body's own read-width-based measure (Wade 07-12, "What Is an Agent-Native
   OS?" wrapping early on ~1200-1300px desktop widths). */
.hero-main { position: relative; z-index: 1; max-width: calc(var(--read-width) + 140px); }
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--blue); letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 18px; display: flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before { content: ''; width: 32px; height: 2px; background: var(--blue); }
.hero h1 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.02; letter-spacing: -1.6px; margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--neon); }
.hero h1.accent-neon   em { color: var(--neon); }
.hero h1.accent-blue   em { color: var(--blue); }
.hero h1.accent-teal   em { color: var(--teal); }
.hero h1.accent-coral  em { color: var(--coral); }
.hero h1.accent-purple em { color: var(--purple); }
.hero h1.accent-violet em { color: var(--violet); }
.hero h1.accent-amber  em { color: var(--amber); }
.hero h1.accent-rose   em { color: var(--rose); }
.hero h1.accent-clay   em { color: #D97757; }
/* Brand accents as bare text on the dark canvas (terminal H1 em convention).
   All clear 3:1 large-text AA: yt 4.95, gws 5.56, zoom 5.95, n8n 5.41.
   accent-slack: aubergine text on black is 1.41:1 (unreadable) — the Slack-blue
   petal #36C5F0 (9.81:1) carries the brand instead. */
.hero h1.accent-yt    em { color: #FF0000; }
.hero h1.accent-gws   em { color: #4285F4; }
.hero h1.accent-zoom  em { color: #2D8CFF; }
.hero h1.accent-slack em { color: #36C5F0; }
.hero h1.accent-n8n   em { color: #EA4B71; }
.hero-lede { font-size: 19px; color: var(--gray); line-height: 1.55; max-width: 620px; }

/* "What you'll have" outcomes block (in hero-main) */
.unlocks {
  margin-top: 38px; padding-top: 30px;
  border-top: 1px solid var(--dark-3);
  max-width: 620px;
}
.unlocks-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--neon); letter-spacing: 2.5px; text-transform: uppercase;
  font-weight: 600; display: block; margin-bottom: 16px;
}
.unlocks ul { list-style: none; padding: 0; margin: 0; }
.unlocks li {
  font-size: 16px; color: var(--gray); line-height: 1.55;
  padding: 9px 0 9px 32px; position: relative;
}
.unlocks li::before {
  content: '→'; position: absolute; left: 0; top: 9px;
  color: var(--neon); font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
.unlocks li strong { color: var(--white); font-weight: 600; }

/* === Hero sidebar === */
.hero-side { position: relative; z-index: 1; }

.cover {
  height: 200px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative; margin-bottom: 24px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.4);
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}
.cover.c-neon   { background: linear-gradient(135deg, #5a7821 0%, #DBFB6B 100%); }
.cover.c-blue   { background: linear-gradient(135deg, #003a44 0%, #00D4FF 100%); }
.cover.c-teal   { background: linear-gradient(135deg, #1f6862 0%, #4ECDC4 100%); }
.cover.c-coral  { background: linear-gradient(135deg, #7a2727 0%, #FF6B6B 100%); }
.cover.c-purple { background: linear-gradient(135deg, #3a2a6e 0%, #A78BFA 100%); }
.cover.c-violet { background: linear-gradient(135deg, #2a1e58 0%, #8B5CF6 100%); }
.cover.c-amber  { background: linear-gradient(135deg, #6e4500 0%, #FFB347 100%); }
.cover.c-rose   { background: linear-gradient(135deg, #6e1a3d 0%, #F472B6 100%); }
.cover.c-clay   { background: linear-gradient(135deg, #6e3820 0%, #D97757 100%); }
/* Brand bands (Wade 07-12): flat official-color grounds, same hex as the FM
   sheet and the library tiles — a brand lockup, not a gradient. */
.cover.b-yt    { background: #FF0000; }   /* the brand's own red under a white mark (Wade 09-19) */
.cover.b-gws   { background: #202124; }
.cover.b-zoom  { background: #2D8CFF; }
.cover.b-slack { background: #4A154B; }
.cover.b-n8n   { background: #EA4B71; }
.cover.b-claude{ background: #D97757; }
/* Full-color brand mark image inside a cover (yt / gws / slack) */
.cover .cover-brand { position: relative; z-index: 1; width: 88px; height: 88px; object-fit: contain; }   /* the glyph's own 88px box, not a percentage (Wade 09-19) */
/* One box for every hero mark: square 88px, wide (a wordmark, the n8n glyph) 132x66; the inline svg's viewBox
   is trimmed to its painted bounds in card.json so the mark fills the box. */
.cover-glyph svg { display: block; width: 88px; height: 88px; }
.cover-glyph.wide svg { width: 132px; height: 66px; }

.cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(22,22,22,0.65) 100%);
}
.cover-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.42) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.32 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 240px 240px;
}
.cover-glyph {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 88px; font-weight: 700; line-height: 1;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  position: relative; z-index: 1;
  letter-spacing: -3px;
}
/* Brand mark colors on the brand grounds (pinned literals, rule 8): white mono
   marks on zoom blue (3.33:1) and n8n raspberry (3.66:1); ink on clay (6.05:1 —
   the sheet's default white-ish glyph only reaches ~3.1 there). */
.cover.b-zoom .cover-glyph,
.cover.b-n8n .cover-glyph,
.cover.b-yt .cover-glyph { color: #FFFFFF; text-shadow: none; }
.cover.b-claude .cover-glyph { color: #111111; text-shadow: none; }

/* Label covers (Workshop Day cards): show a step + track chip instead of a glyph.
   Scoped to .cover.is-label so library cards keep their large emoji glyph. */
.cover.is-label .cover-glyph {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: 4px;
  color: #fff; padding: 13px 30px; border-radius: 999px;
  background: rgba(12,12,16,0.42); border: 1px solid rgba(255,255,255,0.30);
  box-shadow: 0 4px 18px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.16);
  text-shadow: 0 1px 3px rgba(0,0,0,0.40);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}

/* === Badges === */
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.badge {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px; font-weight: 600;
}
.badge.b-4d   { background: var(--neon-dim); color: var(--neon); }
.badge.b-8d   { background: var(--purple-dim); color: var(--purple); }
.badge.b-live { background: var(--coral-dim); color: var(--coral); }
.badge.b-tier { background: var(--dark-3); color: var(--gray); }

/* === Meta block === */
.meta-block {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: 12px;
  padding: 22px 24px;
}
.meta-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--dark-3); gap: 16px;
}
.meta-row:last-child { border-bottom: none; }
.meta-row .label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--gray-dim); letter-spacing: 1.5px; text-transform: uppercase;
  flex-shrink: 0;
}
.meta-row .value { font-size: 14px; color: var(--white); font-weight: 500; text-align: right; }
.meta-row .value code {
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  background: var(--dark-3); padding: 2px 6px; border-radius: 4px;
  color: var(--neon);
}
/* Concept/reference links in the meta block: use the card link blue (not the
   browser-default blue/purple, which showed purple once visited). */
.meta-row .value a, .meta-row .value a:visited { color: var(--blue); text-decoration: underline; }
.meta-row .value a:hover { text-decoration: none; }

/* === Starter prompt (one-click handoff) === */
.starter {
  background: linear-gradient(135deg, rgba(219,251,107,0.10), rgba(78,205,196,0.04));
  border: 1px solid rgba(219,251,107,0.28);
  border-radius: 12px;
  padding: 18px 22px 20px;
  margin-top: 20px;
  text-align: left;
}
.starter-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--neon); letter-spacing: 2px; text-transform: uppercase;
  font-weight: 600; margin-bottom: 8px; display: block;
}
.starter h3 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 16px; color: var(--white); letter-spacing: -0.2px;
  margin-bottom: 6px;
}
.starter p { font-size: 13px; color: var(--gray); line-height: 1.5; margin-bottom: 14px; }
.starter-btn {
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13.5px;
  background: var(--neon); color: var(--black);
  padding: 11px 20px; border: none; border-radius: 8px;
  cursor: pointer; letter-spacing: 0.2px;
  transition: all 0.25s var(--ease);
  width: 100%;
  /* Brief lime pulse on load so the copy button gets noticed during install sessions. */
  animation: starter-btn-pulse 1.5s var(--ease) 0.5s 3;
}
/* Pulse rings out and settles; hover still owns its own glow afterward. */
@keyframes starter-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(219,251,107,0); }
  50% { box-shadow: 0 0 24px 2px rgba(219,251,107,0.55), 0 4px 14px rgba(0,0,0,0.2); }
}
.starter-btn:hover {
  box-shadow: 0 0 28px rgba(219,251,107,0.35), 0 4px 14px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}
.starter-btn.copied { background: var(--blue); }
/* No motion preference: drop the pulse, keep a static lime ring so it stays discoverable. */
@media (prefers-reduced-motion: reduce) {
  .starter-btn { animation: none; box-shadow: 0 0 0 2px rgba(219,251,107,0.45); }
}
/* Shared alternate prompts under the primary setup button (explain / use-case),
   modeled on Every's Agent Mode card. Secondary (outline) styling so the primary
   setup prompt stays the main CTA. */
.starter-alts { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.starter-btn-alt {
  background: transparent; color: var(--neon);
  border: 1px solid rgba(219,251,107,0.45); font-weight: 600;
}
.starter-btn-alt:hover { background: rgba(219,251,107,0.10); }
.starter-btn-alt.copied { background: var(--blue); color: var(--black); border-color: var(--blue); }

/* === Body container === */
.body {
  padding: 32px var(--inset) 120px;
  position: relative; z-index: 1;
  max-width: calc(var(--read-width) + var(--inset) * 4);  /* wider reading column (Wade preference) */
  margin: 0 auto;
}

/* === Section === */
.section { margin-bottom: 56px; }
.section h2 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.8px;
  margin-bottom: 18px;
  display: flex; align-items: baseline; gap: 14px;
}
.section h2::before {
  content: ''; flex-shrink: 0;
  width: 6px; height: 22px; background: var(--neon);
  border-radius: 2px; align-self: center;
}
.section h3 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 19px; letter-spacing: -0.3px; color: var(--white);
  margin-top: 26px; margin-bottom: 10px;
}
.section p { font-size: 17px; color: var(--gray); line-height: 1.7; margin-bottom: 14px; }
.section p strong { color: var(--white); font-weight: 600; }
.section ul, .section ol { margin: 14px 0 18px 24px; }
.section li { color: var(--gray); margin-bottom: 8px; line-height: 1.65; font-size: 16px; }
.section li strong { color: var(--white); font-weight: 600; }
.section code {
  font-family: 'JetBrains Mono', monospace; font-size: 13.5px;
  background: var(--dark-2); border: 1px solid var(--dark-3);
  padding: 2px 7px; border-radius: 4px; color: var(--neon);
}

/* === Prereqs block (build cards) === */
.prereqs {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  padding: 22px 28px;
}
.prereqs h3 {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--blue); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 14px;
}
.prereqs ul { margin: 0; list-style: none; }
.prereqs li { padding-left: 28px; position: relative; margin-bottom: 8px; font-size: 15px; }
.prereqs li::before { content: '✓'; position: absolute; left: 0; top: -1px; color: var(--neon); font-size: 14px; font-weight: 700; }

/* === Build steps === */
.step {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 20px;
  position: relative;
}
.step-head {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid var(--dark-3);
}
.step-num {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--neon); letter-spacing: 2px; text-transform: uppercase;
  background: var(--neon-dim);
  padding: 4px 10px; border-radius: 4px;
  flex-shrink: 0;
}
.step-head h3 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 22px; letter-spacing: -0.4px; line-height: 1.2;
  color: var(--white); flex: 1;
  margin: 0;
}
.step-duration {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--gray-dim); letter-spacing: 1.5px;
  flex-shrink: 0;
}
.step p { margin-bottom: 12px; font-size: 16px; }
.step ul { margin: 10px 0 16px 22px; }
.step li { font-size: 15px; margin-bottom: 6px; }

/* === Code block === */
pre {
  background: var(--black);
  border: 1px solid var(--dark-3);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 14px 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  line-height: 1.55;
  color: var(--neon);
}

/* === Prompt block (paste into Claude Code) === */
.prompt {
  background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(78,205,196,0.03));
  border: 1px solid rgba(0,212,255,0.22);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 14px 90px 16px 20px;
  margin: 16px 0;
  position: relative;
}
.prompt-label {
  display: block;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--blue); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 10px; font-weight: 600;
}
.prompt code {
  display: block;
  font-family: 'JetBrains Mono', monospace; font-size: 14px;
  background: transparent; border: none; padding: 0;
  color: var(--white); font-weight: 500;
  white-space: pre-wrap;
  word-break: break-word;
}
.prompt p {
  font-family: 'Inter', -apple-system, sans-serif; font-size: 14.5px;
  color: var(--white); margin: 0; line-height: 1.65;
}
.prompt p code {
  display: inline;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  background: rgba(0,212,255,0.10); border: 1px solid rgba(0,212,255,0.18);
  padding: 1px 6px; border-radius: 3px;
  color: var(--blue); white-space: nowrap; word-break: normal;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--blue);
  padding: 5px 10px; border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.copy-btn:hover { background: var(--blue); color: var(--black); border-color: var(--blue); }
.copy-btn.copied { background: var(--neon); color: var(--black); border-color: var(--neon); }

/* === If-this-fails callout === */
.stuck {
  background: var(--coral-dim);
  border-left: 3px solid var(--coral);
  border-radius: 0 8px 8px 0;
  padding: 14px 20px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--gray);
}
.stuck::before {
  content: 'If this fails';
  display: block;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--coral); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 6px; font-weight: 600;
}
.stuck strong { color: var(--white); font-weight: 600; }

/* === Win callout === */
.win {
  background: var(--neon-dim);
  border-left: 3px solid var(--neon);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 20px 0;
  font-size: 16px;
  color: var(--white);
}
.win::before {
  content: '✓ You shipped it';
  display: block;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--neon); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 8px; font-weight: 600;
}

/* === Before/after compare (primer cards) === */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.compare-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: 12px;
  padding: 22px 24px;
}
.compare-card.before { border-left: 3px solid var(--gray-dark); }
.compare-card.after  { border-left: 3px solid var(--neon); }
.compare-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
  margin-bottom: 14px; display: block;
}
.compare-card.before .compare-label { color: var(--gray); }
.compare-card.after  .compare-label { color: var(--neon); }
.compare-card p { font-size: 14.5px; line-height: 1.6; margin-bottom: 10px; }
.compare-card p:last-child { margin-bottom: 0; }
.compare-card .you { color: var(--white); font-weight: 500; }
.compare-card .claude {
  color: var(--gray); padding-left: 16px;
  border-left: 2px solid var(--dark-4); margin-left: 4px;
}
.compare-card.after .claude { border-left-color: var(--neon-dim); }

/* === Sections-table (primer cards) === */
.sections-table {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0 24px;
}
.sections-row {
  display: grid; grid-template-columns: 56px 200px 1fr;
  gap: 18px; padding: 16px 22px;
  border-bottom: 1px solid var(--dark-3);
  align-items: baseline;
}
.sections-row:last-child { border-bottom: none; }
.sections-row .num { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--neon); font-weight: 600; }
.sections-row .name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; color: var(--white); }
.sections-row .what { font-size: 14.5px; color: var(--gray); line-height: 1.5; }

/* === Aside / pull-quote callout === */
.aside {
  background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(78,205,196,0.03));
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  padding: 20px 26px;
  margin: 24px 0;
}
.aside-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--blue); letter-spacing: 2px; text-transform: uppercase;
  font-weight: 600; margin-bottom: 8px; display: block;
}
.aside p { font-size: 16px; color: var(--white); line-height: 1.6; margin: 0; }
.aside p strong { font-weight: 600; }

/* Warning variant of the aside callout: coral instead of the default blue.
   Use for hard rules and "do not do this" callouts (e.g. never paste a real key). */
.aside.aside-warn { border-left-color: var(--coral); background: linear-gradient(135deg, rgba(255,107,107,0.08), rgba(255,107,107,0.02)); }
.aside.aside-warn .aside-label { color: var(--coral); }

/* Compact info / comparison table used by a few cards (mode surfaces, secrets examples). */
.surf { width: 100%; border-collapse: collapse; margin: 16px 0 10px; background: var(--dark-2); border: 1px solid var(--dark-3); border-radius: 10px; overflow: hidden; font-size: 14px; }
.surf th, .surf td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--dark-3); color: var(--gray); vertical-align: top; line-height: 1.5; }
.surf th { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--white); letter-spacing: 1px; text-transform: uppercase; background: var(--dark-3); }
.surf tbody tr:last-child td { border-bottom: none; }
.surf td strong { color: var(--white); }
.surf code { font-size: 12.5px; }

/* === Where-to-go-next cards === */
.next-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 24px;
}
.next-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: 12px;
  padding: 22px 24px;
  text-decoration: none; color: var(--white);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
  display: block;
}
.next-card:hover { top: -3px; border-color: var(--gray-dark); }
.next-card .stage {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--blue); letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px; display: block;
}
.next-card h4 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 17px; letter-spacing: -0.3px; margin-bottom: 6px;
}
.next-card p { font-size: 13.5px; color: var(--gray); line-height: 1.5; margin: 0; }

/* Internal cross-links in card prose — one consistent teal-blue.
   Scoped to .body so nav + breadcrumb stay untouched; excludes the
   .next-card footer tiles. !important overrides the per-card inline
   color accents (violet/teal/coral/amber) carried on individual links. */
/* .deck-btn is excluded here for the same reason cards.css excludes it: a deck
   button is a lime-filled button, not body prose, and its label is pinned to
   --on-accent so it stays dark on the fixed lime in BOTH themes. cards.css had
   the exclusion, this terminal-skin copy did not, and it loads later carrying
   !important, so under terminal the button rendered cyan-on-lime. */
.body a:not(.next-card):not(.pg-link):not(.deck-btn):not(.recording-tool) {
  color: var(--blue) !important;
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.body a:not(.next-card):not(.pg-link):not(.deck-btn):not(.recording-tool):hover { text-decoration: underline; }
.body a:not(.next-card):not(.pg-link):not(.deck-btn):not(.recording-tool) code { color: var(--blue) !important; }

/* Hero lede links live outside .body, so the rule above does not reach them.
   Match them to the same teal-blue (and override the default purple :visited). */
.hero-lede a, .hero-lede a:visited { color: var(--blue); text-decoration: underline; }
.hero-lede a:hover { text-decoration: none; }

/* === "How this fits in the OS" — orientation block right below the hero === */
.fit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 12px;
}
.fit-item {
  background: rgba(17,17,17,0.72);
  border: 1px solid var(--dark-3);
  border-radius: 10px;
  padding: 15px 16px;
}
.fit-item span {
  display: block;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--neon); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 7px;
}
.fit-item p { color: var(--gray); font-size: 14px; line-height: 1.55; margin: 0; }
.fit-item strong { color: var(--white); font-weight: 600; }

/* === Inline figures (screenshots, illustrations) === */
.card-figure {
  margin: 24px 0 28px;
  background: rgba(17,17,17,0.72);
  border: 1px solid var(--dark-3);
  border-radius: 12px;
  padding: 14px;
  overflow: hidden;
}
.card-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--dark-3);
}
/* Source-bound lesson art (Week 5/6): pandoc renders each markdown image as a
   bare paragraph holding one img. The stagers emit that src root-relative
   (/agent-native-os/portal/cards/<slug>/assets/...), so match on the
   /assets/ segment, never on a leading "assets/" prefix. Hand-authored
   1600x900 diagrams should fill the reading column; the Week 6 badge stamps
   and the operator license carry a small intrinsic width of their own and must
   render at it instead of stretching. */
.body p > img[src*="/assets/"] {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px auto 28px;
}
.body p > img[src*="/assets/"][src*="-stamp."],
.body p > img[src*="/assets/"][src*="-operator-license."] {
  width: auto;
  max-width: 100%;
}

.card-figure figcaption {
  margin-top: 12px;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  font-style: italic;
}
.card-figure figcaption code {
  font-style: normal;
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* W5-06 ships full-size 1440px reference captures as linked previews. Keep the
   exact source images clickable while constraining them to the reading column. */
#preview-the-shipped-examples a:has(> img) { display: block; background: none; }
#preview-the-shipped-examples img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--dark-3);
  border-radius: 6px;
}

/* === ASCII diagrams === */
pre.diagram {
  background: rgba(17,17,17,0.72);
  border: 1px solid var(--dark-3);
  border-radius: 10px;
  padding: 22px 18px;
  margin: 22px 0;
  color: var(--gray);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  text-align: center;
}

/* === Engine diagram (three doors -> one engine -> personalization layer) === */
.engine-diagram {
  background: rgba(17,17,17,0.72);
  border: 1px solid var(--dark-3);
  border-radius: 12px;
  padding: 28px 22px 26px;
  margin: 24px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ed-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}
.ed-doors {
  align-items: stretch;
}
.ed-door {
  flex: 1 1 0;
  max-width: 180px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--dark-3);
  border-radius: 8px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-align: center;
}
.ed-door-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: var(--neon);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}
.ed-door-icon-img img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}
.ed-connector {
  width: 2px;
  height: 22px;
  background: linear-gradient(to bottom, rgba(219,251,107,0.55), rgba(219,251,107,0.15));
  margin: 0;
}
.ed-engine {
  background: var(--neon-dim);
  border: 1px solid rgba(219,251,107,0.55);
  border-radius: 10px;
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 220px;
  box-shadow: 0 0 32px rgba(219,251,107,0.10);
}
.ed-engine-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon);
}
.ed-engine-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}
.ed-personalization {
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
}
.ed-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--dark-3);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--gray);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  white-space: nowrap;
}
.ed-personalization-label {
  margin-top: 14px;
  color: var(--gray-dim);
  font-size: 12px;
  font-style: italic;
  text-align: center;
}
@media (max-width: 600px) {
  .ed-doors { flex-direction: column; align-items: stretch; }
  .ed-door { max-width: none; }
}

/* === Mobile === */
@media (max-width: 900px) {
  :root { --inset: 24px; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-side { max-width: 480px; }
  .compare { grid-template-columns: 1fr; }
  .sections-row { grid-template-columns: 40px 1fr; }
  .sections-row .what { grid-column: 1 / -1; padding-top: 4px; }
  .fit-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .fit-grid { grid-template-columns: 1fr; }
}

/* The load pulse belongs to the primary copy button only; alt prompts stay quiet. */
.starter-btn-alt { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .starter-btn-alt { box-shadow: none; }
}

/* Test: match terminal content fonts to the Field Manual sizes (typographic
   consistency across themes). Remove this block to revert terminal to its
   pixel-exact original (smaller) sizes. */
.hero-lede { font-size: 20px; }
.section p { font-size: 19px; }
.section li { font-size: 17px; }

/* === Deck CTA (terminal): solid dark panel, hairline border, no gradient/soft-glow.
   Kept dark-styled (not the FM tinted-callout treatment) but cleaned up to match
   the rest of terminal's flat-panel convention (T4: hairline borders, no gradient fills). === */
.deck-cta {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0; padding: 16px 20px;
  background: var(--dark); border: 1px solid var(--dark-4); border-radius: 12px;
}
.deck-cta::before {
  content: ''; flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--dark-4);
  background: rgba(219,251,107,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DBFB6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}
/* Selector carries two classes so it outranks `.deck-cta-text span` (color/size).
   Neon is a fixed light fill: text pinned dark (rule 8). */
.deck-cta .deck-cta-eyebrow {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: #111111;
  border: 1px solid var(--dark-4); background: var(--neon);
  padding: 3px 8px; margin-bottom: 6px; width: fit-content;
}
.deck-cta-text { flex: 1; min-width: 0; }
.deck-cta-text strong { display: block; color: var(--white); font-size: 15px; margin-bottom: 4px; letter-spacing: -0.1px; }
.deck-cta-text span { color: var(--gray); font-size: 13px; line-height: 1.5; }
.deck-cta .deck-btn {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; letter-spacing: 0.3px;
  color: var(--on-accent); background: var(--neon); text-decoration: none;
  padding: 11px 18px; border-radius: 8px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.deck-cta .deck-btn:hover { top: -1px; box-shadow: 0 6px 18px rgba(219,251,107,0.30); }
.deck-cta .deck-btn svg { display: none; }
.deck-cta .deck-btn::after { content: '\2192'; font-size: 14px; line-height: 1; }
@media (max-width: 600px) {
  .deck-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ============================================================
   Keyboard focus (WDG audit leverage point, 07-11) — ONE coherent
   generic :focus-visible treatment. This sheet is the fully standalone
   Terminal swap (field-manual.css + cards.css are disabled when this
   is active), so the rule is unconditionally the terminal neon outline.
   ============================================================ */
a:focus-visible,
button:focus-visible,
[role="tab"]:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

/* ---------- Skip-to-content link (lib/nav.js / lib/nav.classic.js inject
   this as the first focusable element). Standalone terminal sheet: no
   field-manual.css import here, so it needs its own copy. ---------- */
.aibl-skip {
  position: fixed; top: -80px; left: 12px; z-index: 100001;
  background: var(--surface, #111); color: var(--white, #f5f5f5);
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  text-decoration: none; padding: 10px 16px;
  border: 1.5px solid var(--cream-border, rgba(245,245,245,.12)); border-radius: 4px;
  transition: top .15s ease;
}
.aibl-skip:focus-visible { top: 12px; outline: 2px solid var(--neon); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .aibl-skip { transition: none; } }

/* ============================================================
   Summer Camp Week 1 — lesson-card components, TERMINAL skin
   (camp LMS build, 07-12-2026). Twin of the cards.css block.
   ============================================================ */

.obj-lanes { background: var(--dark-2); border: 1px solid var(--dark-3); border-radius: 12px; overflow: hidden; }
.obj-lane { display: grid; grid-template-columns: 156px 1fr; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--dark-3); }
.obj-lane:last-child { border-bottom: none; }
.obj-lane .o-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--neon); padding-top: 3px;
}
.obj-lane p { font-size: 15.5px; color: var(--gray); line-height: 1.6; margin: 0; }
.obj-lane p strong { color: var(--white); font-weight: 600; }
@media (max-width: 560px) { .obj-lane { grid-template-columns: 1fr; gap: 5px; } }

/* Objective tiles: the 2x2 grid variant (camp lesson vote V2) — terminal skin */
.obj-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.obj-tile { background: var(--dark-2); border: 1px solid var(--dark-3); border-radius: 12px; padding: 16px 18px; }
.obj-tile .o-tag { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--white); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.obj-tile .o-tag::before { content: ''; width: 18px; height: 2px; background: var(--neon); }
.obj-tile p { font-size: 15px; color: var(--gray); line-height: 1.55; margin: 0; }
.obj-tile p strong { color: var(--white); font-weight: 600; }
@media (max-width: 640px) { .obj-tiles { grid-template-columns: 1fr; } }

/* Stamped semantic callouts — terminal skin (dim tints, hairline borders) */
/* The co-* modifier separates semantic callouts from Pandoc's bare span.co. */
.co[class*="co-"] { position: relative; border: 1px solid var(--dark-3); border-radius: 12px; padding: 24px 22px 18px; margin: 26px 0 8px; background: var(--tintbg, var(--dark-2)); }
.co-stamp { position: absolute; top: -14px; left: 18px; display: inline-flex; align-items: center; gap: 8px; background: var(--dark); border: 1px solid var(--acc, var(--dark-3)); color: var(--white); padding: 4px 11px 4px 4px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; transform: rotate(-4deg); }
.co-stamp .ico { width: 18px; height: 18px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--acc, var(--neon)); border: 1px solid #111111; }
.co-stamp svg { width: 11px; height: 11px; color: #111111; }
.co-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.3px; color: var(--white); margin-bottom: 6px; }
.co p { font-size: 15px; color: var(--gray); line-height: 1.6; }
.co p strong { color: var(--white); }
.co p + p, .co ol, .co ul { margin-top: 6px; }
.co ol, .co ul { margin-left: 20px; }
.co li { font-size: 15px; color: var(--gray); padding: 3px 0; }
.co li strong { color: var(--white); }
.co-note { --acc: var(--blue); --tintbg: var(--blue-dim); }
.co-check { --acc: var(--neon); --tintbg: var(--neon-dim); }
.co-warn { --acc: var(--coral); --tintbg: var(--coral-dim); }

.step.is-hc { background: var(--coral-dim); border-color: rgba(255,107,107,0.4); }
.step.is-hc .step-num { background: var(--coral); color: #111111; border-color: #111111; }
.hc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 3px 8px; margin-left: 10px;
  background: var(--coral); color: #111111; border: 1px solid #111111;
  border-radius: 2px; vertical-align: 3px; white-space: nowrap;
}

.badge.b-hc   { background: var(--coral); color: #111111; }
.badge.b-camp { background: var(--purple); color: #111111; }

.dod { background: var(--dark-2); border: 1px solid var(--dark-3); border-radius: 12px; overflow: hidden; }
.dod-head {
  padding: 16px 24px 12px; border-bottom: 1px solid var(--dark-3);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.dod-eyebrow { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--white); }
.dod-count { font-family: var(--font-mono); font-size: 11px; color: var(--gray-dim); }
.dod-row {
  display: flex; align-items: flex-start; gap: 13px; padding: 12px 24px;
  border-bottom: 1px solid var(--dark-3);
  font-size: 15.5px; color: var(--white); cursor: pointer;
}
.dod-row:last-of-type { border-bottom: none; }
.dod-check { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dod-box {
  width: 18px; height: 18px; border: 1.5px solid var(--gray-dim); border-radius: 3px;
  background: var(--dark); flex: none; margin-top: 2px; position: relative;
}
.dod-check:checked + .dod-box { background: var(--neon); border-color: #111111; }
.dod-check:checked + .dod-box::after {
  content: ''; position: absolute; inset: 2px 3px 4px 3px;
  border-left: 2.5px solid #111111; border-bottom: 2.5px solid #111111;
  transform: rotate(-48deg);
}
.dod-check:focus-visible + .dod-box { outline: 2px solid var(--neon); outline-offset: 2px; }
.dod-check:checked ~ .dod-text { color: var(--gray-dim); text-decoration: line-through; }
.dod-foot {
  padding: 16px 24px 20px; border-top: 1px solid var(--dark-3);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.dod-hint { font-family: var(--font-mono); font-size: 12px; color: var(--gray-dim); }
.dod-btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  background: var(--neon); color: #111111;
  border: 1px solid #111111; border-radius: 4px;
  padding: 12px 18px; cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.dod-btn:hover { top: -2px; left: -2px; box-shadow: 0 0 22px var(--neon-glow); }
.dod-btn.is-done { background: var(--dark-2); color: var(--white); border-color: var(--dark-4); }

.lesson-pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.pg-link {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 700;
  letter-spacing: 0; color: var(--white);
  border: 1.5px solid var(--cream-border); border-radius: 8px; background: var(--dark-2);
  padding: 15px 22px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 11px; box-shadow: none;
  transition: border-color .13s var(--ease), box-shadow .13s var(--ease), transform .13s var(--ease);
}
.pg-link:hover { border-color: var(--neon); transform: translate(-2px,-2px); box-shadow: 0 0 22px var(--neon-glow); }
.pg-link.pg-next { background: var(--neon); color: #111111; border-color: #111111; }
.pg-link.pg-next:hover { box-shadow: 0 0 26px var(--neon-glow); }
.pg-link svg { width: 16px; height: 16px; flex: none; }

/* ClearType hover fix (Wade 07-12): layout-path nudge bases for the text
   buttons whose hovers moved off transform. */
.back-btn, .starter-btn, .next-card, .deck-cta .deck-btn, .dod-btn { position: relative; top: 0; left: 0; transition: top .12s ease, left .12s ease, box-shadow .12s ease; }

/* === Mobile hardening (Terminal theme) ==================================
   The Terminal sheet is a full swap, so the field-manual mobile hardening in
   cards.css (its .body overflow-wrap + pre max-width block) does NOT apply when
   this sheet is active. Without it, long unbroken literals (64-char SHA-256
   hashes, UPPER_SNAKE receipt tokens like W6_KANSA_BLOCK_BUSINESS_RULES_FAILED,
   and command strings) and wide code/receipt blocks pushed the whole card past a
   390px viewport in Terminal while the field-manual theme stayed bounded. This is
   the same additive fix, mirrored here: overflow-wrap is inherited from .body so
   it reaches inline <code>, <strong>, and .dod-text; <pre> and .prompt code keep
   their own white-space (pre / pre-wrap), which wins over overflow-wrap, so
   formatted command blocks stay intact and scroll via their existing overflow-x;
   min-width:0 lets those boxes shrink inside flex parents. All additive: on
   desktop nothing is long enough to trigger a break, so layout is unchanged. */
.body { overflow-wrap: anywhere; }
/* ...except inside tables, where `anywhere` shatters ordinary words when the
   browser computes a column's min-content width. `break-word` still wraps a
   genuinely oversized literal but sizes columns off whole words again. */
.body th, .body td { overflow-wrap: break-word; }
.dod-text { min-width: 0; }
pre { max-width: 100%; min-width: 0; }
@media (max-width: 640px) {
  .body table { display: block; overflow-x: auto; }
}

/* === Hero-glow page-overflow fix (independent 390px browser QA) ==========
   The block above keeps command/receipt <pre> and long literals scrolling
   inside their own box, but it is NOT what pushed the whole page sideways at
   390px in the Terminal theme. The remaining page-level horizontal overflow is
   the decorative .hero-glow: a 600px circle anchored at left:-180px, so its box
   spans x=-180..420 and its right edge (420px) sits 30px past a 390px viewport,
   which is what drove documentElement/body scrollWidth to ~420px. .hero itself
   dropped overflow:hidden (Option A, see .hero above) so the glow can feather at
   the top edge on desktop, so nothing clips the glow horizontally on a phone.
   Clip it to the hero box on narrow viewports only. overflow-x:clip (not hidden)
   removes the glow from scroll width without turning .hero into a scroll
   container, and overflow-y:visible keeps the top-edge feather intact. Desktop
   (>900px) is untouched, so the glow still feathers there. */
@media (max-width: 900px) {
  .hero {
    overflow-x: clip;
    overflow-y: visible;
  }
}
