:root {
  --ink: #10223b;
  --muted: #66778d;
  --navy-950: #061324;
  --navy-900: #0a1c33;
  --navy-800: #102a49;
  --blue: #1377d4;
  --cyan: #53d7ff;
  --amber: #ffbd45;
  --amber-soft: #fff4d8;
  --green: #3ebd67;
  --red: #e94646;
  --paper: #f7f9fc;
  --white: #fff;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 24px 60px rgba(4, 18, 39, .18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% -10%, rgba(31, 135, 230, .22), transparent 34rem),
    var(--navy-950);
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 3vw, 44px);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: rgba(6, 19, 36, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #12213a;
  border-radius: 15px;
  background: var(--amber);
  box-shadow: inset 0 -3px 0 rgba(133, 76, 0, .18), 0 8px 22px rgba(255, 189, 69, .18);
}

.brand-mark svg {
  width: 27px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: .01em;
}

.brand small {
  margin-top: 1px;
  color: #9db0c8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .13);
}

.icon-button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.card-progress {
  min-width: 64px;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.card-progress span:first-child {
  color: var(--amber);
  font-size: 21px;
}

.card-progress span:last-child {
  margin-left: 3px;
  color: #8da2ba;
}

.app-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: clamp(16px, 2.2vw, 34px);
  width: min(1780px, 100%);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 38px);
}

.card-nav {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 20px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  background: rgba(14, 37, 66, .72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
}

.nav-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #778ba3;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.nav-heading .eyebrow {
  color: #83a0bf;
}

.nav-heading h2 {
  margin: 0;
  font-size: 23px;
}

.available-count {
  padding: 5px 8px;
  color: #8df2af;
  border-radius: 999px;
  background: rgba(62, 189, 103, .12);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.card-number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.card-number {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  color: #8298b1;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}

.card-number:hover {
  transform: translateY(-2px);
  color: var(--white);
  border-color: rgba(255, 255, 255, .22);
}

.card-number::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: #48617d;
}

.card-number.ready::after {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(62, 189, 103, .1);
}

.card-number.active {
  color: #14223a;
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 8px 20px rgba(255, 189, 69, .2);
}

.nav-key {
  display: flex;
  gap: 13px;
  margin-top: 16px;
  color: #91a5bc;
  font-size: 10px;
}

.nav-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.key-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48617d;
}

.key-dot.ready {
  background: var(--green);
}

.card-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.source-link,
.video-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  color: #b3c3d5;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.video-link {
  color: var(--amber);
}

.source-link:hover,
.video-link:hover {
  color: var(--white);
}

html.video-modal-open {
  overflow: hidden;
}

.video-dialog {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: clamp(14px, 3vw, 24px);
  overflow: auto;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  background: var(--navy-900);
  box-shadow: var(--shadow);
}

.video-dialog::backdrop {
  background: rgba(3, 11, 22, .82);
  backdrop-filter: blur(6px);
}

.video-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.video-dialog-heading .eyebrow {
  color: var(--amber);
}

.video-dialog-heading h2 {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.3;
}

.video-dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  font-size: 26px;
}

.circuit-video-player {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 180px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #000;
  object-fit: contain;
}

.circuit-video-player:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.content {
  min-width: 0;
}

.circuit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 960px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.build-side {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3.2vw, 56px);
  color: var(--white);
  background:
    radial-gradient(circle at 15% 12%, rgba(90, 220, 255, .48) 0 2px, transparent 3px),
    radial-gradient(circle at 79% 26%, rgba(90, 220, 255, .38) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(34, 131, 215, .92), rgba(4, 34, 77, .98));
  background-size: 68px 68px, 94px 94px, auto;
}

.build-side::before,
.build-side::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.build-side::before {
  inset: 0;
  opacity: .26;
  background-image:
    linear-gradient(90deg, transparent 49%, rgba(92, 210, 255, .36) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(92, 210, 255, .26) 50%, transparent 51%);
  background-size: 120px 120px;
  mask-image: linear-gradient(to bottom, #000, transparent 62%);
}

.build-side::after {
  width: 310px;
  height: 310px;
  right: -140px;
  top: -160px;
  border: 42px solid rgba(255, 189, 69, .24);
  border-radius: 50%;
}

.build-heading,
.circuit-board,
.power-row,
.mission-panel {
  position: relative;
  z-index: 1;
}

.circuit-index {
  display: inline-flex;
  padding: 6px 10px;
  color: #102442;
  border-radius: 8px;
  background: var(--amber);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
}

.build-heading h1 {
  margin: 12px 0 4px;
  font-size: clamp(31px, 3.2vw, 51px);
  line-height: .98;
  letter-spacing: -.05em;
}

.build-heading p {
  margin: 9px 0 0;
  color: #c8e8ff;
  font-size: 14px;
}

.circuit-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  width: min(100%, 680px);
  aspect-ratio: 4 / 3;
  margin: 34px auto 16px;
  filter: drop-shadow(0 16px 22px rgba(0, 10, 28, .3));
}

.block {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.corner,
.straight,
.led {
  aspect-ratio: 1;
}

.top-left {
  grid-column: 1;
  grid-row: 1;
}

.battery-block {
  position: relative;
  z-index: 2;
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: stretch;
}

.battery {
  object-fit: fill;
}

.battery-toggle {
  position: absolute;
  z-index: 4;
  right: 11.8%;
  bottom: 20%;
  width: 21%;
  height: 25%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.battery-toggle:hover {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .45), 0 0 22px rgba(255, 99, 77, .85);
}

.battery-toggle:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.top-right {
  grid-column: 4;
  grid-row: 1;
  transform: scaleX(-1);
}

.middle-left {
  grid-column: 1;
  grid-row: 2;
  transform: rotate(90deg);
}

.middle-right {
  grid-column: 4;
  grid-row: 2;
  transform: rotate(90deg);
}

.board-center {
  position: relative;
  display: grid;
  grid-column: 2 / 4;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: 43%;
  aspect-ratio: 1;
  place-items: center;
  color: rgba(219, 244, 255, .7);
  border: 1px solid rgba(111, 213, 255, .24);
  border-radius: 50%;
  background: rgba(5, 44, 84, .18);
  font-size: clamp(11px, 1.2vw, 16px);
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.current-orbit {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: orbit 3.6s linear infinite;
}

.orbit-two {
  animation-delay: -1.2s;
}

.orbit-three {
  animation-delay: -2.4s;
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(48px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(48px) rotate(-360deg); }
}

.bottom-left {
  grid-column: 1;
  grid-row: 3;
  transform: rotate(180deg) scaleX(-1);
}

.led {
  z-index: 3;
  grid-column: 2;
  grid-row: 3;
  transition: filter .3s ease, opacity .3s ease;
}

.bottom-middle {
  grid-column: 3;
  grid-row: 3;
}

.switch-component {
  position: relative;
  z-index: 3;
  display: block;
  grid-column: 2;
  grid-row: 3;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 20%;
  background: transparent;
  cursor: pointer;
}

.switch-component img {
  transition: filter .25s ease, transform .25s ease;
}

.switch-component:hover img {
  transform: translateY(-2px);
  filter: brightness(1.06) drop-shadow(0 8px 8px rgba(0, 0, 0, .22));
}

.switch-component:focus-visible {
  outline-offset: -3px;
}

.switch-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: -7px;
  padding: 5px 8px;
  color: #12213a;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 6px 14px rgba(5, 22, 44, .24);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.led-right {
  grid-column: 3;
}

.bottom-right {
  grid-column: 4;
  grid-row: 3;
  transform: rotate(180deg);
}

.board-glow {
  position: absolute;
  z-index: 4;
  left: 31%;
  bottom: 1%;
  width: 18%;
  aspect-ratio: 1;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 241, 72, .23);
  filter: blur(22px);
  transition: opacity .3s ease;
}

.board-glow-right {
  left: 56%;
}

.circuit-card:not(.is-on) .board-glow,
.circuit-card:not(.is-on) .current-orbit {
  opacity: 0;
  animation-play-state: paused;
}

.circuit-card:not(.is-on) .led {
  opacity: .82;
  filter: grayscale(.65) brightness(.72);
}

.circuit-card.is-on .led {
  filter: saturate(1.15) drop-shadow(0 0 13px rgba(255, 242, 56, .76));
}

#generated-cards {
  width: 100%;
}

.reference-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--board-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--board-rows), minmax(0, 1fr));
  width: min(100%, 680px);
  aspect-ratio: var(--board-columns) / var(--board-rows);
  margin: 30px auto 18px;
  filter: drop-shadow(0 16px 22px rgba(0, 10, 28, .28));
}

.reference-board.layout-4,
.reference-board.layout-5,
.reference-board.layout-14,
.reference-board.layout-15,
.reference-board.layout-16,
.reference-board.layout-17,
.reference-board.layout-19,
.reference-board.layout-21,
.reference-board.layout-23 {
  width: min(92%, 610px);
}

.reference-board.layout-11,
.reference-board.layout-20 {
  width: min(78%, 500px);
}

.reference-board.layout-22 {
  width: min(66%, 430px);
}

.reference-board.layout-15,
.reference-board.layout-23 {
  margin-bottom: clamp(58px, 11vw, 82px);
}

.reference-board.layout-24 {
  width: min(72%, 470px);
}

.reference-board.layout-25 {
  width: min(96%, 650px);
}

.reference-board.layout-26 { width: min(64%, 320px); }
.reference-board.layout-27 { width: min(78%, 460px); }

.reference-slot {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 18%;
  background: transparent;
}

button.reference-slot {
  cursor: pointer;
}

button.reference-slot:hover,
button.reference-slot:focus-visible {
  z-index: 8;
}

button.reference-slot:hover img {
  filter: brightness(1.08) drop-shadow(0 8px 10px rgba(0, 0, 0, .26));
}

.reference-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transition: filter .3s ease, opacity .3s ease, transform .3s ease;
}

.reference-slot.rot-90 > img { transform: rotate(90deg); }
.reference-slot.rot-neg-90 > img { transform: rotate(-90deg); }
.reference-slot.rot-180 > img { transform: rotate(180deg); }
.reference-slot.flip-x > img { transform: scaleX(-1); }
.reference-slot.flip-y > img { transform: scaleY(-1); }

.reference-slot.asset-motor {
  z-index: 7;
}

.layout-7 .reference-slot.asset-motor,
.layout-11 .reference-slot.asset-motor {
  z-index: 12;
}

.motor-assembly {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: center;
}

.reference-slot.asset-motor.rot-90 .motor-assembly {
  transform: rotate(90deg);
}

.motor-assembly img {
  position: absolute;
  inset: 0;
  transform: none;
}

.motor-base {
  z-index: 1;
}

.motor-assembly .motor-propeller {
  z-index: 2;
  transform: scale(1.85);
  transform-origin: 50% 50%;
  will-change: transform;
}

.pot-assembly {
  position: absolute;
  inset: 0;
  display: block;
}

.pot-assembly .pot-base {
  position: absolute;
  inset: 0;
}

.pot-assembly .pot-knob {
  position: absolute;
  z-index: 2;
  top: 45%;
  left: 50%;
  width: 33%;
  height: auto;
  transform: translate(-50%, -50%) rotate(var(--pot-angle, 135deg));
  transform-origin: 50% 50%;
  transition: transform .16s ease-out;
  will-change: transform;
}

.reference-slot.vertical-battery img {
  position: absolute;
  top: 25%;
  left: -50%;
  width: 200%;
  height: 50%;
  transform: rotate(-90deg);
}

.reference-slot.vertical-battery .battery-toggle {
  inset: 0;
  width: 100%;
  height: 100%;
}

.reference-current {
  position: absolute;
  z-index: 7;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #efff3d;
  box-shadow: 0 0 15px #efff3d;
  animation: reference-current-travel 3.2s ease-in-out infinite alternate;
}

.reference-current.current-a {
  top: 47%;
  left: 2%;
}

.reference-current.current-b {
  top: 47%;
  right: 2%;
  animation-delay: -1.6s;
}

@keyframes reference-current-travel {
  from { transform: translateY(-70px); }
  to { transform: translateY(70px); }
}

.generated-circuit:not(.is-on) .reference-current {
  opacity: 0;
  animation-play-state: paused;
}

.generated-circuit:not(.is-on) .reference-slot:not([class*="wire"]):not(.asset-battery) img {
  opacity: .78;
  filter: grayscale(.72) brightness(.7);
}

.generated-circuit.is-on .effect-led img {
  filter: saturate(1.14) drop-shadow(0 0 14px rgba(255, 242, 56, .72));
}

.generated-circuit[data-card="26"].is-on .effect-led img {
  opacity: calc(.78 + .22 * var(--charge-level));
  filter: brightness(calc(.65 + .72 * var(--charge-level))) saturate(calc(.3 + var(--charge-level)))
    drop-shadow(0 0 calc(20px * var(--charge-level)) #fff238);
  transition: none;
}

.generated-circuit[data-card="27"].is-on .effect-led img {
  opacity: .78;
  filter: grayscale(.72) brightness(.7);
}

.generated-circuit[data-card="27"].led-flashing .effect-led img {
  animation: back-emf-flash .35s ease-out both;
}

@keyframes back-emf-flash {
  0%, 22% { opacity: 1; filter: brightness(1.6) drop-shadow(0 0 24px #fff238); }
  100% { opacity: .78; filter: grayscale(.72) brightness(.7); }
}

.generated-circuit[data-card="8"] .resistor-control img {
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}

.generated-circuit[data-card="8"][data-resistance="1k"] .effect-led img {
  opacity: 1;
  filter: brightness(1.16) saturate(1.22) drop-shadow(0 0 18px rgba(255, 242, 56, .9));
}

.generated-circuit[data-card="8"][data-resistance="10k"] .effect-led img {
  opacity: .94;
  filter: brightness(.86) saturate(.92) drop-shadow(0 0 8px rgba(255, 242, 56, .46));
}

.generated-circuit[data-card="8"][data-resistance="47k"] .effect-led img {
  opacity: .82;
  filter: brightness(.62) saturate(.72) drop-shadow(0 0 3px rgba(255, 242, 56, .22));
}

.generated-circuit[data-card="9"] .effect-led img {
  opacity: var(--pot-led-opacity, .86);
  filter: brightness(var(--pot-led-brightness, .83)) saturate(var(--pot-led-saturation, .96)) drop-shadow(0 0 var(--pot-led-glow, 10px) rgba(255, 242, 56, .68));
}

.generated-circuit[data-card="10"] .effect-led img {
  opacity: var(--light-led-opacity, 1);
  filter: brightness(var(--light-led-brightness, 1.25)) saturate(var(--light-led-saturation, 1.3)) drop-shadow(0 0 var(--light-led-glow, 20px) rgba(255, 242, 56, .72));
}

.generated-circuit[data-card="10"].light-off .status-light {
  background: #75869a;
  box-shadow: none;
}

.generated-circuit[data-card="22"] .effect-led img {
  opacity: .68;
  filter: grayscale(.72) brightness(.58);
}

.generated-circuit[data-card="22"].is-on:not(.battery-off) .circuit-22-led-a img {
  animation: circuit-22-led-a 2.4s steps(1, end) infinite;
}

.generated-circuit[data-card="22"].is-on:not(.battery-off) .circuit-22-led-b img {
  animation: circuit-22-led-b 2.4s steps(1, end) infinite;
}

@keyframes circuit-22-led-a {
  0%, 49.99% {
    opacity: 1;
    filter: brightness(1.16) saturate(1.25) drop-shadow(0 0 19px rgba(255, 242, 56, .92));
  }
  50%, 100% {
    opacity: .68;
    filter: grayscale(.72) brightness(.58);
  }
}

@keyframes circuit-22-led-b {
  0%, 49.99% {
    opacity: .68;
    filter: grayscale(.72) brightness(.58);
  }
  50%, 100% {
    opacity: 1;
    filter: brightness(1.16) saturate(1.25) drop-shadow(0 0 19px rgba(255, 242, 56, .92));
  }
}

.generated-circuit[data-card="14"] .effect-led img {
  opacity: .68;
  filter: brightness(.38) saturate(.5) drop-shadow(0 0 0 rgba(255, 242, 56, 0));
  transition: opacity var(--capacitor-fade-duration, 0s) linear,
    filter var(--capacitor-fade-duration, 0s) linear;
}

.generated-circuit[data-card="14"].capacitor-charged .effect-led img {
  opacity: 1;
  filter: brightness(1.2) saturate(1.28) drop-shadow(0 0 20px rgba(255, 242, 56, .92));
}

.generated-circuit[data-card="24"] .effect-led img {
  opacity: .68;
  filter: grayscale(.72) brightness(.58);
}

.generated-circuit[data-card="24"]:not(.battery-off).memory-set .memory-set-led img,
.generated-circuit[data-card="24"]:not(.battery-off):not(.memory-set) .memory-reset-led img {
  opacity: 1;
  filter: brightness(1.14) saturate(1.22) drop-shadow(0 0 18px rgba(255, 242, 56, .88));
}

/* Circuit 005 stays powered in both switch positions. With the switch open,
   both LEDs share the series voltage; closing it bypasses the lower LED. */
.generated-circuit[data-card="5"]:not(.is-on) .reference-current {
  opacity: 1;
  animation-play-state: running;
}

.generated-circuit[data-card="5"]:not(.is-on) .reference-slot:not([class*="wire"]):not(.asset-battery) img {
  opacity: 1;
  filter: none;
}

.generated-circuit[data-card="5"]:not(.is-on) .effect-led img {
  opacity: .94;
  filter: brightness(.82) saturate(.86) drop-shadow(0 0 7px rgba(255, 242, 56, .42));
}

.generated-circuit[data-card="5"].is-on .circuit-5-upper-led img {
  opacity: 1;
  filter: brightness(1.18) saturate(1.3) drop-shadow(0 0 22px rgba(255, 242, 56, .95));
}

.generated-circuit[data-card="5"].is-on .circuit-5-bypassed-led img {
  opacity: .68;
  filter: grayscale(.82) brightness(.58);
}

.generated-circuit[data-card="5"]:not(.is-on) .status-light {
  background: #eaff41;
  box-shadow: 0 0 16px #eaff41;
}

.generated-circuit[data-card="5"]:not(.is-on) .schematic-state {
  color: #14843a;
  background: #dcf9e5;
}

.generated-circuit[data-card="5"]:not(.is-on) .schematic-image-frame img {
  opacity: 1;
  filter: none;
}

.generated-circuit[data-card="6"] .circuit-6-diode img {
  transition: transform .65s cubic-bezier(.22, 1, .36, 1), filter .3s ease, opacity .3s ease;
}

.generated-circuit[data-card="6"].is-on .circuit-6-diode img {
  transform: rotate(0deg);
}

.generated-circuit[data-card="6"]:not(.is-on) .circuit-6-diode img {
  transform: rotate(180deg);
}

.generated-circuit.is-on .effect-motor .motor-propeller {
  animation: motor-propeller-spin .72s linear infinite;
}

.generated-circuit[data-card="12"] .effect-motor .motor-propeller {
  animation-duration: var(--motor-spin-duration, .9s);
}

.generated-circuit[data-card="12"].motor-stopped .effect-motor .motor-propeller {
  animation: none;
}

.generated-circuit[data-card="12"].motor-stopped .status-light {
  background: #75869a;
  box-shadow: none;
}

.generated-circuit.is-on .effect-buzzer img {
  animation: component-running .42s ease-in-out infinite alternate;
}

.board-extra {
  position: absolute;
  z-index: 9;
  pointer-events: none;
}

.polarity-arrow {
  top: 50%;
  left: 50%;
  color: #ff3131;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.flashlight {
  top: 45%;
  left: 50%;
  font-size: clamp(35px, 4.6vw, 64px);
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .2));
  transform: translate(-50%, -50%) rotate(-35deg);
}

.layout-10 .flashlight {
  top: 72%;
  left: 37.5%;
  opacity: var(--light-visual-opacity, 1);
  filter: brightness(var(--light-visual-brightness, 1.35)) drop-shadow(0 5px 6px rgba(0, 0, 0, .2));
  transition: opacity .18s ease, filter .18s ease;
}

.layout-12 .flashlight {
  top: 62%;
  left: 96%;
  opacity: var(--light-visual-opacity, 1);
  filter: brightness(var(--light-visual-brightness, 1.35)) drop-shadow(0 5px 6px rgba(0, 0, 0, .2));
  transition: opacity .18s ease, filter .18s ease;
}

.layout-25 .flashlight {
  top: 86%;
  left: 86%;
}

.clap {
  top: 67%;
  left: 82%;
  font-size: clamp(34px, 4.5vw, 62px);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .22));
  transform: rotate(-18deg);
}

.touch-left,
.touch-right {
  bottom: -11%;
  color: #ffd49d;
  font-size: clamp(31px, 4vw, 54px);
  filter: drop-shadow(0 3px 0 #182333);
}

.touch-left { left: 11%; }
.touch-right { left: 58%; }

.layout-15 .touch-left { left: 4%; }
.layout-15 .touch-right { left: 55%; }

.layout-23 .touch-left,
.layout-23 .touch-right {
  bottom: -11%;
  transform: translateX(-50%);
}

.layout-23 .touch-left { left: 10%; }
.layout-23 .touch-right { left: 35%; }

.comparison-stack {
  display: grid;
  align-items: center;
  justify-items: center;
  color: #ef3434;
  font-size: clamp(23px, 3vw, 40px);
  font-weight: 900;
}

.comparison-stack img {
  width: clamp(42px, 5vw, 67px);
  aspect-ratio: 1;
  object-fit: contain;
}

.resistor-stack {
  top: 35%;
  left: 43%;
  transform: translate(-50%, -50%);
}

.capacitor-stack {
  top: 41%;
  left: 42%;
  transform: translate(-50%, -50%);
}

@keyframes component-running {
  from { filter: brightness(1) drop-shadow(0 0 0 rgba(89, 218, 255, 0)); }
  to { filter: brightness(1.08) drop-shadow(0 0 9px rgba(89, 218, 255, .62)); }
}

@keyframes motor-propeller-spin {
  from { transform: scale(1.85) rotate(0deg); }
  to { transform: scale(1.85) rotate(360deg); }
}

.generated-circuit .lesson-intro h2 {
  max-width: 510px;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.08;
}

.generated-schematic-panel {
  overflow: hidden;
  padding: 18px 18px 14px;
}

.schematic-image-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.schematic-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: filter .3s ease, opacity .3s ease;
}

.circuit-card:not(.is-on) .schematic-image-frame img {
  opacity: .68;
  filter: grayscale(.8);
}

.power-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 680px);
  margin: 0 auto 24px;
  padding: 10px 11px 10px 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 17px;
  background: rgba(1, 24, 54, .35);
  backdrop-filter: blur(10px);
}

.power-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.power-status span:last-child {
  display: grid;
  gap: 1px;
}

.power-status small {
  color: #a3c2dd;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.power-status strong {
  font-size: 13px;
}

.status-light {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #eaff41;
  box-shadow: 0 0 16px #eaff41;
  transition: background .3s ease, box-shadow .3s ease;
}

.circuit-card:not(.is-on) .status-light {
  background: #75869a;
  box-shadow: none;
}

.power-button,
.back-to-first {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  color: #172840;
  border: 0;
  border-radius: 11px;
  background: var(--amber);
  box-shadow: inset 0 -2px 0 rgba(127, 76, 0, .18);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.power-button svg {
  width: 17px;
}

.power-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.battery-power-button {
  background: #7edcf7;
}

.resistor-button {
  background: #ffd466;
}

.capacitor-value-button {
  background: #d7c2ff;
}

.capacitor-press-button,
.reference-slot.capacitor-press,
[data-role="momentary-button"] {
  touch-action: none;
  user-select: none;
}

.reference-slot.asset-tact::after {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 36%;
  aspect-ratio: 1;
  border-radius: 21%;
  background: linear-gradient(145deg, #ca7890, #a95370);
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, .2),
    inset -3px -3px 5px rgba(99, 31, 53, .22),
    0 3px 4px rgba(57, 14, 29, .22);
  content: '';
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform .1s ease, filter .1s ease, box-shadow .1s ease;
}

.reference-slot.asset-tact[aria-pressed="true"]::after {
  filter: brightness(.78) saturate(.9);
  box-shadow: inset 3px 3px 6px rgba(73, 20, 38, .38),
    inset -1px -1px 2px rgba(255, 255, 255, .12),
    0 1px 1px rgba(57, 14, 29, .18);
  transform: translate(-50%, -50%) scale(.84);
}

.capacitor-press-button {
  transition: transform .1s ease, background .1s ease, box-shadow .1s ease;
}

.capacitor-press-button[aria-pressed="true"],
.momentary-power-button[aria-pressed="true"] {
  background: #eaff70;
  box-shadow: inset 0 3px 5px rgba(80, 93, 0, .28);
  transform: translateY(3px) scale(.98);
}

.momentary-power-button {
  transition: transform .1s ease, background .1s ease, box-shadow .1s ease;
}

.switch-power-button[aria-pressed="true"] {
  background: #eaff70;
  box-shadow: inset 0 2px 4px rgba(80, 93, 0, .24);
}

.control-symbol {
  display: inline-grid;
  width: 19px;
  height: 19px;
  place-items: center;
  font-size: 15px;
  font-weight: 950;
}

.pot-range-control {
  display: grid;
  width: min(210px, 36vw);
  gap: 5px;
  padding: 7px 11px;
  color: #172840;
  border-radius: 11px;
  background: #ffd466;
  box-shadow: inset 0 -2px 0 rgba(127, 76, 0, .18);
  font-size: 10px;
  font-weight: 850;
}

.pot-range-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.pot-range-control output {
  min-width: 34px;
  text-align: right;
}

.pot-range-control input {
  width: 100%;
  margin: 0;
  accent-color: #ed6d25;
  cursor: ew-resize;
}

.light-range-control {
  background: #9fe8fb;
}

.mission-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  padding: 22px;
  color: #14233a;
  border: 3px solid rgba(165, 103, 4, .34);
  border-radius: 23px;
  background: linear-gradient(135deg, #ffd471, #ffbd45);
  box-shadow: 0 16px 30px rgba(0, 14, 40, .18);
}

.mission-icon {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, .5);
  font-size: 20px;
}

.mission-panel .eyebrow {
  color: #8a5700;
}

.mission-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.15;
}

.mission-panel ol {
  margin: 0 0 10px;
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.55;
}

.mission-panel p {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.45;
}

.mission-panel .tip {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .44);
}

.lesson-side {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: clamp(28px, 3.1vw, 52px);
  background:
    linear-gradient(rgba(16, 42, 73, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 73, .035) 1px, transparent 1px),
    #f7fbff;
  background-size: 34px 34px;
}

.lesson-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 3px;
}

.lesson-number {
  display: grid;
  width: 55px;
  height: 55px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--white);
  border-radius: 18px;
  background: var(--navy-800);
  box-shadow: 0 9px 20px rgba(16, 42, 73, .16);
  font-size: 18px;
  font-weight: 850;
}

.lesson-intro h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1;
  letter-spacing: -.04em;
}

.lesson-panel,
.schematic-panel,
.extension-panel {
  border: 1px solid #dce6f0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 26px rgba(16, 42, 73, .06);
}

.lesson-panel {
  padding: 20px;
}

.learning-panel {
  border: 2px solid #d79d2b;
  background: linear-gradient(135deg, #fff0bf, #ffd273);
}

.lesson-panel h3,
.schematic-panel h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 9px;
  font-size: 17px;
}

.lesson-panel p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.panel-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  font-size: 17px;
}

.panel-icon.target {
  color: #fff;
  background: #eb5a67;
}

.panel-icon.bulb {
  color: #835400;
  background: #ffe38a;
}

.panel-icon.chat {
  color: #fff;
  background: #4b93d7;
}

.lesson-columns {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 17px;
}

.compact-panel {
  min-width: 0;
}

.compact-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.compact-panel dl div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  align-items: baseline;
}

.compact-panel dt {
  color: #6f8197;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.compact-panel dd {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.warning-note {
  margin-top: 12px;
  padding: 10px 12px;
  color: #7b2c2c;
  border-left: 3px solid #ee6868;
  border-radius: 8px;
  background: #fff0f0;
}

.warning-note strong {
  font-size: 11px;
}

.warning-note p {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.4;
}

.state-notes {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.state-notes p {
  padding: 7px 9px;
  border-radius: 8px;
  background: #edf8f1;
  font-size: 10px;
  line-height: 1.4;
}

.state-notes p:last-child {
  background: #f0f3f6;
}

.questions-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 17px;
  color: #40526a;
  font-size: 11px;
  line-height: 1.4;
}

.questions-panel li::marker {
  color: var(--blue);
}

.schematic-panel {
  padding: 20px;
}

.schematic-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.schematic-heading h3 {
  margin: 0;
}

.schematic-state {
  padding: 5px 9px;
  color: #14843a;
  border-radius: 999px;
  background: #dcf9e5;
  font-size: 10px;
  font-weight: 850;
  transition: color .3s ease, background .3s ease;
}

.circuit-card:not(.is-on) .schematic-state {
  color: #6f7e8c;
  background: #e8edf2;
}

.circuit-card-switch:not(.is-on) .switch-component img {
  filter: saturate(.72) brightness(.84);
}

.circuit-card.battery-off[data-card] .board-glow,
.circuit-card.battery-off[data-card] .current-orbit,
.circuit-card.battery-off[data-card] .reference-current {
  opacity: 0;
  animation-play-state: paused;
}

.circuit-card.battery-off[data-card] .led {
  opacity: .82;
  filter: grayscale(.72) brightness(.68);
}

.generated-circuit.battery-off[data-card] .reference-slot:not([class*="wire"]):not(.asset-battery) img {
  opacity: .76;
  filter: grayscale(.8) brightness(.66);
}

.generated-circuit.battery-off[data-card="14"].is-on .effect-led img {
  opacity: .68;
  filter: brightness(.38) saturate(.5) drop-shadow(0 0 0 rgba(255, 242, 56, 0));
  transition: opacity var(--capacitor-fade-duration, 0s) linear,
    filter var(--capacitor-fade-duration, 0s) linear;
}

.generated-circuit.battery-off[data-card="14"].capacitor-charged .effect-led img {
  opacity: 1;
  filter: brightness(1.2) saturate(1.28) drop-shadow(0 0 20px rgba(255, 242, 56, .92));
}

.generated-circuit.battery-off[data-card="14"].is-on .capacitor-control img {
  opacity: 1;
  filter: none;
}

.generated-circuit.battery-off[data-card] .effect-motor .motor-propeller,
.generated-circuit.battery-off[data-card] .effect-buzzer img {
  animation-play-state: paused;
}

.circuit-card.battery-off[data-card] .status-light {
  background: #75869a;
  box-shadow: none;
}

.circuit-card.battery-off[data-card="14"].is-on .status-light {
  background: #eaff41;
  box-shadow: 0 0 16px #eaff41;
}

.circuit-card.battery-off[data-card="14"].is-on .reference-current {
  opacity: 1;
  animation-play-state: running;
}

.circuit-card.battery-off[data-card] .schematic-state {
  color: #6f7e8c;
  background: #e8edf2;
}

.circuit-card.battery-off[data-card="14"].is-on .schematic-state {
  color: #14843a;
  background: #dcf9e5;
}

.circuit-card.battery-off[data-card] .schematic-image-frame img {
  opacity: .68;
  filter: grayscale(.8);
}

.extension-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  color: #173554;
  border-color: #cfe1f0;
  background: #eaf6ff;
}

.extension-panel .rocket {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--white);
  border-radius: 12px;
  background: #217fc8;
  font-size: 20px;
  font-weight: 850;
}

.extension-panel p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.empty-card {
  min-height: min(760px, calc(100vh - 120px));
  padding: 60px 30px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(16, 42, 73, .94), rgba(8, 25, 47, .98));
  box-shadow: var(--shadow);
  text-align: center;
}

.empty-card:not([hidden]) {
  display: grid;
  align-content: center;
  justify-items: center;
}

.empty-card .eyebrow {
  color: #83a0bf;
}

.empty-card h1 {
  margin: 4px 0 10px;
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: -.04em;
}

.empty-card p {
  max-width: 510px;
  margin: 0 0 24px;
  color: #a9bad0;
  font-size: 14px;
  line-height: 1.6;
}

.empty-graphic {
  position: relative;
  display: grid;
  width: 150px;
  height: 150px;
  margin-bottom: 25px;
  place-items: center;
  color: var(--white);
  border: 1px solid rgba(83, 215, 255, .24);
  border-radius: 50%;
  background: rgba(83, 215, 255, .05);
}

.empty-graphic strong {
  font-size: 40px;
}

.empty-graphic span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber);
  animation: empty-orbit 5s linear infinite;
}

.empty-graphic span:nth-child(2) { animation-delay: -1.65s; }
.empty-graphic span:nth-child(3) { animation-delay: -3.3s; }

@keyframes empty-orbit {
  from { transform: rotate(0deg) translateX(74px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(74px) rotate(-360deg); }
}

.back-to-first {
  min-height: 44px;
  padding-inline: 20px;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .card-nav {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
  }

  .nav-heading {
    margin: 0;
  }

  .nav-heading .eyebrow,
  .available-count,
  .nav-key {
    display: none;
  }

  .nav-heading h2 {
    font-size: 16px;
    white-space: nowrap;
  }

  .card-number-grid {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 3px 8px;
    scrollbar-color: #506985 transparent;
  }

  .card-number {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

  .card-resources {
    max-width: 340px;
    margin: 0;
    padding: 0;
    border: 0;
  }
}

@media (max-width: 980px) {
  .circuit-card {
    grid-template-columns: 1fr;
  }

  .build-side,
  .lesson-side {
    padding: clamp(25px, 6vw, 52px);
  }

  .lesson-side {
    min-height: auto;
  }

  .circuit-board {
    max-width: 650px;
  }

  .mission-panel,
  .power-row {
    max-width: 650px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 66px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 41px;
    height: 41px;
    border-radius: 13px;
  }

  .brand small {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .app-shell {
    gap: 12px;
    padding: 12px;
  }

  .card-nav {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 17px;
  }

  .nav-heading,
  .circuit-index {
    display: none;
  }

  .card-number-grid {
    padding-bottom: 3px;
  }

  .card-resources {
    max-width: none;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .09);
  }

  .circuit-card,
  .empty-card {
    border-radius: 21px;
  }

  .build-side,
  .lesson-side {
    padding: 25px 17px;
  }

  .build-heading h1 {
    font-size: 34px;
  }

  .circuit-board {
    width: 108%;
    margin-left: -4%;
  }

  .board-center {
    font-size: 9px;
  }

  @keyframes orbit {
    from { transform: rotate(0deg) translateX(30px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(30px) rotate(-360deg); }
  }

  .power-row {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .power-button {
    width: 100%;
  }

  .pot-range-control {
    width: 100%;
  }

  .mission-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .mission-icon {
    width: 35px;
    height: 35px;
  }

  .lesson-columns {
    grid-template-columns: 1fr;
  }

  .schematic-panel {
    padding: 16px 11px;
  }

  .schematic-heading {
    padding: 0 5px;
  }

  .schematic-state {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .generated-circuit.led-flashing[data-card="27"] .reference-slot.effect-led img {
    animation: none;
    filter: brightness(1.45) drop-shadow(0 0 12px #fff238);
    opacity: 1;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .card-nav,
  .power-row {
    display: none;
  }

  .app-shell {
    display: block;
    padding: 0;
  }

  .circuit-card {
    box-shadow: none;
  }
}

.language-switcher { display: flex; align-items: center; gap: .75rem; font-size: .85rem; }
.language-switcher a { color: inherit; padding: .35rem .1rem; }
.language-switcher a[aria-current] { font-weight: 700; text-decoration: underline; text-underline-offset: .25em; }
.topbar { flex-wrap: wrap; }
.topbar .language-switcher { order: 1; }
