/* ============================================================
   SkillUp
   Visual identity: April's Acoustic Cafe. Paper sleeve stock,
   ink-blue label print, brass hardware. Fraunces for display,
   Karla for reading, IBM Plex Mono for anything file-shaped.
   ============================================================ */

:root {
  --paper:       #F5F2EA;
  --surface:     #FFFDF7;
  --surface-2:   #EDE8DB;
  --ink:         #1B1A16;
  --muted:       #625B4C;
  --faint:       #8C8474;
  --rule:        #DFD8C7;
  --accent:      #1F4E5F;
  --accent-ink:  #17404E;
  --accent-soft: #E1EAEC;
  --brass:       #8F6C11;
  --brass-soft:  #F2E9D2;
  --good:        #2F6B45;
  --good-soft:   #E2EFE6;
  --warn:        #8A5A0B;
  --warn-soft:   #F6EBD6;
  --bad:         #97331F;
  --bad-soft:    #F6E3DD;
  --shadow:      0 1px 2px rgba(27,26,22,.05), 0 10px 30px rgba(27,26,22,.05);
  --shadow-sm:   0 1px 2px rgba(27,26,22,.06);

  --measure: 68ch;
  --sidebar: 268px;
  --topbar-h: 58px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #131210;
    --surface:     #1B1915;
    --surface-2:   #24211A;
    --ink:         #EEE9DD;
    --muted:       #A79F8C;
    --faint:       #7B7463;
    --rule:        #332F26;
    --accent:      #79BACB;
    --accent-ink:  #9BD0DE;
    --accent-soft: #172B31;
    --brass:       #D8AE55;
    --brass-soft:  #2B2416;
    --good:        #7BC095;
    --good-soft:   #16281D;
    --warn:        #DFAC5C;
    --warn-soft:   #2B2214;
    --bad:         #E08D77;
    --bad-soft:    #2E1C16;
    --shadow:      0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.3);
    --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper:       #131210;
  --surface:     #1B1915;
  --surface-2:   #24211A;
  --ink:         #EEE9DD;
  --muted:       #A79F8C;
  --faint:       #7B7463;
  --rule:        #332F26;
  --accent:      #79BACB;
  --accent-ink:  #9BD0DE;
  --accent-soft: #172B31;
  --brass:       #D8AE55;
  --brass-soft:  #2B2416;
  --good:        #7BC095;
  --good-soft:   #16281D;
  --warn:        #DFAC5C;
  --warn-soft:   #2B2214;
  --bad:         #E08D77;
  --bad-soft:    #2E1C16;
  --shadow:      0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.3);
  --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--lwa-font-body);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--paper);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--lwa-font-head);
  font-weight: 600;
  line-height: 1.16;
  text-wrap: balance;
  margin: 0;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
h1 { font-size: clamp(31px, 4.4vw, 42px); letter-spacing: -.015em; }
h2 { font-size: 26px; letter-spacing: -.01em; margin: 52px 0 14px; }
h3 { font-size: 20px; margin: 34px 0 10px; }
h4 { font-size: 17px; margin: 26px 0 8px; font-family: var(--lwa-font-body); font-weight: 700; }

p { margin: 0 0 17px; max-width: var(--measure); }
.lede { font-size: 19.5px; color: var(--muted); margin-top: 14px; max-width: 60ch; }

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
}

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2.5px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px;
}

ul, ol { max-width: var(--measure); margin: 0 0 17px; padding-left: 22px; }
li { margin-bottom: 7px; }
li::marker { color: var(--faint); }

strong { font-weight: 700; }
hr { border: none; border-top: 1px solid var(--rule); margin: 40px 0; }

code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875em;
  background: var(--surface-2);
  padding: .12em .38em;
  border-radius: 3px;
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 22px;
  max-width: 100%;
}
pre code { background: none; padding: 0; font-size: 13.2px; line-height: 1.72; display: block; }

blockquote {
  margin: 0 0 22px;
  padding: 16px 22px;
  border-left: 3px solid var(--brass);
  background: var(--brass-soft);
  border-radius: 0 7px 7px 0;
  max-width: var(--measure);
}
blockquote p:last-child { margin-bottom: 0; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 24px; height: 24px; color: var(--accent); flex: none; }
.brand-name {
  font-family: var(--lwa-font-head); font-weight: 700; font-size: 20px; letter-spacing: -.01em;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-link {
  font-size: 14px; color: var(--muted); text-decoration: none;
  padding: 6px 10px; border-radius: 5px;
}
.topbar-link:hover { background: var(--surface-2); color: var(--ink); }

.theme-toggle, .menu-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13.5px;
  background: none; border: 1px solid var(--rule); color: var(--muted);
  padding: 5px 11px; border-radius: 5px; cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--accent); color: var(--ink); }
.theme-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.menu-toggle { display: none; }

/* ---------- shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  gap: 0 44px;
  padding: 0 20px;
}

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 30px 0 60px;
  border-right: 1px solid var(--rule);
  padding-right: 20px;
  scrollbar-width: thin;
}

.nav-group { margin-bottom: 18px; }
.nav-group-head {
  display: flex; align-items: baseline; gap: 9px;
  text-decoration: none;
  font-family: var(--lwa-font-head); font-weight: 600; font-size: 16px;
  color: var(--ink);
  padding-bottom: 6px;
}
.nav-group-head:hover { color: var(--accent); }
.nav-level {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .06em;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.nav-list { list-style: none; margin: 0; padding: 0 0 0 3px; border-left: 1px solid var(--rule); }
.nav-list li { margin: 0; }
.nav-link {
  display: block;
  padding: 4px 0 4px 13px;
  font-size: 14.2px;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active {
  color: var(--accent-ink);
  border-left-color: var(--accent);
  font-weight: 600;
}
.nav-group:not(.is-open) .nav-list { display: none; }

main { min-width: 0; padding: 38px 0 70px; }
.page { max-width: 780px; }
.page-eyebrow { margin-bottom: 12px; }

/* ---------- components authored in markdown ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.card > :last-child { margin-bottom: 0; }
.card h3, .card h4 { margin-top: 0; }

.grid { display: grid; gap: 16px; margin-bottom: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.note {
  border-radius: 8px;
  padding: 17px 20px;
  margin: 0 0 22px;
  max-width: var(--measure);
  background: var(--accent-soft);
  border: 1px solid transparent;
}
.note > :last-child { margin-bottom: 0; }
.note .eyebrow { color: var(--accent); margin-bottom: 6px; }
.note.brass { background: var(--brass-soft); }
.note.brass .eyebrow { color: var(--brass); }
.note.good { background: var(--good-soft); }
.note.good .eyebrow { color: var(--good); }
.note.bad { background: var(--bad-soft); }
.note.bad .eyebrow { color: var(--bad); }
.note.warn { background: var(--warn-soft); }
.note.warn .eyebrow { color: var(--warn); }

.analogy {
  border: 1px solid var(--brass);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 0 0 24px;
  max-width: var(--measure);
  background: var(--surface);
  position: relative;
}
.analogy .eyebrow { color: var(--brass); margin-bottom: 8px; }
.analogy > :last-child { margin-bottom: 0; }

/* three tier loading diagram */
.tiers { display: flex; flex-direction: column; gap: 9px; margin: 0 0 24px; max-width: var(--measure); }
.tier {
  display: grid;
  grid-template-columns: 158px minmax(0,1fr) auto;
  align-items: center; gap: 16px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 13px 17px;
}
.tier:nth-child(2) { border-left-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); }
.tier:nth-child(3) { border-left-color: color-mix(in srgb, var(--accent) 25%, var(--rule)); }
.tier b { font-family: "IBM Plex Mono", monospace; font-size: 12.8px; font-weight: 500; }
.tier p { margin: 0; font-size: 14.3px; color: var(--muted); max-width: none; }
.tier .cost {
  font-family: "IBM Plex Mono", monospace; font-size: 12.2px; color: var(--faint);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) { .tier { grid-template-columns: 1fr; gap: 5px; } }

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); margin-bottom: 24px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); font-weight: 500; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
td code { font-size: 12.8px; }
.page > table { display: block; overflow-x: auto; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip {
  font-family: "IBM Plex Mono", monospace; font-size: 11.8px;
  padding: 4px 9px; border-radius: 4px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--rule);
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* section index cards */
.tocgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 14px; margin-bottom: 28px; }
.toccard {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
  padding: 17px 19px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease;
}
.toccard:hover { border-color: var(--accent); transform: translateY(-1px); color: inherit; }
.toccard b { display: block; font-family: var(--lwa-font-head); font-weight: 600; font-size: 17.5px; margin-bottom: 4px; }
.toccard span { font-size: 14.3px; color: var(--muted); }

/* scenario cards */
.scenes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 28px; }
.scene {
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 9px;
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease;
}
.scene:hover { border-color: var(--accent); transform: translateY(-1px); color: inherit; }
.scene h3 { margin: 0; font-size: 19px; }
.scene p { margin: 0; font-size: 14.4px; color: var(--muted); max-width: none; }
.scene .parts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 6px; }
.scene .parts span {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  padding: 3px 7px; border-radius: 3px; background: var(--surface-2); color: var(--muted);
}

/* stack diagram used on scenario pages */
.stack-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; max-width: var(--measure); }
.stack-row {
  display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 16px; align-items: start;
  padding: 12px 16px; border: 1px solid var(--rule); border-radius: 7px; background: var(--surface);
}
.stack-row > b {
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brass); padding-top: 3px;
}
.stack-row p { margin: 0; font-size: 14.4px; max-width: none; }
.stack-row code { font-size: 12.6px; }
@media (max-width: 640px) { .stack-row { grid-template-columns: 1fr; gap: 5px; } }

/* good / bad example pairs */
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 24px; }
.pair > div { border-radius: 8px; padding: 16px 18px; border: 1px solid var(--rule); background: var(--surface); }
.pair .no { border-left: 3px solid var(--bad); }
.pair .yes { border-left: 3px solid var(--good); }
.pair .eyebrow { margin-bottom: 7px; }
.pair .no .eyebrow { color: var(--bad); }
.pair .yes .eyebrow { color: var(--good); }
.pair p:last-child { margin-bottom: 0; }
.pair code { font-size: 12.7px; }

/* page nav */
.pagenav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule);
}
.pagenav-item {
  display: flex; flex-direction: column; gap: 3px;
  text-decoration: none; color: var(--ink);
  font-family: var(--lwa-font-head); font-weight: 600; font-size: 16px;
  max-width: 47%;
}
.pagenav-item.next { text-align: right; align-items: flex-end; }
.pagenav-item:hover { color: var(--accent); }

.foot {
  margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--rule);
  font-size: 13.6px; color: var(--faint); max-width: 780px;
}
.foot p { margin: 0 0 5px; max-width: none; }
.foot a { color: var(--muted); }

/* ---------- home ---------- */
.home { max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }

.hero { padding: 78px 0 54px; border-bottom: 1px solid var(--rule); }
.hero h1 {
  font-size: clamp(42px, 7.5vw, 74px);
  letter-spacing: -.03em;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: clamp(18px, 2.2vw, 21px); max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 6px;
  font-weight: 600; font-size: 15.5px; text-decoration: none;
  background: var(--accent); color: var(--paper); border: 1px solid var(--accent);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--paper); }
.btn.ghost { background: none; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--accent); }

.home h2 { font-size: 29px; margin: 64px 0 8px; }
.home .section-lede { color: var(--muted); margin-bottom: 26px; max-width: 60ch; }

.levelgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.levelcard {
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 9px;
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease;
}
.levelcard:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.levelcard .num {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .1em;
  color: var(--brass); font-variant-numeric: tabular-nums;
}
.levelcard b { font-family: var(--lwa-font-head); font-weight: 600; font-size: 20px; }
.levelcard span.d { font-size: 14.5px; color: var(--muted); }

.shopcard {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 10px;
}
.shopcard h3 { margin-top: 0; font-size: 23px; }
.shopcard .depts { display: flex; flex-wrap: wrap; gap: 7px; }
.shopcard .depts span {
  font-family: "IBM Plex Mono", monospace; font-size: 11.8px;
  padding: 4px 9px; border-radius: 4px; background: var(--brass-soft); color: var(--brass);
}

.foot-home { max-width: 1080px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- lab: forge ---------- */
.forge { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; margin: 22px 0 28px; }
@media (max-width: 900px) { .forge { grid-template-columns: 1fr; } }

.forge-pane { border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.forge-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--surface-2);
  flex-wrap: wrap;
}
.forge-head .eyebrow { margin: 0; }
.forge-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini {
  font: inherit; font-size: 12.5px; font-family: "IBM Plex Mono", monospace;
  padding: 4px 9px; border-radius: 4px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--rule); color: var(--muted);
}
.mini:hover { border-color: var(--accent); color: var(--ink); }

#skillEditor {
  width: 100%; min-height: 460px; resize: vertical;
  border: none; padding: 16px 18px; background: var(--surface); color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13.2px; line-height: 1.7;
  tab-size: 2;
}
#skillEditor:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-soft); }

.score-wrap { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.score-top { display: flex; align-items: center; gap: 18px; }
.score-ring { position: relative; width: 84px; height: 84px; flex: none; }
.score-ring svg { transform: rotate(-90deg); width: 84px; height: 84px; }
.score-ring .track { stroke: var(--rule); }
.score-ring .bar { stroke: var(--accent); transition: stroke-dashoffset .4s ease, stroke .3s ease; }
.score-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: "IBM Plex Mono", monospace; font-size: 22px; font-variant-numeric: tabular-nums;
}
.score-copy b { display: block; font-family: var(--lwa-font-head); font-size: 19px; }
.score-copy span { font-size: 14.2px; color: var(--muted); }

.findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.finding {
  display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px;
  padding: 11px 13px; border-radius: 7px; background: var(--surface-2); font-size: 14.2px;
  align-items: start;
}
.finding .tag {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 0; text-align: center; border-radius: 3px;
}
.finding.err .tag { background: var(--bad-soft); color: var(--bad); }
.finding.warn .tag { background: var(--warn-soft); color: var(--warn); }
.finding.ok .tag { background: var(--good-soft); color: var(--good); }
.finding b { display: block; font-weight: 600; margin-bottom: 2px; }
.finding p { margin: 0; font-size: 13.6px; color: var(--muted); max-width: none; }
.finding a { font-size: 13.4px; }

/* ---------- lab: decide ---------- */
.wizard { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); padding: 26px 28px; margin: 22px 0 28px; box-shadow: var(--shadow-sm); }
.wizard-progress { display: flex; gap: 5px; margin-bottom: 20px; }
.wizard-progress i { height: 3px; flex: 1; border-radius: 2px; background: var(--rule); }
.wizard-progress i.done { background: var(--accent); }
.wizard h3 { margin: 0 0 18px; font-size: 22px; }
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  text-align: left; font: inherit; font-size: 15.5px;
  padding: 13px 17px; border-radius: 7px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink);
}
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.verdict-name { font-family: var(--lwa-font-head); font-size: 30px; color: var(--accent); margin: 0 0 6px; }
.why { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 7px; }
.why li { font-size: 14.3px; color: var(--muted); padding-left: 18px; position: relative; }
.why li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }

/* ---------- lab: ideas ---------- */
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 22px; }
.picker label { display: block; margin-bottom: 7px; }
select {
  width: 100%; font: inherit; font-size: 15px;
  padding: 9px 12px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink);
}
.ideacards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 15px; }
.ideacard {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 9px;
  padding: 19px 21px; box-shadow: var(--shadow-sm);
}
.ideacard .nm { font-family: "IBM Plex Mono", monospace; font-size: 13.5px; color: var(--accent-ink); font-weight: 500; }
.ideacard .ds { font-size: 14.3px; color: var(--muted); }
.ideacard .why-it { font-size: 13.6px; padding-top: 9px; border-top: 1px solid var(--rule); color: var(--faint); }
.ideacard .go { margin-top: auto; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 0; }
  .sidebar {
    position: static; max-height: none; overflow: visible;
    border-right: none; border-bottom: 1px solid var(--rule);
    padding: 18px 0; display: none;
  }
  .sidebar.is-open { display: block; }
  .menu-toggle { display: inline-flex; }
  .nav-group:not(.is-open) .nav-list { display: block; }
  main { padding-top: 26px; }
}

/* ---------- checkpoint quiz ---------- */
.quiz { display: flex; flex-direction: column; gap: 16px; margin: 22px 0 26px; max-width: var(--measure); }
.q {
  border: 1px solid var(--rule); border-radius: 9px; background: var(--surface);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.qtext { font-weight: 600; margin: 0 0 6px; max-width: none; }
.q .opt {
  text-align: left; font: inherit; font-size: 15px;
  padding: 10px 14px; border-radius: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink);
}
.q .opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.q .opt:disabled { cursor: default; opacity: .75; }
.q .opt.is-right { border-color: var(--good); background: var(--good-soft); opacity: 1; font-weight: 600; }
.q .opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); opacity: 1; }
.explain {
  margin-top: 6px; padding: 13px 16px; border-radius: 7px;
  background: var(--surface-2); font-size: 14.4px; color: var(--muted);
}
.explain b { color: var(--ink); }
.quiz-result {
  border: 1px solid var(--accent); border-radius: 9px; background: var(--accent-soft);
  padding: 18px 22px; margin-bottom: 24px; max-width: var(--measure);
}
.quiz-result .eyebrow { color: var(--accent); margin-bottom: 5px; }
.quiz-result p { margin: 0; max-width: none; }

/* ---------- forge: sticky scorecard, collapsible passes ---------- */
.forge-pane:last-child { align-self: start; position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); }
.forge-pane:last-child .score-wrap { overflow-y: auto; }
.score-top { position: sticky; top: 0; background: var(--surface); padding-bottom: 12px; z-index: 1; }
.findings.hide-pass .finding.is-pass { display: none; }
.finding-toggle { display: flex; justify-content: center; padding: 4px 0; }
@media (max-width: 900px) {
  .forge-pane:last-child { position: static; max-height: none; }
}

/* h4-styled headings promoted to h3 for a valid heading order */
h3[data-h="4"] { font-size: 17px; margin: 26px 0 8px; font-family: var(--lwa-font-body); font-weight: 700; }
.card h3[data-h="4"] { margin-top: 0; }
