/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --raised:    #21262d;
  --border:    #30363d;
  --border-s:  #1c2128;

  --text:      #e6edf3;
  --muted:     #8b949e;
  --faint:     #5f656d;

  --accent:    #58a6ff;
  --accent-bg: rgba(88, 166, 255, 0.10);
  --amber:     #e3b341;
  --amber-bg:  rgba(227, 179, 65,  0.10);
  --green:     #3fb950;
  --green-bg:  rgba(63, 185, 80,   0.10);

  --r:   8px;
  --r-lg: 12px;
  --max: 800px;

  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* prevent blob bleed from causing horizontal scroll */
}

/* ── Utilities ─────────────────────────────────────────── */
.mono   { font-family: var(--mono); }
.muted  { color: var(--muted); }
.accent { color: var(--accent); }

/* ── Nav ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding: 14px 32px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-s);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}
.nav-brand-arrow { font-size: 17px; line-height: 1; }
.nav-brand-name {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--raised); }
.nav-link-gh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  border: 1px solid var(--border);
}
.nav-link-gh:hover { border-color: var(--muted); }

/* ── Hero ──────────────────────────────────────────────── */
.hero-wrap {
  position: relative;
  /* no overflow:hidden — let blobs bleed into adjacent sections for seamless transitions */
}
/* dot-grid texture */
.hero-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.038) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}
/* ambient blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.blob-1 {
  width: 600px; height: 500px;
  background: rgba(88, 166, 255, 0.09);
  top: -100px;
  left: calc(50% - 300px);
  animation: blob-float 9s ease-in-out infinite;
}
.blob-2 {
  width: 380px; height: 380px;
  background: rgba(227, 179, 65, 0.07);
  bottom: -60px; right: -40px;
  animation: blob-float 11s ease-in-out infinite reverse;
}
@keyframes blob-float {
  0%, 100% { transform: translateY(0)     scale(1);    }
  50%       { transform: translateY(-18px) scale(1.04); }
}
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 32px 72px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 16px;
  line-height: 1.75;
}
.icode {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 2px 7px;
  border-radius: 4px;
}
.hero-rule {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: inline-block;
  padding: 9px 20px;
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: var(--r);
  background: var(--accent-bg);
  margin: 22px auto 14px;
}
.hero-contrast {
  font-size: 14px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-contrast em {
  font-style: normal;
  color: var(--amber);
  font-weight: 600;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #79b8ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.35);
}

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

/* ── Pillars ───────────────────────────────────────────── */
.pillars-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px 72px;
}

.pillars {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.pillar {
  flex: 1;
  padding: 28px 24px;
  background: var(--surface);
}
.pillar-sep {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.pillar-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.pillar-text {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Generic section ───────────────────────────────────── */
.section {
  padding: 0 32px 72px;
  position: relative;
  /* no overflow:hidden — blobs flow seamlessly across section boundaries */
}
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* extra blob variants for non-hero sections */
.blob-3 {
  width: 480px; height: 480px;
  background: rgba(227, 179, 65, 0.06);
  top: 10%; left: -120px;
  animation: blob-float 13s ease-in-out infinite;
}
.blob-4 {
  width: 380px; height: 380px;
  background: rgba(88, 166, 255, 0.07);
  bottom: -80px; right: -60px;
  animation: blob-float 10s ease-in-out infinite reverse;
}
.blob-5 {
  width: 620px; height: 460px;
  background: rgba(88, 166, 255, 0.08);
  top: 20%; left: calc(50% - 310px);
  animation: blob-float 14s ease-in-out infinite;
}
.blob-6 {
  width: 360px; height: 360px;
  background: rgba(63, 185, 80, 0.06);
  top: -60px; left: -80px;
  animation: blob-float 12s ease-in-out infinite reverse;
}
.blob-7 {
  width: 340px; height: 340px;
  background: rgba(227, 179, 65, 0.05);
  bottom: -40px; right: -40px;
  animation: blob-float 9s ease-in-out infinite;
}
.blob-8 {
  width: 420px; height: 380px;
  background: rgba(88, 166, 255, 0.06);
  top: -100px; right: -100px;
  animation: blob-float 11s ease-in-out infinite reverse;
}

.section-title {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 16px;
}
.section-title em {
  font-style: normal;
  color: var(--accent);
}
.section-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.section-lead {
  font-size: 15px;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 32px;
}

/* ── Setup steps ───────────────────────────────────────── */
.steps {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  font-size: 14.5px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-s);
  transition: background 0.1s;
}
.steps li:last-child { border-bottom: none; }
.steps li:hover { background: var(--raised); }

.step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-bg);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.steps code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 1px 6px;
  border-radius: 4px;
}

.setup-note {
  font-size: 12.5px;
  color: var(--faint);
  font-family: var(--mono);
  line-height: 1.6;
}

/* ── Scope ─────────────────────────────────────────────── */
.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.scope-box {
  padding: 22px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
}
.scope-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}
.scope-label.in  { color: var(--green);  background: var(--green-bg);  }
.scope-label.out { color: var(--faint); background: rgba(72,79,88,0.2); }

.scope-box ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.scope-box li {
  font-size: 13.5px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}
.scope-box.in  li::before { content: '✓'; position: absolute; left: 0; color: var(--green);  font-size: 11px; top: 2px; }
.scope-box.out li::before { content: '—'; position: absolute; left: 0; color: var(--faint); font-size: 11px; top: 1px; }

.scope-note {
  font-size: 13px;
  color: var(--faint);
  font-style: italic;
  line-height: 1.65;
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-s);
  padding: 28px 32px;
  text-align: center;
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════
   DEMO MODAL — 3-column fixed layout
══════════════════════════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(1, 4, 9, 0.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: min(96vw, 1360px);
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.70);
}

/* ── Modal header (spans all columns) ─────────────────── */
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--raised);
  flex-shrink: 0;
}
.close-btn {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 4px 7px; border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}
.close-btn:hover { background: var(--border); color: var(--text); }

/* ── Column container ──────────────────────────────────── */
.modal-cols {
  display: flex;
  flex: 1;
  min-height: 0;
}

.col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* shared column header strip */
.col-hdr {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-s);
  background: var(--bg);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

/* ── LEFT column: problem ──────────────────────────────── */
.col-problem {
  width: 22%;
  min-width: 180px;
  border-right: 1px solid var(--border-s);
}
.problem-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 20px;
  min-height: 0;
}
.problem-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}
.problem-meta {
  font-size: 11px;
  color: var(--faint);
  margin-bottom: 14px;
}
.problem-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.problem-desc code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 1px 5px;
  border-radius: 3px;
}
.prob-section { margin-bottom: 16px; }
.prob-sec-hdr {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.prob-pre {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border-s);
  border-radius: 4px;
  padding: 8px 10px;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
}
.prob-constraints {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.prob-constraints li {
  font-size: 12px;
  color: var(--muted);
  padding-left: 12px;
  position: relative;
}
.prob-constraints li::before {
  content: '·';
  position: absolute; left: 0;
  color: var(--faint);
}

/* ── MIDDLE column: slideshow ──────────────────────────── */
.col-middle {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--border-s);
}
.exchanges-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  min-height: 0;
}
.exchanges {
  display: flex; flex-direction: column; gap: 12px;
}
.exchange { display: flex; flex-direction: column; gap: 5px; }
.exchange-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.exchange-role.coach { color: var(--amber); }
.exchange-role.user  { color: var(--accent); }
.exchange-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 2px solid var(--border);
}
.exchange.coach .exchange-text {
  border-left-color: var(--amber);
  background: rgba(227,179,65,0.04);
}
.exchange.user .exchange-text {
  border-left-color: var(--accent);
  background: rgba(88,166,255,0.04);
}
.exchange-text strong { color: var(--amber); font-weight: 600; }
.exchange-text code {
  font-family: var(--mono); font-size: 12px;
  color: var(--amber); background: var(--amber-bg);
  padding: 1px 5px; border-radius: 3px;
}
.exchange-text pre {
  font-family: var(--mono); font-size: 11.5px;
  background: var(--bg); color: var(--muted);
  padding: 14px; border-radius: 6px;
  overflow-x: auto; margin-top: 10px;
  border: 1px solid var(--border-s);
  line-height: 1.55; white-space: pre;
}

/* narrator strip */
.narrator-bar {
  border-top: 1px solid var(--border-s);
  padding: 11px 20px;
  background: var(--bg);
  flex-shrink: 0;
}
.narrator-text {
  font-size: 12.5px; color: var(--muted);
  font-style: italic; line-height: 1.6;
}

/* footer nav */
.modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--border-s);
  background: var(--raised);
  flex-shrink: 0;
}
.nav-btn {
  font-size: 12px; color: var(--muted);
  background: none; border: 1px solid var(--border);
  padding: 6px 14px; border-radius: var(--r);
  cursor: pointer; transition: all 0.1s;
}
.nav-btn:hover:not(:disabled) {
  background: var(--raised); color: var(--text); border-color: var(--muted);
}
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.dots { display: flex; gap: 6px; align-items: center; }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}
.dot.active { background: var(--accent); transform: scale(1.4); }

/* ── RIGHT column: viz + code ──────────────────────────── */
.col-right {
  width: 30%;
  min-width: 220px;
}

/* approach badge */
.approach-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-s);
  flex-shrink: 0;
}
.approach-badge.correct { color: var(--green);  background: var(--green-bg); }
.approach-badge.wrong   { color: #f85149;        background: rgba(248,81,73,0.08); }
.approach-badge.pending { color: var(--faint);   background: transparent; }

/* viz panel */
.viz-panel {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border-s);
  flex-shrink: 0;
}

/* array rows */
.arr-row {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  margin-bottom: 5px;
  overflow-x: auto;
}
.arr-cell {
  min-width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--faint);
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.arr-cell.in-win {
  background: rgba(88,166,255,0.12);
  border-color: var(--accent);
  color: var(--text);
}
.arr-cell.in-win.is-zero {
  background: rgba(227,179,65,0.18);
  border-color: var(--amber);
  color: var(--amber);
}
.ptr-row {
  display: flex;
  gap: 3px;
  margin-bottom: 8px;
  overflow-x: auto;
}
.ptr-cell {
  min-width: 26px;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  min-height: 14px;
  flex-shrink: 0;
}
.ptr-l  { color: var(--accent); }
.ptr-r  { color: var(--amber); }
.ptr-lr { color: var(--green); }

.viz-vars {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.viz-var {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}
.viz-var em { font-style: normal; color: var(--accent); margin-left: 3px; }

.viz-note {
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.55;
  font-style: italic;
}

/* code panel */
.code-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.code-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 12px 14px;
}
#code-content {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre;
  margin: 0;
}
#code-content.code-placeholder {
  color: var(--faint);
  font-style: italic;
}

/* ── Gates grid (expandable cards) ────────────────────── */
.gates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.18s;
}
.gate-card:hover   { border-color: var(--muted); }
.gate-card[open]   { border-color: var(--accent); }
.gate-card-full    { grid-column: 1 / -1; }

.gate-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}
.gate-summary::-webkit-details-marker { display: none; }
.gate-summary::marker { display: none; }

.gate-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gate-summary-body { flex: 1; min-width: 0; }
.gate-summary-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.gate-summary-teaser {
  font-size: 11.5px;
  color: var(--faint);
  font-family: var(--mono);
}
.gate-chevron {
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s, color 0.18s;
  flex-shrink: 0;
}
.gate-card[open] .gate-chevron { transform: rotate(90deg); color: var(--accent); }

.gate-body-inner {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border-s);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gate-q {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  background: var(--amber-bg);
  border-left: 2px solid var(--amber);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  line-height: 1.65;
}
.gate-clears {
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.6;
}
.gate-example {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-s);
  padding-top: 12px;
}
.gate-ex {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 7px 10px;
  border-radius: 5px;
  line-height: 1.55;
}
.gate-ex.fail {
  color: #f85149;
  background: rgba(248,81,73,0.07);
  border-left: 2px solid rgba(248,81,73,0.35);
}
.gate-ex.pass {
  color: var(--green);
  background: var(--green-bg);
  border-left: 2px solid rgba(63,185,80,0.35);
}

/* ── Invariant Card ─────────────────────────────────────── */
.card-block {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.75;
  margin: 0;
}

/* ── Scope example labels ───────────────────────────────── */
.scope-eg {
  display: block;
  font-size: 11px;
  color: var(--faint);
  font-style: italic;
  margin-top: 2px;
}

/* ── Scroll offset for sticky nav ──────────────────────── */
#gates, #card, #scope, #setup { scroll-margin-top: 72px; }

/* ── Halo glow button ──────────────────────────────────── */
@keyframes halo-pulse {
  0%, 100% { box-shadow: 0 0 10px 2px rgba(88,166,255,0.30), 0 4px 16px rgba(88,166,255,0.18); }
  50%       { box-shadow: 0 0 22px 7px rgba(88,166,255,0.52), 0 4px 28px rgba(88,166,255,0.36); }
}
.btn-halo { animation: halo-pulse 2.6s ease-in-out infinite; }
.btn-nav  { padding: 6px 14px; font-size: 12px; margin-left: 8px; }

/* ── Syntax highlight colors ───────────────────────────── */
.hl-kw      { color: #79b8ff; }
.hl-type    { color: #e3b341; }
.hl-num     { color: #b5cea8; }
.hl-comment { color: #5f656d; font-style: italic; }

/* ── Code lines in right panel ─────────────────────────── */
.code-line { display: block; }
.code-line.bug {
  background: rgba(227,179,65,0.17);
  border-left: 2px solid #e3b341;
  margin-left: -14px;
  padding-left: 12px;
}
.code-line.good {
  background: var(--green-bg);
  border-left: 2px solid var(--green);
  margin-left: -14px;
  padding-left: 12px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 700px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero { padding: 64px 20px 56px; }
  .section { padding: 0 20px 56px; }
  .scope-grid { grid-template-columns: 1fr; }
  .gates-grid { grid-template-columns: 1fr; }
  .gate-card-full { grid-column: unset; }
  .gate-q { font-size: 11px; }
  .gate-ex { font-size: 11px; }
  .card-block { font-size: 11px; padding: 18px 16px; }
  .hero-rule { font-size: 11.5px; }
  /* modal: stack columns vertically on small screens */
  .modal { height: 95vh; width: 98vw; }
  .modal-cols { flex-direction: column; }
  .col-problem { width: 100%; height: 180px; min-width: unset; border-right: none; border-bottom: 1px solid var(--border-s); }
  .col-middle { flex: 1; min-height: 0; border-right: none; }
  .col-right { width: 100%; height: 260px; min-width: unset; }
}
