/* Wirewerks Training player.
   BRANDING: the accent colour and brand name are set here and in index.html only.
   Swap --accent (and --accent-ink if the new colour is light) for Wirewerks colours. */
:root {
  --accent: #0b6bcb;          /* <- the one accent colour */
  --accent-ink: #ffffff;      /* text on the accent colour */
  --ok: #1f9d55;
  --bad: #d64545;
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #17202a;
  --muted: #5d6b7a;
  --line: #dfe3e8;
  --soon: #b8c0c9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a; --card: #18202a; --ink: #e8edf2; --muted: #9aa8b6; --line: #2a3542; --soon: #4a5663;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.brand { font-weight: 700; letter-spacing: .2px; margin-right: auto; }
.brand b { color: var(--accent); }
.stat { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.stat strong { color: var(--ink); }
.icon-btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; }
.icon-btn:focus-visible, .btn:focus-visible, .opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bar { height: 6px; background: var(--line); }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s ease; }

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

/* ---------- home: the map ---------- */
.hello { margin: 8px 0 16px; }
.hello h1 { font-size: 22px; margin: 0 0 4px; }
.level { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 8px; margin-bottom: 16px; }
.level .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.level .meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.level .meter > i { display: block; height: 100%; background: var(--accent); }
.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); padding: 14px 16px; width: 100%; text-align: left; margin-bottom: 20px; box-shadow: var(--shadow); }
.resume small { display: block; opacity: .85; }
.track { margin: 0 0 28px; }
.track h2 { font-size: 18px; margin: 0; }
.track .route { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.map { position: relative; }
.map svg.road { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.road path { fill: none; stroke: var(--line); stroke-width: 10; stroke-linecap: round; }
.road path.done { stroke: var(--accent); opacity: .35; }
.site { position: relative; display: flex; align-items: center; gap: 12px; width: 62%; padding: 10px 0; background: none; border: 0; text-align: left; }
.site:nth-of-type(even) { margin-left: 38%; flex-direction: row-reverse; text-align: right; }
.pin { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 3px solid var(--soon); box-shadow: var(--shadow); color: var(--soon); position: relative; }
.pin svg { width: 28px; height: 28px; }
.site .label { font-size: 15px; line-height: 1.3; }
.site .label small { display: block; color: var(--muted); font-size: 12px; }
.site.available .pin, .site.in_progress .pin { border-color: var(--accent); color: var(--accent); }
.site.available .pin::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--accent); animation: ping 1.8s ease-out infinite; }
.site.in_progress .pin { background: linear-gradient(to top, color-mix(in srgb, var(--accent) 25%, var(--card)) 50%, var(--card) 50%); }
.site.done .pin { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent), 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent); }
.site.planned { cursor: default; }
.site.planned .label { color: var(--muted); }
@keyframes ping { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

/* ---------- sheets (module card, glossary, I'm lost) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 15, 20, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 85vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 20px 16px 28px; animation: rise .25s ease-out; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 18px; } }
.sheet h3 { margin: 0 0 8px; font-size: 20px; }
.sheet .btn { width: 100%; margin-top: 8px; }
.job { display: grid; gap: 6px; background: var(--bg); border-radius: 12px; padding: 12px; margin: 10px 0 14px; font-size: 14px; }
.job b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.lessons { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.lessons li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.lessons .tick { color: var(--ok); font-weight: 700; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }

/* ---------- player ---------- */
.stage { min-height: calc(100vh - 140px); display: flex; flex-direction: column; justify-content: center; padding: 8px 0 120px; touch-action: pan-y; }
.screen { animation: slide-in .28s ease-out; }
.screen.back { animation: slide-back .28s ease-out; }
@keyframes slide-in { from { transform: translateX(28px); opacity: 0; } }
@keyframes slide-back { from { transform: translateX(-28px); opacity: 0; } }
.kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.prompt { font-size: 20px; line-height: 1.4; margin: 0 0 16px; font-weight: 600; }
.body { font-size: 18px; line-height: 1.55; }
.body p { margin: 0 0 12px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.opts { display: grid; gap: 10px; }
.opt { width: 100%; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 14px; font-size: 16px; display: flex; gap: 10px; align-items: center; touch-action: none; }
.opt.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.opt.right { border-color: var(--ok); }
.opt.wrong { border-color: var(--bad); }
.opt .grip { color: var(--muted); font-size: 18px; user-select: none; }
.opt .move { margin-left: auto; display: flex; gap: 4px; }
.opt .move button { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; width: 34px; height: 34px; }
.opt.dragging { opacity: .6; transform: scale(1.02); box-shadow: var(--shadow); }
.pair-tag { margin-left: auto; font-size: 13px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.given { margin: 0 0 14px; padding-left: 18px; color: var(--muted); }
.numrow { display: flex; gap: 10px; align-items: center; }
.numrow input[type=number] { flex: 1; font-size: 22px; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); width: 100%; }
.unit { font-size: 18px; color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--accent); height: 36px; }
.readout { font-size: 34px; font-weight: 700; text-align: center; margin: 6px 0; font-variant-numeric: tabular-nums; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 12px 0; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video button.play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 28px; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .note { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .75); color: #fff; padding: 10px 12px; font-size: 14px; }
.video .note a { color: #fff; }
.task-label { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }

/* bottom action area */
.dock { position: fixed; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, var(--bg) 70%, transparent); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 4; }
.dock-in { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.btn { flex: 1; border: 0; border-radius: 12px; padding: 15px 18px; font-weight: 700; font-size: 17px; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); flex: 0 1 auto; }
.hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* feedback */
.fb { margin-top: 16px; border-radius: var(--radius); padding: 14px 16px; border-left: 6px solid; background: var(--card); box-shadow: var(--shadow); animation: rise .25s ease-out; }
.fb.ok { border-color: var(--ok); }
.fb.bad { border-color: var(--bad); }
.fb.neutral { border-color: var(--accent); }
.fb h4 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.fb .pts { margin-left: auto; color: var(--ok); font-weight: 700; animation: pop .5s ease-out; }
.shake { animation: shake .4s; }
.pop { animation: pop .45s ease-out; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* glossary terms */
.g { background: none; border: 0; padding: 0; color: inherit; border-bottom: 2px dotted var(--accent); cursor: help; }

/* finish */
.finish { text-align: center; padding-top: 40px; }
.finish .big { font-size: 64px; animation: pop .6s ease-out; }
.finish h2 { font-size: 26px; margin: 8px 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.error { background: var(--card); border-left: 6px solid var(--bad); padding: 16px; border-radius: 12px; margin-top: 40px; }
.needs-source { background: #fff3cd; color: #6b4e00; border-radius: 6px; padding: 0 6px; font-size: .9em; }

/* ---------- components ---------- */
.opt[disabled] { cursor: default; }
.opt .badge, .pos { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--bg); color: var(--muted); }
.opt.paired .badge, .opt.sel .badge { background: var(--accent); color: var(--accent-ink); }
.match .drop { min-height: 52px; }
.match .drop.over { border-color: var(--accent); border-style: dashed; }
.opt.ghost { position: fixed; z-index: 50; pointer-events: none; box-shadow: var(--shadow); opacity: .92; }
ol.order { list-style: none; padding: 0; margin: 0; }
ol.order .opt:focus-visible, .opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.range-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.hs svg { width: 100%; height: auto; display: block; }
.hs .hs-target { cursor: pointer; outline: none; transition: opacity .15s; }
.hs .hs-target:hover, .hs .hs-target:focus-visible { filter: drop-shadow(0 0 4px var(--accent)); }
.hs .hs-target.sel { filter: drop-shadow(0 0 6px var(--accent)); }
.hs .hs-target.sel .hs-ring, .hs .hs-target:focus-visible .hs-ring { stroke: var(--accent); stroke-width: 3; opacity: 1; }
.hs .hs-target.right .hs-ring { stroke: var(--ok); stroke-width: 4; opacity: 1; }
.hs .hs-target.wrong .hs-ring { stroke: var(--bad); stroke-width: 4; opacity: 1; }
.hs-ring { fill: none; stroke: transparent; opacity: 0; }
.explorer .viz svg { display: block; margin: 0 auto; max-width: 520px; }
.viz-box { fill: var(--bg); stroke: var(--muted); stroke-width: 1.5; }
.viz-t { font: 600 11px system-ui, sans-serif; fill: var(--ink); }
.viz-fibre { stroke: #e6b800; stroke-width: 5; stroke-linecap: round; }
.viz-meter { fill: none; stroke: var(--muted); stroke-width: 1; }
.viz-light { fill: var(--ok); transition: all .15s; }
.viz-bad { fill: var(--bad); }
.figures { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 10px 0 0; font-size: 15px; }
.figures dt { color: var(--muted); }
.figures dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.figures dd.ok { color: var(--ok); } .figures dd.bad { color: var(--bad); }
.bom output { min-width: 28px; text-align: center; font-weight: 700; }
.bom .opt { justify-content: space-between; }
.trail { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.crumb { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 10px; font-size: 13px; color: var(--muted); }
.scenario { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.langs { display: flex; gap: 6px; margin: 4px 0 10px; }
.pill { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; font-size: 14px; }
.pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.video .yt, .video .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 600; text-align: center; padding: 16px; }
.video button.play[disabled] { opacity: .4; }
.task-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 12px 0; border-left: 5px solid var(--accent); animation: rise .25s ease-out; }
.task-card.done { border-left-color: var(--ok); }
.task-card .prompt { font-size: 18px; }
.task-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.task-actions:not(:empty) { margin-top: 12px; display: flex; }
.vtasks > .btn { width: 100%; margin: 8px 0; }
.diagram svg { width: 100%; height: auto; }

/* ---------- job challenge ---------- */
.site.challenge .pin { border-color: var(--accent); color: var(--accent); background: linear-gradient(to top, color-mix(in srgb, var(--accent) 45%, var(--card)) 80%, var(--card) 80%); }
.challenge-box { display: flex; justify-content: space-between; gap: 8px; align-items: center; border: 1px dashed var(--accent); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.sheet-actions { display: grid; gap: 8px; }
.debrief .score { display: flex; gap: 16px; align-items: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 8px 0 12px; border-left: 6px solid var(--bad); }
.debrief .score.pass { border-left-color: var(--ok); }
.debrief .pct { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.debrief-list { list-style: none; padding: 0; margin: 0 0 120px; display: grid; gap: 10px; }
.debrief-list li { background: var(--card); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); border-left: 5px solid var(--ok); }
.debrief-list li.miss { border-left-color: var(--bad); }
.debrief-list p { margin: 6px 0 0; font-size: 15px; }
.d-head { display: flex; gap: 10px; font-weight: 600; }
.d-head .mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ok); font-size: 14px; }
.miss .d-head .mark { background: var(--bad); }
.debrief .why { color: var(--muted); }
.debrief .onsite { background: color-mix(in srgb, var(--bad) 8%, transparent); border-radius: 8px; padding: 8px 10px; }
.debrief .revisit { margin-top: 8px; width: auto; }

/* teach screens, customer lines and module notes */
.teach-title { font-size: 24px; line-height: 1.25; margin: 0 0 12px; }
.teach-fig { margin: 0 0 14px; }
.bubble { position: relative; border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; font-size: 18px; line-height: 1.5; }
.bubble .who { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.bubble.ask { background: var(--card); box-shadow: var(--shadow); margin-right: 12%; border-bottom-left-radius: 4px; }
.bubble.say { background: color-mix(in srgb, var(--accent) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); margin-left: 6%; border-bottom-right-radius: 4px; }
.avoid { font-size: 15px; color: var(--muted); margin: 0 0 12px; }
.say-timer { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.say-timer .btn { width: auto; }
.say-timer .t-out { font-variant-numeric: tabular-nums; font-weight: 600; }
.notes { padding-bottom: 120px; }
.notes h1 { font-size: 26px; margin: 4px 0 6px; }
.notes .toc { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 6px; }
.notes .toc a { color: var(--accent); text-decoration: none; font-weight: 600; }
.notes .lesson { margin: 0 0 28px; }
.notes .lesson > h2 { font-size: 21px; border-bottom: 2px solid var(--line); padding-bottom: 6px; margin: 0 0 12px; }
.notes .lesson > h2 small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.notes h3 { font-size: 18px; margin: 18px 0 8px; }
.notes .body { font-size: 17px; }
.notes .back { width: auto; margin-bottom: 8px; }
@media print {
  #top, #dock, #bar, .notes .back, .notes .print, .say-timer { display: none !important; }
  .notes .lesson { break-inside: avoid-page; }
  .notes figure { break-inside: avoid; }
  body { background: #fff; }
}
.teach-fig > div { display: flex; justify-content: center; }
.teach-fig svg, .notes .diagram svg { max-height: min(44vh, 360px); width: auto; max-width: 100%; }
.body ul, .body ol, .bubble ul { margin: 0 0 12px; padding-left: 22px; } .body li { margin: 0 0 6px; }
.notes-link { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; padding: 8px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.product { margin: 0; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; font-size: 13px; line-height: 1.35; }
.product img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.product b { display: block; font-size: 13px; margin-top: 4px; }
.product .ds { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---- Decision flowchart ---- */
.flow-result { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 12px; }
.flow-result .flow-title { font-size: 19px; font-weight: 700; margin: 2px 0 6px; }
.flow-result.tone-copper { border-color: #c77d2e; }
.flow-result.tone-fibre { border-color: var(--accent); }
.flow-result.tone-hybrid { border-color: var(--ok); }
.flow-products { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

/* ---- Sortable comparison ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 6px 12px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.cmp { border-collapse: collapse; min-width: 640px; width: 100%; font-size: 13px; }
table.cmp th, table.cmp td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
table.cmp thead th { font-size: 13px; position: sticky; top: 0; background: var(--card); }
table.cmp tbody th { font-weight: 600; width: 120px; }
table.cmp .lead { background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
table.cmp tr.off { opacity: .55; }
.cmp-score { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.dots { display: block; color: var(--accent); letter-spacing: 1px; }
.cmp-note { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cmp-bad { display: block; font-weight: 600; color: var(--bad); font-size: 12px; margin-top: 2px; }

/* ---- Product explorer ---- */
.explore svg { width: 100%; height: auto; display: block; }
.explore g.sel circle:not(.hs-ring) { fill: var(--accent); }
.explore g.sel text { fill: #fff; }
.ex-card { background: var(--card); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; min-height: 64px; box-shadow: var(--shadow); }
.ex-title { font-weight: 700; margin-bottom: 4px; }
.ex-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ex-item { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.ex-item.on { border-color: var(--accent); }
.ex-item.seen .ex-num { background: var(--ok); }
.ex-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; margin-right: 6px; }

/* ---- Configure it and part-number builder ---- */
.cfg-req { padding: 12px 14px; margin-bottom: 10px; }
.cfg-facets { display: grid; gap: 8px; margin-bottom: 8px; }
.cfg-flabel { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.cfg-facet .chips { margin: 0; }
.cfg-items { display: grid; gap: 6px; }
.cfg-item { display: flex; gap: 10px; align-items: center; text-align: left; border: 2px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 6px 10px; }
.cfg-item img { width: 56px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; flex: none; }
.cfg-item small { color: var(--muted); }
.cfg-item.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.pn-out { text-align: center; margin: 4px 0 12px; }
.pn-code { display: block; font: 700 26px ui-monospace, Menlo, monospace; letter-spacing: 1px; color: var(--accent); }

/* ---- Product lookup ---- */
.lookup-link { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 15px; }
.lookup h1 { margin: 12px 0 4px; }
.lk-q { width: 100%; font-size: 17px; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: var(--ink); margin: 6px 0 12px; }
.lk-q:focus { border-color: var(--accent); outline: none; }
.lk-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 10px; }
.lk-head { display: flex; gap: 12px; align-items: flex-start; }
.lk-head img { width: 84px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; flex: none; }
.lk-head small { color: var(--muted); }
.lk-item { font-family: ui-monospace, Menlo, monospace; }
.lk-links { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; }
.lk-links a { color: var(--accent); }
.lk-lessons { display: grid; gap: 4px; }
.lk-lessons > small { color: var(--muted); }
.lk-lesson { text-align: left; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.lk-lesson small { color: var(--muted); }
