:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #263238;
  --muted: #5f6d6f;
  --line: #d7ded9;
  --teal: #147c78;
  --teal-dark: #0c5b58;
  --mint: #d8f0e9;
  --yellow: #ffd166;
  --amber: #f5a623;
  --coral: #e55d45;
  --rose: #f9ded7;
  --blue: #3977a8;
  --sky: #dceffc;
  --green: #4f9d69;
  --shadow: 0 16px 36px rgba(38, 50, 56, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(246, 244, 238, 0.92);
  border-bottom: 1px solid rgba(38, 50, 56, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(20, 124, 120, 0.2);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--teal-dark);
  background: var(--mint);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background: var(--ink);
  border-radius: 999px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.88fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  min-height: calc(100svh - 72px);
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 56px) 34px;
  overflow: hidden;
}

.hero-content {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.08;
}

h1 {
  max-width: 840px;
  margin-bottom: 18px;
  font-size: clamp(2.65rem, 7vw, 5.4rem);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.35rem);
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.hero-content p:not(.eyebrow) {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button,
.ghost-button,
.answer-button,
.choice-button,
.switch-control {
  min-height: 44px;
  border-radius: var(--radius);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
}

.button:hover,
.ghost-button:hover,
.answer-button:hover,
.choice-button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 12px 24px rgba(20, 124, 120, 0.22);
}

.button.secondary {
  color: var(--teal-dark);
  background: var(--surface);
  border-color: var(--line);
}

.hero-visual {
  position: relative;
  min-height: 530px;
}

.atom-stage {
  position: absolute;
  top: 0;
  right: min(2vw, 20px);
  width: min(92vw, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(38, 50, 56, 0.12);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98), rgba(216, 240, 233, 0.58) 62%, rgba(255, 209, 102, 0.18)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(220, 239, 252, 0.65));
  box-shadow: var(--shadow);
}

.nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 82px;
  height: 82px;
  padding: 17px;
  transform: translate(-50%, -50%);
  background: var(--rose);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(229, 93, 69, 0.25);
}

.nucleus span {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: var(--coral);
  border-radius: 50%;
}

.orbit {
  position: absolute;
  inset: 68px;
  border: 2px solid rgba(20, 124, 120, 0.24);
  border-radius: 50%;
  animation: spin 8s linear infinite;
}

.orbit-two {
  transform: rotate(60deg);
  animation-duration: 10s;
}

.orbit-three {
  transform: rotate(-55deg);
  animation-duration: 12s;
}

.electron {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 18px;
  height: 18px;
  background: var(--blue);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(57, 119, 168, 0.28);
}

.mini-circuit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(90vw, 360px);
  height: 230px;
  background: #fff;
  border: 1px solid rgba(38, 50, 56, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mini-circuit .cell {
  position: absolute;
  left: 30px;
  bottom: 74px;
  display: grid;
  width: 66px;
  height: 86px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: var(--teal-dark);
  border-radius: var(--radius);
}

.wire,
.circuit-wire {
  position: absolute;
  background: #37474f;
}

.wire-top {
  top: 50px;
  left: 64px;
  width: 210px;
  height: 8px;
}

.wire-right {
  top: 50px;
  right: 78px;
  width: 8px;
  height: 86px;
}

.wire-bottom {
  left: 64px;
  bottom: 88px;
  width: 220px;
  height: 8px;
}

.wire-left {
  left: 64px;
  top: 50px;
  width: 8px;
  height: 92px;
}

.bulb {
  position: absolute;
  right: 46px;
  bottom: 61px;
  width: 72px;
  height: 72px;
  background: #fff7d1;
  border: 8px solid var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 42px rgba(245, 166, 35, 0.42);
}

.bulb::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: -19px;
  left: 15px;
  height: 20px;
  background: #6d4c41;
  border-radius: 0 0 6px 6px;
}

.flow-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.8);
  animation: circuitFlow 4s linear infinite;
}

.dot-one {
  top: 48px;
  left: 110px;
}

.dot-two {
  top: 48px;
  left: 178px;
  animation-delay: -1.2s;
}

.dot-three {
  top: 120px;
  left: 248px;
  animation-delay: -2.4s;
}

.section-inner {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
}

.path-band {
  padding: 0 0 42px;
}

.learning-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.learning-path li {
  min-height: 126px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.learning-path span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: var(--teal);
  border-radius: 50%;
}

.learning-path strong,
.learning-path small {
  display: block;
}

.learning-path small {
  margin-top: 5px;
  color: var(--muted);
}

.content-section {
  padding: clamp(58px, 8vw, 100px) 0;
}

.content-section.tinted {
  background: #eaf6f1;
}

.content-section.warm {
  background: #fff2d6;
}

.section-heading {
  max-width: 790px;
  margin-bottom: 32px;
}

.section-heading.compact {
  max-width: 720px;
}

.section-heading p:not(.eyebrow),
.two-column p,
.model-card p,
.material-card p,
.part-card p,
.compare-card p,
.activity-card p,
.site-footer p {
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.model-card,
.material-card,
.part-card,
.compare-card,
.activity-card {
  background: var(--surface);
  border: 1px solid rgba(38, 50, 56, 0.12);
  border-radius: var(--radius);
}

.model-card {
  min-height: 470px;
  padding: 18px;
}

.model-year {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  margin-bottom: 14px;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 900;
  background: var(--mint);
  border-radius: var(--radius);
}

.model-visual {
  position: relative;
  height: 136px;
  margin-bottom: 18px;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.democritus span,
.dalton span {
  position: absolute;
  border-radius: 50%;
}

.democritus span {
  background: var(--amber);
}

.democritus span:nth-child(1) {
  width: 50px;
  height: 50px;
  top: 24px;
  left: 34px;
}

.democritus span:nth-child(2) {
  width: 34px;
  height: 34px;
  right: 46px;
  bottom: 30px;
}

.democritus span:nth-child(3) {
  width: 22px;
  height: 22px;
  top: 38px;
  right: 86px;
}

.dalton span {
  width: 48px;
  height: 48px;
  background: var(--blue);
  box-shadow: inset -10px -10px 0 rgba(255, 255, 255, 0.24);
}

.dalton span:nth-child(1) {
  top: 42px;
  left: 42px;
}

.dalton span:nth-child(2) {
  top: 42px;
  left: 92px;
}

.dalton span:nth-child(3) {
  top: 42px;
  left: 142px;
}

.rutherford .core,
.current-model .core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: var(--coral);
  border-radius: 50%;
}

.rutherford .path {
  position: absolute;
  inset: 22px 48px;
  border: 2px solid rgba(20, 124, 120, 0.34);
  border-radius: 50%;
}

.rutherford .e-one,
.rutherford .e-two {
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--blue);
  border-radius: 50%;
}

.rutherford .e-one {
  top: 29px;
  left: 72px;
}

.rutherford .e-two {
  right: 70px;
  bottom: 27px;
}

.cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.cloud-one {
  inset: 20px 48px;
  background: rgba(57, 119, 168, 0.25);
}

.cloud-two {
  inset: 38px 30px;
  background: rgba(20, 124, 120, 0.18);
}

.cloud-three {
  inset: 32px 74px;
  background: rgba(255, 209, 102, 0.34);
}

.ghost-button {
  width: 100%;
  padding: 10px 12px;
  color: var(--teal-dark);
  font-weight: 900;
  background: #fff;
  border: 1px solid var(--line);
}

.hidden-note {
  display: none;
  padding: 12px;
  margin: 12px 0 0;
  color: var(--ink);
  background: var(--mint);
  border-radius: var(--radius);
}

.hidden-note.is-visible {
  display: block;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.concept-panel {
  display: grid;
  gap: 14px;
}

.charge-demo {
  display: grid;
  grid-template-columns: 76px 76px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid rgba(38, 50, 56, 0.12);
  border-radius: var(--radius);
}

.charge-demo span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: #fff;
  font-size: 2.3rem;
  font-weight: 900;
  border-radius: 50%;
}

.same-charge span {
  background: var(--blue);
}

.opposite-charge span:first-child {
  background: var(--coral);
}

.opposite-charge span:nth-child(2) {
  background: var(--blue);
}

.charge-demo strong {
  font-size: 1.3rem;
}

.fact-strip {
  padding: 18px;
  color: var(--teal-dark);
  font-weight: 900;
  background: var(--yellow);
  border-radius: var(--radius);
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.material-card {
  padding: 22px;
}

.material-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.material-card li {
  padding: 10px 12px;
  font-weight: 800;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.material-card.conductor {
  border-top: 6px solid var(--green);
}

.material-card.insulator {
  border-top: 6px solid var(--coral);
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.part-card {
  min-height: 238px;
  padding: 20px;
}

.part-icon {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.battery-icon::before,
.battery-icon::after,
.wire-icon::before,
.wire-icon::after,
.switch-icon::before,
.switch-icon::after,
.bulb-icon::before,
.bulb-icon::after {
  content: "";
  position: absolute;
}

.battery-icon::before {
  top: 18px;
  left: 21px;
  width: 34px;
  height: 42px;
  background: var(--teal);
  border-radius: 4px;
}

.battery-icon::after {
  top: 12px;
  left: 31px;
  width: 14px;
  height: 8px;
  background: var(--teal-dark);
  border-radius: 3px 3px 0 0;
}

.wire-icon::before {
  top: 36px;
  left: 12px;
  width: 52px;
  height: 7px;
  background: var(--ink);
  border-radius: 999px;
}

.wire-icon::after {
  top: 26px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: var(--yellow);
  border-radius: 50%;
}

.switch-icon::before {
  left: 16px;
  bottom: 20px;
  width: 44px;
  height: 6px;
  background: var(--ink);
  transform: rotate(-23deg);
  transform-origin: left center;
  border-radius: 999px;
}

.switch-icon::after {
  right: 13px;
  bottom: 18px;
  width: 12px;
  height: 12px;
  background: var(--coral);
  border-radius: 50%;
}

.bulb-icon::before {
  top: 12px;
  left: 20px;
  width: 36px;
  height: 36px;
  background: var(--yellow);
  border: 5px solid var(--amber);
  border-radius: 50%;
}

.bulb-icon::after {
  left: 28px;
  bottom: 14px;
  width: 20px;
  height: 18px;
  background: #6d4c41;
  border-radius: 0 0 4px 4px;
}

.compare-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.compare-card {
  padding: 20px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.download-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  margin-top: 16px;
  background: var(--ink);
  border-radius: var(--radius);
}

.download-band h3,
.download-band p {
  margin: 0;
}

.download-band h3 {
  color: #ffffff;
}

.download-band p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
}

.activity-card {
  min-height: 490px;
  padding: 20px;
}

.quiz-question {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 850;
}

.answer-list,
.sorter-options,
.order-list {
  display: grid;
  gap: 10px;
}

.answer-button,
.choice-button {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
}

.answer-button:disabled,
.choice-button:disabled {
  cursor: default;
  opacity: 0.98;
}

.answer-button.is-correct,
.choice-button.is-correct {
  color: #17462f;
  background: #dff4e7;
  border-color: #86cfa3;
}

.answer-button.is-wrong,
.choice-button.is-wrong {
  color: #6b2b21;
  background: #fde1da;
  border-color: #f0aa9d;
}

.activity-feedback {
  min-height: 52px;
  padding: 12px;
  margin: 16px 0 0;
  color: var(--teal-dark);
  font-weight: 800;
  background: var(--mint);
  border-radius: var(--radius);
}

.quiz-footer,
.sorter-footer,
.order-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.small-action {
  min-height: 40px;
  padding: 8px 12px;
  color: #fff;
  font-weight: 900;
  background: var(--teal);
  border: 0;
  border-radius: var(--radius);
}

.score-pill {
  padding: 8px 10px;
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 900;
  background: var(--mint);
  border-radius: var(--radius);
}

.sorter-target {
  padding: 16px;
  margin: 16px 0;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-list {
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.order-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-item span {
  font-weight: 900;
}

.order-controls {
  display: flex;
  gap: 6px;
}

.order-controls button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--teal-dark);
  font-weight: 900;
  background: var(--mint);
  border: 0;
  border-radius: var(--radius);
}

.lab-section {
  background: #edf6fb;
}

.credits-section {
  background: #ffffff;
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.circuit-board,
.lab-controls {
  background: var(--surface);
  border: 1px solid rgba(38, 50, 56, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(38, 50, 56, 0.08);
}

.circuit-board {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

.circuit-board::before {
  content: "";
  position: absolute;
  inset: 18px;
  background-image:
    linear-gradient(rgba(38, 50, 56, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 50, 56, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  border-radius: var(--radius);
}

.battery {
  position: absolute;
  top: 185px;
  left: 54px;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 118px;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  background: var(--teal-dark);
  border: 6px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(12, 91, 88, 0.2);
}

.wire-a {
  top: 105px;
  left: 97px;
  width: calc(100% - 230px);
  height: 12px;
}

.wire-b {
  top: 105px;
  right: 126px;
  width: 12px;
  height: 126px;
}

.wire-c {
  right: 126px;
  bottom: 116px;
  width: calc(100% - 230px);
  height: 12px;
}

.wire-d {
  top: 236px;
  left: 97px;
  width: 12px;
  height: 134px;
}

.lab-bulb {
  position: absolute;
  right: 72px;
  top: 196px;
  z-index: 3;
  width: 120px;
  height: 120px;
  background: #fcfbf2;
  border: 12px solid #c9a64a;
  border-radius: 50%;
  box-shadow: inset 0 -16px 0 rgba(0, 0, 0, 0.04);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.lab-bulb::after {
  content: "";
  position: absolute;
  right: 31px;
  bottom: -42px;
  left: 31px;
  height: 42px;
  background: #6d4c41;
  border-radius: 0 0 8px 8px;
}

.filament {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 28px;
  border-bottom: 5px solid #8d6e63;
  border-radius: 50%;
  transform: translate(-50%, -44%);
}

.switch-control {
  position: absolute;
  bottom: 93px;
  left: 250px;
  z-index: 4;
  width: 124px;
  height: 76px;
  background: #fff;
  border: 2px solid var(--line);
}

.switch-control::before,
.switch-control::after {
  content: "";
  position: absolute;
  bottom: 20px;
  width: 16px;
  height: 16px;
  background: var(--ink);
  border-radius: 50%;
}

.switch-control::before {
  left: 24px;
}

.switch-control::after {
  right: 24px;
}

.switch-arm {
  position: absolute;
  left: 32px;
  bottom: 27px;
  width: 64px;
  height: 8px;
  background: var(--coral);
  border-radius: 999px;
  transform: rotate(-25deg);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.circuit-board[data-circuit-state="closed"] .switch-arm {
  transform: rotate(0deg);
}

.current-flow span {
  position: absolute;
  z-index: 5;
  width: 15px;
  height: 15px;
  background: var(--yellow);
  border: 2px solid #fff;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.8);
  animation: labFlow 3.2s linear infinite;
}

.current-flow span:nth-child(1) {
  top: 103px;
  left: 160px;
}

.current-flow span:nth-child(2) {
  top: 103px;
  left: 340px;
  animation-delay: -0.8s;
}

.current-flow span:nth-child(3) {
  right: 124px;
  bottom: 112px;
  animation-delay: -1.6s;
}

.current-flow span:nth-child(4) {
  bottom: 112px;
  left: 350px;
  animation-delay: -2.4s;
}

.circuit-board[data-circuit-state="closed"] .current-flow span {
  opacity: 1;
}

.lab-controls {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
}

.lab-controls label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 900;
}

.lab-controls input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.meter-grid div {
  min-height: 92px;
  padding: 14px;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.meter-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.meter-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
}

.lab-feedback {
  min-height: 76px;
  padding: 14px;
  margin: 0;
  color: var(--teal-dark);
  font-weight: 850;
  background: var(--mint);
  border-radius: var(--radius);
}

.site-footer {
  padding: 26px 0 34px;
  background: var(--ink);
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.worksheet-page {
  background: #eef4f0;
}

.worksheet-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(246, 244, 238, 0.94);
  border-bottom: 1px solid rgba(38, 50, 56, 0.12);
  backdrop-filter: blur(14px);
}

.worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.worksheet {
  width: min(100% - 36px, 980px);
  margin: 28px auto 54px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.worksheet-cover,
.worksheet-block {
  padding: clamp(24px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
}

.worksheet-block:last-child {
  border-bottom: 0;
}

.worksheet-cover h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

.worksheet-cover p:not(.eyebrow),
.worksheet-block p {
  color: var(--muted);
}

.student-fields {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 12px;
  margin-top: 28px;
}

.student-fields label,
.question-set label {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
}

.student-fields span,
.question-set span {
  display: block;
  min-height: 34px;
  border-bottom: 2px solid #9aa8a8;
}

.worksheet-block h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.answer-lines {
  display: grid;
  gap: 14px;
  padding-left: 24px;
  margin: 18px 0 0;
}

.answer-lines li {
  min-height: 34px;
  padding-left: 8px;
  border-bottom: 2px solid #9aa8a8;
}

.question-set {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.worksheet-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  table-layout: fixed;
}

.worksheet-table th,
.worksheet-table td {
  min-height: 54px;
  padding: 12px;
  text-align: left;
  vertical-align: top;
  border: 1px solid #9aa8a8;
}

.worksheet-table th {
  background: var(--mint);
}

.worksheet-table td {
  height: 58px;
}

.drawing-box {
  min-height: 260px;
  margin-top: 18px;
  background-image:
    linear-gradient(rgba(38, 50, 56, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 50, 56, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 2px solid #9aa8a8;
  border-radius: var(--radius);
}

.paragraph-lines {
  min-height: 180px;
  margin-top: 18px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    #9aa8a8 32px,
    transparent 33px
  );
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@keyframes circuitFlow {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateX(72px);
    opacity: 0;
  }
}

@keyframes labFlow {
  0% {
    transform: translateX(0) translateY(0);
  }
  100% {
    transform: translateX(74px) translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-section,
  .two-column,
  .lab-layout {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-visual {
    min-height: 460px;
  }

  .atom-stage {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .mini-circuit {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .learning-path,
  .timeline,
  .parts-grid,
  .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .circuit-board {
    min-height: 440px;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: grid;
  }

  .main-nav {
    position: absolute;
    top: 68px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .hero-section {
    padding-top: 34px;
  }

  .hero-visual {
    min-height: 390px;
  }

  .atom-stage {
    width: min(88vw, 330px);
  }

  .orbit {
    inset: 50px;
  }

  .mini-circuit {
    width: min(88vw, 330px);
    height: 210px;
  }

  .learning-path,
  .timeline,
  .material-grid,
  .parts-grid,
  .compare-row,
  .activity-grid {
    grid-template-columns: 1fr;
  }

  .download-band,
  .worksheet-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .download-band .button,
  .worksheet-actions .button {
    width: 100%;
  }

  .model-card,
  .activity-card {
    min-height: auto;
  }

  .student-fields {
    grid-template-columns: 1fr;
  }

  .charge-demo {
    grid-template-columns: 58px 58px minmax(0, 1fr);
    gap: 10px;
  }

  .charge-demo span {
    width: 58px;
    height: 58px;
    font-size: 1.8rem;
  }

  .material-card ul {
    grid-template-columns: 1fr;
  }

  .circuit-board {
    min-height: 390px;
  }

  .battery {
    top: 150px;
    left: 28px;
    width: 72px;
    height: 104px;
  }

  .wire-a {
    top: 82px;
    left: 64px;
    width: calc(100% - 164px);
  }

  .wire-b {
    top: 82px;
    right: 80px;
    height: 112px;
  }

  .wire-c {
    right: 80px;
    bottom: 93px;
    width: calc(100% - 164px);
  }

  .wire-d {
    top: 190px;
    left: 64px;
    height: 106px;
  }

  .lab-bulb {
    top: 162px;
    right: 34px;
    width: 92px;
    height: 92px;
    border-width: 9px;
  }

  .lab-bulb::after {
    right: 25px;
    bottom: -34px;
    left: 25px;
    height: 34px;
  }

  .switch-control {
    bottom: 70px;
    left: 138px;
    width: 112px;
    height: 70px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --ink: #111111;
    --muted: #333333;
    --line: #777777;
    --shadow: none;
  }

  body {
    background: #ffffff;
  }

  .worksheet-toolbar {
    display: none;
  }

  .worksheet {
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .worksheet-cover,
  .worksheet-block {
    padding: 18mm 12mm;
    break-inside: avoid;
  }

  .worksheet-cover h1 {
    font-size: 34pt;
  }

  .worksheet-block h2 {
    font-size: 17pt;
  }

  .button {
    display: none;
  }
}
