/* ==========================================================================
   VCDX Academy — design system
   Warm neutral + slate blue. Light, low eye-strain, long-session reading.
   Edit this file and re-run build/generate_site.py to restyle the whole site.
   ========================================================================== */

:root {
  /* Surfaces — warm neutrals */
  --bg:            #faf9f7;
  --surface:       #ffffff;
  --surface-2:     #f4f2ee;
  --surface-3:     #ebe8e2;

  /* Lines */
  --border:        #e4e0d9;
  --border-strong: #cfc9bf;

  /* Text — warm charcoal */
  --fg:            #2b2a28;
  --fg-muted:      #6b6862;
  --fg-faint:      #97938c;

  /* Slate blue accent */
  --accent:        #4a6785;
  --accent-hover:  #38506a;
  --accent-soft:   #eaeff5;
  --accent-line:   #c3d0e0;

  /* Semantic */
  --ok:            #4a7c59;
  --ok-soft:       #edf4ef;
  --warn:          #9a7434;
  --warn-soft:     #f9f3e6;
  --danger:        #a1483d;
  --danger-soft:   #f9edeb;
  --info:          #4a6785;
  --info-soft:     #eaeff5;

  /* Type */
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  /* Metrics */
  --radius:     8px;
  --radius-sm:  5px;
  --sidebar-w:  292px;
  --measure:    74ch;
  --shadow-sm:  0 1px 2px rgba(43,42,40,.05);
  --shadow:     0 2px 8px rgba(43,42,40,.07);
  --shadow-lg:  0 8px 28px rgba(43,42,40,.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Layout
   ========================================================================== */
/* FLEX, not grid. A grid track can size itself to its content (or to `auto`
   if a custom property fails to resolve) and silently widen the sidebar
   column, leaving a dead band between the nav and the content. `flex: 0 0`
   with a hard width cannot grow, so that failure mode is impossible. */
.layout { display: flex; align-items: stretch; min-height: 100vh; }
.layout > .sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  min-width: 0;
  overflow-x: hidden;          /* long nav labels must never widen the rail */
}
.layout > .main { flex: 1 1 0%; min-width: 0; max-width: 100%; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 9px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand a { text-decoration: none; color: inherit; display: block; }
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.brand-title span { color: var(--accent); }
.brand-sub { font-size: 11.5px; color: var(--fg-faint); font-family: var(--mono); margin-top: 3px; }

/* Sidebar search */
.side-search { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.side-search input {
  width: 100%; padding: 8px 11px; font-size: 13px; font-family: var(--sans);
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.side-search input::placeholder { color: var(--fg-faint); }
.side-search input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.nav { padding: 10px 10px 32px; flex: 1; }
.nav-group { margin-bottom: 3px; }
.nav-group-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 0; overflow-wrap: anywhere;
  padding: 7px 10px; font-size: 12.5px; font-weight: 650; color: var(--fg-muted);
  cursor: pointer; border-radius: var(--radius-sm); user-select: none; line-height: 1.4;
}
.nav-group-title:hover { background: var(--surface-3); color: var(--fg); }
.nav-group-title .chev {
  font-size: 9px; color: var(--fg-faint); transition: transform .15s ease; flex-shrink: 0;
}
.nav-group.open > .nav-group-title .chev { transform: rotate(90deg); }
.nav-group.open > .nav-group-title { color: var(--fg); }
.nav-items { display: none; padding: 2px 0 6px 8px; margin-left: 8px; border-left: 1px solid var(--border); }
.nav-group.open > .nav-items { display: block; }
.nav-items a {
  display: block; padding: 5px 9px; font-size: 12.5px; color: var(--fg-muted);
  text-decoration: none; border-radius: var(--radius-sm); line-height: 1.45;
}
.nav-items a:hover { background: var(--surface-3); color: var(--fg); }
.nav-items a.current { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.nav-top a {
  display: block; padding: 7px 10px; font-size: 12.5px; font-weight: 600;
  color: var(--fg-muted); text-decoration: none; border-radius: var(--radius-sm);
}
.nav-top a:hover { background: var(--surface-3); color: var(--fg); }
.nav-top a.current { background: var(--accent-soft); color: var(--accent-hover); }
.nav-divider { height: 1px; background: var(--border); margin: 10px 10px; }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 34px;
  background: rgba(250,249,247,.93);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.menu-btn {
  display: none; background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--fg); border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 15px; cursor: pointer; line-height: 1;
}
.crumb { font-size: 12.5px; color: var(--fg-faint); flex: 1; min-width: 0; }
.crumb a { color: var(--fg-muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); text-decoration: underline; }
.crumb .sep { margin: 0 7px; color: var(--border-strong); }

.vfilter { display: flex; align-items: center; gap: 6px; }
.vfilter-label {
  font-size: 11px; color: var(--fg-faint); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.vbtn {
  padding: 3px 11px; font-size: 11.5px; font-weight: 600; font-family: var(--sans);
  border-radius: 20px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--fg-muted); cursor: pointer;
}
.vbtn:hover { border-color: var(--accent); color: var(--accent); }
.vbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.vbtn[disabled] { opacity: .45; cursor: not-allowed; }
.vbtn[disabled]:hover { border-color: var(--border-strong); color: var(--fg-muted); }
/* Static per-page version badge (lab + VVS pages) — P5 option A */
.vbadge {
  padding: 3px 11px; font-size: 11.5px; font-weight: 600; border-radius: 20px;
  border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-hover);
  white-space: nowrap;
}

.content { padding: 32px 34px 96px; max-width: 1280px; width: 100%; margin-inline: auto; }
.prose { max-width: var(--measure); }
/* Home hero (h1 + intro + disclosure) spans the full content width (P1). */
.hero.prose { max-width: none; }

/* Note-type text: provenance, caveats, empty states, disclaimers (P2).
   Italic + muted, never applied to body prose, headings, tables or code. */
.note, .callout.neutral, .callout.info, .footer-note, #vfilter-empty {
  font-style: italic; color: var(--fg-muted); font-size: 12.5px; line-height: 1.55;
}
.note code, .callout.neutral code, .callout.info code { font-style: normal; }
p.note { margin: 0 0 22px; }

/* ==========================================================================
   Typography
   ========================================================================== */
h1 {
  font-size: 30px; line-height: 1.2; letter-spacing: -.021em;
  font-weight: 700; margin-bottom: 12px;
}
h2 {
  font-size: 20px; line-height: 1.3; letter-spacing: -.012em; font-weight: 660;
  margin: 34px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--border);
}
h3 { font-size: 16.5px; font-weight: 650; margin: 24px 0 8px; letter-spacing: -.006em; }
h4 { font-size: 14.5px; font-weight: 650; margin: 18px 0 6px; color: var(--fg-muted); }
p { margin-bottom: 13px; }
ul, ol { margin: 0 0 14px 1.35rem; }
li { margin-bottom: 5px; }
li > ul, li > ol { margin-top: 5px; margin-bottom: 6px; }
strong, b { font-weight: 650; color: var(--fg); }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--border); margin: 26px 0; }

a { color: var(--accent); text-decoration-color: var(--accent-line); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

code {
  font-family: var(--mono); font-size: .855em;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .1em .38em; border-radius: 4px; word-break: break-word;
}
pre {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; margin-bottom: 15px;
}
pre code {
  background: none; border: 0; padding: 0; font-size: 12.9px;
  line-height: 1.62; display: block; white-space: pre; word-break: normal;
}
blockquote {
  border-left: 3px solid var(--accent-line); padding: 2px 0 2px 15px;
  margin: 0 0 14px; color: var(--fg-muted);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; margin-bottom: 16px; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.8px; background: var(--surface); }
th {
  text-align: left; font-weight: 650; padding: 9px 12px;
  background: var(--surface-2); border-bottom: 2px solid var(--border-strong);
  color: var(--fg-muted); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .045em; white-space: nowrap;
}
td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }

/* ==========================================================================
   Components
   ========================================================================== */

/* Badges */
.badge {
  display: inline-block; font-size: 11px; font-weight: 650; padding: 2.5px 9px;
  border-radius: 20px; letter-spacing: .025em; white-space: nowrap;
  border: 1px solid transparent; line-height: 1.5;
}
.badge-version    { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-line); }
.badge-track      { background: var(--surface-2); color: var(--fg-muted); border-color: var(--border-strong); }
.badge-diff-beginner     { background: var(--ok-soft);     color: #33603f;     border-color: #cfe0d4; }
.badge-diff-intermediate { background: var(--warn-soft);   color: #7a5a20;   border-color: #e8dcc0; }
.badge-diff-advanced     { background: var(--danger-soft); color: var(--danger); border-color: #ecc9c3; }
.badge-diff-expert       { background: #f0ebf6; color: #6b4c91; border-color: #dccfe8; }
.badge-new  { background: var(--accent); color: #fff; }
.badge-brk  { background: var(--danger); color: #fff; }

.meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 18px; }
.meta-item { font-size: 12.5px; color: var(--fg-muted); }

/* Callouts */
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 15px; font-size: 14.2px;
}
.callout > :last-child { margin-bottom: 0; }
.callout-label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 700; margin-bottom: 5px; color: var(--accent-hover);
}
.callout.ok     { border-color: var(--ok);     background: var(--ok-soft); }
.callout.ok .callout-label { color: var(--ok); }
.callout.warn   { border-color: var(--warn);   background: var(--warn-soft); }
.callout.warn .callout-label { color: var(--warn); }
.callout.danger { border-color: var(--danger); background: var(--danger-soft); }
.callout.danger .callout-label { color: var(--danger); }
.callout.neutral { border-color: var(--border-strong); background: var(--surface-2); }
.callout.neutral .callout-label { color: var(--fg-muted); }

/* Legacy hooks from the v1 renderer */
.step-tip, .tip {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 10px 0; font-size: 13.8px;
}
.warning, .caution {
  border-left: 3px solid var(--warn); background: var(--warn-soft);
  padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 10px 0; font-size: 13.8px;
}
.error-box {
  border-left: 3px solid var(--danger); background: var(--danger-soft);
  padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 10px 0; font-size: 13.8px;
}

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.card h3, .card h4 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: 14px; margin-bottom: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); }

/* Link cards (index / section pages) */
.linkcard {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 17px;
  transition: border-color .13s ease, box-shadow .13s ease, transform .13s ease;
}
.linkcard:hover {
  border-color: var(--accent-line); box-shadow: var(--shadow);
  transform: translateY(-1px); color: inherit;
}
.linkcard-title { font-weight: 650; font-size: 14.8px; margin-bottom: 5px; line-height: 1.35; }
.linkcard-desc {
  font-size: 12.9px; color: var(--fg-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.linkcard-meta {
  margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 11.5px; color: var(--fg-faint);
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; text-align: center;
}
.stat-num { font-size: 25px; font-weight: 700; color: var(--accent); line-height: 1.15; letter-spacing: -.02em; }
.stat-label {
  font-size: 11px; color: var(--fg-faint); text-transform: uppercase;
  letter-spacing: .055em; margin-top: 3px; font-weight: 600;
}

/* Steps / tasks (lab pages) */
.task {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.task-title { font-size: 16px; font-weight: 650; margin-bottom: 12px; }
.step { padding: 11px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: 0; padding-bottom: 0; }
/* A pill, not a 21px circle. The label is "Step 12", not "12" — a fixed circle
   wrapped it onto two lines on every step of every lab. Never re-add a fixed
   width/height here. Mirror any change into generate.py:css(). */
.step-num {
  display: inline-block; width: auto; height: auto;
  padding: 2px 9px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-hover); font-size: 11px; font-weight: 700;
  line-height: 1.5; white-space: nowrap; margin-right: 8px; flex-shrink: 0;
  vertical-align: middle;
}
.step-title { font-weight: 620; margin-bottom: 5px; }

/* Reference list */
.ref-tier {
  font-size: 11px; color: var(--fg-faint); margin-left: 8px;
  background: var(--surface-2); padding: 1px 7px; border-radius: 20px;
  border: 1px solid var(--border);
}

/* Version comparison */
.version-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 14px; margin: 16px 0; }
.version-box {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--border-strong);
  border-radius: var(--radius); padding: 14px 16px;
}
.version-box.vcf52 { border-top-color: #b89150; }
.version-box.vcf90 { border-top-color: var(--accent); }
.version-box.vcf91 { border-top-color: var(--ok); }
.version-box h4 { margin: 0 0 6px; font-size: 13.5px; color: var(--fg); }
.version-box p { font-size: 13px; color: var(--fg-muted); margin: 0; }

/* Quiz + flashcards */
.quiz-q, .fc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 13px;
}
.quiz-opt {
  display: block; padding: 9px 13px; margin: 5px 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; background: var(--surface);
}
.quiz-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.quiz-opt.wrong   { border-color: var(--danger); background: var(--danger-soft); }

/* Pager */
.pager {
  display: flex; justify-content: space-between; gap: 14px;
  margin-top: 46px; padding-top: 20px; border-top: 1px solid var(--border);
}
.pager a {
  display: block; max-width: 46%; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 11px 15px; font-size: 13.5px;
}
.pager a:hover { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.pager .dir {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--fg-faint); font-weight: 650; margin-bottom: 2px;
}
.pager .next { text-align: right; margin-left: auto; }

/* Search overlay */
.search-overlay {
  display: none; position: fixed; inset: 0; z-index: 120;
  background: rgba(43,42,40,.32); backdrop-filter: blur(2px);
  padding: 76px 20px 20px; justify-content: center; align-items: flex-start;
}
.search-overlay.open { display: flex; }
.search-panel {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: 72vh; display: flex; flex-direction: column;
}
.search-panel input {
  width: 100%; padding: 15px 18px; font-size: 15.5px; font-family: var(--sans);
  border: 0; border-bottom: 1px solid var(--border); background: transparent;
  color: var(--fg); border-radius: 12px 12px 0 0;
}
.search-panel input:focus { outline: none; }
.search-results { overflow-y: auto; padding: 7px; }
.search-hit {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm);
  text-decoration: none; color: inherit;
}
.search-hit:hover, .search-hit.sel { background: var(--accent-soft); color: inherit; }
.search-hit-title { font-size: 14px; font-weight: 620; margin-bottom: 1px; }
.search-hit-meta { font-size: 11.5px; color: var(--fg-faint); }
.search-empty { padding: 26px; text-align: center; color: var(--fg-faint); font-size: 13.5px; }
.kbd {
  font-family: var(--mono); font-size: 11px; background: var(--surface-2);
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; color: var(--fg-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border); margin-top: 56px; padding: 22px 34px 40px;
  color: var(--fg-faint); font-size: 12.5px;
}
.footer a { color: var(--fg-muted); }

/* Version filtering */
[data-vcf-version].v-hidden { display: none !important; }

/* ==========================================================================
   Feedback loop (v7) — site-only
   ========================================================================== */
.report-link {
  font-size: 11px; font-weight: 600; margin-left: 10px; color: var(--fg-faint);
  text-decoration: none; opacity: 0; transition: opacity .15s; vertical-align: middle;
  white-space: nowrap;
}
.theory-block:hover .report-link, .task:hover .report-link, .quiz-question:hover .report-link,
tr.dd-expand:hover .report-link, .report-link:focus { opacity: 1; }
.report-link:hover { color: var(--accent); text-decoration: underline; }
@media (hover: none) { .report-link { opacity: 1; } }

.useful {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: -48px auto 0; width: calc(100% - 68px); max-width: 1212px;
  padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); font-size: 13.5px; color: var(--fg-muted);
}
.useful button {
  padding: 4px 12px; font-size: 12.5px; font-weight: 600; font-family: var(--sans);
  border-radius: 20px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); cursor: pointer;
}
.useful button:hover { border-color: var(--accent); color: var(--accent); }
.useful button[disabled] { opacity: .5; cursor: default; }

.search-miss { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; }

.fb-form { max-width: 760px; }
.fb-row { margin-bottom: 18px; }
.fb-row label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.fb-row .req { color: var(--danger); }
.fb-row .opt { color: var(--fg-faint); font-weight: 500; font-size: 12px; }
.fb-form select, .fb-form input[type="text"], .fb-form input[type="url"], .fb-form input[type="email"],
.fb-form textarea {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 14px; color: var(--fg);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.fb-form textarea { resize: vertical; min-height: 90px; }
.fb-form select:focus, .fb-form input:focus, .fb-form textarea:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
.fb-form input[type="file"] { font-size: 13px; }
.fb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.fb-check label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.fb-hint { margin: 6px 0 0 !important; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-submit {
  padding: 10px 22px; font: inherit; font-size: 14px; font-weight: 650; color: #fff;
  background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm); cursor: pointer;
}
.fb-submit:hover { background: var(--accent-hover); }
.fb-submit[disabled] { opacity: .6; cursor: default; }
@media (max-width: 1040px) { .useful { width: calc(100% - 40px); } }
@media (max-width: 620px) { .fb-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Orientation layer (v8): Start here, survey, My plan, curriculum, Next up.
   Site-only elements — nothing here is shared with the single-file SPA.
   ========================================================================== */
/* Start here uses the full content column (like the Home hero, P1) rather
   than the 74ch reading measure — a guide page, not long-form theory. */
.lead { font-size: 17px; color: var(--fg-muted); max-width: 100ch; margin-bottom: 18px; }
#section-start > p, #section-start > ul, #section-start > ol { max-width: 100ch; }
#section-plan .lead { max-width: 100ch; }
.expectations li, .wf-steps li { margin-bottom: 7px; }
.components td:last-child { color: var(--fg-muted); }
@media (min-width: 621px) { .components td:first-child, .components td:last-child { white-space: nowrap; } }

/* Goal / Next-up card (home, dashboard, plan) */
.goal-card { border-left-color: var(--ok); background: var(--ok-soft); font-size: 14.6px; margin: 4px 0 24px; }
.goal-card .callout-label { color: var(--ok); }
.goal-card a { font-weight: 600; }
.goal-card .goal-cta { display: inline-block; margin-left: 6px; white-space: nowrap; }
.mark-done { margin-top: 24px; }

/* Workflow SVG: wide chain on desktop, tall chain on narrow screens */
.workflow { margin: 6px 0 14px; }
.wf-svg { display: block; width: 100%; height: auto; }
.wf-wide { max-width: 960px; }
.wf-tall { display: none; max-width: 360px; }
.wf-node { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.wf-num { fill: var(--accent-hover); font: 700 24px var(--sans); }
.wf-tall .wf-num { font-size: 18px; }
.wf-label { fill: var(--fg); font: 600 17px var(--sans); }
.wf-line { stroke: var(--border-strong); stroke-width: 2; }
.wf-arrow { fill: var(--border-strong); }
@media (max-width: 640px) { .wf-wide { display: none; } .wf-tall { display: block; } }

/* Survey */
.survey { margin-top: 34px; padding-top: 10px; border-top: 1px solid var(--border); }
.survey-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 14px; }
.survey-form > p { grid-column: 1 / -1; margin: 4px 0 0; }
.survey-q { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px 8px; margin: 0; background: var(--surface); box-shadow: var(--shadow-sm); min-inline-size: 0; }
/* Legend rendered as a card heading (no border cut-through) */
.survey-q legend { float: left; width: 100%; font-weight: 650; font-size: 14.5px; padding: 12px 0 8px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.survey-q legend + * { clear: both; }
.survey-q.invalid { border-color: var(--danger); }
.survey-help { margin-bottom: 8px; }
.survey-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 14px; }
.survey-opt { display: flex; gap: 9px; align-items: flex-start; padding: 5px 4px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14.2px; line-height: 1.45; }
.survey-opt:hover { background: var(--surface-2); }
.survey-opt input { margin-top: 4px; flex: none; width: 15px; height: 15px; }
.survey-opt small { display: block; color: var(--fg-muted); font-size: 12.2px; }
.survey-num { width: 90px; padding: 6px 8px; font: inherit; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.survey-err { color: var(--danger); font-style: normal; font-weight: 600; margin: 6px 0 4px; }
.survey .req { color: var(--danger); }

/* Plan */
.plan-head h2 { margin-top: 6px; }
.plan-settings { color: var(--fg-muted); font-size: 13.5px; }
.plan-stats { margin-bottom: 18px; }
.plan-stage { margin-bottom: 22px; }
.plan-stage h3 { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.plan-weeks { font-size: 12.5px; font-weight: 500; color: var(--fg-muted); }
.plan-items { list-style: none; margin: 0; padding: 0; }
.plan-item { display: grid; grid-template-columns: 22px 110px 1fr; gap: 4px 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 6px; font-size: 14px; }
.plan-item.done { background: var(--ok-soft); border-color: #cfe0d4; }
.plan-item.next { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.plan-item.revise { grid-template-columns: 110px 1fr; }
.plan-tick { color: var(--ok); font-weight: 700; text-align: center; }
.plan-kind { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-faint); }
.plan-item a { font-weight: 600; text-decoration: none; }
.plan-item a:hover { text-decoration: underline; }
.plan-meta { grid-column: 3; font-size: 12.3px; color: var(--fg-muted); }
@media (max-width: 620px) {
  .plan-item { grid-template-columns: 22px 1fr; }
  .plan-item.revise { grid-template-columns: 1fr; }
  .plan-kind { grid-column: 2; }
  .plan-item a, .plan-meta { grid-column: 2; }
}

/* Curriculum */
.cur-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 20px; }
.cur-tab { font: inherit; font-size: 12.8px; font-weight: 650; padding: 6px 11px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); color: var(--fg-muted); cursor: pointer; line-height: 1.3; }
.cur-tab small { display: block; font-size: 11px; font-weight: 600; color: var(--fg-faint); }
.cur-tab:hover { border-color: var(--accent-line); color: var(--fg); }
.cur-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cur-tab.active small { color: #dfe7f0; }
.cur-table td { font-size: 12.6px; }
.cur-id { white-space: nowrap; font-family: var(--mono); font-size: 11.5px; color: var(--fg-muted); }
.cur-links { min-width: 220px; }
.cur-link { display: inline-block; margin: 0 6px 4px 0; padding: 2px 8px; border-radius: 12px; font-size: 11.5px; text-decoration: none; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-hover); }
.cur-link.cur-lab { background: var(--warn-soft); border-color: #e8dcc0; color: #7a5a20; }
.cur-link.cur-vvs { background: #f0ebf6; border-color: #dccfe8; color: #6b4c91; }
.cur-link:hover { text-decoration: underline; }
.cur-q { text-align: center; white-space: nowrap; }
.cov { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 9px; border-radius: 20px; white-space: nowrap; border: 1px solid transparent; }
.cov-covered { background: var(--ok-soft); color: #33603f; border-color: #cfe0d4; }
.cov-partial { background: var(--warn-soft); color: #7a5a20; border-color: #e8dcc0; }
.cov-gap { background: var(--danger-soft); color: var(--danger); border-color: #ecc9c3; }


/* v8.1 inferred structure in theory text (F-v8-5) — mirrored in generate.py css() */
.md-dl { margin: 6px 0 16px; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.md-dl dt { font-weight: 650; color: var(--fg); }
.md-dl dd { margin: 0; color: var(--fg-muted); }
.md-dl dt + dd + dd { grid-column: 2; }
@media (max-width: 620px) { .md-dl { grid-template-columns: 1fr; gap: 2px 0; } .md-dl dd { margin-bottom: 8px; } }
.md-label { margin: 14px 0 4px; }
.theory-block h4 { font-size: 15px; font-weight: 650; margin: 18px 0 6px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1040px) {
  /* Sidebar leaves the flex flow entirely and overlays as a drawer; main
     takes the full width. No reserved rail can survive this. */
  .layout { display: block; }
  .layout > .sidebar { flex: none; max-width: none; }
  .layout > .main { width: 100%; max-width: 100%; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 290px; z-index: 110;
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: var(--shadow-lg); height: 100dvh;
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: block; }
  .content, .topbar, .footer { padding-left: 20px; padding-right: 20px; }
  .scrim {
    display: none; position: fixed; inset: 0; background: rgba(43,42,40,.32); z-index: 100;
  }
  .scrim.open { display: block; }
  h1 { font-size: 25px; }
}
@media (max-width: 620px) {
  body { font-size: 15px; }
  .vfilter-label { display: none; }
  .pager { flex-direction: column; }
  .pager a { max-width: 100%; }
  .pager .next { text-align: left; }
  .content { padding-top: 22px; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .sidebar, .topbar, .pager, .search-overlay, .scrim, .footer { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: 100%; }
  body { font-size: 11pt; background: #fff; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .card, .task, table { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
}

/* ==========================================================================
   Component layer — quiz, exam simulator, flashcards, dashboard, VVS,
   Holodeck states, roadmap, blueprint bars.
   Added 2026-09-01: these components are emitted by build/generate.py's
   render functions, which the multi-page build reuses. Previously only the
   single-file build carried their CSS, so every interactive component on the
   multi-page site rendered unstyled (bare <li> choices in the exam simulator,
   flat dashboard, etc.). Keep this layer in sync if generate.py's css() changes.
   ========================================================================== */

/* Legacy token aliases: generated markup and inline styles reference the
   single-file build's variable names. Map them onto this palette. */
:root {
  --bg2:     var(--surface);
  --bg3:     var(--surface-2);
  --fg2:     var(--fg-muted);
  --fg3:     var(--fg-faint);
  --accent2: var(--accent-hover);
  --green:   var(--ok);
  --yellow:  var(--warn);
  --red:     var(--danger);
  --orange:  var(--warn);
}
/* Nav sidebar — the SPA rule that made .nav position:fixed/280px was removed
   (2026-09-02). .nav is a normal flex child of .sidebar in this build; its real
   rule is near the top of this file. */
/* Main content — DO NOT re-add a margin-left here. In the single-file build the
   sidebar is position:fixed so .main needs an offset; in this multi-page build
   the sidebar is in flex flow and .main sits beside it. A ported margin-left
   produced a 340px dead band between nav and content (2026-09-02). */
/* Badges */
    .badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; margin-right: 6px; }
.badge-version { background: var(--accent-soft); color: var(--accent-hover); border: 1px solid var(--accent-line);}
.badge-diff-beginner { background: var(--ok-soft); color: #33603f; border: 1px solid #cfe0d4;}
.badge-diff-intermediate { background: var(--warn-soft); color: #7a5a20; border: 1px solid #e8dcc0;}
.badge-diff-advanced { background: var(--danger-soft); color: var(--danger); border: 1px solid #ecc9c3;}
.badge-diff-expert { background: #f7e9ea; color: #a1483d; border: 1px solid #ecc9c3;}
.badge-track { background: var(--bg3); color: var(--fg2); }
.badge-status-RESOLVED { background: var(--ok-soft); color: #33603f; border: 1px solid #cfe0d4;}
.badge-status-LIKELY_RESOLVED { background: var(--warn-soft); color: #7a5a20; border: 1px solid #e8dcc0;}
.badge-status-OPEN { background: #f7e9ea; color: #a1483d; border: 1px solid #ecc9c3;}
.badge-status-INFORMATIONAL { background: var(--bg3); color: var(--fg2); }
/* Meta bar */
    .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; align-items: center; }
.meta-item { font-size: 13px; color: var(--fg3); }
.meta-item strong { color: var(--fg2); }
/* Cards */
    .card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
            padding: 20px; margin: 16px 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
/* Task cards */
    .task { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
            margin: 20px 0; overflow: hidden; }
.task-header { background: var(--bg3); padding: 12px 20px; cursor: pointer;
                   display: flex; justify-content: space-between; align-items: center; }
.task-header h3 { margin: 0; font-size: 15px; }
.task-header .task-num { color: var(--accent); font-weight: 700; margin-right: 8px; }
.task-body { padding: 20px; display: none; }
.task-body.show { display: block; }
/* Steps */
    .step { background: var(--bg); border-left: 3px solid var(--accent); padding: 12px 16px;
            margin: 10px 0; border-radius: 0 var(--radius) var(--radius) 0; }
.step-num { color: var(--accent); font-weight: 700; font-size: 13px; }
.step-instruction { margin: 4px 0; }
.step-expected { color: var(--green); font-size: 13px; margin: 4px 0; }
.step-expected::before { content: '✓ '; }
/* ASCII / box-drawing diagrams (F-20): monospace + own scroll container, so the
   picture stays aligned and a long rule never widens the page on mobile. */
.ascii-art { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre; overflow-x: auto; font-size: 12.5px; line-height: 1.35;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; max-width: 100%; }
/* Rich variant: expected_output that contains markdown (F-17). The tick moves
   onto an explicit label so it does not orphan above the first block. */
.step-expected-rich::before { content: none; }
.step-expected-rich > :first-child { margin-top: 0; }
.step-expected-rich p { margin: 4px 0; }
.step-expected-rich table { color: var(--fg); }
.step-expected-label { display: block; font-weight: 600; }
.step-expected-label::before { content: '✓ '; }
.step-warning { color: var(--yellow); font-size: 13px; margin: 4px 0; padding: 6px 10px;
                    background: rgba(245, 158, 11, 0.1); border-radius: 4px; }
.step-warning::before { content: '⚠ '; }
.step-tip { color: var(--accent2); font-size: 13px; margin: 4px 0; padding: 6px 10px;
                background: rgba(59, 130, 246, 0.1); border-radius: 4px; }
.step-tip::before { content: '💡 '; }
/* Validation box */
    .validation { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.3);
                  border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.validation h4 { color: var(--green); margin: 0 0 8px; }
.validation h4::before { content: '✓ '; }
/* Error cards */
    .error-card { background: rgba(239, 68, 68, 0.06); border: 1px solid rgba(239, 68, 68, 0.2);
                  border-radius: var(--radius); padding: 14px; margin: 8px 0; }
.error-card .symptom { color: var(--red); font-weight: 600; font-size: 14px; }
.error-card .cause { color: var(--fg2); font-size: 13px; margin: 4px 0; }
.error-card .fix { color: var(--green); font-size: 13px; margin: 4px 0; }
.error-card .kb-ref { font-size: 12px; color: var(--fg3); }
/* Pitfalls sidebar */
    .pitfalls { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                padding: 20px; margin: 24px 0; }
.pitfalls h3 { color: var(--yellow); margin-bottom: 12px; }
.pitfall-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.pitfall-item:last-child { border-bottom: none; }
.pitfall-title { font-weight: 600; font-size: 14px; }
.pitfall-summary { font-size: 13px; color: var(--fg2); margin: 4px 0; }
/* RCAR */
    .rcar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.rcar-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.rcar-box h4 { margin: 0 0 8px; font-size: 14px; }
.rcar-box.req h4 { color: var(--accent2); }
.rcar-box.con h4 { color: var(--yellow); }
.rcar-box.asm h4 { color: var(--fg2); }
.rcar-box.risk h4 { color: var(--red); }
.rcar-box ul { padding-left: 18px; font-size: 13px; color: var(--fg2); }
.rcar-box li { margin: 4px 0; }
/* References */
    .ref-list { list-style: none; padding: 0; }
.ref-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.ref-list a { color: var(--accent2); text-decoration: none; }
.ref-list a:hover { text-decoration: underline; }
.ref-tier { font-size: 11px; color: var(--fg3); margin-left: 8px; }
/* Theory section */
    .theory-block { margin: 20px 0; }
.theory-block h3 { color: var(--fg); }
/* Extensions */
    .extension { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
                 padding: 14px; margin: 8px 0; }
.extension h4 { margin: 0 0 4px; }
/* Responsive — SPA-era .nav/.main overrides removed; the real responsive rules
   live in the @media (max-width: 1040px) block near the top of this file. */
    @media (max-width: 900px) {
      .rcar { grid-template-columns: 1fr; }
    }
/* Collapsible sections */
    .collapsible-header { cursor: pointer; user-select: none; }
.collapsible-header::after { content: ' ▸'; font-size: 12px; }
.collapsible-header.open::after { content: ' ▾'; }
.collapsible-body { display: none; }
.collapsible-body.show { display: block; }
/* Network diagram (mermaid placeholder rendered as pre) */
    .diagram { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
               padding: 16px; margin: 12px 0; overflow-x: auto; }
.diagram pre { color: var(--fg2); font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.diagram-caption { font-size: 12px; color: var(--fg3); margin-top: 6px; font-style: italic; }
code { background: var(--bg3); padding: 1px 6px; border-radius: 3px; font-size: 13px;
           font-family: 'JetBrains Mono', monospace; color: var(--accent2); }
/* ===== Quiz Engine ===== */
    .quiz-container { margin: 24px 0; }
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.quiz-score { font-size: 14px; color: var(--fg2); }
.quiz-score .correct { color: var(--green); font-weight: 700; }
.quiz-score .total { color: var(--fg3); }
.quiz-question { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                     padding: 20px; margin: 12px 0; }
.quiz-question.answered-correct { border-color: var(--green); }
.quiz-question.answered-wrong { border-color: var(--red); }
.quiz-q-text { font-size: 15px; font-weight: 600; color: var(--fg); margin-bottom: 12px; }
.quiz-q-num { color: var(--accent); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.quiz-choices { list-style: none; padding: 0; }
.quiz-choice { padding: 8px 14px; margin: 4px 0; border: 1px solid var(--border); border-radius: 6px;
                   cursor: pointer; font-size: 14px; color: var(--fg2); transition: all 0.15s; }
.quiz-choice:hover { border-color: var(--accent); color: var(--fg); }
.quiz-choice.selected { border-color: var(--accent); background: rgba(59,130,246,0.1); color: var(--fg); }
.quiz-choice.correct { border-color: var(--green); background: rgba(16,185,129,0.12); color: var(--green); }
.quiz-choice.wrong { border-color: var(--red); background: rgba(239,68,68,0.08); color: var(--red); }
.quiz-choice.disabled { pointer-events: none; opacity: 0.85; }
.quiz-explanation { margin-top: 10px; padding: 10px 14px; background: rgba(96,165,250,0.08);
                        border-radius: 6px; font-size: 13px; color: var(--fg2); display: none; }
.quiz-explanation.show { display: block; }
.quiz-btn { padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 600;
                cursor: pointer; border: none; }
.quiz-btn-check { background: var(--accent); color: #fff; }
.quiz-btn-check:hover { background: var(--accent-hover); color: #fff; }
.quiz-btn-reset { background: var(--bg3); color: var(--fg2); margin-left: 8px; }
.quiz-btn-reset:hover { background: var(--border); }
.quiz-progress { height: 4px; background: var(--bg3); border-radius: 2px; margin: 8px 0; }
.quiz-progress-bar { height: 4px; background: var(--accent); border-radius: 2px; transition: width 0.3s; }
/* ===== Flashcard System ===== */
    .fc-container { margin: 24px 0; }
.fc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.fc-stats { font-size: 13px; color: var(--fg3); }
.fc-stats span { margin-right: 16px; }
.fc-card-wrapper { perspective: 1000px; margin: 16px 0; }
.fc-card { position: relative; width: 100%; min-height: 200px; cursor: pointer;
               transition: transform 0.5s; transform-style: preserve-3d; }
.fc-card.flipped { transform: rotateY(180deg); }
.fc-card-face { position: absolute; top: 0; left: 0; width: 100%; min-height: 200px;
                    backface-visibility: hidden; border-radius: var(--radius); padding: 32px;
                    display: flex; align-items: center; justify-content: center; text-align: center; }
.fc-front { background: var(--bg2); border: 2px solid var(--accent); color: var(--fg);
                font-size: 18px; font-weight: 600; }
.fc-back { background: var(--bg2); border: 2px solid var(--green); color: var(--fg2);
               font-size: 15px; transform: rotateY(180deg); }
.fc-nav { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.fc-nav-btn { padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 600;
                  cursor: pointer; border: 1px solid var(--border); background: var(--bg2); color: var(--fg2); }
.fc-nav-btn:hover { border-color: var(--accent); color: var(--fg); }
.fc-nav-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.fc-counter { text-align: center; font-size: 13px; color: var(--fg3); margin: 8px 0; }
.fc-rating { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }
.fc-rating-btn { padding: 6px 14px; border-radius: 6px; font-size: 12px; cursor: pointer;
                     border: 1px solid var(--border); background: var(--bg); color: var(--fg3); }
.fc-rating-btn:hover { border-color: var(--accent); }
.fc-rating-btn.easy { border-color: var(--green); color: var(--green); }
.fc-rating-btn.good { border-color: var(--accent2); color: var(--accent2); }
.fc-rating-btn.hard { border-color: var(--yellow); color: var(--yellow); }
.fc-rating-btn.again { border-color: var(--red); color: var(--red); }
/* ===== VVS Solutions ===== */
    .vvs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.vvs-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                padding: 20px; cursor: pointer; transition: border-color 0.2s; }
.vvs-card:hover { border-color: var(--accent); }
.vvs-card.vcf90 { border-left: 3px solid var(--accent); }
.vvs-card.vcf52 { border-left: 3px solid var(--yellow); }
.vvs-card h3 { font-size: 15px; margin-bottom: 8px; }
.vvs-card .vvs-card-meta { font-size: 12px; color: var(--fg3); }
.vvs-tabs { display: flex; border-bottom: 1px solid var(--border); margin: 16px 0 0; }
.vvs-tab { padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer;
               color: var(--fg3); border-bottom: 2px solid transparent; }
.vvs-tab:hover { color: var(--fg); }
.vvs-tab.active { color: var(--accent2); border-bottom-color: var(--accent); }
.vvs-tab-content { display: none; padding: 20px 0; }
.vvs-tab-content.active { display: block; }
.dd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dd-table th { text-align: left; padding: 8px 12px; background: var(--bg3); color: var(--fg2);
                   border-bottom: 1px solid var(--border); font-weight: 600; }
.dd-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--fg2); vertical-align: top; }
.dd-table tr:hover { background: rgba(59,130,246,0.05); }
.dd-id { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; }
.dd-expand { cursor: pointer; }
.dd-detail { display: none; padding: 12px; background: var(--bg); border-radius: 6px; margin: 8px 0; }
.dd-detail.show { display: block; }
.quality-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px;
                     font-weight: 600; margin: 0 2px; }
.quality-badge.availability { background: var(--ok-soft); color: #33603f; border: 1px solid #cfe0d4;}
.quality-badge.manageability { background: var(--accent-soft); color: var(--accent-hover); border: 1px solid var(--accent-line);}
.quality-badge.performance { background: var(--warn-soft); color: #7a5a20; border: 1px solid #e8dcc0;}
.quality-badge.recoverability { background: #ecebf7; color: #3b3578; border: 1px solid #d5d2ec;}
.quality-badge.security { background: #f7e9ea; color: #a1483d; border: 1px solid #ecc9c3;}
/* Section tabs (Quiz/Flashcard in section overview) */
    .section-tabs { display: flex; border-bottom: 1px solid var(--border); margin: 24px 0 0; }
.section-tab { padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer;
                   color: var(--fg3); border-bottom: 2px solid transparent; }
.section-tab:hover { color: var(--fg); }
.section-tab.active { color: var(--accent2); border-bottom-color: var(--accent); }
.section-tab-content { display: none; padding: 20px 0; }
.section-tab-content.active { display: block; }
/* Certification Roadmap */
    .roadmap-container { max-width: 1000px; margin: 0 auto; }
.track-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 24px 0; }
.track-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                  padding: 20px; border-left: 4px solid var(--accent); }
.track-card h3 { margin: 0 0 12px; font-size: 17px; }
.track-card .track-level { display: flex; align-items: center; padding: 6px 0; font-size: 13px; color: var(--fg2); }
.track-card .track-level .level-badge { display: inline-block; padding: 2px 8px; border-radius: 10px;
                  font-size: 11px; font-weight: 700; margin-right: 8px; min-width: 40px; text-align: center; }
.track-card .level-badge.vcp { background: var(--ok-soft); color: #33603f; border: 1px solid #cfe0d4;}
.track-card .level-badge.vcap { background: var(--accent-soft); color: var(--accent-hover); border: 1px solid var(--accent-line);}
.track-card .level-badge.vcap-role { background: #ecebf7; color: #3b3578; border: 1px solid #d5d2ec;}
.track-card .level-badge.vcdx { background: var(--warn-soft); color: #7a5a20; border: 1px solid #e8dcc0;}
.track-card .mandatory-tag { background: var(--red); color: #fff; padding: 1px 6px; border-radius: 8px;
                  font-size: 11px; font-weight: 700; margin-left: 6px; }
.track-card .elective-tag { background: var(--bg3); color: var(--fg3); padding: 1px 6px; border-radius: 8px;
                  font-size: 11px; margin-left: 6px; }
.track-card .exam-code { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.track-arrow { text-align: center; color: var(--fg3); font-size: 16px; padding: 2px 0; }
/* Study Timeline */
    .timeline { position: relative; margin: 32px 0; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-entry { position: relative; margin-bottom: 20px; padding: 12px 16px; background: var(--bg2);
                      border: 1px solid var(--border); border-radius: var(--radius); }
.timeline-entry::before { content: ''; position: absolute; left: -30px; top: 16px; width: 10px; height: 10px;
                              background: var(--accent); border-radius: 50%; border: 2px solid var(--bg); }
.timeline-entry .timeline-months { font-weight: 700; color: var(--accent2); font-size: 13px; }
.timeline-entry .timeline-milestone { font-size: 14px; font-weight: 600; color: var(--fg); margin: 4px 0; }
.timeline-entry .timeline-activity { font-size: 12px; color: var(--fg3); }
.timeline-entry .timeline-sections { margin-top: 6px; }
.timeline-entry .timeline-sections a { font-size: 11px; color: var(--accent); cursor: pointer; margin-right: 8px; }
/* Data tables (VCF 5.2 reference) */
    .data-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.data-table th { text-align: left; padding: 8px 10px; background: var(--bg3); color: var(--fg2);
                     border-bottom: 1px solid var(--border); font-weight: 600; font-size: 12px; }
.data-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); color: var(--fg2); vertical-align: top; font-size: 12px; }
.data-table tr:hover { background: rgba(59,130,246,0.05); }
.data-table tr:nth-child(even) { background: var(--bg); }
/* Version comparison boxes */
    .version-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.version-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                   padding: 14px; border-top: 3px solid var(--accent); }
.version-box.vcf52 { border-top-color: var(--yellow); }
.version-box.vcf90 { border-top-color: var(--accent); }
.version-box h4 { margin: 0 0 8px; font-size: 14px; }
.version-box p { font-size: 13px; color: var(--fg2); margin: 0; }
/* Exam metadata card */
    .exam-meta-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                      padding: 16px; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.exam-meta-card .exam-meta-item { text-align: center; min-width: 80px; }
.exam-meta-card .exam-meta-value { font-size: 20px; font-weight: 700; color: var(--accent2); }
.exam-meta-card .exam-meta-label { font-size: 11px; color: var(--fg3); text-transform: uppercase; }
.exam-meta-card .exam-meta-code { font-family: 'JetBrains Mono', monospace; font-size: 14px;
                      color: var(--accent); font-weight: 700; }
/* Blueprint weight bars */
    .weight-bars { margin: 16px 0; }
.weight-bar { display: flex; align-items: center; margin: 6px 0; font-size: 13px; }
.weight-bar-label { width: 200px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weight-bar-track { flex: 1; height: 20px; background: var(--bg3); border-radius: 4px; margin: 0 10px; overflow: hidden; }
.weight-bar-fill { height: 100%; border-radius: 4px; display: flex; align-items: center; justify-content: center;
                       font-size: 11px; font-weight: 700; color: #fff; min-width: 30px; }
.weight-bar-fill.high { background: var(--accent); }
.weight-bar-fill.medium { background: var(--accent2); }
.weight-bar-fill.low { background: var(--fg3); }
.weight-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px;
                    font-weight: 700; margin-left: 8px; }
.weight-badge.high { background: rgba(59,130,246,0.15); color: var(--accent); }
.weight-badge.priority { background: rgba(245,158,11,0.15); color: var(--yellow); }
/* Version filter bar */
    .version-filter { display: flex; gap: 8px; padding: 8px 16px; background: var(--bg2);
                      border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.version-filter-btn { padding: 4px 14px; border-radius: 14px; font-size: 12px; font-weight: 600;
                          cursor: pointer; border: 1px solid var(--border); background: var(--bg);
                          color: var(--fg3); transition: all 0.2s; }
.version-filter-btn:hover { border-color: var(--accent); color: var(--fg); }
.version-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Holodeck state diagram */
    .state-diagram { margin: 24px 0; }
.state-path { margin-bottom: 24px; }
.state-path-title { font-size: 15px; font-weight: 700; color: var(--accent2); margin-bottom: 12px; }
.state-path-desc { font-size: 13px; color: var(--fg3); margin-bottom: 12px; }
.state-flow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.state-node { display: inline-flex; flex-direction: column; align-items: center; padding: 10px 14px;
                  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                  min-width: 120px; max-width: 200px; cursor: default; transition: border-color 0.2s; }
.state-node:hover { border-color: var(--accent); }
.state-node.vcf52 { border-left: 3px solid var(--yellow); }
.state-node.vcf9x { border-left: 3px solid var(--accent); }
.state-node.vcf902 { border-left: 3px solid var(--accent2); }
.state-node-id { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent);
                     font-weight: 700; margin-bottom: 2px; }
.state-node-name { font-size: 12px; font-weight: 600; color: var(--fg); text-align: center; }
.state-arrow { font-size: 18px; color: var(--fg3); padding: 0 2px; }
.state-details { margin-top: 24px; }
.state-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                  padding: 16px; margin-bottom: 12px; }
.state-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.state-card-id { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
                     color: var(--accent); background: rgba(59,130,246,0.1); padding: 2px 8px;
                     border-radius: 4px; }
.state-card-name { font-size: 15px; font-weight: 700; color: var(--fg); }
.state-card-ver { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.state-card-ver.v52 { background: rgba(245,158,11,0.15); color: var(--yellow); }
.state-card-ver.v9x { background: rgba(59,130,246,0.15); color: var(--accent); }
.state-card-ver.v902 { background: rgba(52,211,153,0.15); color: var(--accent2); }
.state-card-ver.vany { background: rgba(156,163,175,0.15); color: var(--fg3); }
.state-card-desc { font-size: 13px; color: var(--fg2); line-height: 1.5; margin-bottom: 10px; }
.state-card-components { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.state-component { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.state-component.present { background: rgba(52,211,153,0.12); color: var(--accent2); }
.state-component.absent { background: rgba(239,68,68,0.12); color: var(--red); text-decoration: line-through; }
.state-labs-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
                        padding: 3px 10px; border-radius: 10px; background: rgba(59,130,246,0.12);
                        color: var(--accent); margin-top: 8px; }
.lab-state-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
                       padding: 4px 12px; border-radius: 8px; background: rgba(52,211,153,0.08);
                       border: 1px solid rgba(52,211,153,0.2); color: var(--accent2); margin: 4px 0; }
.lab-state-badge .state-id-ref { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
/* ===== Lab task progress checkboxes ===== */
    .task-check { width: 16px; height: 16px; margin-right: 10px; accent-color: var(--green);
                  cursor: pointer; flex-shrink: 0; }
.task-header { gap: 8px; flex-wrap: wrap; }
.task-header .task-title-wrap { display: flex; align-items: center; flex: 1 1 260px; min-width: 0; }
.task-header h3 { min-width: 0; overflow-wrap: anywhere; }
/* Header badges must never out-compete the title for width. */
.task-header .badge { flex: 0 1 auto; max-width: 100%; white-space: normal; display: inline-block; }
/* Sentence-length design_quality values render here, under the header,
   instead of as a badge (generate.py:render_task). */
.task-defense-note {
  padding: 9px 20px 10px 20px; font-size: 13.3px; line-height: 1.55;
  color: var(--fg-muted); background: var(--surface-2);
  border-top: 1px solid var(--border); border-left: 3px solid var(--accent-line);
}
.task-defense-note::before {
  content: "VCDX defense angle"; display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-hover); margin-bottom: 3px;
}
/* ===== Exam Simulator ===== */
    .sim-timer { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20;
                 background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
                 padding: 10px 16px; margin: 12px 0; font-size: 18px; font-weight: 700;
                 font-family: 'JetBrains Mono', monospace; color: var(--accent2); }
.sim-q .quiz-choice.selected { border-color: var(--accent); background: rgba(59,130,246,0.15); color: var(--fg); }
.sim-card { cursor: default; }
.pass-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px;
                  font-weight: 700; background: rgba(16,185,129,0.15); color: var(--green); }
.fail-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px;
                  font-weight: 700; background: rgba(239,68,68,0.15); color: var(--red); }
/* ===== Progress dashboard ===== */
    .dash-bar { display: inline-block; vertical-align: middle; width: 120px; height: 10px;
                background: var(--bg3); border-radius: 5px; overflow: hidden; margin-right: 8px; }
.dash-bar-fill { height: 100%; background: var(--accent); border-radius: 5px; }
.dash-pct { font-size: 12px; color: var(--fg2); font-weight: 600; }
.due-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px;
                 font-weight: 700; background: rgba(245,158,11,0.15); color: var(--yellow); }
/* ===== Weak-area heatmap ===== */
    .heat-cell { display: inline-block; min-width: 48px; text-align: center; padding: 2px 8px;
                 border-radius: 4px; font-weight: 700; font-size: 12px; }
.heat-good { background: rgba(16,185,129,0.18); color: var(--green); }
.heat-mid { background: rgba(245,158,11,0.18); color: var(--yellow); }
.heat-bad { background: rgba(239,68,68,0.18); color: var(--red); }
/* Selection affordance: choices are clickable list items, not <input>s, so
   they need an explicit radio-style marker to read as answerable. */
.quiz-choices { list-style: none; padding-left: 0; margin: 8px 0; }
.quiz-choice { list-style: none; display: flex; align-items: flex-start; gap: 10px;
               background: var(--surface); }
.quiz-choice::before {
  content: ""; flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px;
  border: 2px solid var(--border-strong); border-radius: 50%; background: var(--bg);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.quiz-choice:hover::before { border-color: var(--accent); }
.quiz-choice.selected::before,
.quiz-choice.correct::before,
.quiz-choice.wrong::before { box-shadow: inset 0 0 0 3px var(--bg); }
.quiz-choice.selected::before { border-color: var(--accent); background: var(--accent); }
.quiz-choice.correct::before  { border-color: var(--ok); background: var(--ok); }
.quiz-choice.wrong::before    { border-color: var(--danger); background: var(--danger); }
.quiz-choice.selected { background: var(--accent-soft); }
.quiz-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Simulator controls need real button styling on the multi-page build. */
.sim-timer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.sim-timer button, .quiz-btn {
  padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; font-family: inherit;
}
.sim-timer button + button, .quiz-btn-reset {
  background: var(--surface-2); color: var(--fg-muted); border-color: var(--border-strong);
}
.sim-timer button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

/* Status badges are emitted with dynamic suffixes (badge-status-<STATUS>).
   Give every variant a sane default so unknown statuses still read as badges. */
[class*="badge-status-"] {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  background: var(--surface-2); color: var(--fg-muted); border: 1px solid var(--border);
}
.badge-status-RESOLVED, .badge-status-LIKELY_RESOLVED { background: var(--ok-soft); color: #33603f; border-color: var(--ok); }
.badge-status-OPEN, .badge-status-CRITICAL, .badge-status-CRITICAL_IF_MISDESIGNED { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.badge-status-VERIFY_ON_9_1, .badge-status-SUPERSEDED_IN_9_1 { background: var(--warn-soft); color: #7a5a20; border-color: var(--warn); }
.badge-status-INFORMATIONAL, .badge-status-STILL_RELEVANT, .badge-status-COMMON, .badge-status-STRUCTURAL { background: var(--info-soft); color: var(--info); border-color: var(--info); }
/* Code inside table cells must not break mid-token: CIDRs and emails were
   splitting as 10.1.0.0/2 | 0 (F-08). Must sit AFTER the generic `code` rule. */
td code, th code, .md-table code { white-space: nowrap; word-break: normal; overflow-wrap: normal; }

/* Tables and code emitted by generate.py:md() (F-04). Mirror into generate.py:css(). */
.md-table { width: 100%; border-collapse: collapse; font-size: 13.8px; background: var(--surface); }
.md-table th { text-align: left; font-weight: 650; padding: 8px 12px; background: var(--surface-2);
               border-bottom: 2px solid var(--border-strong); color: var(--fg-muted);
               font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.md-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.md-table tbody tr:last-child td { border-bottom: 0; }
.md-table tbody tr:hover { background: var(--surface-2); }
.content pre > code { display: block; white-space: pre; font-size: 12.9px; line-height: 1.6; }

/* Remaining statuses, normalised by generate.py:status_class(). Free-text
   variants collapse to their base token, so "OPEN (workaround provided)"
   lands on .badge-status-OPEN rather than splitting into bogus classes. */
.badge-status-WORKING, .badge-status-READY, .badge-status-ACTIVE,
.badge-status-ONLINE, .badge-status-HEALTHY, .badge-status-IN_USE { background: var(--ok-soft); color: #33603f; border-color: var(--ok); }
.badge-status-FAILS, .badge-status-NOT_FOUND { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.badge-status-NO_FILTER_SUPPORT, .badge-status-STANDBY { background: var(--warn-soft); color: #7a5a20; border-color: var(--warn); }
.badge-status-BY_DESIGN { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.lab-page { display: block; }

/* ---------- Study links (quiz question -> source material) ---------- */
.study-links { margin: 10px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
               font-size: 12.5px; line-height: 1.5; }
.study-links-intro { color: var(--fg-faint); font-weight: 600; }
.study-links-prompt { padding: 8px 10px; background: var(--surface-2);
                      border: 1px dashed var(--border-strong); border-radius: 6px; }
.study-links-exp { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.study-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
              background: var(--surface); border: 1px solid var(--accent-line);
              border-radius: 999px; color: var(--accent); text-decoration: none;
              font-weight: 600; transition: background .15s, border-color .15s, color .15s; }
.study-link:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.study-link-icon { font-size: 12px; line-height: 1; }
.study-link-supporting { font-weight: 500; color: var(--fg-muted); border-color: var(--border); }
.study-link-supporting:hover { color: var(--accent); }

/* Anchor affordance on theory blocks + flash when arrived at via a study link */
.theory-block { scroll-margin-top: 24px; }
.theory-block > h2 .anchor-link { margin-left: 8px; color: var(--border-strong);
    text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; font-size: .8em; }
.theory-block:hover > h2 .anchor-link { opacity: 1; }
.theory-block > h2 .anchor-link:hover { color: var(--accent); }
@keyframes anchorFlash { from { background: var(--accent-soft); } to { background: transparent; } }
.anchor-flash { animation: anchorFlash 1.6s ease-out; border-radius: 8px; }
:target.theory-block { animation: anchorFlash 1.6s ease-out; border-radius: 8px; }

/* Low-confidence study links: right topic area, but the material does not state
   the specific fact. Must never read as a verified source. */
.study-link-related { background: var(--bg); border-style: dashed; border-color: var(--border-strong);
                      color: var(--fg-muted); font-weight: 500; }
.study-link-related:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.study-link-tag { margin-left: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
                  font-weight: 700; color: var(--fg-faint); border: 1px solid var(--border);
                  border-radius: 3px; padding: 0 4px; }

/* F-15: graded questions lock their Check button */
.quiz-btn:disabled, .quiz-btn-check:disabled { opacity: .55; cursor: default; }

/* F-11: keyboard focus ring for card-shaped links */
[role="link"]:focus-visible, .vvs-card:focus-visible, .card[role="link"]:focus-visible,
.linkcard:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm);
}

/* Long unbreakable strings (URLs, IDs) must not widen the page (F-21). */
/* overflow-wrap is inherited: one rule on .content protects every descendant,
   while <pre>/.ascii-art keep their own scroll container. */
.content, .crumb { overflow-wrap: anywhere; }
/* Exam-blueprint labels: fixed 200px + nowrap overflowed at 375px (F-21). */
@media (max-width: 640px) {
  .weight-bar-label { white-space: normal; width: auto; min-width: 0; }
  .weight-bar { flex-wrap: wrap; }
}
/* VVS tab bar: 6 fixed-width tabs are 614px wide and blew past a 335px column
   on all 16 solution pages (F-21). Wrap them instead. */
.vvs-tabs { flex-wrap: wrap; }
@media (max-width: 640px) { .vvs-tab { padding: 9px 12px; font-size: 12.5px; } }
/* Long track/difficulty badges are nowrap inline-blocks; one 341px badge
   overflowed a 305px card on labs/vcp-architect-07 (F-21). */
.badge { max-width: 100%; }
@media (max-width: 640px) { .badge { white-space: normal; } }
