/* ===== SQLCase design system — dark, with a white & yellow brand accent ===== */
:root {
  --bg: #0b0e14;
  --bg-elev-1: #11151f;
  --bg-elev-2: #171c29;
  --bg-elev-3: #1e2433;
  --border: #262d3f;
  --border-soft: #1c2230;
  --text: #f4f2ea;
  --text-dim: #9aa3b8;
  --text-faint: #6b7590;
  --accent: #f4c430;
  --accent-strong: #ffd84d;
  --accent-ink: #f4c430;
  --accent-on: #1f1600;
  --accent-glow: rgba(244, 196, 48, 0.2);
  --amber: #f0b429;
  --red: #f2545b;
  --green: #35d07f;
  --blue: #5b8def;
  --code-bg: #0d1117;
  --code-text: #e7eaf3;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --level-beginner: #35d07f;
  --level-intermediate: #f0b429;
  --level-advanced: #f2545b;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--font-mono); }
::selection { background: var(--accent-glow); color: var(--text); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 840px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; position: relative; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-weight: 600; font-size: 14.5px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-cta {
  background: var(--accent); color: var(--accent-on) !important; padding: 9px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
}
.nav-cta:hover { background: var(--accent-strong); text-decoration: none; }
.nav-toggle-cb { display: none; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; cursor: pointer; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { box-shadow: 0 0 0 4px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent-strong); color: var(--accent-ink); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary:disabled { animation: btn-loading-pulse 1.4s ease-in-out infinite; }
@keyframes btn-loading-pulse { 0%, 100% { opacity: .45; } 50% { opacity: .75; } }

/* ---------- hero ---------- */
.hero { padding: 88px 0 64px; position: relative; overflow: hidden; }
.hero-inner { position: relative; text-align: center; max-width: 780px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--accent-ink); background: rgba(244, 196, 48, .18); border: 1px solid rgba(244, 196, 48, .35);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: 52px; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 20px; font-weight: 800; }
.hero h1 .accent { color: var(--accent-ink); }
.hero p.lede { font-size: 19px; color: var(--text-dim); margin: 0 0 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 56px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .n { font-size: 30px; font-weight: 800; color: var(--text); }
.hero-stat .l { font-size: 13px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }


/* ---------- level cards on homepage ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 32px; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-dim); font-size: 16px; margin: 0; }

.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.level-card {
  background: linear-gradient(180deg, var(--bg-elev-1), var(--bg-elev-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  transition: transform .18s ease, border-color .18s ease;
  display: block;
}
.level-card:hover { transform: translateY(-4px); text-decoration: none; }
.level-badge {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.level-badge.beginner { background: rgba(53,208,127,.14); color: var(--level-beginner); }
.level-badge.intermediate { background: rgba(240,180,41,.14); color: var(--level-intermediate); }
.level-badge.advanced { background: rgba(242,84,91,.14); color: var(--level-advanced); }
.level-card h3 { font-size: 22px; margin: 0 0 10px; color: var(--text); }
.level-card p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 20px; }
.level-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-faint); }
.progress-bar { height: 6px; border-radius: 999px; background: var(--bg-elev-3); overflow: hidden; margin-top: 14px; }
.progress-bar > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }

/* ---------- case list ---------- */
.module-block { margin-bottom: 40px; }
.module-title {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); margin: 0 0 16px; display: flex; align-items: center; gap: 10px;
}
.module-title::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.case-card {
  background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px; display: block; position: relative; transition: border-color .15s ease, transform .15s ease;
}
.case-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.case-card .num { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); font-weight: 700; }
.case-card h4 { font-size: 16.5px; margin: 6px 0 10px; color: var(--text); line-height: 1.35; }
.case-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; font-weight: 700; color: var(--text-dim); background: var(--bg-elev-3);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 6px;
}
.case-card .check {
  position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 999px;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent;
}
.case-card.completed .check { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }

/* ---------- breadcrumb / case header ---------- */
.breadcrumb { font-size: 13.5px; color: var(--text-faint); padding: 20px 0 0; }
.breadcrumb a { color: var(--text-dim); }
.case-hero { padding: 28px 0 20px; border-bottom: 1px solid var(--border-soft); }
.case-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.case-hero .level-badge { margin-bottom: 0; }
.case-progress-label { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--text-faint); letter-spacing: 0.02em; }
.case-hero h1 { font-size: 34px; margin: 0 0 10px; letter-spacing: -0.01em; }
.case-hero .concepts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.journey-bar { margin-top: 18px; height: 4px; border-radius: 999px; background: var(--bg-elev-3); overflow: hidden; }
.journey-bar div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 999px; transition: width .3s ease; }

/* ---------- story ---------- */
.story-box {
  background: var(--bg-elev-1); border: 1px solid var(--border-soft); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 22px 24px; margin: 28px 0; color: var(--text-dim); font-size: 15.5px;
}
.story-box p { margin: 0 0 10px; }
.story-box p:last-child { margin-bottom: 0; }
.story-box .quote { color: var(--text); font-style: italic; }

/* ---------- course-complete finale ---------- */
.finale-banner {
  text-align: center; padding: 56px 24px 40px;
  background: radial-gradient(ellipse at top, var(--accent-glow), transparent 70%);
  border-radius: var(--radius);
}
.finale-banner .finale-emoji { font-size: 52px; line-height: 1; margin-bottom: 14px; }
.finale-banner h1 { font-size: 38px; margin: 0 0 12px; }
.finale-banner p { color: var(--text-dim); font-size: 17px; max-width: 560px; margin: 0 auto; line-height: 1.6; }
.share-banner {
  text-align: center; background: var(--bg-elev-1); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 36px 24px; margin: 36px 0;
}
.share-banner h2 { font-size: 22px; margin: 0 0 8px; }
.share-banner p { color: var(--text-dim); margin: 0 0 18px; font-size: 15px; }
.share-link-box {
  display: inline-flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px 10px 22px; font-family: var(--font-mono); font-size: 15px; color: var(--accent-ink);
}
.copy-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer; padding: 0;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-faint); }
.copy-btn .icon-check { display: none; color: var(--green); }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }
.copy-btn.copied { border-color: var(--green); }
.copy-btn .copy-feedback {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--bg-elev-3); color: var(--text); font-size: 12px; font-weight: 600; font-family: var(--font-sans);
  padding: 4px 10px; border-radius: var(--radius-sm); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
}
.copy-btn.copied .copy-feedback { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- schema panel ---------- */
.schema-panel { margin: 24px 0; }
.schema-tables { display: flex; gap: 14px; flex-wrap: wrap; }
.schema-tables.schema-tables-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.schema-table { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; min-width: 220px; }
.schema-table .t-name { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--accent-ink); padding: 10px 14px; background: var(--bg-elev-2); border-bottom: 1px solid var(--border); }
.schema-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.schema-table th, .schema-table td { padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--border-soft); font-family: var(--font-mono); white-space: nowrap; }
.schema-table th { color: var(--text-faint); font-weight: 600; font-size: 11px; text-transform: uppercase; }
.schema-table td { color: var(--text-dim); }
.schema-table tr:last-child td { border-bottom: none; }
.schema-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }

/* ---------- challenge card ---------- */
.challenge { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius); margin: 22px 0; overflow: hidden; box-shadow: var(--shadow); transition: border-color .3s ease, box-shadow .3s ease; }
.challenge.solved { border-color: rgba(53, 208, 127, 0.35); }
.challenge.just-solved { animation: solved-glow 0.9s ease; }
@keyframes solved-glow {
  0% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0.5), var(--shadow); }
  40% { box-shadow: 0 0 0 8px rgba(53, 208, 127, 0), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}
.challenge-head { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: 12px; }
.challenge-head .title { display: flex; align-items: center; gap: 12px; }
.challenge-num { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); font-weight: 700; flex-shrink: 0; }
.challenge-head h3 { font-size: 16.5px; margin: 0; color: var(--text); }
.challenge-status { width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; transition: background .3s ease, border-color .3s ease, transform .3s ease; }
.challenge.solved .challenge-status { background: var(--green); border-color: var(--green); color: #052b12; }
.challenge.just-solved .challenge-status { transform: scale(1.25); }
.challenge-body { display: none; padding: 0 24px 24px; }
.challenge.open .challenge-body { display: block; }

.question-box { background: var(--bg-elev-2); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 16px; font-size: 15px; color: var(--text); border: 1px solid var(--border-soft); }
.question-box strong { color: var(--accent-ink); }

.editor-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.editor-wrap:has(.CodeMirror-focused) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg-elev-2); border-bottom: 1px solid var(--border); }
.CodeMirror { height: auto; font-family: var(--font-mono); font-size: 14px; background: var(--code-bg) !important; padding: 4px 0; }
.CodeMirror-gutters { background: var(--code-bg) !important; border: none !important; }
.CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler { display: none !important; }
.CodeMirror-scroll { overflow-x: hidden !important; height: auto !important; min-height: 120px; max-height: 420px; }
.CodeMirror-placeholder { color: var(--text-faint) !important; font-style: italic; }

.run-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.feedback { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-top: 4px; display: none; }
.feedback.show { display: block; }
.feedback.ok { background: rgba(53,208,127,.12); color: var(--green); border: 1px solid rgba(53,208,127,.3); }
.feedback.bad { background: rgba(242,84,91,.12); color: var(--red); border: 1px solid rgba(242,84,91,.3); }
.feedback.info { background: rgba(91,141,239,.12); color: var(--blue); border: 1px solid rgba(91,141,239,.3); }

.result-table-wrap { overflow: auto; max-height: 232px; margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.result-table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-family: var(--font-mono); }
.result-table th, .result-table td { padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.result-table th { position: sticky; top: 0; z-index: 1; background: var(--bg-elev-2); color: var(--text-faint); text-transform: uppercase; font-size: 11px; }
.result-table td { color: var(--text-dim); }
.result-table tr:last-child td { border-bottom: none; }
.result-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.result-table tbody tr:hover td { background: rgba(244, 196, 48, 0.05); color: var(--text); }
.result-empty { padding: 16px; color: var(--text-faint); font-size: 13.5px; font-style: italic; }

/* Run / Get a hint / Show final query double as tab selectors - the last one clicked stays
   visually pressed, showing which of the three panels below is currently open. */
.btn-ghost.active { background: var(--bg-elev-3); border-color: var(--accent); color: var(--accent-ink); }
.run-row .btn.has-content:not(.active)::after {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); margin-left: 8px; vertical-align: middle;
}

.output-panels { margin-top: 14px; }
.output-pane { display: none; }
.output-pane.active { display: block; }

.hints-panel {
  padding: 4px 16px; background: var(--bg-elev-2);
  border: 1px solid var(--border-soft); border-left: 3px solid var(--amber); border-radius: var(--radius-sm);
}
.hint-line { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--border-soft); font-size: 14.5px; color: var(--text-dim); transition: opacity .35s ease, transform .35s ease; }
.hint-line:first-child { border-top: none; }
.hint-line .bulb { flex-shrink: 0; }
.hint-line .quote-text { color: var(--text); font-style: italic; }
.hint-line.hint-enter { opacity: 0; transform: translateY(-6px); }
.sql-kw {
  font-family: var(--font-mono); font-size: 0.92em; font-weight: 600; color: var(--accent-ink);
  background: rgba(244, 196, 48, 0.12); padding: 1px 5px; border-radius: 4px; white-space: nowrap;
}

.solution-panel {
  padding: 16px; background: var(--bg-elev-2);
  border: 1px solid var(--border-soft); border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
}
.solution-panel .solution-code { margin: 0; }
.solution-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 8px; }
.solution-code { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; font-family: var(--font-mono); font-size: 13.5px; color: var(--text); white-space: pre; overflow-x: auto; line-height: 1.6; }
.solution-result { margin-top: 8px; }

.explanation-box { margin-top: 16px; padding: 16px 18px; background: rgba(244, 196, 48, .12); border: 1px solid rgba(244, 196, 48, .3); border-radius: var(--radius-sm); font-size: 14.5px; color: var(--text-dim); display: none; }
.explanation-box.show { display: block; }
.explanation-box p { margin: 0 0 8px; }
.explanation-box p:last-child { margin-bottom: 0; }
.explanation-box .quote-text { color: var(--text); }
.debrief-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.debrief-concept {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(244, 196, 48, .3);
  padding: 3px 10px; border-radius: 999px;
}
.debrief-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.debrief-list li { position: relative; padding-left: 24px; line-height: 1.55; }
.debrief-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--accent-ink); font-weight: 700; }
.debrief-sublist { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.debrief-sublist li { position: relative; padding-left: 20px; margin-left: 8px; line-height: 1.5; font-size: 14px; color: var(--text-dim); }
.debrief-sublist li::before { content: '–'; position: absolute; left: 0; top: 0; color: var(--text-faint); font-weight: 400; }

/* ---------- tier recap pages ---------- */
.recap-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.recap-list li { position: relative; padding-left: 24px; line-height: 1.55; font-size: 14.5px; color: var(--text-dim); }
.recap-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--accent-ink); font-weight: 700; }
.recap-list li strong { color: var(--text); }
.recap-list li a { color: var(--text-faint); font-size: 13px; margin-left: 6px; white-space: nowrap; }

/* ---------- case footer / nav ---------- */
.case-complete-banner { text-align: center; padding: 48px 24px; background: linear-gradient(180deg, var(--bg-elev-1), transparent); border-radius: var(--radius); margin: 40px 0; }
.case-complete-banner h2 { font-size: 26px; margin: 0 0 10px; }
.case-complete-banner p { color: var(--text-dim); margin: 0 0 24px; }
.case-nav { display: flex; justify-content: space-between; align-items: center; padding: 32px 0 60px; gap: 16px; }
.case-nav a { flex: 1; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.case-nav a:hover { border-color: var(--accent); text-decoration: none; }
.case-nav .dir { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.case-nav .title { color: var(--text); font-weight: 700; margin-top: 4px; }
.case-nav .next { text-align: right; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 48px 0; margin-top: 60px; color: var(--text-faint); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-faint); }
.footer-links a:hover { color: var(--text); }

/* ---------- misc ---------- */
.pill-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.kbd { font-family: var(--font-mono); background: var(--bg-elev-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12px; }
.progress-mini { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; z-index: 999; background: var(--accent); color: var(--accent-on); padding: 8px 14px; border-radius: 8px; }

@media (max-width: 900px) {
  .level-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-elev-1); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links a { padding: 14px 24px; border-top: 1px solid var(--border-soft); }
  .nav-links .nav-cta { margin: 14px 24px; text-align: center; }
  .nav-toggle-cb:checked ~ .nav-links { max-height: 400px; }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle span { transition: transform .2s ease, opacity .2s ease; }
  .schema-tables.schema-tables-grid-2 { grid-template-columns: 1fr; }
}

/* ===================================================================
   V2 HOMEPAGE MOCKUP (/home-v2) — additive only. Nothing above this
   line is modified for V2; every rule below is scoped to a .v2- class
   or an element that only exists on the V2 template, so the live
   homepage and every other page are unaffected.
   =================================================================== */
.v2-brand-sql { color: var(--accent-ink); }
.v2-brand-case { color: var(--text); }

.v2-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.v2-preview-left, .v2-preview-right { min-width: 0; }
.v2-preview-title { font-size: 20px; margin: 10px 0 14px; color: var(--text); }
.v2-preview-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; font-weight: 700; }

.v2-timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; margin-top: 16px; }
.v2-timeline::before { content: ''; position: absolute; top: 19px; left: 6%; right: 6%; height: 1px; background: var(--border); }
.v2-timeline-step { position: relative; padding: 0 14px; text-align: center; }
.v2-timeline-num {
  width: 38px; height: 38px; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--accent);
  color: var(--accent-ink); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; margin: 0 auto 14px; position: relative; z-index: 1;
}
.v2-timeline-body h3 { font-size: 14.5px; margin: 0 0 6px; color: var(--text); }
.v2-timeline-body p { font-size: 13px; color: var(--text-dim); margin: 0; line-height: 1.55; }

.v2-topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.v2-topic { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.v2-topic h3 { font-size: 14.5px; margin: 0 0 6px; color: var(--accent-ink); }
.v2-topic p { font-size: 12.5px; color: var(--text-dim); margin: 0; font-family: var(--font-mono); line-height: 1.5; }

.v2-audience-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.v2-audience h3 { font-size: 15px; margin: 0 0 8px; color: var(--text); }
.v2-audience h3::before { content: ''; display: block; width: 28px; height: 2px; background: var(--accent); margin-bottom: 12px; }
.v2-audience p { font-size: 13.5px; color: var(--text-dim); margin: 0; line-height: 1.55; }

.v2-faq { display: flex; flex-direction: column; gap: 10px; }
.v2-faq-item { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 20px; }
.v2-faq-item summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 15px; color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.v2-faq-item summary::-webkit-details-marker { display: none; }
.v2-faq-item summary::after { content: '+'; color: var(--accent-ink); font-size: 20px; font-weight: 400; transition: transform .2s ease; flex-shrink: 0; }
.v2-faq-item[open] summary::after { transform: rotate(45deg); }
.v2-faq-item p { margin: 0 0 18px; color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .v2-preview { grid-template-columns: 1fr; padding: 18px; }
  .v2-timeline { grid-template-columns: 1fr; gap: 22px; }
  .v2-timeline::before { display: none; }
  .v2-timeline-step { text-align: left; display: flex; gap: 14px; padding: 0; }
  .v2-timeline-num { margin: 0; flex-shrink: 0; }
  .v2-topic-grid { grid-template-columns: repeat(2, 1fr); }
  .v2-audience-grid { grid-template-columns: repeat(2, 1fr); }
}
