:root {
  /* light base */
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --panel-3: #eef1f8;
  --border: #e1e5f0;
  --border-soft: #edeff6;
  --text: #1b2030;
  --text-dim: #535b70;
  --text-faint: #8b92a6;

  /* jewel tones */
  --emerald: #0f9d6f;
  --emerald-deep: #0a7c58;
  --sapphire: #2f6df0;
  --sapphire-deep: #1f55cc;
  --amethyst: #7c3aed;
  --amethyst-deep: #6429d6;
  --ruby: #d61f4e;
  --topaz: #b9820a;
  --topaz-soft: #f4c430;

  --accent: var(--emerald);
  --accent-deep: var(--emerald-deep);
  --accent-2: var(--sapphire);
  --accent-2-deep: var(--sapphire-deep);
  --warn: var(--topaz);
  --danger: var(--ruby);
  --good: var(--emerald);

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  /* distinctive, macOS-local pairing — refined serif display + geometric sans UI (offline) */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, serif;
  --font-ui: "Avenir Next", "Avenir", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ring-track: #e6e9f2;
  --shadow: 0 18px 44px -22px rgba(26, 32, 56, .32);
  --shadow-sm: 0 8px 22px -14px rgba(26, 32, 56, .25);
  --ring: 0 0 0 3px rgba(15, 157, 111, .2);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(15, 157, 111, .1), transparent 58%),
    radial-gradient(1000px 620px at 100% -6%, rgba(47, 109, 240, .1), transparent 55%),
    radial-gradient(900px 700px at 70% 110%, rgba(124, 58, 237, .07), transparent 55%),
    var(--bg);
}
a { color: var(--sapphire-deep); text-decoration: none; }
a:hover { color: var(--sapphire); }

/* scrollbars */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #ccd2e2; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b3bbd0; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- header ---------- */
header.topbar {
  display: flex; align-items: center; gap: 22px;
  height: 62px; padding: 0 22px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(26, 32, 56, .03), 0 6px 24px -18px rgba(26, 32, 56, .35);
}
.brand { font-family: var(--font-display); font-weight: 700; letter-spacing: .2px; font-size: 19px; display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand .dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4fe3b3, var(--emerald-deep));
  box-shadow: 0 0 0 3px rgba(15, 157, 111, .16);
}
.brand small { color: var(--text-faint); font-weight: 500; font-size: 12.5px; }

nav.tabs { display: flex; gap: 3px; }
nav.tabs button {
  background: transparent; border: 1px solid transparent; color: var(--text-dim);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all .15s ease; display: inline-flex; align-items: center; gap: 7px;
}
nav.tabs button svg { width: 17px; height: 17px; opacity: .9; }
nav.tabs button:hover { color: var(--text); background: rgba(26, 32, 56, .05); }
nav.tabs button.active {
  color: #fff; background: linear-gradient(180deg, var(--emerald), var(--emerald-deep));
  box-shadow: 0 8px 18px -9px rgba(15, 157, 111, .7);
}
.search { margin-left: auto; position: relative; display: flex; align-items: center; }
.search::before { content: "⌕"; position: absolute; left: 12px; color: var(--text-faint); font-size: 17px; pointer-events: none; }
.search input {
  background: #fff; border: 1px solid var(--border); color: var(--text);
  padding: 9px 13px 9px 34px; border-radius: 10px; width: 250px; font-size: 14px; transition: all .15s ease;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }

/* ---------- layout / scrolling ---------- */
main { height: calc(100vh - 62px); overflow: hidden; position: relative; }
#app > .split { height: 100%; }
#app > .pane { height: 100%; overflow-y: auto; }

.split { display: grid; grid-template-columns: 320px 1fr; height: 100%; }
.sidebar {
  background: rgba(255, 255, 255, .6);
  border-right: 1px solid var(--border); overflow-y: auto; padding: 14px 10px 40px;
}
.pane { overflow-y: auto; padding: 40px 48px 90px; }
/* center a comfortable reading column instead of dumping whitespace on the right */
.pane > * { width: 100%; max-width: 960px; margin-left: auto; margin-right: auto; }
.pane.narrow > * { max-width: 860px; }
/* the Learn pane already sits beside the sidebar — keep its column left-anchored */
.split .pane > * { margin-left: 0; margin-right: auto; }

/* ---------- curriculum tree ---------- */
.sec-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--text-faint);
  padding: 16px 12px 7px; font-weight: 800; display: flex; justify-content: space-between; align-items: center;
}
.sec-title .pct {
  color: var(--emerald-deep); font-size: 11px; background: rgba(15, 157, 111, .12);
  padding: 2px 8px; border-radius: 20px; font-weight: 700; letter-spacing: 0;
}
.lesson-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px;
  cursor: pointer; color: var(--text-dim); font-size: 13.5px; line-height: 1.35;
  border: 1px solid transparent; transition: background .13s ease, color .13s ease;
}
.lesson-link:hover { background: rgba(26, 32, 56, .045); color: var(--text); }
.lesson-link.active {
  background: linear-gradient(90deg, rgba(15, 157, 111, .14), rgba(15, 157, 111, .02));
  color: var(--text); border-color: rgba(15, 157, 111, .3); font-weight: 600;
}
.lesson-link .check {
  width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid #c3c9d8;
  display: grid; place-items: center; transition: all .15s ease;
}
.lesson-link.done .check { background: linear-gradient(180deg, var(--emerald), var(--emerald-deep)); border-color: var(--emerald-deep); }
.lesson-link.done .check::after { content: "✓"; color: #fff; font-size: 10px; font-weight: 900; }
.lesson-link.done .label { color: var(--text); }

/* ---------- markdown / prose ---------- */
.md { max-width: 100%; }
.md > *:first-child { margin-top: 0; }
.md h1 {
  font-family: var(--font-display);
  font-size: 34px; line-height: 1.15; margin: 0 0 18px; font-weight: 700; letter-spacing: -.2px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  background: linear-gradient(100deg, var(--emerald-deep), var(--sapphire-deep) 55%, var(--amethyst));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.md h2 { font-family: var(--font-display); font-size: 24px; margin: 34px 0 12px; font-weight: 700; letter-spacing: -.1px; color: #161b29; }
.md h3 { font-size: 17px; margin: 26px 0 9px; color: var(--emerald-deep); font-weight: 700; }
.md h4 { font-size: 12.5px; margin: 20px 0 7px; color: var(--amethyst-deep); text-transform: uppercase; letter-spacing: .8px; font-weight: 800; }
.md p { margin: 12px 0; color: #353c4e; }
.md ul, .md ol { padding-left: 24px; }
.md li { margin: 6px 0; color: #353c4e; }
.md li::marker { color: var(--emerald); }
.md li.task { list-style: none; margin-left: -22px; }
.md strong { color: #11151f; font-weight: 700; }
.md a { border-bottom: 1px solid rgba(47, 109, 240, .35); }
.md a:hover { border-bottom-color: var(--sapphire); }
.md code {
  background: rgba(15, 157, 111, .1); padding: 2px 7px; border-radius: 6px;
  font-family: var(--mono); font-size: 12.5px; color: var(--emerald-deep);
}
.md pre {
  background: #f5f7fc; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  overflow-x: auto; margin: 16px 0;
}
.md pre code { background: none; color: #2a3142; padding: 0; font-size: 13px; line-height: 1.6; }
.md blockquote {
  border-left: 3px solid var(--emerald); margin: 16px 0; padding: 12px 18px;
  background: linear-gradient(90deg, rgba(15, 157, 111, .08), transparent);
  color: #3a4254; border-radius: 0 10px 10px 0;
}
.md blockquote p { margin: 4px 0; }
.md table { border-collapse: separate; border-spacing: 0; margin: 18px 0; width: 100%; font-size: 13.5px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.md th, .md td { border-bottom: 1px solid var(--border-soft); padding: 9px 13px; text-align: left; vertical-align: top; }
.md th { background: var(--panel-3); font-weight: 700; color: #1d2333; border-bottom: 1px solid var(--border); }
.md tr:last-child td { border-bottom: none; }
.md tbody tr:nth-child(even) td { background: #fafbfe; }
.md tbody tr:hover td { background: rgba(47, 109, 240, .06); }
.md hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* ---------- lesson toolbar ---------- */
.lesson-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: rgba(255, 255, 255, .85); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.spacer { flex: 1; }

/* ---------- buttons ---------- */
button.btn, a.btn {
  background: #fff; border: 1px solid var(--border); color: var(--text);
  padding: 9px 15px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; transition: all .15s ease; white-space: nowrap;
}
button.btn:hover, a.btn:hover { background: #f6f8fc; border-color: #cfd5e4; transform: translateY(-1px); color: var(--text); }
button.btn:active, a.btn:active { transform: translateY(0); }
button.btn.primary, a.btn.primary {
  background: linear-gradient(180deg, var(--emerald), var(--emerald-deep)); border: none; color: #fff;
  box-shadow: 0 10px 22px -11px rgba(15, 157, 111, .75);
}
button.btn.primary:hover { filter: brightness(1.05); color: #fff; }
button.btn.ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
button.btn.ghost:hover { background: rgba(26, 32, 56, .05); color: var(--text); }
button.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.try { background: rgba(47, 109, 240, .1); border-color: rgba(47, 109, 240, .4); color: var(--sapphire-deep); }
.btn.try:hover { background: rgba(47, 109, 240, .16); color: var(--sapphire-deep); }

/* ---------- badges ---------- */
.badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 700; letter-spacing: .2px; display: inline-flex; align-items: center; gap: 5px; }
.badge.read { background: rgba(47, 109, 240, .12); color: var(--sapphire-deep); }
.badge.write { background: rgba(15, 157, 111, .14); color: var(--emerald-deep); }
.badge.ok { background: rgba(15, 157, 111, .14); color: var(--emerald-deep); }
.badge.ok::before { content: "●"; font-size: 9px; }
.badge.missing { background: rgba(214, 31, 78, .12); color: var(--ruby); }
.badge.flag { background: rgba(185, 130, 10, .16); color: var(--topaz); }

/* ---------- page heading helper ---------- */
.pane h1.md { font-size: 28px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 8px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 22px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-sm); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--emerald), var(--sapphire), var(--amethyst)); opacity: 0; transition: opacity .16s ease; }
.card:hover { transform: translateY(-3px); border-color: #d2d8e6; box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card h3 { margin: 0 0 5px; font-size: 16.5px; font-weight: 700; }
.card .summary { color: var(--text-dim); font-size: 13.5px; min-height: 42px; line-height: 1.5; }
.card .foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }

/* ---------- forms ---------- */
.toolform { max-width: 720px; margin-top: 8px; }
.field { margin: 16px 0; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.field input[type=text], .field input[type=number], .field select, .field input[type=file] {
  width: 100%; background: #fff; border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 10px; font-size: 14px; transition: all .15s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }
.field input[type=file] { padding: 8px; cursor: pointer; }
.field input[type=file]::file-selector-button {
  background: var(--panel-3); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 8px; margin-right: 12px; cursor: pointer; font-weight: 600;
}
.field.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.field.check label { margin: 0; color: var(--text); }
.field.check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--emerald); cursor: pointer; }
.hint { color: var(--text-faint); font-size: 12.5px; margin-top: 5px; }
.mappings .row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mappings .row input { width: 92px; }
.mappings .row span { color: var(--emerald-deep); font-weight: 700; }

/* ---------- results ---------- */
.result { margin-top: 26px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.result .rhead { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: #fafbfe; }
.result .rbody { padding: 18px; }
.cmd { font-family: var(--mono); font-size: 12.5px; background: #f5f7fc; border: 1px solid var(--border); padding: 11px 13px; border-radius: 10px; color: var(--emerald-deep); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.log { font-family: var(--mono); font-size: 12.5px; background: #1a2032; border: 1px solid #2a3350; padding: 13px; border-radius: 10px; white-space: pre-wrap; max-height: 340px; overflow-y: auto; color: #c3cbe0; line-height: 1.55; }
.errbox { background: rgba(214, 31, 78, .08); border: 1px solid rgba(214, 31, 78, .4); color: #a8123a; padding: 13px 15px; border-radius: 11px; }
.hintbox { background: rgba(185, 130, 10, .09); border: 1px solid rgba(185, 130, 10, .4); color: #8a6209; padding: 13px 15px; border-radius: 11px; margin-top: 12px; }
.hintbox code { background: #fff5dd; padding: 2px 7px; border-radius: 6px; color: #8a6209; }

/* histogram */
.hist td.bar-cell { width: 38%; }
.bar { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--sapphire), var(--emerald)); }

/* data tables */
.table-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; box-shadow: var(--shadow-sm); }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; background: #fff; }
table.data th, table.data td { border-bottom: 1px solid var(--border-soft); padding: 8px 11px; text-align: right; white-space: nowrap; }
table.data th { background: var(--panel-3); cursor: pointer; position: sticky; top: 0; z-index: 1; font-weight: 700; user-select: none; }
table.data th:hover { background: #e3e8f3; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data tbody tr:hover td { background: rgba(47, 109, 240, .06); }
table.data tr.flagged td { background: rgba(185, 130, 10, .1); }

/* ---------- quiz ---------- */
.quiz .q { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 16px 0; box-shadow: var(--shadow-sm); }
.quiz .q .qtext { font-weight: 600; margin-bottom: 12px; font-size: 15.5px; }
.quiz .choice { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; margin: 7px 0; cursor: pointer; transition: all .13s ease; }
.quiz .choice:hover { background: #f6f8fc; border-color: #cfd5e4; }
.quiz .choice input { accent-color: var(--emerald); width: 17px; height: 17px; }
.quiz .choice.correct { border-color: var(--emerald); background: rgba(15, 157, 111, .1); }
.quiz .choice.wrong { border-color: var(--ruby); background: rgba(214, 31, 78, .08); }
.quiz .explain { margin-top: 10px; font-size: 13px; color: var(--text-dim); border-left: 2px solid var(--emerald); padding-left: 12px; line-height: 1.5; }
.scorebar { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.score-num { font-family: var(--font-display); font-size: 36px; font-weight: 700; background: linear-gradient(120deg, var(--emerald-deep), var(--sapphire-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- progress ---------- */
.progress-grid { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 740px; }
.prow { display: flex; align-items: center; gap: 16px; }
.prow .name { width: 230px; font-weight: 600; font-size: 14px; }
.pbar { flex: 1; height: 11px; background: #e6e9f2; border-radius: 7px; overflow: hidden; border: 1px solid var(--border-soft); }
.pbar > div { height: 100%; background: linear-gradient(90deg, var(--emerald-deep), var(--emerald)); border-radius: 7px; transition: width .4s ease; }
.pbar.q > div { background: linear-gradient(90deg, var(--sapphire-deep), var(--sapphire)); }
.big-pct { font-size: 54px; font-weight: 800; line-height: 1; background: linear-gradient(120deg, var(--emerald-deep), var(--sapphire-deep) 70%, var(--amethyst)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- misc ---------- */
.muted { color: var(--text-dim); }
.center-help { color: var(--text-dim); text-align: center; margin: 90px auto 0; max-width: 540px; }
.center-help h2 { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.3px; background: linear-gradient(100deg, var(--emerald-deep), var(--sapphire-deep), var(--amethyst)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kbd { font-family: var(--mono); background: var(--panel-3); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 12px; }
.searchres { max-width: 880px; }
.searchres .hit { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 12px 0; transition: border-color .15s ease, box-shadow .15s ease; box-shadow: var(--shadow-sm); }
.searchres .hit:hover { border-color: #d2d8e6; box-shadow: var(--shadow); }
.searchres .hit .path { font-weight: 700; font-size: 14.5px; }
.searchres .snip { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--border); }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .pane { padding: 24px 20px 60px; }
}

/* ============================================================
   STRUCTURE & VISUALS — editorial cartography lab
   ============================================================ */

/* topographic contour motif (offline, pure CSS) */
.contour {
  position: absolute; inset: 0; pointer-events: none; opacity: .5; overflow: hidden; border-radius: inherit;
  background-image:
    repeating-radial-gradient(circle at 85% 18%, transparent 0 21px, rgba(15,157,111,.07) 21px 22px),
    repeating-radial-gradient(circle at 12% 120%, transparent 0 26px, rgba(47,109,240,.06) 26px 27px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%);
  mask-image: linear-gradient(90deg, transparent, #000 35%);
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 22px;
  padding: 38px 40px; margin-bottom: 30px;
  background:
    radial-gradient(700px 300px at 90% -40%, rgba(124,58,237,.1), transparent 60%),
    linear-gradient(135deg, #ffffff, #f3f7ff 60%, #eefcf6);
  box-shadow: var(--shadow-sm);
}
.hero .eyebrow {
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 800; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--emerald-deep); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.hero .eyebrow svg { width: 16px; height: 16px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.5px;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.08; margin: 0 0 12px; max-width: 18ch; color: #131722;
}
.hero h1 .accent { background: linear-gradient(110deg, var(--emerald-deep), var(--sapphire-deep) 60%, var(--amethyst)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: 16px; color: var(--text-dim); max-width: 58ch; margin: 0 0 22px; line-height: 1.6; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- stat tiles ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat {
  position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.stat .ic-badge { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; }
.stat .ic-badge svg { width: 20px; height: 20px; }
.stat .num { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; color: #161c2b; }
.stat .num small { font-size: 16px; color: var(--text-faint); font-weight: 600; }
.stat .lbl { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; font-weight: 600; }

/* ---------- section / continue cards ---------- */
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 16px; }
.section-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.1px; }
.section-head .count { color: var(--text-faint); font-size: 13px; font-weight: 600; }

.continue-card {
  display: flex; align-items: center; gap: 18px; text-align: left; width: 100%;
  background: linear-gradient(120deg, #0f9d6f, #0a7c58); border: none; color: #fff;
  border-radius: 18px; padding: 22px 24px; margin-bottom: 30px; cursor: pointer;
  box-shadow: 0 18px 36px -20px rgba(15,157,111,.8); position: relative; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
}
.continue-card:hover { transform: translateY(-2px); box-shadow: 0 24px 44px -20px rgba(15,157,111,.9); }
.continue-card .ic-lg { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; }
.continue-card .ic-lg svg { width: 26px; height: 26px; }
.continue-card .meta { flex: 1; min-width: 0; }
.continue-card .meta .k { font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; opacity: .85; font-weight: 700; }
.continue-card .meta .t { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-card .go { font-size: 26px; opacity: .9; }

.section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 16px; }
.sec-card {
  position: relative; text-align: left; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; cursor: pointer; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.sec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d2d8e6; }
.sec-card .top { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.sec-card .ic-badge { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.sec-card .ic-badge svg { width: 23px; height: 23px; }
.sec-card .name { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.sec-card .name small { display: block; color: var(--text-faint); font-weight: 600; font-size: 12px; margin-top: 2px; }
.sec-card .barwrap { display: flex; align-items: center; gap: 10px; }
.sec-card .barwrap .pbar { flex: 1; }
.sec-card .barwrap .pn { font-size: 12px; color: var(--text-dim); font-weight: 700; white-space: nowrap; }

/* ---------- page header (glossary / cheatsheet / search / do / progress) ---------- */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.page-head .ic-badge { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.page-head .ic-badge svg { width: 26px; height: 26px; }
.page-head h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin: 0; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--text-dim); font-size: 14px; }

/* ---------- icon badge tints (set --hue inline) ---------- */
.ic-badge { background: #eef2f9; color: var(--hue); }
.ic-badge { background: color-mix(in srgb, var(--hue) 14%, #fff); }
.ic-badge.solid { background: var(--hue); color: #fff; }

/* ---------- lesson eyebrow ---------- */
.lesson-eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--hue, var(--emerald-deep)); }
.lesson-eyebrow svg { width: 16px; height: 16px; }

/* sidebar section icon dot */
.sec-title .dot-ic { display: inline-flex; align-items: center; gap: 8px; }
.sec-title .dot-ic svg { width: 14px; height: 14px; color: var(--hue, var(--emerald-deep)); }

/* ---------- tool group header ---------- */
.tool-group-head { display: flex; align-items: center; gap: 9px; margin: 26px 0 4px; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-faint); }
.tool-group-head .line { flex: 1; height: 1px; background: var(--border); }
.card .ic-badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 13px; }
.card .ic-badge svg { width: 22px; height: 22px; }

/* ---------- progress ring ---------- */
.ring-wrap { position: relative; width: 160px; height: 160px; flex: none; }
.ring-wrap .ring { transform: none; }
.ring-wrap .ring circle.bg { stroke: var(--ring-track); }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-center .p { font-family: var(--font-display); font-size: 38px; font-weight: 700; line-height: 1; background: linear-gradient(130deg, var(--emerald-deep), var(--sapphire-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ring-center .l { font-size: 11px; color: var(--text-faint); font-weight: 700; letter-spacing: .8px; text-transform: uppercase; margin-top: 2px; }
.progress-hero { display: flex; align-items: center; gap: 30px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 26px 30px; margin-bottom: 28px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }

.big-pct { font-family: var(--font-display); font-weight: 700; }

/* ============================================================
   MOTION · FIELD ACCENT · CARD ILLUSTRATIONS
   ============================================================ */

/* ---------- page-load stagger ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .pane > * { animation: rise .5s cubic-bezier(.2, .75, .25, 1) both; }
  .pane > *:nth-child(1) { animation-delay: .00s; }
  .pane > *:nth-child(2) { animation-delay: .05s; }
  .pane > *:nth-child(3) { animation-delay: .10s; }
  .pane > *:nth-child(4) { animation-delay: .15s; }
  .pane > *:nth-child(5) { animation-delay: .20s; }
  .pane > *:nth-child(6) { animation-delay: .25s; }
  .pane > *:nth-child(n+7) { animation-delay: .30s; }

  .stat-row > *, .section-grid > *, .cards > * { animation: rise .55s cubic-bezier(.2, .75, .25, 1) both; }
  .stat-row > *:nth-child(1), .section-grid > *:nth-child(1), .cards > *:nth-child(1) { animation-delay: .12s; }
  .stat-row > *:nth-child(2), .section-grid > *:nth-child(2), .cards > *:nth-child(2) { animation-delay: .18s; }
  .stat-row > *:nth-child(3), .section-grid > *:nth-child(3), .cards > *:nth-child(3) { animation-delay: .24s; }
  .stat-row > *:nth-child(4), .section-grid > *:nth-child(4), .cards > *:nth-child(4) { animation-delay: .30s; }
  .section-grid > *:nth-child(5), .cards > *:nth-child(5) { animation-delay: .36s; }
  .section-grid > *:nth-child(6), .cards > *:nth-child(6) { animation-delay: .42s; }
  .section-grid > *:nth-child(n+7) { animation-delay: .48s; }
  .lesson-link { animation: rise .4s ease both; }
}

/* ---------- card illustrations (watermark) ---------- */
.art { position: absolute; right: -16px; bottom: -22px; color: var(--hue, var(--emerald)); opacity: .07; pointer-events: none; line-height: 0; }
.art svg { width: 112px; height: 112px; }
.stat .art { right: -18px; bottom: -24px; opacity: .06; }
.stat .art svg { width: 96px; height: 96px; }
.sec-card .art, .card .art { transition: opacity .18s ease, transform .18s ease; }
.sec-card:hover .art, .card:hover .art { opacity: .12; transform: scale(1.06) rotate(-3deg); }

/* hue accent line on section cards */
.sec-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--hue, var(--emerald)); opacity: 0; transition: opacity .16s ease; }
.sec-card:hover::before { opacity: .9; }
.sec-card .top, .sec-card .barwrap { position: relative; z-index: 1; }
.card > *:not(.art) { position: relative; z-index: 1; }
.stat > *:not(.art) { position: relative; z-index: 1; }

/* ---------- dark "field" accent — continue card ---------- */
.continue-card {
  background: linear-gradient(125deg, #0a201a 0%, #0c352a 55%, #0a2c3f 100%);
  color: #eafff8;
  box-shadow: 0 22px 44px -22px rgba(8, 28, 22, .85), inset 0 0 0 1px rgba(122, 240, 214, .1);
}
.continue-card .contour {
  opacity: .8;
  background-image:
    repeating-radial-gradient(circle at 88% 25%, transparent 0 19px, rgba(122, 240, 214, .12) 19px 20px),
    repeating-radial-gradient(circle at 8% 130%, transparent 0 24px, rgba(111, 156, 255, .1) 24px 25px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.continue-card .ic-lg { background: rgba(122, 240, 214, .14); color: #8df3da; box-shadow: inset 0 0 0 1px rgba(122, 240, 214, .2); }
.continue-card .meta .k { color: #8fcabb; }
.continue-card .meta .t { color: #f3fffb; }
.continue-card .go { color: #6fe7c6; }
.continue-card:hover .go { transform: translateX(4px); transition: transform .16s ease; }

/* a touch of field tone on the hero eyebrow chip */
.hero .eyebrow span { background: linear-gradient(180deg, rgba(10,44,36,.06), rgba(10,44,36,.02)); }

/* ============================================================
   GLOSSARY TERM CARDS · CHEAT-SHEET REFERENCE PANELS
   ============================================================ */
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 14px; }
.term-card {
  position: relative; background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--hue, var(--emerald)); border-radius: 13px;
  padding: 15px 16px 16px 17px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.term-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.term-card .term { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: #18202f; margin-bottom: 5px; line-height: 1.25; }
.term-card .def { color: var(--text-dim); font-size: 13.3px; line-height: 1.52; }
.term-card .def code { font-size: 11.5px; }
@media (prefers-reduced-motion: no-preference) {
  .term-grid > * { animation: rise .5s cubic-bezier(.2, .75, .25, 1) both; }
  .term-grid > *:nth-child(3n+2) { animation-delay: .05s; }
  .term-grid > *:nth-child(3n+3) { animation-delay: .10s; }
}
.gloss-foot {
  margin-top: 22px; padding: 14px 18px; border-radius: 13px; font-size: 13.5px; color: var(--text-dim);
  background: linear-gradient(120deg, rgba(15,157,111,.07), rgba(47,109,240,.05));
  border: 1px solid var(--border);
}
.gloss-foot strong { color: var(--emerald-deep); }
.gloss-foot code { font-size: 12px; }

.callout {
  background: linear-gradient(120deg, rgba(47,109,240,.07), rgba(124,58,237,.05));
  border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; margin-bottom: 22px;
}
.callout blockquote { border: none; background: none; margin: 12px 0; padding: 0; color: var(--text-dim); }

.ref-card {
  position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px 24px 8px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.ref-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--hue, var(--emerald)); }
.ref-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.ref-head .rt { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.15; }
.ref-head .rt small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); font-weight: 400; margin-top: 2px; letter-spacing: 0; }
.ref-card .md table { margin-top: 12px; }
.ref-card .md > p:first-child { margin-top: 4px; }

/* ============================================================
   GENERATED VISUALS — classified tile + pipeline diagram
   ============================================================ */
.viz-card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 14px; margin-bottom: 28px; box-shadow: var(--shadow-sm); }
.viz-frame { border-radius: 13px; overflow: hidden; border: 1px solid var(--border-soft); background: #eef4fb; line-height: 0; }
.lidar-svg { display: block; width: 100%; height: auto; }
.viz-cap { margin: 11px 3px 13px; font-size: 13px; line-height: 1.5; }
.class-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0 3px 2px; }
.legend-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.legend-chip .sw { width: 13px; height: 13px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.legend-chip b { font-family: var(--mono); font-size: 11px; color: var(--text-faint); font-weight: 600; }

.pipeline { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.pstep {
  flex: 1 1 148px; min-width: 138px; display: flex; flex-direction: column; gap: 9px; text-align: left;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px;
  box-shadow: var(--shadow-sm); cursor: default; font: inherit; color: inherit;
}
.pstep.link { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.pstep.link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--hue); }
.pstep .ic-badge { width: 36px; height: 36px; border-radius: 10px; }
.pstep .pt { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.pstep .pt small { display: block; color: var(--text-faint); font-weight: 600; font-size: 11.5px; margin-top: 3px; }
.parrow { display: flex; align-items: center; color: var(--text-faint); flex: 0 0 auto; align-self: center; }
@media (max-width: 720px) { .parrow { transform: rotate(90deg); margin: -2px auto; } .pstep { flex-basis: 100%; } }

/* ---------- cross-section: points fade in by class ---------- */
@keyframes ptin { 0% { opacity: 0; transform: scale(.1); } 65% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
.lidar-svg circle.pt {
  opacity: 0; transform-box: fill-box; transform-origin: center center;
  animation: ptin .5s cubic-bezier(.2, .85, .25, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .lidar-svg circle.pt { animation: none; opacity: 1; transform: none; }
}

/* ---------- legend chips light up as each class lands ---------- */
.legend-chip .sw { background: var(--sw, #999); display: inline-block; }
.legend-chip.anim { animation: chipland .55s ease both; }
.legend-chip.anim .sw { animation: swland .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: inherit; }
@keyframes chipland {
  0% { opacity: .3; filter: grayscale(1); }
  58% { opacity: 1; filter: none; }
  100% { opacity: 1; filter: none; }
}
@keyframes swland {
  0% { transform: scale(.5); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
  55% { transform: scale(1.45); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sw) 32%, transparent), inset 0 0 0 1px rgba(0, 0, 0, .14); }
  100% { transform: scale(1); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
}
@media (prefers-reduced-motion: reduce) {
  .legend-chip.anim, .legend-chip.anim .sw { animation: none; opacity: 1; filter: none; transform: none; }
}

/* ---------- sweeping scan line across the tile ---------- */
.viz-frame { position: relative; }
.scan {
  position: absolute; top: 0; bottom: 0; left: -170px; width: 150px; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(61, 215, 184, .14) 70%, rgba(74, 163, 224, .42) 95%, rgba(255, 255, 255, .9) 100%);
  border-right: 2px solid rgba(122, 240, 214, .9);
  box-shadow: 0 0 26px 6px rgba(61, 215, 184, .28);
  opacity: 0; animation: scansweep 2.3s cubic-bezier(.45, 0, .25, 1) both;
}
@keyframes scansweep {
  0% { left: -170px; opacity: 0; }
  9% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .scan { display: none; } }

/* ============================================================
   CLICKABLE WALKTHROUGH — focus a class in the cross-section
   ============================================================ */
/* dim via fill-opacity (the entrance animation owns `opacity`, so use a separate channel) */
.lidar-svg circle.pt { transition: fill-opacity .22s ease; }
.viz-frame.focusing circle.pt { fill-opacity: .1; }
.viz-frame[data-focus="ground"]   circle.c-ground,
.viz-frame[data-focus="lowveg"]   circle.c-lowveg,
.viz-frame[data-focus="medveg"]   circle.c-medveg,
.viz-frame[data-focus="highveg"]  circle.c-highveg,
.viz-frame[data-focus="building"] circle.c-building,
.viz-frame[data-focus="water"]    circle.c-water,
.viz-frame[data-focus="bridge"]   circle.c-bridge,
.viz-frame[data-focus="wire"]     circle.c-wire,
.viz-frame[data-focus="tower"]    circle.c-tower { fill-opacity: 1; }

/* selectable legend chips */
.legend-chip.sel-able { cursor: pointer; padding: 4px 9px; border-radius: 9px; border: 1px solid transparent; transition: background .14s ease, border-color .14s ease; }
.legend-chip.sel-able:hover { background: #eef3fb; }
.legend-chip.sel { background: #eef4ff; border-color: var(--sw); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sw) 18%, transparent); }

/* explanation panel */
.viz-explain {
  display: flex; align-items: flex-start; gap: 13px; margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 14px; min-height: 56px;
  background: linear-gradient(120deg, #fbfcfe, #f4f8ff);
}
.viz-explain .sw { width: 16px; height: 16px; border-radius: 5px; flex: none; margin-top: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.viz-explain .ttl { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; }
.viz-explain .txt { font-size: 13.2px; color: var(--text-dim); line-height: 1.52; margin-top: 3px; }

/* embedded diagram inside a lesson */
.md .viz-card.lesson-embed { margin: 22px 0 26px; }

/* embedded pipeline diagram inside a lesson */
.md .pipe-embed.lesson-embed { margin: 22px 0 26px; }
.md .pipe-embed .embed-cap { font-size: 13px; color: var(--text-dim); margin: 0 2px 12px; line-height: 1.5; }

/* "Try this tool" CTA under a lesson table */
.md .try-cta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px;
  padding: 12px 16px; border: 1px dashed #c9d2e2; border-radius: 13px;
  background: linear-gradient(120deg, rgba(15, 157, 111, .06), rgba(47, 109, 240, .03));
}
.md .try-cta .muted { color: var(--text-dim); font-size: 13.5px; }

/* ============================================================
   FIELD PLAN — NC western-phase checklist
   ============================================================ */
.plan-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.plan-actions .pbar { flex: 1; min-width: 160px; height: 12px; }
.plan-callout {
  font-size: 13.2px; color: var(--text-dim); line-height: 1.55; margin-bottom: 24px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(120deg, rgba(124, 58, 237, .06), rgba(47, 109, 240, .04));
}
.plan-callout strong { color: var(--amethyst-deep); }

.plan-phase { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.plan-phase::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--hue, var(--emerald)); }
.plan-phase .ph-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.plan-phase .ph-head .t { font-family: var(--font-display); font-weight: 700; font-size: 17.5px; }

.check-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--border-soft); cursor: pointer; }
.check-item:first-of-type { border-top: none; }
.check-item input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--emerald); flex: none; cursor: pointer; }
.check-item .ci-body { flex: 1; }
.check-item .ci-t { font-size: 14px; line-height: 1.45; }
.check-item.done .ci-t { color: var(--text-faint); text-decoration: line-through; }
.check-item .ci-tags { display: flex; gap: 8px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.tag { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 20px; letter-spacing: .4px; text-transform: uppercase; }
.tag.verify { background: rgba(185, 130, 10, .16); color: var(--topaz); }
.tag.local { background: rgba(15, 157, 111, .14); color: var(--emerald-deep); }
.tag.cli { background: rgba(124, 58, 237, .14); color: var(--amethyst-deep); }
.ci-link { font-size: 12px; font-weight: 600; }

/* ---------- print: clean checklist on paper ---------- */
@media print {
  header.topbar, .plan-actions, .lesson-eyebrow, .scan { display: none !important; }
  html, body, main, #app > .pane { height: auto !important; overflow: visible !important; }
  body { background: #fff !important; }
  .pane { padding: 0 !important; }
  .pane.narrow > * { max-width: 100% !important; }
  .plan-phase, .plan-callout { break-inside: avoid; box-shadow: none; }
  .check-item { break-inside: avoid; }
  a[href]::after { content: ""; }
}

/* ---------- copy button on code blocks ---------- */
.md pre.has-copy { position: relative; }
.code-copy {
  position: absolute; top: 8px; right: 8px; padding: 4px 9px; font-size: 11px; font-weight: 600;
  border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-dim);
  cursor: pointer; opacity: 0; transition: opacity .15s ease, color .15s ease, border-color .15s ease;
  display: inline-flex; align-items: center; gap: 5px;
}
.md pre.has-copy:hover .code-copy, .code-copy:focus { opacity: 1; }
.code-copy:hover { color: var(--emerald-deep); border-color: var(--emerald); }
.code-copy svg { width: 13px; height: 13px; }
@media (hover: none) { .code-copy { opacity: 1; } }

/* toast (static build notice) */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: #161c2b; color: #eef2f8; padding: 12px 18px; border-radius: 12px; font-size: 13.5px;
  box-shadow: var(--shadow); max-width: 460px; z-index: 100; opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Windows <-> WSL path converter widget ---------- */
.pathconv {
  background: linear-gradient(120deg, #fbfcfe, #f3f8ff); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 18px 16px; margin: 18px 0 24px; box-shadow: var(--shadow-sm);
}
.pathconv .pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--sapphire-deep); }
.pathconv .pc-lab { display: block; font-size: 12px; font-weight: 700; color: var(--text-dim); margin: 10px 0 5px; text-transform: uppercase; letter-spacing: .5px; }
.pathconv input {
  width: 100%; background: #fff; border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: 10px; font-family: var(--mono); font-size: 13.5px;
}
.pathconv input:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }
.pathconv .pc-out { display: flex; gap: 8px; align-items: stretch; }
.pathconv .pc-out input { background: #f5f7fc; color: var(--emerald-deep); font-weight: 600; }
.pathconv .pc-out .btn { white-space: nowrap; }

/* ---------- Utilities: class lookup + RMSE calc ---------- */
.util-card { background: linear-gradient(120deg, #fbfcfe, #f3f8ff); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; margin: 4px 0 6px; box-shadow: var(--shadow-sm); }
.util-card input[type=text], .util-card input[type=number] { width: 100%; background: #fff; border: 1px solid var(--border); color: var(--text); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.util-card input:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }
.cl-sw { width: 13px; height: 13px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); flex: none; display: inline-block; }
.rmse .rmse-row { display: flex; align-items: center; gap: 12px; margin: 9px 0; }
.rmse .rmse-row label { width: 110px; font-weight: 700; color: var(--text-dim); }
.rmse .rmse-row input { flex: 1; font-family: var(--mono); }
.rmse .rmse-row .u { color: var(--text-faint); width: 42px; font-size: 12.5px; }
.rmse .rmse-op { text-align: center; color: var(--emerald-deep); font-weight: 700; margin: 6px 0; letter-spacing: .5px; }

/* ---------- Utilities: train/val split helper ---------- */
.util-card textarea { width: 100%; background: #fff; border: 1px solid var(--border); color: var(--text); padding: 10px 12px; border-radius: 10px; font-family: var(--mono); font-size: 13px; resize: vertical; }
.util-card textarea:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }
.split-opts { display: grid; grid-template-columns: 1fr 200px; gap: 14px; margin-top: 10px; }
.split-out { margin-top: 14px; }
.split-sum { font-weight: 700; font-size: 15px; color: #16233a; }
.split-warn { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }
@media (max-width: 600px) { .split-opts { grid-template-columns: 1fr; } }

/* ---------- Course Overview ---------- */
.ov-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.ov-progress .pbar { height: 12px; }
.ov-sec { display: flex; align-items: center; gap: 12px; margin: 26px 0 10px; }
.ov-sec .ic-badge { width: 38px; height: 38px; border-radius: 11px; }
.ov-sec-t { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.15; }
.ov-sec-t small { display: block; font-family: var(--font-ui); color: var(--text-faint); font-weight: 600; font-size: 12px; margin-top: 1px; }
.ov-sec-n { margin-left: auto; font-weight: 700; font-size: 13px; }
.ov-list { display: flex; flex-direction: column; gap: 6px; }
.ov-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel); cursor: pointer; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.ov-row:hover { transform: translateX(3px); border-color: #cfd6e6; box-shadow: var(--shadow-sm); }
.ov-num { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--panel-3); color: var(--text-dim); }
.ov-num.done { background: linear-gradient(180deg, var(--emerald), var(--emerald-deep)); color: #fff; }
.ov-title { flex: 1; font-size: 14px; }
.ov-row.done .ov-title { color: var(--text-dim); }
.ov-badges { display: flex; gap: 6px; }
.ov-badges .badge { font-size: 10px; padding: 2px 8px; }
