@import url("https://fonts.googleapis.com/css2?family=Bangers&family=Comic+Neue:wght@400;700&family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  /* Light theme — cool paper + deep sky (not purple, not cream) */
  --bg: #f3f6f9;
  --bg2: #e9eef4;
  --panel: #ffffff;
  --panel-2: #f0f4f8;
  --text: #1a2433;
  --muted: #5a6b7d;
  --accent: #176f9e;
  --accent-dim: rgba(23, 111, 158, 0.1);
  --accent-2: #8f6a18;
  --warn: #8f6a18;
  --ok: #1b7d56;
  --bad: #c23d4a;
  --line: #d0dae6;
  --code-bg: #1e2836;
  --code-inline-bg: #e4eef5;
  --code-inline-text: #0a4d70;
  --code-text: #e8eef5;
  --shadow: 0 10px 28px rgba(26, 36, 51, 0.08);
  --radius: 14px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --topbar-bg: rgba(255, 255, 255, 0.92);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 50% at 10% -10%, rgba(23, 111, 158, 0.07), transparent 50%),
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(143, 106, 24, 0.05), transparent 45%),
    var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.92rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.hero {
  padding: 2.5rem 0 1rem;
  animation: fadeUp 0.6s ease both;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--warn);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
}
h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  color: var(--text);
  font-weight: 600;
}
.lede {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 42rem;
  margin: 0 0 1.4rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; filter: brightness(1.08); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #ffffff;
}
.btn.ghost { background: transparent; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.card {
  display: block;
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
  animation: fadeUp 0.55s ease both;
}
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  text-decoration: none;
}
.card .num {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0 0 0.7rem; font-size: 0.95rem; }
.card ul { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 1rem; }

h2 { font-size: 1.45rem; margin: 2.4rem 0 0.7rem; letter-spacing: -0.02em; color: var(--text); }
h3 { font-size: 1.1rem; margin: 1.4rem 0 0.5rem; color: var(--text); }

.hint { color: var(--muted); }
.callout {
  border-radius: 12px;
  padding: 0.95rem 1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  background: var(--panel);
}
.callout.tip { border-left: 4px solid var(--accent); }
.callout.warn { border-left: 4px solid var(--warn); background: rgba(255, 176, 32, 0.08); }
.callout.ok { border-left: 4px solid var(--ok); background: rgba(61, 214, 140, 0.08); }
.callout.bad { border-left: 4px solid var(--bad); background: rgba(255, 107, 122, 0.08); }
.callout strong { display: block; margin-bottom: 0.25rem; }

.step {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.15rem 1.2rem 1.25rem;
  margin: 1.4rem 0;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s ease both;
}
.step + .step { margin-top: 1.6rem; }
.step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.step-num {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0c141c;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(41, 181, 232, 0.5);
  animation: pulseRing 2.2s ease infinite;
}
.step h3 { margin: 0; }
.step p { color: var(--muted); margin: 0.35rem 0 0.8rem; }
.checklist { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.checklist li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.7rem;
  color: var(--muted);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
}

/* Action strip — separates “story” from “do this SQL” */
.action-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.85rem 0 0.35rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(23, 111, 158, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
}
.action-hint::before {
  content: "▸";
  font-size: 0.95rem;
  color: var(--accent-2);
  font-weight: 700;
  line-height: 1.4;
  flex: 0 0 auto;
}

.code-block {
  position: relative;
  margin: 0.5rem 0 1.1rem;
  border: 1px solid rgba(94, 184, 232, 0.35);
  border-radius: 12px;
  background: var(--code-bg);
  overflow: visible;
  box-shadow: 0 0 0 1px rgba(94, 184, 232, 0.08);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem 0.55rem 0.9rem;
  border-bottom: 1px solid #2a3544;
  background: #252f3d;
  border-radius: 12px 12px 0 0;
  font-size: 0.8rem;
  color: #9aabbd;
  position: sticky;
  top: 3.25rem;
  z-index: 5;
}
.code-head span {
  font-weight: 600;
  color: var(--muted);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  border: none;
  background: var(--accent);
  color: #12202a;
  border-radius: 9px;
  padding: 0.5rem 0.9rem;
  min-height: 40px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sans);
  box-shadow: 0 2px 8px rgba(94, 184, 232, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}
.copy-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: #0c141c;
  border: none;
}
.copy-btn:active { transform: translateY(0); }
.copy-btn.copied {
  background: var(--ok);
  color: #0c141c;
  box-shadow: 0 2px 8px rgba(78, 207, 150, 0.35);
}
.copy-btn svg {
  flex-shrink: 0;
}
/* Floating copy on the code itself (always visible while scrolling code) */
.copy-fab {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 4;
  display: none; /* shown when no sticky head on some blocks */
}
.code-block.has-fab .copy-fab { display: inline-flex; }
.code-block pre {
  margin: 0;
  padding: 1rem 1.05rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.6;
  border-radius: 0 0 12px 12px;
  -webkit-overflow-scrolling: touch;
}
.code-block code {
  color: var(--code-text);
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Inline code chips — soft sky on slate (NOT neon mint) */
:not(pre) > code {
  font-family: var(--mono);
  background: var(--code-inline-bg);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--code-inline-text);
  font-size: 0.88em;
  font-weight: 500;
}

/* Fake Snowsight UI mock */
.ui-mock {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.ui-mock-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--text);
}
.ui-chip.glow {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  animation: chipPulse 1.6s ease infinite;
}
.ui-chip .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}
.ui-mock-body { padding: 0.9rem; }
.ui-tree {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}
.ui-tree .hl { color: var(--accent); font-weight: 600; }
.ui-result {
  margin-top: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.ui-result table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 0;
}
.ui-result th, .ui-result td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
}
.ui-result th { background: var(--panel); color: var(--muted); }
.badge-fail {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 107, 122, 0.12);
  color: var(--bad);
  font-size: 0.82rem;
  font-weight: 600;
}
.badge-ok {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(61, 214, 140, 0.12);
  color: var(--ok);
  font-size: 0.82rem;
  font-weight: 600;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0;
}
.flow .node {
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 0.85rem;
  font-weight: 600;
}
.flow .node.accent { border-color: var(--accent); color: var(--accent); }
.flow .arrow {
  color: var(--muted);
  animation: slideArrow 1.4s ease infinite;
}

.progress-track {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0 0.5rem;
  flex-wrap: wrap;
}
.progress-track span {
  width: 2.2rem;
  height: 0.35rem;
  border-radius: 99px;
  background: var(--line);
}
.progress-track span.on { background: var(--accent); }

table.plain {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.92rem;
}
table.plain th, table.plain td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.5rem;
  text-align: left;
}
table.plain th { color: var(--muted); }

.soundbite {
  border: 1px dashed rgba(41, 181, 232, 0.45);
  background: var(--accent-dim);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
  font-size: 1.02rem;
}

/* Interviewer presses further — required on every lab */
.drill-wrap {
  border-color: rgba(201, 164, 92, 0.45);
  background:
    linear-gradient(160deg, rgba(201, 164, 92, 0.1), transparent 40%),
    var(--panel);
}
.drill-wrap > p { margin: 0 0 0.85rem; }
.drill {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 0.65rem 0.85rem;
  margin: 0.45rem 0;
}
.drill summary {
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
  list-style: none;
}
.drill summary::-webkit-details-marker { display: none; }
.drill summary::before {
  content: "▸ ";
  color: #8f6a18;
  font-weight: 800;
}
.drill[open] summary::before { content: "▾ "; }
.drill-say {
  margin: 0.65rem 0 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #e8f1f7;
  border: 1px solid #c5d5e3;
  color: #122433;
  font-size: 0.92rem;
  line-height: 1.5;
}
.drill-say strong { color: var(--accent-2); }

/* Teach-then-run: explain code before copy */
.explain {
  margin: 1rem 0 0.4rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(41, 181, 232, 0.07);
  border: 1px solid rgba(41, 181, 232, 0.22);
}
.explain h4 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  color: var(--accent);
  font-weight: 700;
}
.explain p { margin: 0.4rem 0; color: var(--muted); font-size: 0.95rem; }
.explain ul { margin: 0.4rem 0 0; padding-left: 1.15rem; color: var(--muted); font-size: 0.93rem; }
.explain li { margin: 0.25rem 0; }
.explain .why {
  display: block;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
  color: var(--warn);
  font-size: 0.9rem;
}
.gloss {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
}
.gloss th, .gloss td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.4rem;
  text-align: left;
  vertical-align: top;
}
.gloss th { color: var(--muted); font-weight: 600; width: 42%; }
.gloss code { font-size: 0.8em; word-break: break-all; }
.chunk-label {
  display: inline-block;
  margin: 1.1rem 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* Story narration */
.story {
  margin: 1rem 0 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
}
.reading-rail {
  max-width: 42rem; /* comfortable measure for story prose */
}
.step .story p,
.wrap > .story p {
  max-width: 40rem;
}
.story .story-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--warn);
  margin: 0 0 0.5rem;
}
.story p {
  margin: 0.45rem 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.65;
}
.story p:first-of-type { margin-top: 0; }
.story .cast {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
}
.story .cast li {
  padding: 0.25rem 0 0.25rem 1.1rem;
  position: relative;
}
.story .cast li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(41, 181, 232, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(41, 181, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(41, 181, 232, 0); }
}
@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-dim); }
  50% { box-shadow: 0 0 0 6px rgba(41, 181, 232, 0.08); }
}
@keyframes slideArrow {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(4px); opacity: 1; }
}

/* ========== Mobile / small screens ========== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 900px) {
  .wrap {
    padding: 1rem 1rem 3rem;
    max-width: 100%;
  }
  .topbar-inner {
    max-width: 100%;
    padding: 0.65rem 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }
  .nav-links a {
    flex: 0 0 auto;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .nav-links a.active {
    border-color: var(--accent);
    color: var(--accent);
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .brand {
    font-size: 1.05rem;
  }
  .hero {
    padding: 1.25rem 0 0.5rem;
  }
  h1 {
    font-size: 1.65rem;
    line-height: 1.2;
    word-wrap: break-word;
  }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1.05rem; }
  .lede {
    font-size: 1rem;
    max-width: none;
  }
  .cta-row {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px; /* touch target */
    padding: 0.85rem 1rem;
  }
  .pager {
    flex-direction: column;
  }
  .pager .btn { width: 100%; }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .card {
    padding: 1rem;
  }

  .step {
    padding: 0.95rem 0.85rem 1.05rem;
    margin: 1rem 0;
  }
  .step-head {
    gap: 0.65rem;
  }
  .step-num {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.9rem;
  }

  .flow {
    flex-direction: column;
    align-items: stretch;
  }
  .flow .arrow {
    transform: rotate(90deg);
    align-self: center;
  }
  .flow .node {
    text-align: center;
  }

  .callout, .explain, .soundbite {
    padding: 0.85rem 0.8rem;
    font-size: 0.95rem;
  }

  /* Tables scroll horizontally instead of crushing */
  .explain,
  .callout,
  .step,
  .ui-mock-body {
    overflow-x: auto;
  }
  table.plain,
  .gloss,
  .ui-result table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  table.plain tbody,
  table.plain thead,
  table.plain tr,
  .gloss tbody,
  .gloss thead,
  .gloss tr,
  .ui-result table tbody,
  .ui-result table thead,
  .ui-result table tr {
    white-space: normal;
  }
  .gloss th { width: auto; min-width: 7.5rem; }
  .gloss td { min-width: 10rem; }
  table.plain th,
  table.plain td,
  .gloss th,
  .gloss td {
    padding: 0.5rem 0.45rem;
    font-size: 0.84rem;
  }

  .code-block {
    margin: 0.65rem 0 1rem;
    border-radius: 10px;
  }
  .code-head {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.55rem 0.6rem;
    position: sticky;
    top: 0;
  }
  .code-head span {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 0.75rem;
    line-height: 1.35;
  }
  .copy-btn {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
  }
  .action-hint {
    font-size: 0.78rem;
    padding: 0.5rem 0.65rem;
  }
  .code-block pre {
    padding: 0.8rem 0.75rem;
    font-size: 0.76rem;
    line-height: 1.55;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  code {
    word-break: break-word;
  }

  .ui-mock-bar {
    gap: 0.35rem;
    padding: 0.55rem 0.6rem;
  }
  .ui-chip {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
    max-width: 100%;
  }

  .footer {
    padding: 1.25rem 1rem 2.5rem;
    font-size: 0.85rem;
  }

  details.callout summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 380px) {
  h1 { font-size: 1.45rem; }
  .code-block pre { font-size: 0.7rem; }
  .nav-links a {
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
  }
}

/* BEFORE / AFTER problem→solution screens */
.ba-grid {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}
@media (min-width: 860px) {
  .ba-grid { grid-template-columns: 1fr 1fr; }
}
.ba-panel {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ba-panel.before { border-color: rgba(224, 128, 134, 0.55); }
.ba-panel.after { border-color: rgba(91, 191, 150, 0.55); }
.ba-panel img {
  display: block;
  width: 100%;
  height: auto;
}
.ba-panel figcaption {
  padding: 0.7rem 1rem 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  line-height: 1.45;
}
.ba-panel figcaption strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.ba-panel.before figcaption strong { color: var(--bad); }
.ba-panel.after figcaption strong { color: var(--ok); }

/* Visual “see it” cards instead of theory tables */
.see-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}
@media (min-width: 720px) {
  .see-grid.two { grid-template-columns: 1fr 1fr; }
  .see-grid.three { grid-template-columns: repeat(3, 1fr); }
}
.see-card {
  padding: 1rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.see-card .see-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.35rem;
}
.see-card strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.see-card p { margin: 0; font-size: 0.92rem; color: var(--muted); line-height: 1.45; }
.see-card .see-example {
  margin-top: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: #e8f1f7;
  border: 1px solid #c5d5e3;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #122433;
  line-height: 1.45;
  font-weight: 500;
}
.see-card .see-example code {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Teach-first blocks (assume zero prior jargon) */
.teach {
  margin: 1.75rem 0 2rem;
  padding: 1.25rem 1.35rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(107, 184, 224, 0.06), transparent 45%), var(--panel);
}
.teach h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: var(--text);
}
.teach > p { color: var(--muted); }

.flow-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1.25rem 0 1.5rem;
}
.flow-node {
  flex: 1 1 160px;
  min-width: 140px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.flow-node.source { border-color: #e08086; box-shadow: 0 0 0 1px rgba(224, 128, 134, 0.25); }
.flow-node.stg { border-color: var(--accent); }
.flow-node.fct { border-color: var(--ok); box-shadow: 0 0 0 1px rgba(91, 191, 150, 0.25); }
.flow-tag {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.flow-node strong {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-word;
}
.flow-sub { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }

.flow-arrow {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.flow-arrow span {
  display: block;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid var(--accent);
  animation: flowPulse 1.6s ease-in-out infinite;
}
@keyframes flowPulse {
  0%, 100% { opacity: 0.35; transform: translateX(-3px); }
  50% { opacity: 1; transform: translateX(3px); }
}

/* Lab 05 — animated CDC workflow */
.cdc-wrap { overflow: hidden; }
.cdc-stage {
  position: relative;
  margin-top: 1rem;
  padding: 1rem 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(23, 111, 158, 0.06), transparent 40%),
    var(--panel-2);
}
.cdc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.cdc-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 9px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  min-height: 38px;
}
.cdc-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cdc-btn:hover { filter: brightness(1.05); }
.cdc-step-label {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cdc-track {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.cdc-node {
  flex: 1 1 110px;
  min-width: 100px;
  padding: 0.75rem 0.7rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  opacity: 0.55;
}
.cdc-node.is-done {
  opacity: 0.85;
  border-color: rgba(27, 125, 86, 0.45);
}
.cdc-node.is-active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow);
  transform: translateY(-3px);
  animation: cdcPulse 1.4s ease-in-out infinite;
}
.cdc-num {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--bg2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cdc-node.is-active .cdc-num {
  background: var(--accent);
  color: #fff;
}
.cdc-node strong {
  font-size: 0.92rem;
  color: var(--text);
}
.cdc-obj {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--code-inline-text);
  word-break: break-word;
  line-height: 1.35;
}
.cdc-hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.cdc-pipe {
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cdc-pipe i {
  display: block;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid var(--line);
  transition: border-left-color 0.25s ease, transform 0.25s ease;
}
.cdc-pipe.is-lit i {
  border-left-color: var(--accent);
  animation: flowPulse 1s ease-in-out infinite;
}
.cdc-packet {
  position: absolute;
  top: 5.2rem;
  left: 8%;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.8);
  transition: left 0.7s ease, opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.cdc-packet.is-visible { opacity: 1; transform: scale(1); }
.cdc-packet.at-stream { left: 42%; }
.cdc-packet.at-task { left: 62%; background: var(--accent); }
.cdc-packet.at-silver { left: 82%; background: var(--ok); }
.cdc-caption {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 5.5rem;
}
.cdc-caption strong {
  display: block;
  color: var(--accent);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}
.cdc-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.cdc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.cdc-legend span {
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  margin-right: 0.35rem;
}
@keyframes cdcPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-dim); }
  50% { box-shadow: 0 0 0 8px rgba(23, 111, 158, 0.08); }
}
@media (max-width: 720px) {
  .cdc-pipe { display: none; }
  .cdc-packet { display: none; }
  .cdc-step-label { margin-left: 0; width: 100%; }
}

/* Lab 05 — stream+task vs dynamic table picker */
.pick-wrap .pick-h3 {
  margin: 1.35rem 0 0.65rem;
  font-size: 1.05rem;
  color: var(--text);
}
.pick-lanes {
  display: grid;
  gap: 0.85rem;
  margin: 1.1rem 0 0.5rem;
  align-items: stretch;
}
@media (min-width: 860px) {
  .pick-lanes {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
}
.pick-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
}
.pick-lane {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  background: var(--panel-2);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.pick-lane.is-dim {
  opacity: 0.42;
  filter: grayscale(0.25);
}
.pick-lane.is-lit {
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.pick-lane.is-stream.is-lit { border-color: var(--accent); }
.pick-lane.is-dt.is-lit { border-color: var(--ok); }
.pick-lane-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.pick-tag {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.pick-lane-head strong {
  font-size: 1.15rem;
  color: var(--text);
}
.pick-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.pick-box {
  flex: 1 1 72px;
  min-width: 68px;
  padding: 0.45rem 0.4rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}
.pick-box code {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--text);
  background: transparent;
  border: none;
  padding: 0;
  word-break: break-all;
}
.pick-box.accent { border-color: var(--accent); background: rgba(23, 111, 158, 0.08); }
.pick-box.warn { border-color: #c9a45c; background: rgba(201, 164, 92, 0.12); }
.pick-box.ok { border-color: var(--ok); background: rgba(91, 191, 150, 0.1); }
.pick-arrow {
  flex: 0 0 12px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent);
  opacity: 0.55;
}
.pick-bullets {
  margin: 0 0 0.65rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.pick-bullets li { margin: 0.2rem 0; }
.pick-one-liner {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: #e8f1f7;
  border: 1px solid #c5d5e3;
  font-size: 0.88rem;
  color: #122433;
  line-height: 1.4;
}
.pick-demo {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 800px) {
  .pick-demo { grid-template-columns: 1.2fr 0.9fr; align-items: start; }
}
.pick-scenarios {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.pick-scenario {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.7rem 0.85rem;
  background: var(--panel);
  cursor: pointer;
  font-family: var(--sans);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pick-scenario:hover { border-color: var(--accent); }
.pick-scenario.is-active {
  border-color: var(--accent);
  background: rgba(23, 111, 158, 0.08);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.pick-q {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}
.pick-a {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.pick-result {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  background:
    linear-gradient(160deg, rgba(23, 111, 158, 0.08), transparent 50%),
    var(--panel-2);
  min-height: 8rem;
}
.pick-result[data-mode="dt"] {
  background:
    linear-gradient(160deg, rgba(91, 191, 150, 0.12), transparent 50%),
    var(--panel-2);
}
.pick-result[data-mode="dbt"] {
  background:
    linear-gradient(160deg, rgba(201, 164, 92, 0.14), transparent 50%),
    var(--panel-2);
}
.pick-result-badge {
  display: inline-block;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
  color: var(--accent-2);
}
.pick-result[data-mode="dt"] .pick-result-badge { color: var(--ok); }
.pick-result[data-mode="dbt"] .pick-result-badge { color: #8f6a18; }
.pick-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.wm-demo {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}
@media (min-width: 800px) {
  .wm-demo { grid-template-columns: repeat(3, 1fr); }
}
.wm-card {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg2);
}
.wm-card h4 { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--accent-2); }
.wm-card p { margin: 0.35rem 0; font-size: 0.9rem; color: var(--muted); }
.wm-card.highlight {
  border-color: var(--ok);
  background: rgba(91, 191, 150, 0.08);
}
.wm-mark {
  margin-top: 0.6rem !important;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: #e8f1f7 !important;
  border: 1px solid #c5d5e3;
  color: #122433 !important;
  font-family: var(--mono);
  font-size: 0.8rem !important;
  font-weight: 500;
}
.wm-mark code {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
}

/* Visual memory panels (lab art) */
.viz-panel {
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(107, 184, 224, 0.08), transparent 55%),
    var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.viz-panel figcaption {
  padding: 0.75rem 1.1rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  border-top: 1px solid var(--line);
}
.viz-panel figcaption strong {
  color: var(--accent-2);
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.viz-panel img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.viz-row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 820px) {
  .viz-row.two { grid-template-columns: 1fr 1fr; }
}
.viz-svg {
  width: 100%;
  height: auto;
  display: block;
  padding: 0.75rem 0.5rem 0.25rem;
}

/* Persistent Snowsight reminder (injected by course.js) */
.gotcha-strip {
  margin: 0;
  padding: 0.65rem 1.1rem;
  background: rgba(201, 164, 92, 0.14);
  border-bottom: 1px solid rgba(201, 164, 92, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}
.gotcha-strip strong { color: var(--warn); }
.gotcha-strip code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--code-inline-bg);
  color: var(--code-inline-text);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Prevent accidental horizontal page scroll */
body {
  overflow-x: hidden;
}
img, svg, video {
  max-width: 100%;
  height: auto;
}

/* ——— Comic strips (Meridian cast conversations) ——— */
.comic-strip {
  margin: 1.5rem 0 1.75rem;
  padding: 1.1rem 1.15rem 1.25rem;
  border-radius: 16px;
  border: 3px solid #1a2433;
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      rgba(23, 111, 158, 0.03) 10px,
      rgba(23, 111, 158, 0.03) 11px
    ),
    linear-gradient(180deg, #fffdf8, #f3f6f9 60%, #e9eef4);
  box-shadow: 4px 4px 0 #1a2433;
}
.comic-kicker {
  font-family: "Bangers", var(--sans);
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: #8f6a18;
  margin: 0 0 0.25rem;
}
.comic-strip h2,
.comic-strip .comic-title {
  font-family: "Bangers", var(--sans);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  margin: 0 0 0.85rem;
  color: #1a2433;
  font-weight: 400;
  line-height: 1.2;
}
.comic-row {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 720px) {
  .comic-row.two { grid-template-columns: 1fr 1fr; }
  .comic-row.three { grid-template-columns: 1fr 1fr 1fr; }
}
.comic-panel {
  margin: 0;
  padding: 0.75rem 0.8rem 0.85rem;
  border: 2.5px solid #1a2433;
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
  position: relative;
}
.comic-panel::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(26, 36, 51, 0.12);
  border-radius: 8px;
  pointer-events: none;
}
.comic-who {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}
.comic-face {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #1a2433;
  background-color: #1a2029;
  background-repeat: no-repeat;
  background-position: center 18%;
  background-size: 115%;
  box-shadow: 2px 2px 0 rgba(26, 36, 51, 0.25);
}
/* Individual headshots (cropped from cast-sheet.jpg via scripts/crop_cast_faces.py) */
/* Alpine Retail cast (SnowPro Core) — reuse face assets with new names */
.comic-face.priya { background-image: url("cast/elena.jpg"); border-color: #c9a45c; }
.comic-face.dev { background-image: url("cast/dev.jpg"); border-color: #0d7a6f; }
.comic-face.kai { background-image: url("cast/alex.jpg"); border-color: #176f9e; }
.comic-face.riley { background-image: url("cast/jordan.jpg"); border-color: #1a3658; }
.comic-face.morgan { background-image: url("cast/marcus.jpg"); border-color: #8f6a18; }
.comic-face.sam { background-image: url("cast/sam.jpg"); border-color: #c9a45c; }
/* aliases kept so shared snippets still render */
.comic-face.elena { background-image: url("cast/elena.jpg"); border-color: #c9a45c; }
.comic-face.marcus { background-image: url("cast/marcus.jpg"); border-color: #1a3658; }
.comic-face.alex { background-image: url("cast/alex.jpg"); border-color: #176f9e; }
.comic-face.jordan { background-image: url("cast/jordan.jpg"); border-color: #0d7a6f; }
.comic-face.nora { background-image: url("cast/nora.jpg"); border-color: #b76e79; }

/* Diagram-style BEFORE/AFTER when no photo art yet */
.ba-diagram {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  min-height: 200px;
}
.ba-diagram.before { border-left: 4px solid var(--bad); }
.ba-diagram.after { border-left: 4px solid var(--ok); }
.ba-diagram .ba-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ba-diagram ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.ba-diagram strong { color: var(--text); }
.comic-name {
  font-family: "Comic Neue", var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a2433;
  line-height: 1.2;
}
.comic-role {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comic-bubble {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.65rem 0.75rem 0.7rem;
  border: 2px solid #1a2433;
  border-radius: 14px;
  background: #fffef6;
  font-family: "Comic Neue", var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1a2433;
}
.comic-bubble::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -8px;
  width: 12px;
  height: 12px;
  background: #fffef6;
  border-left: 2px solid #1a2433;
  border-top: 2px solid #1a2433;
  transform: rotate(45deg);
}
.comic-bubble code {
  font-family: var(--mono);
  font-size: 0.82em;
  font-weight: 500;
  background: #e8f1f7;
  color: #0a4d70;
  padding: 0.05em 0.3em;
  border-radius: 4px;
  border: none;
}
.comic-beat {
  font-family: "Bangers", var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #c23d4a;
  text-align: center;
  margin: 0.35rem 0 0;
}
.comic-caption {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.45;
}

/* Mid-step coach comics — tighter so they sit above each SQL chunk */
.comic-strip.comic-step {
  margin: 0.65rem 0 0.85rem;
  padding: 0.75rem 0.85rem 0.85rem;
  box-shadow: 3px 3px 0 #1a2433;
  border-width: 2px;
}
.comic-strip.comic-step .comic-title {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}
.comic-strip.comic-step .comic-face {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}
.comic-strip.comic-step .comic-bubble {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 0.65rem;
}
.comic-strip.comic-step .comic-caption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}
.step-head + .comic-strip.comic-step {
  margin-top: 0.75rem;
}
