:root {
  --bg: #060609;
  --surface: #0e0e18;
  --surface2: #14141f;
  --surface-2: #14141f;  /* alias used in sections 09–16 */
  --surface3: #1c1c2e;
  --border: #1e1e32;
  --border2: #28283f;
  --accent: #6c63ff;
  --accent-light: rgba(108,99,255,0.12);
  --green: #00e5a0;
  --green-light: rgba(0,229,160,0.1);
  --orange: #ff7c3e;
  --yellow: #ffd166;
  --red: #ff4466;
  --cyan: #00cfff;
  --text: #ddddf5;
  --text-muted: #7676ac; /* lifted from #5a5a90 — passes WCAG AA 4.5:1 on --bg */
  --text-dim: #30304a;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── Accessibility: focus rings ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Skip-to-content link (injected by course.js) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

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

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}

.sidebar-logo:visited,
.sidebar-logo:active,
.sidebar-logo:hover {
  color: inherit;
}
.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.logo-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.logo-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-name span { color: var(--accent); }

/* Progress widget */
.sidebar-progress {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.progress-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--green);
  font-weight: 700;
}

.progress-track {
  height: 3px;
  background: var(--border2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 99px;
  transition: width 0.5s ease;
  width: 0%;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.nav-group-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  padding: 0.75rem 1.5rem 0.3rem;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1.5rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  cursor: pointer;
}

.nav-item:hover { color: var(--text); background: var(--surface2); }

.nav-item.active {
  color: var(--text);
  background: var(--accent-light);
  border-left-color: var(--accent);
}

.nav-item.completed { color: var(--green); }
.nav-item.completed .nav-num { color: var(--green); }

.nav-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  min-width: 1.4rem;
}

.nav-check {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--green);
  display: none;
}

.nav-item.completed .nav-check { display: block; }

/* ── MAIN CONTENT ── */
.main {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(6,6,9,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
}

.topbar-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.topbar-breadcrumb span { color: var(--accent); }

.topbar-actions { display: flex; gap: 0.6rem; align-items: center; }

.btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 1rem;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-outline {
  background: transparent;
  border-color: var(--border2);
  color: var(--text-muted);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-accent:hover { opacity: 0.85; }

.btn-green {
  background: transparent;
  border-color: var(--green);
  color: var(--green);
}

.btn-green:hover { background: var(--green-light); }

/* ── PAGE CONTENT ── */
.page { max-width: 860px; margin: 0 auto; padding: 2.5rem 2rem 6rem; }

/* ── SECTION HERO ── */
.section-hero {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hero-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 0.2rem 0.6rem;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border: 1px solid;
}

.tag-new { color: var(--green); border-color: var(--green); background: var(--green-light); }
.tag-core { color: var(--cyan); border-color: var(--cyan); background: rgba(0,207,255,0.08); }
.tag-updated { color: var(--yellow); border-color: var(--yellow); background: rgba(255,209,102,0.08); }

.hero-time {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-left: auto;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-title span { color: var(--accent); }

.section-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ── CONTENT BLOCKS ── */
.block { margin-bottom: 2.5rem; }

.block-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.block-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 0.8rem; }

/* ── VISUAL DIAGRAM ── */
.diagram {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 2rem;
  margin: 1.5rem 0;
  overflow: hidden;
}

.diagram-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Agent loop diagram */
.agent-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 1rem 0;
}

.loop-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 90px;
}

.loop-icon {
  width: 56px; height: 56px;
  border: 1.5px solid var(--border2);
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: relative;
}

.loop-node.highlighted .loop-icon {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 20px rgba(108,99,255,0.2);
}

.loop-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.08em;
}

.loop-arrow {
  font-size: 1.2rem;
  color: var(--border2);
  margin: 0 0.3rem;
  padding-bottom: 1.5rem;
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0;
}

.compare-table th {
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  font-weight: 500;
}

.compare-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  vertical-align: top;
}

.compare-table tr:hover td { background: var(--surface2); }

.compare-table td:first-child { color: var(--text); font-weight: 600; }

.cell-good { color: var(--green) !important; }
.cell-bad { color: var(--red) !important; }

/* Concept cards */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.concept-card {
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 1.2rem;
  transition: border-color 0.2s;
}

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

.concept-icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.concept-name {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.concept-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* Callout boxes */
.callout {
  border-left: 3px solid;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.callout-info { border-color: var(--accent); background: var(--accent-light); color: var(--text-muted); }
.callout-success { border-color: var(--green); background: var(--green-light); color: var(--text-muted); }
.callout-warning,
.callout-warn { border-color: var(--yellow); background: rgba(255,209,102,0.08); color: var(--text-muted); }

.callout strong { color: var(--text); }

/* ── CODE BLOCKS ── */
.code-block {
  background: #0a0a10;
  border: 1px solid var(--border2);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border2);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.code-copy {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border2);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
}

.code-copy:hover { color: var(--green); border-color: var(--green); }

.code-block pre {
  padding: 1.2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #c8c8e8;
}

/* Syntax colors */
.kw { color: #c792ea; }
.fn { color: #82aaff; }
.st { color: #c3e88d; }
.cm { color: #546e7a; font-style: italic; }
.nu { color: #f78c6c; }
.cl { color: #ffcb6b; }

/* ── LAB STEPS ── */
.lab-container {
  border: 1px solid var(--border2);
  background: var(--surface);
  overflow: hidden;
  margin: 1.5rem 0;
}

.lab-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border2);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lab-icon { font-size: 1.2rem; }

.lab-title-wrap { flex: 1 }
.lab-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
}

.lab-subtitle {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

.lab-steps { padding: 0; }

.step {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

.step-gutter {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.2rem;
  gap: 0.3rem;
}

.step-num-circle {
  width: 24px; height: 24px;
  border: 1.5px solid var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.step.done .step-num-circle {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}

.step-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 0.3rem;
}

.step:last-child .step-line { display: none; }

.step-content { flex: 1; padding: 1.2rem 1.5rem 1.5rem 0; }

.step-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-check {
  width: 16px; height: 16px;
  border: 1px solid var(--border2);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  appearance: none;
  background: transparent;
  border-radius: 0;
  position: relative;
}

.step-check:checked { background: var(--green); border-color: var(--green); }
.step-check:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--bg);
  font-weight: 900;
}

.step-body { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }
.step-body p { margin-bottom: 0.6rem; }

/* ── NEXT SECTION NAV ── */
.section-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.nav-prev, .nav-next {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.nav-prev:hover, .nav-next:hover { color: var(--accent); }

.mark-complete-bar {
  text-align: center;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  margin-top: 2rem;
}

.mark-complete-bar p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

/* ── INDEX PAGE SPECIFIC ── */
.index-hero {
  padding: 4rem 2rem 3rem;
  max-width: 860px;
  margin: 0 auto;
}

.index-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.index-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.index-title span { color: var(--accent); }

.index-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.stats-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.section-grid {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  position: relative;
}

.section-row:hover {
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateX(2px);
}

.section-row.completed { opacity: 0.6; }

.section-row-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  min-width: 2rem;
}

.section-row-info { flex: 1 }
.section-row-title { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.2rem; }
.section-row-desc { font-size: 0.78rem; color: var(--text-muted); }

.section-row-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.section-row-status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid;
}

.status-notstarted { color: var(--text-muted); border-color: var(--border); }
.status-done { color: var(--green); border-color: var(--green); }
.status-new { color: var(--green); border-color: var(--green); background: var(--green-light); }
.status-updated { color: var(--yellow); border-color: var(--yellow); background: rgba(255,209,102,0.08); }

/* ── QUIZ ── */
.quiz-q {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.quiz-q:last-of-type { border-bottom: none; }

.quiz-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.quiz-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
  line-height: 1.5;
}

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

.quiz-option input[type="radio"] {
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
}

.quiz-feedback {
  display: none;
  margin-top: 0.8rem;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0.7rem 1rem;
  background: var(--surface2);
  border-left: 3px solid var(--border2);
}

/* ── RESPONSIVE ── */

/* ── ACRONYMS ── */
abbr[title] {
  text-decoration: underline dotted var(--text-dim);
  cursor: help;
  text-underline-offset: 3px;
}

/* Mobile menu button — hidden on desktop */
.menu-btn { display: none; }

/* Sidebar overlay — hidden by default */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 49;
  cursor: pointer;
}

@media (max-width: 768px) {
  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s ease;
  }
  .sidebar.open { transform: translateX(0); }

  /* Main takes full width */
  .main { margin-left: 0; }

  /* Hamburger button visible */
  .menu-btn {
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1rem;
    padding: 0.4rem 0.7rem;
  }

  /* Topbar — hide breadcrumb, keep actions compact */
  .topbar { padding: 0.65rem 0.9rem; }
  .topbar-breadcrumb { display: none; }
  .topbar-actions { gap: 0.4rem; }

  /* Reduce page padding */
  .page { padding: 1.5rem 1rem 4rem; }

  /* Tables — horizontal scroll instead of overflow */
  .compare-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .compare-table th,
  .compare-table td { white-space: normal; min-width: 110px; }

  /* Collapse any inline 2-col grids used in section content */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Concept grid */
  .concept-grid { grid-template-columns: 1fr; }

  /* Hero meta — don't push time to far right */
  .hero-time { margin-left: 0; }

  /* Section nav footer — stack vertically */
  .section-nav-footer {
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
  }

  /* Index section rows — hide time + status badge on small screens */
  .section-row-time,
  .section-row-status { display: none; }

  /* Index hero padding */
  .index-hero { padding: 2rem 1rem 2rem; }
  .section-grid { padding: 0 1rem 3rem; }

  /* Mark complete bar */
  .mark-complete-bar { padding: 1rem; }

  /* Agent loop diagram — allow horizontal scroll */
  .agent-loop { justify-content: flex-start; }

  /* Inline-styled code divs used in sections 09–16 */
  div[style*="font-family:var(--font-mono)"][style*="background:var(--bg)"],
  div[style*="font-family: var(--font-mono)"][style*="background: var(--bg)"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    font-size: 0.72rem !important;
  }

  /* Prevent any pre from blowing out the layout */
  pre { overflow-x: auto; max-width: 100%; }
}
