:root {
  --bg: #070912;
  --panel: rgba(255, 255, 255, 0.045);
  --stroke: rgba(255, 255, 255, 0.1);
  --text: #e8eaf6;
  --muted: #8a90ad;
  --accent: #7c5cff;
  --accent-2: #26d0c4;
  --code-bg: rgba(6, 8, 18, 0.72);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 0 24px 48px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}
.orb-a { width: 520px; height: 520px; top: -180px; left: -140px; background: #4a2ecc; }
.orb-b { width: 460px; height: 460px; bottom: -200px; right: -120px; background: #0d6f74; }

header {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; }

.mark {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  font-size: 24px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.35);
}

h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.tag { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.head-right { display: flex; align-items: center; gap: 12px; }

.pill {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  background: var(--panel);
  white-space: nowrap;
}
.pill.ok { color: var(--accent-2); border-color: rgba(38, 208, 196, 0.35); }
.pill.warn { color: #ffb454; border-color: rgba(255, 180, 84, 0.35); }

main { max-width: 980px; margin: 0 auto; display: grid; gap: 20px; }
#genView { display: grid; gap: 20px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(14px);
}

.field-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Textarea with ghost-text autocomplete. The wrapper carries the visible
   box (background/border/focus ring); the textarea and ghost layer share
   identical metrics so the muted suggestion lines up under what you type. */
.ta-wrap {
  position: relative;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ta-wrap:focus-within {
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
}

#usecase,
.ghost-text {
  margin: 0;
  padding: 14px 16px;
  border: 0;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  background: transparent;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}

#usecase {
  position: relative;
  display: block;
  resize: vertical;
  min-height: calc(1.55em * 5 + 28px);
  color: var(--text);
}
#usecase:focus { outline: none; }

.ghost-text {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  color: var(--muted);
}
.ghost-text .typed { color: transparent; } /* invisible spacer keeps alignment */

.tab-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
}
.tab-hint kbd {
  font: inherit;
  color: #cfc4ff;
  font-weight: 600;
}

.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.examples button {
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.examples button:hover { color: var(--text); border-color: rgba(124, 92, 255, 0.55); background: rgba(124, 92, 255, 0.1); }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.seg {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}
.seg-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 4px; }
.seg button {
  font: inherit;
  font-size: 13px;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: rgba(124, 92, 255, 0.2); color: #cfc4ff; }

.model-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}
.model-pick select {
  font: inherit;
  font-size: 13px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #cfc4ff;
  cursor: pointer;
}
.model-pick select:focus { outline: none; }
.model-pick option { background: #12142a; color: var(--text); }

.go {
  margin-left: auto;
  font: inherit;
  font-weight: 600;
  padding: 11px 22px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5b8cff);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.3);
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(124, 92, 255, 0.42); }
.go:disabled { opacity: 0.5; cursor: not-allowed; }
.go kbd { font: inherit; font-size: 11.5px; opacity: 0.7; margin-left: 6px; }

/* Output */
.out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--stroke);
}
.out-title { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.dot.live { animation: pulse 1.1s ease-in-out infinite; background: var(--accent); }
.dot.err { background: #ff6b6b; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }

.out-actions { display: flex; align-items: center; gap: 8px; }
.usage { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ghost {
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }

/* Circuit diagram */
.circuit { margin: 14px 0 4px; }
.circuit-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.circuit-svg {
  overflow-x: auto;
  padding: 14px 12px;
  background: var(--code-bg);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}
.circuit-svg svg { display: block; }
.cg-wire { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.5; }
.cg-cwire { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; }
.cg-line { stroke: #cfc7ff; stroke-width: 1.8; }
.cg-reg { fill: var(--muted); font: 600 12px ui-monospace, Menlo, monospace; }
.cg-box { fill: rgba(124, 92, 255, 0.9); stroke: #b9a8ff; stroke-width: 1; }
.cg-mbox { fill: rgba(38, 208, 196, 0.85); stroke: #7ff0e6; stroke-width: 1; }
.cg-label { fill: #fff; font: 600 13px ui-sans-serif, system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; }
.cg-ctrl { fill: #cfc7ff; }
.cg-open { fill: none; stroke: #cfc7ff; stroke-width: 1.8; }
.cg-arc { fill: none; stroke: #052; stroke-width: 1.6; }
.cg-empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* Simulator */
.sim { margin: 16px 0 4px; }
.sim-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.sim-ctrls { display: flex; align-items: center; gap: 8px; }
.sim-step { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.sim-state {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  background: var(--code-bg);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  display: grid;
  gap: 5px;
}
.sim-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.sim-ket { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: #cfc7ff; white-space: nowrap; }
.sim-barwrap { height: 14px; background: rgba(255, 255, 255, 0.05); border-radius: 4px; overflow: hidden; }
.sim-bar { height: 100%; width: 0; border-radius: 4px; transition: width 0.5s ease, background 0.5s ease; }
.sim-pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.sim-warn {
  margin-bottom: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #ffcaa8;
  background: rgba(255, 140, 84, 0.1);
  border: 1px solid rgba(255, 140, 84, 0.35);
  border-radius: 10px;
}
.sim-note { margin-top: 8px; font-size: 12px; color: var(--muted); }

.out h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent-2); margin: 24px 0 8px; }
.out h2:first-child { margin-top: 10px; }
.out p { margin: 0 0 12px; color: #c9cde4; }
.out ul { margin: 0 0 12px; padding-left: 20px; color: #c9cde4; }
.out li { margin-bottom: 5px; }
.out code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: rgba(255,255,255,0.07); padding: 1px 5px; border-radius: 5px; }

.out pre {
  background: var(--code-bg);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.out pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #d5dbf5;
  white-space: pre;
}

.err-box {
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
  color: #ffb3b3;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
}

/* Gate hover tooltip */
.cg-gate { cursor: pointer; }
.tip {
  position: fixed;
  z-index: 50;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(18, 20, 34, 0.98);
  border: 1px solid rgba(124, 92, 255, 0.4);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}
.tip-title { font-size: 13.5px; font-weight: 600; color: #cfc4ff; margin-bottom: 5px; }
.tip-note { font-size: 13px; color: #d3d7ec; line-height: 1.5; }
.tip-link {
  display: inline-block;
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--accent-2);
  text-decoration: none;
}
.tip-link:hover { text-decoration: underline; }

/* Reference overlay */
.ref-overlay[hidden] { display: none; }
.ref-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 14, 0.72);
  backdrop-filter: blur(6px);
}
.ref-card {
  width: min(720px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: #0d0f1c;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
}
.ref-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--stroke);
}
.ref-head h2 { margin: 0; font-size: 18px; }
.ref-body { padding: 8px 20px 20px; overflow-y: auto; }
.ref-item { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); scroll-margin-top: 12px; }
.ref-item:last-child { border-bottom: 0; }
.ref-item h3 { margin: 0 0 6px; font-size: 14.5px; color: #cfc4ff; }
.ref-item p { margin: 0; color: #c9cde4; font-size: 13.5px; line-height: 1.55; }
.ref-item .ref-sym { font-family: ui-monospace, Menlo, monospace; color: var(--muted); font-size: 12px; margin-left: 8px; }
.ref-item.ref-hi { background: rgba(124, 92, 255, 0.12); border-radius: 10px; padding-left: 12px; padding-right: 12px; }

footer { max-width: 980px; margin: 32px auto 0; text-align: center; font-size: 12.5px; color: var(--muted); }

@media (max-width: 640px) {
  body { padding: 0 14px 32px; }
  .go { margin-left: 0; width: 100%; }
  .controls { gap: 10px; }
}

/* Author display values (grid/flex) beat the UA's [hidden] rule — restore
   hideability for every Learn element we toggle via the hidden attribute. */
#genView[hidden],
#learnView[hidden],
.lesson-grid[hidden],
#learnPlayer[hidden],
.lp-foot[hidden] { display: none; }

/* ---------- header tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}
.tabs button {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(91,140,255,.25)); color: #e6e0ff; }

/* ---------- learn intro ---------- */
.learn-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.learn-intro h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.learn-intro p { margin: 0; color: var(--muted); max-width: 640px; }

/* ---------- lesson catalog ---------- */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.lesson-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.lesson-card:hover,
.lesson-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.15);
  outline: none;
}
.lesson-card.done { border-color: rgba(38, 208, 196, 0.35); }
.lc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lc-min { font-size: 12px; color: var(--muted); }
.lesson-card h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: baseline; gap: 9px; }
.lc-num {
  font-size: 11.5px;
  color: #cfc4ff;
  background: rgba(124, 92, 255, 0.2);
  border-radius: 7px;
  padding: 2px 7px;
}
.lesson-card p { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.lc-bottom { display: flex; align-items: center; gap: 12px; }
.lc-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.lc-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lc-state { font-size: 12px; color: var(--accent-2); white-space: nowrap; }
.lv {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.lv-b { color: #26d0c4; background: rgba(38,208,196,.12); border: 1px solid rgba(38,208,196,.3); }
.lv-i { color: #cfc4ff; background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.35); }
.lv-a { color: #ffb454; background: rgba(255,180,84,.1); border: 1px solid rgba(255,180,84,.32); }

/* ---------- player shell ---------- */
.lp-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stroke);
}
.lp-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lp-title-wrap h2 { margin: 0; font-size: 18px; }
.lp-dots { margin-left: auto; display: flex; gap: 7px; }
.lp-dot {
  width: 11px; height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.lp-dot.open { border-color: rgba(124,92,255,.55); }
.lp-dot.done { background: var(--accent-2); border-color: var(--accent-2); }
.lp-dot.current { transform: scale(1.25); box-shadow: 0 0 0 3px rgba(124,92,255,.25); }
.lp-dot.current:not(.done) { background: var(--accent); border-color: var(--accent); }
.lp-dot:disabled { opacity: .35; cursor: default; }

.step-head { margin-bottom: 4px; }
.step-title { margin: 14px 0 6px; font-size: 17px; color: #cfc4ff; }

#lpBody .md { color: #c9cde4; }
#lpBody .md p { margin: 0 0 12px; line-height: 1.65; }
#lpBody .md ul { margin: 0 0 12px; padding-left: 20px; }
#lpBody .md li { margin-bottom: 5px; }
#lpBody .md code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255,255,255,.07);
  padding: 1px 5px;
  border-radius: 5px;
}

.goal-pill {
  display: inline-block;
  margin: 2px 0 14px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(38,208,196,.4);
  background: rgba(38,208,196,.08);
  color: #b8f4ee;
  font-size: 13.5px;
}
.goal-pill strong {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .08em;
  margin-right: 10px;
  color: var(--accent-2);
}

.lp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
}
.lp-ptext { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.go-sm {
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5b8cff);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124,92,255,.28);
  transition: transform 0.12s, opacity 0.12s;
}
.go-sm:hover:not(:disabled) { transform: translateY(-1px); }
.go-sm:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- quiz ---------- */
.quiz-q { font-weight: 600; margin: 14px 0 10px; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
  font: inherit;
  text-align: left;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.22);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.quiz-opt:hover:not(:disabled) { border-color: rgba(124,92,255,.55); background: rgba(124,92,255,.08); }
.quiz-opt.correct { border-color: rgba(38,208,196,.6); background: rgba(38,208,196,.1); color: #b8f4ee; }
.quiz-opt.wrong { border-color: rgba(255,107,107,.55); background: rgba(255,107,107,.07); color: #ffb3b3; opacity: .75; }
.quiz-feed {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.55;
}
.quiz-feed.ok, .b-feed.ok {
  color: #b8f4ee;
  background: rgba(38,208,196,.08);
  border: 1px solid rgba(38,208,196,.35);
}
.quiz-feed.bad, .b-feed.bad {
  color: #ffc9a8;
  background: rgba(255,140,84,.08);
  border: 1px solid rgba(255,140,84,.32);
}

/* ---------- builder ---------- */
.b-status { margin: 4px 0 10px; font-size: 13px; color: var(--muted); min-height: 20px; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pal-btn {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.22);
  color: #cfc7ff;
  cursor: pointer;
  transition: all 0.15s;
}
.pal-btn:hover { border-color: rgba(124,92,255,.6); background: rgba(124,92,255,.12); }
.pal-btn.armed {
  border-color: var(--accent-2);
  background: rgba(38,208,196,.14);
  color: #b8f4ee;
  box-shadow: 0 0 0 3px rgba(38,208,196,.15);
}
.b-actions { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.b-actions .go-sm { margin-left: auto; }
.b-feed { margin: 10px 0 4px; padding: 11px 14px; border-radius: 11px; font-size: 13.5px; line-height: 1.55; }
.b-feed .b-solution { margin-left: 12px; }

/* wire placement hit areas (SVG) */
.lp-circuit .lp-wire { cursor: pointer; }
.lp-circuit .lp-wire:hover { fill: rgba(124, 92, 255, 0.09); }
.lp-circuit .lp-wire.sel { fill: rgba(38, 208, 196, 0.14); }

/* ---------- finish screen ---------- */
.finish { text-align: center; padding: 30px 10px 16px; }
.finish h3 { margin: 0 0 10px; font-size: 22px; color: #b8f4ee; }
.finish p { margin: 0 auto 22px; max-width: 480px; color: #c9cde4; }
.finish-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .tabs { order: 3; width: 100%; justify-content: center; }
  header { justify-content: center; }
  .lp-dots { margin-left: 0; }
}
