/* ============================================================
   FiredUpSkills v2 — shared design system
   Tokens and components extracted from Design/FiredUpSkills -
   Plan (standalone).html so every page matches that file.
   ============================================================ */

:root {
  --bg: #0b111a;
  --surface: #131923;
  --surface-2: #1b2332;
  --ember: #f97316;
  --ember-dark: #ea580c;
  --lime: #c8f04a;
  --text: #f6f8fa;
  --text-soft: #c9d2dc;
  --muted: #828f9f;
  --border: rgba(249, 115, 22, 0.12);
  --border-strong: rgba(249, 115, 22, 0.16);
  --border-hover: rgba(249, 115, 22, 0.3);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'DM Mono', monospace;
  /* Aliases so module pages using shadcn-style naming resolve to the same
     tokens as the rest of the site, instead of an undefined var() silently
     dropping the property (missing badge backgrounds, unstyled text). */
  --primary: var(--lime);
  --fg: var(--text);
  --red: #ef4444;
  --destructive: var(--red);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
}

::selection { background: var(--ember); color: var(--bg); }

a { color: inherit; }

/* Fixed grid-dot backdrop */
.grid-dots {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(249, 115, 22, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

main, .page { position: relative; z-index: 1; }

/* ---- Nav ---- */
/* Founding-launch announcement strip — sits above the sticky nav, scrolls away */
.announce-strip {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ember);
  background: rgba(249, 115, 22, 0.08);
  border-bottom: 1px solid rgba(249, 115, 22, 0.25);
  padding: 10px 16px;
  text-decoration: none;
  letter-spacing: 0.2px;
}

.announce-strip strong { color: var(--text); font-weight: 600; }
.announce-strip:hover { background: rgba(249, 115, 22, 0.14); }

/* Quiet founding-launch reminder line (quiz footer, CTA sections) */
.founding-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ember);
  margin-top: 18px;
}

/* ---- Library / catalog grid ---- */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.lib-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.lib-card:hover { border-color: var(--ember); transform: translateY(-2px); }

.lib-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}

.lib-body { padding: 18px 18px 16px; display: flex; flex-direction: column; flex: 1; }

.lib-slug { font-family: var(--font-mono); font-size: 12px; color: var(--lime); margin-bottom: 6px; }

.lib-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.25;
}

.lib-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; flex: 1; margin-bottom: 14px; }

.lib-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }

.lib-price { font-family: var(--font-mono); font-size: 14px; color: var(--text); }

.lib-cta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ember);
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 8px;
  padding: 8px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.lib-card:hover .lib-cta { background: var(--ember); color: var(--bg); }
.lib-card.owned .lib-cta { color: var(--lime); border-color: rgba(200, 240, 74, 0.4); }
.lib-card.owned:hover .lib-cta { background: var(--lime); color: var(--bg); }
.lib-card:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  background: rgba(11, 17, 26, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  background: var(--lime);
  transform: skewX(-12deg);
  border-radius: 3px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:not(.btn):hover { color: var(--ember); }

.nav-links a.btn-ember { color: var(--bg); }
.nav-links a.btn-ghost { color: var(--text); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-ember {
  background: var(--ember);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.35);
}

.btn-ember:hover {
  background: var(--ember-dark);
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(249, 115, 22, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}

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

/* ---- Section scaffolding ---- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 40px;
}

.section-narrow { max-width: 900px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--lime);
  margin-bottom: 14px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 36px;
}

h1 .glow { color: var(--ember); text-shadow: 0 0 30px rgba(249, 115, 22, 0.5); }

.sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 560px;
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 24px;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--border-hover); }

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin: 8px 0 6px;
}

.card-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---- Terminal window ---- */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid rgba(249, 115, 22, 0.1);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.4;
}

.terminal-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 26px 24px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 2.1;
}

.terminal-body .k { color: var(--lime); }
.terminal-body .ok { color: var(--lime); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .dim { color: var(--muted); }

.cursor {
  display: inline-block;
  width: 9px;
  height: 17px;
  background: var(--lime);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---- Timeline (module sequence) ---- */
.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-strong);
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 20px;
  padding-bottom: 32px;
}

.timeline-num {
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--lime);
  z-index: 1;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  flex: 1;
}

.timeline-card .mod-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--lime);
  margin-bottom: 6px;
}

.timeline-card .mod-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.timeline-card .mod-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Pricing tiers ---- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.tier {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 26px;
}

.tier.featured {
  background: #161a12;
  border-color: var(--ember);
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.25);
}

.tier-badge {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--ember);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}

.tier-price {
  font-family: var(--font-mono);
  font-size: 34px;
  margin-bottom: 4px;
}

.tier-cadence {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}

.tier-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}

.tier-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-soft);
}

.tier-feature .check {
  color: var(--lime);
  font-family: var(--font-mono);
}

.tier .btn { display: block; width: 100%; }

.fine-print {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 30px;
}

/* ---- Stats strip ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 40px;
  color: var(--lime);
}

.stat-label {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
}

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--lime);
  font-size: 18px;
}

.faq-item[open] summary::after { content: '−'; }

.faq-item .faq-body {
  padding: 0 20px 18px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(249, 115, 22, 0.1);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 60px auto 0;
}

.footer .brand-name { font-size: 14px; }
.footer .brand-mark { width: 14px; height: 14px; border-radius: 2px; }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  padding: 10px 2px;
}

.footer-links a:hover { color: var(--ember); }

/* ---- Quiz ---- */
.quiz-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

.quiz-progress-wrap { margin: 26px 0 46px; }

.quiz-progress-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.quiz-progress-track {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--lime);
  border-radius: 2px;
  width: 0;
  transition: width 0.3s ease;
}

.quiz-resume-note {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.quiz-resume-note a {
  color: var(--ember);
  text-decoration: underline;
}

.quiz-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 10px;
}

.quiz-hint {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 30px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.quiz-option:hover { border-color: var(--ember); }

.quiz-option.selected {
  border-color: var(--lime);
  background: #161a12;
}

.quiz-option .idx {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--lime);
  min-width: 22px;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 34px;
}

.quiz-back {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13.5px;
  cursor: pointer;
  padding: 12px 8px;
  margin: -12px -8px;
}

.quiz-back:hover { color: var(--ember); }

.quiz-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 16px 18px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15.5px;
  outline: none;
}

.quiz-input:focus { border-color: var(--lime); }

.quiz-email-msg {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.email-suggest-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--ember);
  text-decoration: underline;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}

/* ---- Playbook ---- */
.playbook-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 40px 100px;
  position: relative;
  z-index: 1;
}

.playbook-rail {
  position: sticky;
  top: 90px;
  align-self: start;
}

.rail-progress {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.rail-steps { list-style: none; }

.rail-steps li { margin-bottom: 4px; }

.rail-steps a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
}

.rail-steps a:hover { background: var(--surface); color: var(--text); }

.rail-steps .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lime);
  min-width: 20px;
}

.rail-steps li.done a { color: var(--lime); }
.rail-steps li.done .num::after { content: ' ✓'; }

.pb-step {
  margin-bottom: 56px;
  scroll-margin-top: 90px;
}

.pb-step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.pb-step-head { cursor: pointer; }

.pb-check {
  appearance: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-top: 4px;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}

/* Enlarges the tappable area around the small visual checkbox without
   changing its size — the whole step header is clickable (see playbook.js). */
.pb-check::before {
  content: '';
  position: absolute;
  inset: -12px;
}

.pb-check:checked { background: var(--lime); border-color: var(--lime); }

.pb-check:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
}

.pb-step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
}

.pb-step .step-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--lime);
}

.pb-step p, .pb-step li {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 65ch;
}

.pb-step p { margin: 10px 0; }

.pb-step ul, .pb-step ol { padding-left: 22px; margin: 10px 0; }

.pb-step code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--lime);
}

/* --- Premium Teaching Textures --- */

.config-block {
  margin: 24px 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.config-block .cb-header {
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border-strong);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-block .cb-code {
  padding: 20px;
}

.flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
}

.flow .flow-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.flow .flow-step:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.flow .flow-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.flow .flow-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* Prompt Block */
.prompt-block {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  margin: 18px 0;
}

.prompt-block .prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid rgba(249, 115, 22, 0.1);
}

.prompt-block .prompt-bar > span {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prompt-block .prompt-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lime);
  background: none;
  border: 1px solid rgba(200, 240, 74, 0.3);
  border-radius: 6px;
  padding: 4px 12px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.copy-btn:hover { background: var(--lime); color: var(--bg); }

.copy-btn.copied { background: var(--lime); color: var(--bg); }

.prompt-block pre {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-note {
  font-size: 13px;
  color: var(--muted);
  padding: 0 4px;
  margin-top: -8px;
}

/* Stuck accordion */
.stuck {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(19, 25, 35, 0.6);
  margin: 14px 0;
}

.stuck summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.stuck summary::-webkit-details-marker { display: none; }
.stuck summary::before { content: '? '; color: var(--ember); }
.stuck .stuck-body { padding: 0 16px 14px; font-size: 14px; }

/* Sandbox callout */
.sandbox-callout {
  border: 1px solid rgba(200, 240, 74, 0.4);
  border-radius: 12px;
  background: rgba(200, 240, 74, 0.05);
  padding: 20px 22px;
  margin: 18px 0;
}

.sandbox-callout .sandbox-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Mental model callout */
.mental-model {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.05);
  padding: 20px 22px;
  margin: 18px 0;
}

.mental-model .mm-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ember);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Data table — comparison/reference tables (pricing, plugins, niches, etc.) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  margin: 18px 0;
  background: var(--surface);
}

.data-table thead th {
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-strong);
}

.data-table tbody td {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.5;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
.data-table tbody td:first-child { color: var(--text); font-weight: 500; }
.data-table tbody tr:hover td { background: rgba(200, 240, 74, 0.04); }

/* Flow diagram — a short labeled sequence of stages, used sparingly where a
   module's mental model describes an explicit ordered pipeline (e.g. tool
   calls, prompt->build->output layers). One consistent visual so it reads
   the same across every module that uses it. */
.flow-diagram {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  margin: 18px 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
}

.flow-diagram .fd-step {
  flex: 1 1 0;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  text-align: center;
}

.flow-diagram .fd-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flow-diagram .fd-label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.35;
}

.flow-diagram .fd-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ember);
  font-size: 18px;
  padding: 0 4px;
  flex: 0 0 auto;
}

/* Kit card */
.kit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 40px;
}

.kit-card .kit-info { flex: 1; }

.kit-card .kit-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.kit-card .kit-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Done panel */
.done-panel {
  border: 1px solid var(--ember);
  border-radius: 14px;
  background: #161a12;
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.2);
  padding: 34px 30px;
  text-align: center;
}

/* ---- Module dashboard cards ---- */
.module-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 16px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}

.module-card:hover { border-color: var(--ember); }

.module-card.locked { opacity: 0.55; }
.module-card.locked:hover { border-color: var(--border); }

.module-card .mc-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
}

.mc-status.active { background: rgba(249, 115, 22, 0.15); color: var(--ember); }
.mc-status.done { background: rgba(200, 240, 74, 0.15); color: var(--lime); }
.mc-status.locked-tag { background: var(--surface-2); color: var(--muted); }

/* ---- Lock screen ---- */
.lock-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 110px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.unlock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.unlock-cover {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}

/* [id] anchor targets land clear of the sticky nav on jump */
[id] { scroll-margin-top: 90px; }

/* ---- Playbook interactivity ---- */

/* Module setup panel: values typed here flow into every prompt block */
.config-panel {
  background: var(--surface);
  border: 1px solid rgba(200, 240, 74, 0.35);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 40px;
}

.config-panel .cfg-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.config-panel .cfg-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.cfg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.cfg-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cfg-field input {
  width: 100%;
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  outline: none;
  box-sizing: border-box;
}

.cfg-field input:focus { border-color: var(--lime); }

/* Slots inside rendered prompts */
.slot-filled { color: var(--lime); }
.slot-empty { color: var(--ember); }

/* Checkpoint quiz */
.checkpoint {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  padding: 20px 22px;
  margin: 18px 0;
}

.checkpoint .cp-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ember);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.checkpoint .cp-q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  margin-bottom: 14px;
}

.checkpoint .cp-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color 0.12s;
}

.checkpoint .cp-opt:hover { border-color: var(--ember); }
.checkpoint .cp-opt.right { border-color: var(--lime); background: rgba(200, 240, 74, 0.07); }
.checkpoint .cp-opt.wrong { border-color: var(--ember); background: rgba(249, 115, 22, 0.07); }

.checkpoint .cp-feedback {
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-top: 6px;
  min-height: 18px;
}

/* Keyboard focus affordance on custom (non-native) interactive controls. */
.pb-check:focus-visible,
.copy-btn:focus-visible,
.checkpoint .cp-opt:focus-visible,
.module-card:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.checkpoint .cp-feedback.ok { color: var(--lime); }
.checkpoint .cp-feedback.no { color: var(--ember); }

/* Expected output toggle */
.expected {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  margin: 12px 0 18px;
}

.expected summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.expected summary::-webkit-details-marker { display: none; }
.expected summary::before { content: '▸ '; color: var(--lime); }
.expected[open] summary::before { content: '▾ '; }

.expected pre {
  padding: 4px 18px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
  white-space: pre-wrap;
}

.expected pre .ok { color: var(--lime); }

/* ---- Learner guidance block ("start here") ---- */
.guide-block {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 26px;
}

.guide-block .gb-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.guide-block .gb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 22px;
}

.guide-block .gb-row .gb-k {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.guide-block .gb-row .gb-v {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.55;
}

/* ---- Progress summary + continue bar (injected by playbook.js) ---- */
.progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.progress-summary .ps-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-soft);
}

.progress-summary .ps-text .ps-next {
  color: var(--lime);
}

.progress-summary .ps-continue {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--lime);
  background: none;
  border: 1px solid rgba(200, 240, 74, 0.3);
  border-radius: 6px;
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.progress-summary .ps-continue:hover { background: var(--lime); color: var(--bg); }

/* ---- Per-step "output" confirmation checklist ---- */
.step-output {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(200, 240, 74, 0.04);
  padding: 6px 8px;
  margin: 16px 0;
}

.output-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 8px;
  cursor: pointer;
}

.output-check + .output-check {
  border-top: 1px solid var(--border);
}

.out-check {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  border: 1px solid var(--border-hover);
  border-radius: 5px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
}

/* Expands the tappable area to 44px without changing the visual checkbox size. */
.out-check::before {
  content: '';
  position: absolute;
  inset: -13px;
}

.out-check:checked { background: var(--lime); border-color: var(--lime); }

.out-check:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

.output-check .out-label {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.55;
}

.output-check .out-label .out-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}

/* Final-step "ship it" checklist reuses .step-output/.output-check with several
   items instead of one — same mechanism, no separate component needed. */
.ship-checklist .gb-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ember);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 6px;
}

/* ---- Reflection field (injected by playbook.js, final step) ---- */
.reflect-block {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px 18px;
  margin: 18px 0;
}

.reflect-block .rb-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.reflect-block textarea {
  width: 100%;
  min-height: 64px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

.reflect-block textarea:focus { border-color: var(--lime); }

.reflect-block .rb-saved {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--lime);
  margin-top: 6px;
  min-height: 14px;
}

.out-check:focus-visible,
.progress-summary .ps-continue:focus-visible,
.reflect-block textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* Deploy log strip on dashboard */
.deploy-log-strip {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 34px;
}

.deploy-log-strip .dl-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 0;
}

.deploy-log-strip .dl-entry .ok { color: var(--lime); }
.deploy-log-strip .dl-date { color: var(--muted); margin-left: auto; }

/* ---- Responsive ---- */
/* This block must stay last in the file: several rules above share equal
   specificity with their overrides here, and CSS resolves ties by source
   order, not by @media position. */
@media (max-width: 900px) {
  .section { padding: 64px 22px; }
  h1 { font-size: 34px; }
  h2 { font-size: 24px; }
  .nav { padding: 14px 20px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.btn):not(.nav-persist):not(.nav-keep) { display: none; }
  .tiers, .stats { grid-template-columns: 1fr; }
  .hero-grid, .workspace-grid { grid-template-columns: 1fr; }
  .hero-grid > div:first-child { gap: 0; }
  .workspace-grid > div { border-right: none !important; border-bottom: 1px solid var(--border); }
  .workspace-grid > div:last-child { border-bottom: none; }
  .playbook-layout { grid-template-columns: 1fr; padding: 30px 20px 80px; }
  .playbook-rail { position: static; margin-bottom: 10px; }
  .module-card { flex-wrap: wrap; }
  .module-card .mc-status { margin-left: 54px; }
  .footer { flex-direction: column; gap: 16px; padding: 28px 20px; }
  .footer-links { justify-content: center; gap: 14px 18px; }
  .grid2, .grid4 { grid-template-columns: 1fr !important; }
  .prompt-block .prompt-bar { gap: 12px; }
  .prompt-block .prompt-bar > span { gap: 10px; }
  .progress-summary { flex-direction: column; align-items: stretch; }
  .progress-summary .ps-continue { width: 100%; }
  .guide-block .gb-grid { grid-template-columns: 1fr; }
  .unlock-grid { grid-template-columns: 1fr; }
  .lib-grid { grid-template-columns: 1fr; }
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table thead, .data-table tbody { display: table; width: 100%; table-layout: fixed; }
  .data-table thead th, .data-table tbody td { padding: 10px 12px; font-size: 13px; }
  .flow-diagram { flex-direction: column; padding: 14px; }
  .flow-diagram .fd-arrow { transform: rotate(90deg); padding: 2px 0; }
}

@media (min-width: 561px) and (max-width: 900px) {
  .lib-grid { grid-template-columns: 1fr 1fr; }
}

/* Narrow phones: brand + Library + Pricing + the CTA button don't all fit on
   one row at the 900px breakpoint's padding/gap — collapsing the wordmark to
   just the icon mark (kept, .nav-keep links stay reachable) is enough slack
   to avoid the whole page scrolling horizontally. */
@media (max-width: 480px) {
  .brand-name { display: none; }
  .nav { padding: 12px 16px; gap: 10px; }
  .nav-links { gap: 10px; }
}
