:root {
  --edu-ink: #082f49;
  --edu-muted: #526574;
  --edu-blue: #00617f;
  --edu-blue-dark: #003b57;
  --edu-cyan: #0e91b4;
  --edu-gold: #e4a11b;
  --edu-paper: #ffffff;
  --edu-wash: #eef7f9;
  --edu-line: #cbdde3;
  --edu-shadow: 0 18px 48px rgba(8, 47, 73, 0.1);
}

.education-page {
  color: var(--edu-ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(14, 145, 180, 0.12), transparent 30rem),
    linear-gradient(180deg, #f8fbfc 0, #edf4f6 100%);
}

.education-page .econenergetica-main {
  padding: 2.2rem 0 4rem;
}

.education-page .econenergetica-container {
  max-width: 1240px;
}

.education-eyebrow,
.education-kicker {
  margin: 0 0 0.35rem;
  color: var(--edu-blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.education-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1.7rem clamp(1.25rem, 3vw, 2.4rem);
  overflow: hidden;
  border: 1px solid rgba(0, 97, 127, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.98), rgba(232, 247, 250, 0.94)),
    var(--edu-paper);
  box-shadow: var(--edu-shadow);
}

.education-hero h1,
.education-login h1 {
  margin: 0;
  color: var(--edu-ink);
  font-family: "Source Serif Pro", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.education-hero__intro {
  max-width: 52rem;
  margin: 0.8rem 0 0;
  color: var(--edu-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.education-logout {
  flex: 0 0 auto;
}

.education-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.education-button:hover {
  transform: translateY(-1px);
}

.education-button:focus-visible,
.education-page input:focus-visible,
.experiment-nav__button:focus-visible {
  outline: 3px solid rgba(14, 145, 180, 0.3);
  outline-offset: 2px;
}

.education-button--primary {
  background: var(--edu-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 97, 127, 0.18);
}

.education-button--primary:hover {
  background: var(--edu-blue-dark);
}

.education-button--quiet {
  border-color: var(--edu-line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--edu-blue-dark);
}

.education-button--quiet:hover {
  border-color: var(--edu-blue);
  background: #fff;
}

.experiment-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}

.experiment-nav__button {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--edu-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--edu-ink);
  text-align: left;
  cursor: pointer;
  transition: border 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.experiment-nav__button:hover,
.experiment-nav__button.is-active {
  border-color: rgba(0, 97, 127, 0.55);
  background: #fff;
  box-shadow: 0 8px 24px rgba(8, 47, 73, 0.09);
}

.experiment-nav__button.is-active {
  box-shadow: inset 0 -3px 0 var(--edu-gold), 0 8px 24px rgba(8, 47, 73, 0.09);
}

.experiment-nav__number {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--edu-wash);
  color: var(--edu-blue);
  font-size: 0.9rem;
  font-weight: 850;
}

.experiment-nav__button.is-active .experiment-nav__number {
  background: var(--edu-blue);
  color: #fff;
}

.experiment-nav__button strong,
.experiment-nav__button small {
  display: block;
}

.experiment-nav__button strong {
  margin-bottom: 0.15rem;
  font-size: 0.98rem;
  color: var(--edu-ink) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.experiment-nav__button small {
  color: var(--edu-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.experiment-panel {
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--edu-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--edu-shadow);
}

.experiment-heading {
  display: grid;
  grid-template-columns: minmax(15rem, 0.9fr) minmax(20rem, 1.2fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--edu-line);
}

.experiment-heading h2,
.result-surface h3 {
  margin: 0;
  color: var(--edu-ink);
  font-family: "Source Serif Pro", Georgia, serif;
}

.experiment-heading h2 {
  font-size: clamp(1.45rem, 3vw, 2.05rem);
}

.experiment-heading > p {
  margin: 0;
  color: var(--edu-muted);
  line-height: 1.5;
}

.experiment-form {
  display: grid;
  gap: 1.1rem;
}

.experiment-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--edu-line);
  border-radius: 10px;
  background: #fbfdfe;
}

.experiment-form legend {
  padding: 0 0.45rem;
  color: var(--edu-blue-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.education-fields {
  display: grid;
  gap: 0.85rem;
}

.education-fields--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.education-fields--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.education-fields label,
.education-login__form label {
  display: grid;
  gap: 0.28rem;
  color: var(--edu-ink);
  font-size: 0.79rem;
  font-weight: 750;
}

.education-fields label > span {
  color: var(--edu-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.education-page .experiment-form input,
.education-page .education-login__form input {
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.7rem;
  border: 1px solid #aebfc7;
  border-radius: 6px;
  background: #fff;
  color: #102f40;
  font: inherit;
  font-size: 0.88rem;
}

.education-page .experiment-form input[aria-invalid="true"],
.education-page .education-login__form input[aria-invalid="true"] {
  border-color: #b42318;
  background: #fff7f6;
}

.experiment-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.education-alert {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 7px;
  font-size: 0.83rem;
  line-height: 1.45;
}

.education-alert--error {
  border: 1px solid #e3aaa5;
  background: #fff3f2;
  color: #8b2119;
}

.education-alert--warning {
  border: 1px solid #ebc66d;
  background: #fff9e8;
  color: #654700;
}

.experiment-results {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.7rem;
}

.result-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--edu-line);
  border-left: 4px solid var(--edu-cyan);
  border-radius: 9px;
  background: var(--edu-wash);
}

.result-card--button {
  width: 100%;
  min-height: 8.2rem;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.result-card--button:hover,
.result-card--button:focus-visible {
  border-color: rgba(0, 97, 127, 0.55);
  background: #e6f4f7;
  box-shadow: 0 8px 18px rgba(8, 47, 73, 0.1);
  transform: translateY(-1px);
}

.result-card--button:focus-visible {
  outline: 3px solid rgba(14, 145, 180, 0.3);
  outline-offset: 2px;
}

.result-card--button.is-open {
  border-left-color: var(--edu-gold);
  background: #fffaf0;
  box-shadow: 0 8px 18px rgba(8, 47, 73, 0.09);
}

.result-card span,
.result-card strong,
.result-card small {
  display: block;
}

.result-card span {
  color: var(--edu-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.result-card strong {
  margin: 0.18rem 0;
  color: var(--edu-ink);
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}

.result-card small {
  color: var(--edu-muted);
  font-size: 0.68rem;
}

.result-card .result-card__hint,
.result-card .result-card__hint span {
  display: inline;
}

.result-card__hint {
  margin-top: 0.65rem;
  color: var(--edu-blue) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
}

.result-card--button[aria-expanded="true"] .result-card__hint span {
  display: inline-block;
  transform: rotate(180deg);
}

.calculation-detail {
  min-width: 0;
  grid-column: 1 / -1;
  padding: clamp(1rem, 3vw, 1.45rem);
  border: 1px solid #e6c36e;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffdf7, #f8fcfd);
  box-shadow: inset 4px 0 0 var(--edu-gold);
}

.calculation-detail__heading {
  margin-bottom: 0.8rem;
}

.calculation-detail__heading h4 {
  margin: 0;
  color: var(--edu-ink);
  font-family: "Source Serif Pro", Georgia, serif;
  font-size: 1.08rem;
}

.calculation-steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding-left: 1.4rem;
}

.calculation-steps li {
  padding-left: 0.2rem;
  color: var(--edu-ink);
}

.calculation-steps li::marker {
  color: var(--edu-blue);
  font-weight: 800;
}

.calculation-steps li > strong {
  font-size: 0.85rem;
}

.calculation-steps li > p {
  margin: 0.35rem 0 0;
  color: var(--edu-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.calculation-formula {
  margin-top: 0.35rem;
  padding: 0.62rem 0.72rem;
  overflow-x: auto;
  border: 1px solid #d9e7eb;
  border-radius: 6px;
  background: #fff;
  color: #173f55;
  font-family: "Cambria Math", Cambria, Georgia, serif;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: anywhere;
}

.phasor-symbol {
  text-decoration: overline;
  text-decoration-skip-ink: none;
}

.phasor-symbol + sub {
  margin-left: 0.04em;
}

.calculation-rounding {
  margin: 1rem 0 0;
  color: var(--edu-muted);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
}

.calculation-disclosure {
  margin-top: 0.8rem;
}

.calculation-disclosure > summary,
.result-row-button {
  padding: 0.6rem;
  border: 1px solid var(--edu-line);
  border-radius: 6px;
  background: var(--edu-wash);
  color: var(--edu-blue-dark);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.calculation-disclosure > summary:focus-visible,
.result-row-button:focus-visible {
  outline: 3px solid var(--edu-cyan);
  outline-offset: 2px;
}

.calculation-disclosure[open] > summary {
  margin-bottom: 0.6rem;
}

.calculation-sketch {
  max-width: 420px;
  margin: 0 auto 1rem;
}

.calculation-sketch svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.calculation-sketch text {
  fill: var(--edu-ink);
  font: 16px "Cambria Math", Cambria, Georgia, serif;
}

.calculation-sketch__triangle {
  fill: none;
  stroke: var(--edu-blue);
  stroke-width: 2;
}

.calculation-sketch__guide {
  fill: none;
  stroke: var(--edu-muted);
  stroke-width: 1;
}

.calculation-sketch figcaption {
  margin-top: 0.6rem;
  color: var(--edu-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.calculation-steps .calculation-detail {
  padding: clamp(0.65rem, 2vw, 1.2rem);
  box-shadow: none;
}

.calculation-steps .calculation-disclosure > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
}

.calculation-steps .calculation-disclosure > summary::-webkit-details-marker {
  display: none;
}

.calculation-steps .calculation-disclosure > summary::after {
  content: "⌄";
}

.calculation-steps .calculation-disclosure[open] > summary::after {
  transform: rotate(180deg);
}

.phasor-card:has(.calculation-disclosure[open]) {
  grid-column: 1 / -1;
}

.phasor-card:has(.calculation-disclosure[open]) > svg {
  max-width: 460px;
  margin-inline: auto;
}

.result-surface {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--edu-line);
  border-radius: 10px;
  background: #fff;
}

.result-surface__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.result-surface h3 {
  font-size: 1.25rem;
}

.result-surface__heading > p {
  max-width: 27rem;
  margin: 0;
  color: var(--edu-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.chart-frame {
  min-height: 280px;
  overflow: hidden;
  border-radius: 7px;
  background: #fbfdfe;
}

.chart-frame svg,
.phasor-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0 0 0.6rem;
  color: var(--edu-muted);
  font-size: 0.7rem;
}

.chart-legend span::before {
  display: inline-block;
  width: 0.8rem;
  height: 3px;
  margin-right: 0.3rem;
  vertical-align: middle;
  background: var(--legend-color);
  content: "";
}

.phasor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.phasor-card {
  padding: 0.75rem;
  border: 1px solid var(--edu-line);
  border-radius: 8px;
  background: #fbfdfe;
}

.phasor-card h4 {
  margin: 0 0 0.45rem;
  color: var(--edu-ink);
  font-size: 0.84rem;
}

.branch-table {
  overflow: hidden;
  border: 1px solid var(--edu-line);
  border-radius: 10px;
  background: #fbfdfe;
}

.branch-table__row {
  display: grid;
  grid-template-columns: minmax(4rem, 0.7fr) repeat(3, minmax(6rem, 1fr));
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem 0.85rem;
  border-top: 1px solid var(--edu-line);
}

.branch-table__row:first-child {
  border-top: 0;
}

.branch-table__head {
  background: var(--edu-wash);
  color: var(--edu-muted);
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.parallel-results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.result-table-wrap {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.result-table th,
.result-table td {
  padding: 0.58rem 0.5rem;
  border-bottom: 1px solid #e3ebee;
  text-align: right;
  white-space: nowrap;
}

.result-table th {
  color: var(--edu-muted);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.result-table th:first-child,
.result-table td:first-child,
.result-table th:last-child,
.result-table td:last-child {
  text-align: left;
}

.result-table tbody tr:last-child td {
  border-bottom: 0;
}

.result-table__combination {
  background: #f4fafb;
  font-weight: 700;
}

.result-table .result-table__detail td {
  white-space: normal;
  font-weight: 400;
  text-align: left;
}

.result-table__complex {
  color: #173f55;
  font-family: "Cambria Math", Cambria, Georgia, serif;
  font-weight: 650;
}

.education-login {
  width: min(520px, 100%);
  margin: clamp(1.5rem, 8vh, 5rem) auto;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  border: 1px solid var(--edu-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--edu-shadow);
}

.education-login__mark {
  display: grid;
  width: 3.4rem;
  height: 3.4rem;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--edu-blue);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.education-login__intro {
  margin: 0.85rem 0 1.2rem;
  color: var(--edu-muted);
  line-height: 1.5;
}

.education-login__form {
  display: grid;
  gap: 0.75rem;
}

.education-login__form .education-button {
  margin-top: 0.15rem;
}

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

@media (max-width: 880px) {
  .education-fields--3,
  .parallel-results-grid {
    grid-template-columns: 1fr;
  }

  .experiment-heading {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 680px) {
  .education-page .econenergetica-main {
    padding-top: 1rem;
  }

  .education-hero,
  .result-surface__heading {
    display: block;
  }

  .education-logout {
    margin-top: 1rem;
  }

  .experiment-nav,
  .education-fields--2 {
    grid-template-columns: 1fr;
  }

  .experiment-nav__button small {
    display: none;
  }

  .branch-table__row {
    grid-template-columns: 2.7rem repeat(3, minmax(4.6rem, 1fr));
    gap: 0.35rem;
    padding: 0.55rem;
  }

  .branch-table__row input {
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }

  .result-surface__heading > p {
    margin-top: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .education-button,
  .experiment-nav__button {
    transition: none;
  }
}

/* Guided exercises share the teaching page's palette and typography. */
.practice-conventions,
.practice-explorer {
  border-block: 1px solid var(--edu-line);
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.practice-conventions summary,
.practice-explorer summary {
  color: var(--edu-blue-dark);
  cursor: pointer;
  font-weight: 700;
}

.practice-conventions p,
.practice-explorer > p { max-width: 78ch; }
.practice-conventions p:first-of-type,
.practice-explorer > p:first-of-type { margin-top: 1rem; }

.practice-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 2rem;
}

.practice-sidebar { min-width: 0; }
#practice-tracks { display: grid; gap: 0.5rem; }
.practice-track {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  color: var(--edu-ink);
  cursor: pointer;
}
.practice-track:hover { background: #f3f8fa; }
.practice-track.is-active { background: var(--edu-wash); border-color: var(--edu-blue); }
.practice-track-number {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #dae9ef;
  text-align: center;
  line-height: 1.6rem;
  font-weight: 700;
}
.practice-track.is-active .practice-track-number { background: var(--edu-blue); color: #fff; }
.practice-track strong,
.practice-track small { display: block; line-height: 1.35; }
.practice-track strong { color: var(--edu-ink); }
.practice-track small { margin-top: 0.3rem; color: var(--edu-muted); font-size: 0.8rem; }
.practice-progress { margin-top: 1.2rem; font-weight: 700; font-size: 0.9rem; line-height: 1.5; }
.practice-storage-note { color: var(--edu-muted); font-size: 0.8rem; line-height: 1.5; }
.practice-workspace { min-width: 0; }
.practice-toolbar { display: flex; align-items: end; gap: 0.8rem; padding-bottom: 1.4rem; }
.practice-toolbar label { flex: 1; min-width: 0; }
.practice-toolbar > button { flex-shrink: 0; }
.practice-workspace label,
.practice-explorer-controls label { display: block; font-weight: 650; line-height: 1.45; }
.practice-workspace input,
.practice-workspace select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0.4rem 0 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid #a7bfca;
  border-radius: 6px;
  color: var(--edu-ink);
  background: #fff;
  font: inherit;
}
.practice-workspace input:focus,
.practice-workspace select:focus,
.practice-track:focus-visible,
.practice-help-actions button:focus-visible {
  outline: 3px solid #7bbbd0;
  outline-offset: 2px;
}
#practice-title { font-size: 1.55rem; margin: 0 0 0.8rem; color: var(--edu-ink); }
#practice-prompt { font-size: 1.08rem; line-height: 1.65; margin: 0 0 0.8rem; }
.practice-reference { padding: 0.6rem 0.9rem; border-left: 3px solid var(--edu-cyan); background: #f3f9fb; line-height: 1.5; }
.practice-step { min-width: 0; margin: 1.2rem 0; padding: 0.8rem 1rem 0.3rem; border: 1px solid var(--edu-line); border-radius: 8px; }
.practice-step legend { width: auto; padding: 0 0.45rem; font-size: 0.9rem; font-weight: 750; border: 0; margin: 0; color: var(--edu-blue-dark); }
.practice-answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1.2rem; }
.practice-answer:only-child { grid-column: 1 / -1; }
.practice-answer { min-width: 0; padding: 0.25rem 0; }
.practice-number-input { position: relative; }
.practice-number-input input { padding-right: 3.4rem; }
.practice-number-input > span { position: absolute; right: 0.8rem; top: 0.7rem; color: var(--edu-muted); pointer-events: none; }
.practice-field-feedback { min-height: 1.15rem; margin: 0.4rem 0; font-size: 0.88rem; line-height: 1.45; }
.practice-answer.is-correct input,
.practice-answer.is-correct select { border-color: #23865e; background: #f2fbf6; }
.practice-answer.is-correct .practice-field-feedback { color: #146746; }
.practice-answer.is-incorrect input,
.practice-answer.is-incorrect select { border-color: #b54b39; background: #fff9f7; }
.practice-answer.is-incorrect .practice-field-feedback { color: #943a2c; }
.practice-feedback { margin: 1rem 0; color: var(--edu-ink); line-height: 1.55; }
.practice-feedback:empty { display: none; }
.practice-feedback.is-correct { border-left: 3px solid #23865e; padding: 0.7rem 1rem; background: #f2fbf6; }
.practice-help-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1rem; }
.practice-help-actions button:disabled { opacity: 0.6; cursor: default; }
.practice-hints p { padding: 0.7rem 1rem; background: #fff8e9; border-left: 3px solid var(--edu-gold); margin: 0.8rem 0; line-height: 1.5; }
.practice-solution { margin-top: 1.3rem; padding: 1.2rem; border: 1px solid var(--edu-line); background: #f8fbfc; border-radius: 8px; }
.practice-solution[hidden] { display: none; }
.practice-solution h4 { font-size: 1.25rem; margin-top: 0; }
.practice-solution ol { padding-left: 1.3rem; }
.practice-solution li { padding-left: 0.2rem; margin-bottom: 1rem; }
.practice-formula { font-family: "Cambria Math", Cambria, Georgia, serif; line-height: 1.7; overflow-wrap: anywhere; margin-top: 0.4rem; }
.practice-next { display: flex; justify-content: flex-end; margin-top: 1.3rem; }
.practice-figure,
.practice-circuit { margin: 1rem 0; }
.practice-figure { border: 1px solid var(--edu-line); border-radius: 8px; padding: 0.7rem; background: white; }
.practice-figure svg,
.practice-circuit svg { display: block; width: 100%; height: auto; max-height: 350px; }
.practice-circuit svg { max-height: 165px; }
.practice-figure svg[data-axis-radius] { max-height: none; }
.practice-figure svg text,
.practice-circuit svg text { font-family: "Source Sans Pro", sans-serif; font-size: 14px; fill: var(--edu-ink); }
.practice-figure svg .practice-tick { font-size: 11px; fill: var(--edu-muted); }
.practice-figure figcaption { font-size: 0.87rem; line-height: 1.5; }
.practice-figure figcaption p { margin: 0.4rem 0; }
.practice-legend { list-style: none; padding: 0; margin: 0; }
.practice-legend li { padding: 0.2rem 0 0.2rem 0.6rem; margin: 0.3rem 0; border-left: 3px solid var(--vector-color); overflow-wrap: anywhere; }
.practice-explorer { margin-top: 2rem; }
.practice-explorer-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: 1rem 0; }
.practice-explorer-controls output { display: block; color: var(--edu-blue); }
.practice-explorer-controls input { display: block; width: 100%; margin-top: 0.5rem; accent-color: var(--edu-blue); }
.practice-graphs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.sinus-animation { padding: 1.2rem; border: 1px solid var(--edu-line); border-radius: 10px; background: var(--edu-wash); }
.sinus-animation-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem; }
.sinus-animation-toolbar label { display: grid; gap: 0.3rem; font-weight: 700; }
.sinus-animation-toolbar select { padding: 0.5rem; min-height: 42px; border: 1px solid var(--edu-line); border-radius: 6px; background: white; font: inherit; }
.sinus-animation-note { font-size: 0.9rem; color: var(--edu-muted); margin: 0.5rem 0 0.9rem; }
.sinus-time-stops { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.sinus-time-control { display: block; font-weight: 700; }
.sinus-time-control output { margin-left: 0.6rem; color: var(--edu-blue); }
.sinus-time-control input { display: block; width: 100%; min-height: 32px; padding: 0; accent-color: var(--edu-blue); }
.sinus-animation .practice-figure { margin: 0.5rem 0; min-width: 0; }
.sinus-animation svg { max-height: none; }
.sinus-animation .sinus-small { font-size: 12px; }
.sinus-animation-key { margin-top: 0.8rem; line-height: 1.6; }
.sinus-animation-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.sinus-animation-values p { margin: 0.4rem 0; padding: 0.7rem; background: white; border: 1px solid var(--edu-line); border-radius: 6px; font-size: 0.9rem; overflow-wrap: anywhere; }
.sinus-static-heading { margin-top: 2rem; }
.sinus-step-heading { font-size: 1.2rem; }
.power-animation { margin-top: 1.5rem; padding: 1.2rem; border: 1px solid var(--edu-line); border-radius: 10px; background: #f3f7f5; }
.power-animation .sinus-time-control { margin-top: 1rem; }
.power-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.power-layout > div { min-width: 0; }
.power-animation .practice-figure { margin: 0.7rem 0; }
.power-animation svg { max-height: none; }
.power-animation svg text { font-size: 12px; }
.power-totals { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.power-totals p { flex: 1 1 120px; margin: 0.25rem 0; padding: 0.7rem; border: 1px solid var(--edu-line); border-radius: 6px; background: white; font-size: 0.9rem; }
.power-components-toggle { display: flex; align-items: center; gap: 0.6rem; margin: 1rem 0; }
.power-animation .power-components-toggle input { width: 18px; height: 18px; min-height: 0; margin: 0; flex: 0 0 18px; }
.power-voltage-key { color: #126b9e; }
.power-current-key { color: #af4b09; }
.power-animation details { margin-top: 1rem; line-height: 1.6; }
.power-animation summary { cursor: pointer; font-weight: 700; }
.power-storage { margin-top: 1.4rem; padding-top: 1rem; border-top: 2px solid var(--edu-line); }
.power-storage h4 { margin: 0 0 0.7rem; font-size: 1.2rem; }
.power-storage .practice-formula { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .power-layout { grid-template-columns: 1fr; }
  .power-animation { padding: 0.7rem; }
  .power-storage svg text { font-size: 18px; }
}
.sinus-static-controls { padding: 0.9rem; border: 1px solid var(--edu-line); border-radius: 8px; background: var(--edu-wash); }
.practice-figure svg .phasor-reference-label { fill: #875200; font-size: 13px; }
.practice-figure svg .phasor-phase-label { fill: #875200; font-size: 17px; font-weight: 700; }
@media (max-width: 680px) {
  .sinus-animation { padding: 0.7rem; }
  .sinus-animation-values { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .practice-layout { grid-template-columns: 1fr; gap: 1rem; }
  #practice-tracks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .practice-sidebar > .practice-storage-note { max-width: 85ch; }
  .practice-track { height: 100%; }
}

.education-site-navigation { margin-bottom: 1.2rem; }
.education-test-notice { margin-bottom: 1.2rem; line-height: 1.6; }
.education-lab-login { max-width: 420px; }
.practice-value-unit { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(135px, 1fr); gap: 0.6rem; }
.practice-unit-feedback { font-size: 0.87rem; margin: 0 0 0.5rem; line-height: 1.4; }
.practice-answer.is-correct .practice-unit-feedback { color: #146746; }
.practice-answer.is-incorrect .practice-unit-feedback { color: #943a2c; }
.practice-unit-explanation { font-size: 0.85rem; color: var(--edu-muted); }
.theory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.theory-card { padding: 1.25rem; border: 1px solid var(--edu-line); border-radius: 10px; background: #f8fbfc; min-width: 0; line-height: 1.6; }
.theory-card h3 { margin: 0 0 0.75rem; font-size: 1.3rem; color: var(--edu-ink); }
.theory-card svg { display: block; width: 100%; max-height: 240px; margin: 0.8rem 0; background: white; }
.theory-card svg text { font: 15px "Source Sans Pro", sans-serif; fill: var(--edu-ink); }
.theory-table-wrap { overflow-x: auto; }
.theory-table { width: 100%; border-collapse: collapse; }
.theory-table th, .theory-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid var(--edu-line); }
.theory-table caption { font-weight: 700; color: var(--edu-ink); }
@media (max-width: 780px) { .theory-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .practice-value-unit { grid-template-columns: 1fr; gap: 0; } }

.explorer-modes { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 1.4rem; }
.explorer-modes button[aria-pressed="true"] { background: var(--edu-blue); color: white; border-color: var(--edu-blue); }
.explorer-panel[hidden], .explorer-panel [hidden] { display: none; }
.circuit-explorer-settings { padding: 1rem; border: 1px solid var(--edu-line); border-radius: 8px; background: var(--edu-wash); }
.circuit-explorer-settings > label { display: grid; gap: 0.4rem; max-width: 300px; font-weight: 700; }
.circuit-explorer-settings select { min-width: 0; max-width: 100%; min-height: 42px; padding: 0.5rem; background: white; border: 1px solid var(--edu-line); border-radius: 6px; font: inherit; }
.circuit-explorer-settings > label + label { margin-top: 0.8rem; }
.circuit-loss-settings { min-width: 0; margin: 1rem 0; padding: 0.8rem 1rem; border: 1px solid var(--edu-line); border-radius: 6px; background: #fff; }
.circuit-loss-settings legend { padding: 0 0.35rem; font-weight: 700; }
.circuit-loss-settings > p { margin-top: 0.3rem; }
.circuit-loss-settings .practice-explorer-controls { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.practice-circuit--lossy svg { max-height: 320px; }
.practice-explorer-controls input[type="range"] { min-height: 32px; padding: 0; accent-color: var(--edu-blue); }
.circuit-range-control { display: grid; gap: 0.35rem; min-width: 0; }
.circuit-range-control__heading { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.circuit-range-control__heading > label { min-width: 0; font-weight: 650; line-height: 1.45; }
.circuit-direct-input { display: flex; flex: 0 0 auto; align-items: center; gap: 0.35rem; color: var(--edu-muted); font-size: 0.85rem; }
.practice-explorer-controls .circuit-direct-input input { box-sizing: border-box; width: 6.25rem; min-height: 38px; margin: 0; padding: 0.4rem 0.5rem; border: 1px solid #a7bfca; border-radius: 6px; background: #fff; color: var(--edu-ink); font: inherit; text-align: right; }
.practice-explorer-controls .circuit-direct-input input[aria-invalid="true"] { border-color: #b42318; background: #fff7f6; }
.circuit-explorer-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.circuit-explorer-results > div { border: 1px solid var(--edu-line); border-radius: 8px; padding: 0.9rem; background: #f8fbfc; overflow-wrap: anywhere; line-height: 1.5; }
.circuit-explorer-results dt { font-weight: 700; margin-bottom: 0.35rem; }
.circuit-explorer-results dd { margin: 0; }
.circuit-explorer-results small { display: block; color: var(--edu-muted); }
.circuit-explorer-plots h4 { margin: 1rem 0 0.4rem; font-size: 1.1rem; }
.circuit-explorer-plots .practice-figure { margin-top: 0; }
.circuit-explorer-plots > section { min-width: 0; }
.circuit-zoom-controls { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.circuit-zoom-controls .education-button { min-height: 40px; padding: 0.5rem 0.65rem; color: var(--edu-blue-dark); background: #fff; }
.circuit-zoom-controls .education-button:disabled { opacity: 0.5; cursor: default; transform: none; }
.circuit-zoom-scale { color: var(--edu-muted); font-size: 0.88rem; margin: 0.6rem 0; line-height: 1.4; }
.circuit-zoom-note { padding: 0.5rem 0.7rem; border-left: 3px solid var(--edu-gold); background: #fff8e9; font-size: 0.88rem; line-height: 1.5; }
@media (max-width: 680px) {
  .circuit-explorer-results { grid-template-columns: 1fr; }
  .circuit-range-control__heading { align-items: flex-start; flex-direction: column; gap: 0.3rem; }
}
@media (max-width: 680px) {
  .experiment-nav { grid-template-columns: 1fr; }
  #practice-tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice-toolbar { align-items: stretch; flex-direction: column; }
  .practice-toolbar > button { align-self: flex-start; }
  .practice-answer-grid,
  .practice-graphs,
  .practice-explorer-controls { grid-template-columns: 1fr; }
  .practice-solution { padding: 0.8rem; }
  .practice-track { padding: 0.6rem 0.35rem; }
  .practice-track-number { display: none; }
}
