/* Trade Up — mobile-first. Hi-vis accent on jobsite charcoal. */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #ece9e1;
  --text: #1b1d21;
  --muted: #5d6068;
  --line: #d9d5cb;
  --accent: #f59e0b;
  --accent-2: #d97706;
  --on-accent: #1b1d21;
  --good: #15803d;
  --good-bg: #dcfce7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --info: #1d4ed8;
  --elec: #eab308;
  --plumb: #0ea5e9;
  --const: #f97316;
  --heavy: #84cc16;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .06);
  --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181c; --surface: #1f2228; --surface-2: #2a2e36; --text: #eef0f3; --muted: #a1a6b0;
    --line: #353a44; --good: #4ade80; --good-bg: #14361f; --bad: #f87171; --bad-bg: #3f1a1a; --info: #60a5fa;
    --shadow: 0 1px 2px rgb(0 0 0 / .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16181c; --surface: #1f2228; --surface-2: #2a2e36; --text: #eef0f3; --muted: #a1a6b0;
  --line: #353a44; --good: #4ade80; --good-bg: #14361f; --bad: #f87171; --bad-bg: #3f1a1a; --info: #60a5fa;
  --shadow: 0 1px 2px rgb(0 0 0 / .3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--accent); padding: .5rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(.6rem + env(safe-area-inset-top)) 16px .6rem; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; text-decoration: none; letter-spacing: -.01em; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; }
.topstats { display: flex; gap: .4rem; font-size: .85rem; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .55rem; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }

main { max-width: 760px; margin: 0 auto; padding: 16px; outline: none; }

/* tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: .72rem; color: var(--muted); font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg { fill: var(--accent); }
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: 96px; }
  .tabbar { top: 0; bottom: 0; right: auto; width: 96px; height: auto; grid-template-columns: 1fr; grid-auto-rows: 80px; align-content: center; border-top: 0; border-right: 1px solid var(--line); }
}

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card.hero { background: linear-gradient(135deg, var(--accent), #fbbf24); color: #1b1d21; border: 0; }
.card.hero .muted { color: #3b3b3b; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.stack > * + * { margin-top: .6rem; }
.section-title { margin: 1.25rem 0 .6rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .6rem 1.1rem;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: transform .08s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.dark { background: #1b1d21; color: #fff; border-color: #1b1d21; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.linklike { background: none; border: 0; padding: 0; color: var(--info); text-decoration: underline; cursor: pointer; }

/* trade tiles */
.tile { display: block; text-decoration: none; border-radius: var(--radius); padding: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--tc, var(--accent)); }
.tile .emoji { font-size: 1.8rem; display: block; }
.tile h3 { margin: .3rem 0 .2rem; }
.tile p { margin: 0; font-size: .88rem; color: var(--muted); }
[data-trade="electrician"] { --tc: var(--elec); }
[data-trade="plumber"] { --tc: var(--plumb); }
[data-trade="construction"] { --tc: var(--const); }
[data-trade="heavy"] { --tc: var(--heavy); }

/* progress */
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s; }
.bar.good > i { background: var(--good); }
.level-badge { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 14px; background: #1b1d21; color: var(--accent); font-weight: 900; font-size: 1.3rem; flex: none; }

/* roadmap */
.phase { margin: 0 0 1rem; }
.phase > h3 { display: flex; align-items: center; gap: .5rem; }
.phase > h3 .num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); font-size: .85rem; }
.ms { display: flex; gap: .75rem; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: .5rem; }
.ms input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--good); flex: none; margin-top: 2px; }
.ms.done { background: var(--good-bg); border-color: transparent; }
.ms.done .ms-title { text-decoration: line-through; text-decoration-thickness: 2px; }
.ms-title { font-weight: 700; }
.ms .xp { margin-left: auto; font-size: .8rem; font-weight: 800; color: var(--accent-2); white-space: nowrap; }

/* facts & sources */
.fact { padding: .7rem .8rem; border-left: 4px solid var(--tc, var(--accent)); background: var(--surface-2); border-radius: 0 10px 10px 0; margin-bottom: .6rem; }
.src { font-size: .78rem; color: var(--muted); }
.src a { color: var(--info); }
.warn { background: #fff7e6; border: 1px solid #f5d08a; color: #5a3d00; border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .warn { background: #33270d; border-color: #6b4f14; color: #fde7b0; } }
:root[data-theme="dark"] .warn { background: #33270d; border-color: #6b4f14; color: #fde7b0; }

/* games */
.choices { display: grid; gap: .6rem; }
.choice { text-align: left; padding: .9rem 1rem; min-height: 54px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.choice.correct { border-color: var(--good); background: var(--good-bg); }
.choice.wrong { border-color: var(--bad); background: var(--bad-bg); }
.choice[disabled] { cursor: default; }
.timer { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: .5rem 0 1rem; }
.timer > i { display: block; height: 100%; background: var(--accent); width: 100%; }
.big-q { font-size: 1.2rem; font-weight: 700; margin: .5rem 0 1rem; }
.explain { margin-top: .9rem; padding: .8rem; border-radius: 12px; background: var(--surface-2); font-size: .95rem; }
.combo { font-weight: 900; color: var(--accent-2); }
.tape-wrap { background: var(--surface-2); border-radius: 12px; padding: 8px; overflow: hidden; }
.tape-wrap svg { display: block; width: 100%; height: auto; }
.bigscore { font-size: 3rem; font-weight: 900; line-height: 1; }
.game-card { display: flex; gap: .8rem; align-items: flex-start; text-decoration: none; }
.game-card .gi { font-size: 2rem; line-height: 1; }

/* forms */
label.field { display: block; margin-bottom: .8rem; font-weight: 600; }
label.field input, label.field select, label.field textarea { display: block; width: 100%; margin-top: .3rem; padding: .7rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); min-height: 46px; }
.opts { display: grid; gap: .5rem; }
.opt { display: flex; gap: .6rem; align-items: center; padding: .8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; }
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.opt input { accent-color: var(--accent); width: 20px; height: 20px; }

/* badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; }
.badge { text-align: center; padding: .7rem .4rem; border-radius: 12px; background: var(--surface-2); font-size: .78rem; font-weight: 700; }
.badge .bi { font-size: 1.7rem; display: block; }
.badge.locked { opacity: .35; filter: grayscale(1); }

/* coach bubble */
.coach { display: flex; gap: .75rem; align-items: flex-start; }
.coach .avatar { width: 44px; height: 44px; border-radius: 50%; background: #1b1d21; display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.coach .bubble { background: var(--surface-2); padding: .75rem .9rem; border-radius: 4px 14px 14px 14px; }

table.simple { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.simple th, table.simple td { text-align: left; padding: .45rem .3rem; border-bottom: 1px solid var(--line); vertical-align: top; }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: #1b1d21; color: #fff; padding: .7rem 1rem; border-radius: 12px; font-weight: 700; transition: .25s; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* segmented tabs */
.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin: 0 0 14px; overflow-x: auto; }
.seg a { flex: 1; text-align: center; padding: .55rem .6rem; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: .9rem; white-space: nowrap; color: var(--muted); }
.seg a[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* career path timeline */
.timeline { list-style: none; margin: 0 0 14px; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; background: var(--tc, var(--accent)); border-radius: 3px; opacity: .6; }
.timeline li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; margin-bottom: .7rem; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 1rem; width: 13px; height: 13px; border-radius: 50%; background: var(--tc, var(--accent)); border: 3px solid var(--bg); }
.tl-head { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; margin-bottom: .25rem; }
.honest { margin-top: .5rem; padding: .5rem .65rem; border-radius: 10px; background: var(--surface-2); }

/* study */
.concept-row { padding: .55rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.concept-row:last-child { border-bottom: 0; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary { margin-bottom: .5rem; }
.lesson p { margin-bottom: .7rem; }
.lesson code { background: var(--surface-2); padding: .05rem .3rem; border-radius: 5px; }
.flashcard { display: flex; flex-direction: column; justify-content: center; gap: .8rem; width: 100%; min-height: 240px; padding: 1.4rem; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 1.15rem; font-weight: 700; text-align: center; cursor: pointer; }
.flashcard.flipped { cursor: default; border-color: var(--accent); }
.fc-back { font-weight: 600; }
.form-err { margin: .2rem 0 .6rem; }

/* arcade */
.arcade-top { margin-bottom: .6rem; }
.arcade-hud { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; font-weight: 800; }
.arcade-stage { position: relative; border-radius: 16px; overflow: hidden; background: #111; box-shadow: var(--shadow); }
.arcade-stage canvas { display: block; }
.arcade-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(10, 12, 16, .55); backdrop-filter: blur(2px); overflow-y: auto; }
.arcade-overlay[hidden] { display: none; }
.explain-card { width: 100%; max-width: 380px; background: var(--surface); color: var(--text); border-radius: 16px; padding: 18px; box-shadow: 0 10px 40px rgb(0 0 0 / .4); }
.explain-card ol { padding-left: 1.2rem; }
.work { font-size: 1.1rem; background: var(--surface-2); padding: .5rem .7rem; border-radius: 10px; }
.arcade-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .5rem; margin-top: .7rem; }
.arcade-controls > .grid, .arcade-controls > .btn.block { grid-column: 1 / -1; }
.breaker { flex-direction: column; min-height: 64px; gap: 0; background: #1b1d21; color: #fff; border-color: #1b1d21; }
.breaker b { font-size: 1.25rem; color: var(--accent); }
.breaker span { font-size: .8rem; opacity: .8; }
.hold { user-select: none; -webkit-user-select: none; touch-action: none; }
.tl-head { flex-wrap: wrap; }
.tl-head .pill { white-space: normal; }

/* portfolio */
.project-card { display: block; text-decoration: none; padding: 10px; }
.project-card img, .project-card .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: .5rem; background: var(--surface-2); display: grid; place-items: center; font-size: 2.2rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.photos figure .btn { position: absolute; top: 6px; right: 6px; min-height: 32px; padding: 0 .6rem; }
.skillgrid { display: grid; grid-template-columns: 3rem repeat(4, 1fr); gap: 5px; }
.sg-h { font-weight: 800; font-size: .8rem; text-align: center; align-self: end; }
.sg-h span { display: block; font-weight: 600; color: var(--muted); font-size: .7rem; }
.sg-pos { align-self: center; text-align: left; }
.sg-cell { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.1rem; cursor: pointer; }
.sg-cell.lv1 { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); }
.sg-cell.lv2 { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.sg-cell.lv3 { background: color-mix(in srgb, var(--good) 35%, var(--surface)); }
.sg-cell.lv4 { background: var(--good-bg); border-color: var(--good); }
[data-trade="welder"] { --tc: var(--weld); }
:root { --weld: #ef4444; }

.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: .35rem .8rem; font-weight: 700; cursor: pointer; min-height: 38px; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--surface)); }
[data-trade="xray"] { --tc: var(--xray); }
:root { --xray: #8b5cf6; }

.reviewed { margin-top: .4rem; color: var(--good); font-weight: 700; }
.review-item.ok { border-left: 4px solid var(--good); }
.review-item.issue { border-left: 4px solid var(--bad); }
.review-item.stale { border-left: 4px solid var(--accent); }
:root { --hvac: #06b6d4; --lineworker: #facc15; --diesel: #78716c; --cdl: #2563eb; --fiber: #d946ef; }
[data-trade="hvac"] { --tc: var(--hvac); } [data-trade="lineworker"] { --tc: var(--lineworker); } [data-trade="diesel"] { --tc: var(--diesel); }
[data-trade="cdl"] { --tc: var(--cdl); } [data-trade="fiber"] { --tc: var(--fiber); }
:root { --solar: #f59e0b; --wind: #22d3ee; --lowvolt: #6366f1; }
[data-trade="solar"] { --tc: var(--solar); } [data-trade="wind"] { --tc: var(--wind); } [data-trade="lowvolt"] { --tc: var(--lowvolt); }

/* house wiring board */
.hw-board { width: 100%; height: auto; display: block; touch-action: manipulation; }
.hw-bg { fill: #1f2937; }
.hw-dev { fill: #e5e7eb; stroke: #9ca3af; stroke-width: 1.5; }
.hw-dev.lit { fill: #fef9c3; stroke: #facc15; }
.hw-lbl { font: 700 11px system-ui, sans-serif; fill: #111827; text-anchor: middle; }
.hw-tl { font: 600 9px system-ui, sans-serif; fill: #374151; text-anchor: middle; pointer-events: none; }
.hw-term { cursor: pointer; }
.hw-dot { stroke: #374151; stroke-width: 2; }
.hw-term.sel .hw-dot { stroke: #f59e0b; stroke-width: 4; }
.hw-dot.live { stroke: #ef4444; stroke-width: 4; }
.hw-wire { fill: none; stroke-width: 4; stroke-linecap: round; cursor: pointer; opacity: .92; }
.hw-toggle { cursor: pointer; }
.hw-toggle rect.up { fill: #16a34a; } .hw-toggle rect.down { fill: #6b7280; }
.hw-tog { font: 800 10px system-ui, sans-serif; fill: #fff; text-anchor: middle; pointer-events: none; }
.hw-bulb { fill: #9ca3af; } .hw-bulb.on { fill: #fde047; filter: drop-shadow(0 0 6px #facc15); }
.hw-fan { font: 900 20px system-ui; fill: #374151; text-anchor: middle; transform-box: fill-box; transform-origin: center; }
.hw-fan.spin { animation: hwspin .6s linear infinite; fill: #0ea5e9; }
@keyframes hwspin { to { transform: rotate(360deg); } }
.hw-trip { font: 900 18px system-ui; fill: #ef4444; text-anchor: middle; }

/* pipe run */
.pr-board { width: 100%; height: auto; display: block; touch-action: manipulation; }
.pr-bg { fill: #3b3026; }
.pr-roof { stroke: #a16207; stroke-width: 6; }
.pr-lbl { font: 800 10px system-ui, sans-serif; fill: #fde68a; text-anchor: middle; letter-spacing: .06em; }
.pr-cell { fill: #57473a; stroke: #6b5a4b; cursor: pointer; }
.pr-cell.stack { fill: #4b5563; } .pr-cell.fix { fill: #e7e5e4; }
.pr-fix { font-size: 26px; text-anchor: middle; pointer-events: none; }
.pr-mark { font-size: 16px; text-anchor: middle; pointer-events: none; }
.pp { stroke: #d6d3d1; stroke-width: 11; stroke-linecap: round; fill: none; pointer-events: none; }
.pj { fill: #d6d3d1; pointer-events: none; }
.pp.wet { stroke: #38bdf8; animation: prflow .4s both; } .pj.wet { fill: #38bdf8; animation: prflow .4s both; }
.wet.d0 { animation-delay: 0.00s; }
.wet.d1 { animation-delay: 0.18s; }
.wet.d2 { animation-delay: 0.36s; }
.wet.d3 { animation-delay: 0.54s; }
.wet.d4 { animation-delay: 0.72s; }
.wet.d5 { animation-delay: 0.90s; }
.wet.d6 { animation-delay: 1.08s; }
.wet.d7 { animation-delay: 1.26s; }
.wet.d8 { animation-delay: 1.44s; }
.wet.d9 { animation-delay: 1.62s; }
.wet.d10 { animation-delay: 1.80s; }
.wet.d11 { animation-delay: 1.98s; }
.wet.d12 { animation-delay: 2.16s; }

@keyframes prflow { from { stroke: #d6d3d1; fill: #d6d3d1; } }
.pr-tray { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: .4rem 0 .6rem; }
.pr-piece { background: #57473a; border: 2px solid transparent; border-radius: 10px; padding: 2px; aspect-ratio: 1; cursor: pointer; }
.pr-piece.on { border-color: var(--accent); background: #6b5a4b; }
.pr-piece svg { width: 100%; height: 100%; display: block; }
.hw-face { fill: #f5f5f4; stroke: #a8a29e; stroke-width: 2; } .hw-face.on { fill: #fef9c3; stroke: #facc15; filter: drop-shadow(0 0 6px #facc15); }
.hw-slots { font: 900 14px system-ui; fill: #57534e; text-anchor: middle; pointer-events: none; }
.hw-tab { cursor: pointer; } .hw-tabline { stroke: #b45309; stroke-width: 5; } .hw-tabline.broken { stroke-dasharray: 22 14; opacity: .6; }

/* sun roof */
.sr-roof { width: 100%; height: auto; display: block; background: #0f172a; border-radius: 14px; touch-action: manipulation; }
.sr-sun { font: 800 11px system-ui; fill: #fde68a; text-anchor: middle; }
.sr-cell { cursor: pointer; stroke: #0f172a; stroke-width: 1; }
.sr-cell.dS { fill: #b45309; } .sr-cell.dF { fill: #a16207; } .sr-cell.dW { fill: #92400e; } .sr-cell.dE { fill: #7c2d12; } .sr-cell.dN { fill: #57534e; }
.sr-cell.s1 { filter: brightness(.75); } .sr-cell.s2 { filter: brightness(.5); }
.sr-block { fill: #334155; } .sr-block.x { fill: #1e293b; stroke: #ef4444; stroke-dasharray: 3 3; stroke-width: .8; cursor: help; }
.sr-ico, .sr-dir { font: 700 11px system-ui; fill: #fde68a; text-anchor: middle; pointer-events: none; opacity: .75; }
.sr-tree { font-size: 10px; text-anchor: middle; pointer-events: none; }
.sr-panel { fill: #1d4ed8; stroke: #93c5fd; stroke-width: 1.5; cursor: pointer; }
.sr-grid { stroke: #93c5fd; stroke-width: .8; pointer-events: none; }
/* parts match */
.pm-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.pm-col { display: grid; gap: 8px; align-content: start; }
.pm-card { min-height: 58px; padding: .5rem .6rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .9rem; cursor: pointer; text-align: left; }
.pm-card.term { background: var(--surface-2); }
.pm-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.pm-card.done { border-color: var(--good); background: var(--good-bg); opacity: .75; }
.pm-card.bad { border-color: var(--bad); background: var(--bad-bg); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* career explorer */
.opt.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.chip-s { display: inline-block; padding: .2rem .5rem; border-radius: 8px; margin: .15rem .15rem 0 0; font-weight: 600; }
.chip-s.ok { background: var(--good-bg); color: var(--good); }
.chip-s.warn { background: #fff7e6; color: #92400e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip-s.warn { background: #33270d; color: #fde7b0; } }
:root[data-theme="dark"] .chip-s.warn { background: #33270d; color: #fde7b0; }
table.cmp th, table.cmp td { min-width: 110px; font-size: .85rem; }
table.cmp tbody th { min-width: 120px; color: var(--muted); font-weight: 700; }
