:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5a6670;
  --line: rgba(23, 32, 38, 0.14);
  --soft-line: rgba(23, 32, 38, 0.08);
  --page: #f5f3ea;
  --surface: #fffdf7;
  --surface-strong: #ffffff;
  --teal: #14796b;
  --teal-dark: #0e564e;
  --orange: #c06d2e;
  --blue: #2d5d7b;
  --shadow: rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(20, 121, 107, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(192, 109, 46, 0.14), transparent 42%),
    var(--page);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 22px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal-dark);
  font-weight: 900;
}

.course-tag {
  color: var(--teal-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 26px;
  align-items: center;
  padding: 34px 0 24px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  line-height: 1.72;
}

.motor-visual {
  margin: 0;
  min-width: 0;
}

.motor-visual figcaption {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.motor-visual svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 210px;
}

.magnet {
  fill: rgba(45, 93, 123, 0.13);
  stroke: rgba(45, 93, 123, 0.32);
  stroke-width: 2;
}

.south {
  fill: rgba(192, 109, 46, 0.14);
  stroke: rgba(192, 109, 46, 0.34);
}

.motor-visual text {
  dominant-baseline: middle;
  fill: var(--ink);
  font-size: 30px;
  font-weight: 800;
  text-anchor: middle;
}

.diagram-label {
  fill: var(--muted);
  font-size: 20px;
  font-weight: 700;
}

.diagram-sub {
  font-size: 13px;
}

.motor-ring {
  fill: rgba(255, 255, 255, 0.76);
  stroke: var(--teal);
  stroke-width: 6;
}

.coil-line,
.shaft,
.flow,
.arrow {
  fill: none;
  stroke: url("#coil");
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.shaft {
  stroke: var(--blue);
  stroke-width: 5;
}

.flow,
.arrow {
  stroke: var(--orange);
  stroke-width: 5;
}

.learning-board {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px 0 44px;
}

.topic-list {
  display: grid;
  gap: 10px;
}

.topic-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.82);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.topic-button:hover,
.topic-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 107, 0.35);
  background: var(--surface-strong);
  box-shadow: 0 10px 26px rgba(23, 32, 38, 0.08);
}

.topic-button.is-active {
  border-color: rgba(20, 121, 107, 0.48);
  background: rgba(20, 121, 107, 0.1);
}

.topic-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal-dark);
  font-weight: 900;
}

.topic-button strong,
.topic-button small {
  display: block;
  min-width: 0;
}

.topic-button strong {
  line-height: 1.25;
}

.topic-button small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.topic-card {
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 22px 60px var(--shadow);
}

.topic-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.topic-heading p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.subtopic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.subtopic-tabs[hidden] {
  display: none;
}

.subtopic-button {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.subtopic-button:hover,
.subtopic-button:focus-visible {
  border-color: rgba(20, 121, 107, 0.36);
  background: #ffffff;
}

.subtopic-button.is-active {
  color: #ffffff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-top: 24px;
}

.note-block,
.formula-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.note-block h3,
.formula-block h3 {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-size: 1rem;
}

.heading-note {
  color: var(--muted);
  font-size: 0.86em;
  font-weight: 700;
}

.note-block ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.formula {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 94px;
  margin: 0;
  padding: 18px;
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.1);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1.32;
  text-align: center;
}

.formula .equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.42em;
}

.formula .chain {
  gap: 0.34em;
}

.formula .equation-pair {
  gap: 0.34em;
}

.formula .equation-stack {
  display: grid;
  gap: 0.38em;
  justify-items: center;
}

.formula .separator {
  color: var(--orange);
}

.fraction {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  min-width: max-content;
  line-height: 1.08;
}

.fraction span:first-child {
  width: 100%;
  padding: 0 0.34em 0.16em;
  border-bottom: 2px solid currentColor;
}

.fraction span:last-child {
  padding: 0.16em 0.34em 0;
}

.formula sub,
.math-inline sub {
  font-size: 0.64em;
  line-height: 0;
  vertical-align: sub;
}

.math-inline {
  color: var(--ink);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-weight: 700;
  white-space: nowrap;
}

.formula-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.cn-footnote {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0.78;
}

.note-block .cn-footnote,
.formula-note .cn-footnote {
  display: inline;
  margin-left: 4px;
  font-size: 0.92em;
}

.intro-landing {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.intro-landing[hidden] {
  display: none;
}

.landing-header {
  max-width: 760px;
}

.landing-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.44rem;
  line-height: 1.2;
}

.landing-header p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.landing-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(45, 93, 123, 0.06);
  line-height: 1.58;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 4px;
}

.landing-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(20, 121, 107, 0.28);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.08);
  font-weight: 800;
  text-decoration: none;
}

.landing-actions a:hover,
.landing-actions a:focus-visible {
  border-color: rgba(20, 121, 107, 0.48);
  background: rgba(20, 121, 107, 0.13);
}

.motor-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 4px;
}

.motor-route {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 108px;
  padding: 16px;
  border: 1px solid rgba(20, 121, 107, 0.28);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(20, 121, 107, 0.08);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.motor-route:hover,
.motor-route:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 107, 0.52);
  background: rgba(20, 121, 107, 0.13);
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.09);
}

.route-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal-dark);
  font-weight: 900;
}

.motor-route strong,
.motor-route small,
.motor-route em {
  display: block;
  min-width: 0;
}

.motor-route strong {
  font-size: 1.22rem;
  line-height: 1.2;
}

.motor-route small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.38;
}

.motor-route em {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  opacity: 0.72;
}

.type-jump-panel {
  display: grid;
  gap: 18px;
  margin: 24px 0 10px;
}

.jump-family {
  padding: 20px 0 0;
  border-top: 1px solid var(--soft-line);
}

.jump-family-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.family-pill {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
}

.family-pill-dc {
  background: var(--orange);
}

.jump-family-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.jump-family-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.52;
}

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

.intro-page-grid {
  margin-top: 20px;
}

.type-jump {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border: 1px solid rgba(45, 93, 123, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.type-jump:hover,
.type-jump:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(45, 93, 123, 0.46);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.08);
}

.type-jump strong,
.type-jump small {
  display: block;
  min-width: 0;
}

.type-jump strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.type-jump small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.38;
}

.jump-thumb {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 38, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 93, 123, 0.12), rgba(20, 121, 107, 0.1)),
    #ffffff;
}

.jump-thumb::before,
.jump-thumb::after {
  position: absolute;
  content: "";
}

.jump-thumb::before {
  inset: 13px;
  border: 3px solid var(--blue);
  border-radius: 50%;
}

.jump-thumb::after {
  inset: 24px 10px auto;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
  transform: rotate(-22deg);
}

.jump-thumb-three::after {
  inset: 27px 8px auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--orange));
  box-shadow:
    0 -10px 0 rgba(45, 93, 123, 0.65),
    0 10px 0 rgba(192, 109, 46, 0.72);
  transform: none;
}

.jump-thumb-single::after {
  inset: 28px 8px auto;
  height: 3px;
  background: var(--orange);
  box-shadow: 0 8px 0 rgba(45, 93, 123, 0.45);
  transform: none;
}

.jump-thumb-induction::after {
  inset: 15px 7px auto;
  height: 28px;
  border: 3px solid var(--orange);
  border-radius: 50%;
  background: transparent;
  transform: none;
}

.jump-thumb-dc::before {
  border-color: var(--teal-dark);
}

.jump-thumb-dc::after {
  inset: 25px 8px auto;
  height: 6px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 14px 0 0 var(--blue);
  transform: none;
}

.jump-thumb-shaded::before {
  border-color: var(--orange);
}

.jump-thumb-shaded::after {
  inset: 9px 12px 9px auto;
  width: 10px;
  height: auto;
  border-radius: 8px;
  background: rgba(20, 121, 107, 0.35);
  transform: none;
}

.jump-thumb-split::after,
.jump-thumb-cap-start::after,
.jump-thumb-cap-run::after,
.jump-thumb-separate::after,
.jump-thumb-shunt::after,
.jump-thumb-series::after,
.jump-thumb-compound::after {
  inset: 15px 12px auto;
  width: 34px;
  height: 28px;
  border: 3px solid var(--orange);
  border-radius: 6px;
  background: transparent;
  transform: rotate(0);
}

.jump-thumb-split::after {
  border-left-color: var(--blue);
  border-right-color: var(--teal);
}

.jump-thumb-cap-start::after {
  border-width: 0;
  width: 4px;
  height: 34px;
  background: var(--orange);
  box-shadow: 12px 0 0 var(--orange);
}

.jump-thumb-cap-run::after {
  border-width: 0;
  width: 4px;
  height: 34px;
  background: var(--blue);
  box-shadow:
    10px 0 0 var(--blue),
    24px 0 0 var(--orange),
    34px 0 0 var(--orange);
}

.jump-thumb-separate::after {
  inset: 12px auto auto 8px;
  width: 16px;
  height: 34px;
  border-color: var(--blue);
  box-shadow: 25px 0 0 -3px rgba(192, 109, 46, 0.7);
}

.jump-thumb-shunt::after {
  inset: 17px 8px auto;
  width: auto;
  height: 23px;
  border-color: var(--teal);
}

.jump-thumb-series::after {
  inset: 26px 8px auto;
  width: auto;
  height: 4px;
  border-width: 0;
  border-radius: 999px;
  background: var(--teal);
  box-shadow:
    -10px 0 0 0 var(--teal),
    10px 0 0 0 var(--orange);
}

.jump-thumb-compound::after {
  inset: 14px 8px auto;
  width: auto;
  height: 30px;
  border-color: var(--teal);
  box-shadow: inset 12px 0 0 rgba(192, 109, 46, 0.24);
}

.jump-thumb-example-motor::before {
  inset: 12px 9px;
  border-color: var(--teal-dark);
  border-radius: 999px;
}

.jump-thumb-example-motor::after {
  inset: 25px 7px auto;
  height: 7px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow:
    0 -13px 0 -2px rgba(45, 93, 123, 0.66),
    0 13px 0 -2px rgba(20, 121, 107, 0.58),
    34px 0 0 -1px var(--blue);
  transform: none;
}

.route-section {
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.route-heading {
  max-width: 760px;
  margin-bottom: 4px;
}

.route-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.34rem;
  line-height: 1.2;
}

.route-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.64;
}

.intro-feature {
  display: grid;
  grid-template-columns: minmax(240px, 0.92fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--soft-line);
  scroll-margin-top: 18px;
}

.feature-media {
  min-width: 0;
}

.feature-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  object-fit: contain;
}

.feature-copy {
  min-width: 0;
}

.feature-kicker {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-copy h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.28;
}

.feature-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.64;
}

.machine-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--soft-line);
}

.machine-comparison .intro-feature {
  display: block;
  padding: 0;
  border-top: 0;
}

.machine-comparison .feature-copy {
  margin-top: 14px;
}

.machine-comparison .feature-media img {
  aspect-ratio: 16 / 10;
}

.detail-stack {
  display: grid;
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--soft-line);
}

.type-detail {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--soft-line);
  scroll-margin-top: 20px;
}

.type-detail:first-child {
  border-top: 0;
}

.type-figure {
  min-width: 0;
  margin: 0;
}

.type-figure svg {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(45, 93, 123, 0.08), rgba(20, 121, 107, 0.08)),
    #ffffff;
}

.type-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.42;
}

.type-figure text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.diagram-ring,
.diagram-frame,
.diagram-supply {
  fill: rgba(20, 121, 107, 0.08);
  stroke: var(--teal-dark);
  stroke-width: 4;
}

.diagram-rotor {
  fill: rgba(192, 109, 46, 0.18);
  stroke: var(--orange);
  stroke-width: 4;
}

.diagram-field,
.diagram-wave,
.diagram-pulse,
.diagram-arrow-loop,
.diagram-switch,
.diagram-wire,
.diagram-coil,
.diagram-cap,
.diagram-shade {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.diagram-field.warm,
.diagram-wire.warm,
.diagram-supply.warm,
.diagram-cap.run {
  stroke: var(--orange);
}

.diagram-field.cool,
.diagram-coil.aux {
  stroke: var(--teal);
}

.diagram-pole {
  fill: rgba(45, 93, 123, 0.12);
  stroke: var(--blue);
  stroke-width: 4;
}

.diagram-shade {
  stroke: var(--orange);
  stroke-width: 9;
}

.diagram-arrow-head {
  fill: var(--blue);
  stroke: none;
}

.detail-copy {
  min-width: 0;
}

.detail-copy h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.24;
}

.detail-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.64;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.detail-list li::marker {
  color: var(--orange);
}

.detail-formula {
  display: inline-flex;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(20, 121, 107, 0.22);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.08);
  font-size: 1.08rem;
  font-weight: 900;
  overflow-x: auto;
}

.detail-formula .equation {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.detail-body {
  background:
    linear-gradient(135deg, rgba(20, 121, 107, 0.1), transparent 42%),
    linear-gradient(315deg, rgba(45, 93, 123, 0.09), transparent 40%),
    var(--page);
}

.detail-page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.detail-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 22px;
}

.return-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(20, 121, 107, 0.28);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.08);
  font-weight: 800;
  text-decoration: none;
}

.return-link:hover,
.return-link:focus-visible {
  border-color: rgba(20, 121, 107, 0.5);
  background: rgba(20, 121, 107, 0.13);
}

.return-link.standalone {
  margin-top: 18px;
}

.detail-page-main {
  min-width: 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 26px;
  align-items: center;
  padding: 28px 0 24px;
}

.detail-hero-text-only {
  grid-template-columns: minmax(0, 1fr);
}

.detail-hero .detail-copy {
  min-width: 0;
}

.detail-hero h1 {
  max-width: 760px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
}

.detail-subtitle {
  margin: 18px 0 0;
  color: var(--teal-dark);
  font-size: clamp(1.04rem, 2vw, 1.22rem);
  font-weight: 900;
  line-height: 1.45;
}

.detail-summary {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.detail-visual-panel {
  min-width: 0;
}

.detail-figure {
  padding: 0;
}

.detail-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  object-fit: contain;
}

.detail-equation-panel {
  margin: 14px 0 22px;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.88);
  box-shadow: 0 18px 46px rgba(23, 32, 38, 0.08);
}

.detail-equation-panel h2,
.related-panel h2 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 1rem;
  line-height: 1.25;
}

.detail-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-section-grid .insight-block.is-wide {
  grid-column: 1 / -1;
}

.detail-action-panel {
  margin-top: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-action-panel h2 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 1rem;
  line-height: 1.25;
}

.detail-action-grid {
  margin-top: 12px;
}

.insight-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.9);
}

.insight-block h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.insight-block h3 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.98rem;
  line-height: 1.28;
}

.insight-block ul {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.58;
}

.insight-block li::marker {
  color: var(--orange);
}

.detail-rich-content {
  min-width: 0;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.62;
}

.detail-diagram-card {
  margin: 0;
}

.detail-diagram-card svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.detail-image-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #ffffff;
}

.example-image-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.detail-diagram-card figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.solution-steps {
  display: grid;
  gap: 12px;
}

.solution-step {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.solution-step p {
  margin: 8px 0 0;
}

.solution-step.result-step {
  border-color: rgba(192, 109, 46, 0.34);
  background: rgba(192, 109, 46, 0.08);
}

.solution-table-wrap {
  max-width: 100%;
  margin-top: 12px;
  overflow-x: auto;
}

.solution-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.42;
}

.solution-table.compact {
  min-width: 560px;
}

.solution-table th,
.solution-table td {
  padding: 10px 12px;
  border: 1px solid rgba(45, 93, 123, 0.16);
  text-align: left;
  vertical-align: top;
}

.solution-table th {
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.08);
  font-weight: 900;
}

.solution-equation {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 0.42em;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.07);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.solution-equation sup,
.solution-equation sub,
.detail-formula sub {
  font-size: 0.68em;
  line-height: 0;
}

.shunt-path-demo {
  display: grid;
  gap: 14px;
}

.shunt-path-demo > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.shunt-path-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shunt-path-controls label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(45, 93, 123, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.shunt-path-controls label:hover,
.shunt-path-controls label:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 107, 0.42);
}

#show-shunt-il:checked ~ .shunt-path-controls label[for="show-shunt-il"],
#show-shunt-ia:checked ~ .shunt-path-controls label[for="show-shunt-ia"],
#show-shunt-if:checked ~ .shunt-path-controls label[for="show-shunt-if"] {
  border-color: rgba(20, 121, 107, 0.54);
  color: #ffffff;
  background: var(--teal);
}

.shunt-current-map {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  background: rgba(229, 241, 239, 0.52);
}

.current-node {
  display: grid;
  min-width: 0;
  min-height: 78px;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
  line-height: 1.25;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.current-node span {
  display: block;
  color: var(--ink);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 900;
}

.current-node small {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 800;
}

.current-line {
  width: min(320px, 100%);
  justify-self: center;
}

.current-split-point {
  width: 16px;
  height: 16px;
  justify-self: center;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 7px rgba(192, 109, 46, 0.13);
}

.current-branches,
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#show-shunt-il:checked ~ .shunt-current-map .current-line,
#show-shunt-ia:checked ~ .shunt-current-map .current-armature,
#show-shunt-if:checked ~ .shunt-current-map .current-field {
  border-color: rgba(192, 109, 46, 0.55);
  color: var(--ink);
  background: rgba(192, 109, 46, 0.11);
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.08);
}

#show-shunt-il:checked ~ .shunt-current-map .current-armature,
#show-shunt-il:checked ~ .shunt-current-map .current-field {
  border-color: rgba(20, 121, 107, 0.34);
  color: var(--ink);
  background: rgba(20, 121, 107, 0.09);
}

.path-readout {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}

#show-shunt-il:checked ~ .path-readout-il,
#show-shunt-ia:checked ~ .path-readout-ia,
#show-shunt-if:checked ~ .path-readout-if {
  display: block;
}

.shunt-quantity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.shunt-quantity-grid span,
.comparison-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.shunt-quantity-grid b {
  display: block;
  color: var(--teal-dark);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1.08rem;
}

.comparison-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.comparison-card p {
  margin: 8px 0 0;
}

.compact-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.compact-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.42;
}

.compact-table th,
.compact-table td {
  padding: 10px 12px;
  border: 1px solid rgba(45, 93, 123, 0.16);
  text-align: left;
  vertical-align: top;
}

.compact-table th {
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.08);
  font-weight: 900;
}

.example-motor-diagram {
  min-height: 250px;
}

.example-motor-diagram text {
  fill: var(--ink);
  font-family: Arial, sans-serif;
}

.example-motor-diagram .diagram-title {
  fill: var(--teal-dark);
  font-size: 24px;
  font-weight: 900;
}

.example-motor-diagram .diagram-small {
  fill: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.example-motor-diagram .diagram-label rect {
  fill: #ffffff;
  stroke: rgba(20, 121, 107, 0.26);
  stroke-width: 2;
}

.example-motor-diagram .diagram-label text {
  fill: var(--teal-dark);
  font-size: 16px;
  font-weight: 900;
}

.jump-thumb-eff-basics::before {
  inset: 10px;
  border-color: var(--teal);
}

.jump-thumb-eff-basics::after {
  inset: 14px 15px auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    conic-gradient(var(--teal) 0 70%, rgba(192, 109, 46, 0.25) 70% 100%),
    #ffffff;
  transform: none;
}

.jump-thumb-eff-flow::before {
  inset: 15px 10px;
  border-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--orange));
}

.jump-thumb-eff-flow::after {
  inset: 22px 9px auto auto;
  width: 13px;
  height: 13px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: var(--orange);
  transform: none;
}

.jump-thumb-eff-loss::before {
  inset: 11px 18px auto;
  width: 22px;
  height: 30px;
  border-width: 0;
  border-radius: 8px 8px 14px 14px;
  background: linear-gradient(180deg, rgba(192, 109, 46, 0.88), rgba(192, 109, 46, 0.16));
}

.jump-thumb-eff-loss::after {
  inset: 18px 9px auto;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow:
    0 10px 0 rgba(20, 121, 107, 0.7),
    0 20px 0 rgba(192, 109, 46, 0.65);
  transform: none;
}

.jump-thumb-eff-equation::before {
  inset: 10px 8px;
  border-width: 0;
  border-radius: 6px;
  background:
    linear-gradient(var(--teal-dark), var(--teal-dark)) 12px 16px / 34px 3px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 20px 28px / 18px 3px no-repeat,
    rgba(255, 255, 255, 0.86);
}

.jump-thumb-eff-equation::after {
  inset: 13px auto auto 12px;
  content: "\03b7";
  width: auto;
  height: auto;
  color: var(--teal-dark);
  background: none;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  transform: none;
}

.jump-thumb-eff-max::before {
  inset: 12px 9px 13px;
  border-width: 0 0 3px 3px;
  border-color: var(--blue);
  border-style: solid;
  border-radius: 0;
}

.jump-thumb-eff-max::after {
  inset: 19px 12px auto;
  width: 36px;
  height: 19px;
  border-radius: 50% 50% 20% 20%;
  background: transparent;
  border-top: 4px solid var(--orange);
  box-shadow: 18px -3px 0 -14px var(--teal-dark);
  transform: rotate(-8deg);
}

.jump-thumb-eff-calc::before {
  inset: 9px 12px;
  border-width: 0;
  border-radius: 7px;
  background:
    linear-gradient(var(--blue), var(--blue)) 8px 9px / 24px 4px no-repeat,
    linear-gradient(var(--teal), var(--teal)) 8px 20px / 7px 7px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 21px 20px / 7px 7px no-repeat,
    linear-gradient(var(--teal-dark), var(--teal-dark)) 8px 33px / 20px 4px no-repeat,
    rgba(255, 255, 255, 0.88);
}

.jump-thumb-eff-calc::after {
  display: none;
}

.efficiency-route-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.route-energy-node {
  display: grid;
  min-height: 108px;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(45, 93, 123, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.route-energy-node span {
  color: var(--teal-dark);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1.04rem;
}

.route-input {
  border-color: rgba(45, 93, 123, 0.32);
}

.route-loss {
  border-color: rgba(192, 109, 46, 0.34);
  background: rgba(192, 109, 46, 0.08);
}

.route-output {
  border-color: rgba(20, 121, 107, 0.34);
  background: rgba(20, 121, 107, 0.08);
}

.route-arrow {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.route-arrow::after {
  position: absolute;
  top: 50%;
  right: -2px;
  width: 12px;
  height: 12px;
  content: "";
  background: var(--teal);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

.efficiency-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.efficiency-control-row label {
  color: var(--ink);
  font-weight: 900;
}

.efficiency-control-row label span {
  color: var(--orange);
}

.efficiency-control-row input[type="range"] {
  width: min(360px, 48%);
  accent-color: var(--teal);
}

.efficiency-basics-widget {
  --loss-share: 20%;
  min-width: 0;
}

.energy-split-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(160px, 1.1fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: stretch;
}

.energy-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: center;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(45, 93, 123, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.energy-card::before {
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  content: "";
  background: var(--blue);
}

.energy-card strong {
  color: var(--ink);
  font-size: 0.93rem;
}

.energy-card span {
  color: var(--teal-dark);
  font-size: 1.5rem;
  font-weight: 950;
  line-height: 1.1;
}

.energy-card-loss {
  background: rgba(192, 109, 46, 0.09);
}

.energy-card-loss::before {
  width: var(--loss-share);
  background: var(--orange);
}

.energy-card-output {
  background: rgba(20, 121, 107, 0.08);
}

.energy-card-output::before {
  width: calc(100% - var(--loss-share));
  background: var(--teal);
}

.energy-flow-track {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border: 1px dashed rgba(45, 93, 123, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(45, 93, 123, 0.08), rgba(20, 121, 107, 0.09)),
    rgba(255, 255, 255, 0.54);
}

.energy-flow-track::before {
  position: absolute;
  top: 50%;
  right: 18px;
  left: 18px;
  height: 4px;
  content: "";
  border-radius: 999px;
  background: rgba(45, 93, 123, 0.18);
  transform: translateY(-50%);
}

.energy-flow-track span {
  position: absolute;
  top: calc(50% - 7px);
  left: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 7px rgba(20, 121, 107, 0.11);
  animation: splitPulse 2.8s ease-in-out infinite;
}

.energy-flow-track span:nth-child(2) {
  background: var(--orange);
  animation-delay: 0.45s;
}

.energy-flow-track span:nth-child(3) {
  background: var(--blue);
  animation-delay: 0.9s;
}

.power-flow-widget,
.loss-explorer,
.equation-builder,
.maximum-efficiency-widget,
.efficiency-calculator {
  min-width: 0;
}

.flow-controls,
.flow-loss-buttons,
.equation-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.flow-control,
.flow-loss-buttons button,
.equation-controls button,
.calc-button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(20, 121, 107, 0.26);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.74);
  font-weight: 900;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.flow-control:hover,
.flow-control:focus-visible,
.flow-loss-buttons button:hover,
.flow-loss-buttons button:focus-visible,
.equation-controls button:hover,
.equation-controls button:focus-visible,
.calc-button:hover,
.calc-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 107, 0.5);
  background: #ffffff;
}

.flow-control.is-active,
.flow-loss-buttons button.is-active {
  color: #ffffff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.equation-controls button:disabled {
  cursor: default;
  opacity: 0.44;
  transform: none;
}

.power-flow-canvas {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 93, 123, 0.08), rgba(20, 121, 107, 0.06)),
    #ffffff;
}

.power-flow-canvas svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.power-flow-canvas text {
  fill: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  text-anchor: middle;
}

.power-flow-canvas marker path {
  fill: var(--teal);
}

.flow-main-path,
.flow-loss-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  marker-end: url("#eff-arrow");
}

.flow-main-path {
  stroke: var(--teal);
  stroke-width: 8;
}

.flow-loss-path {
  opacity: 0;
  stroke: var(--orange);
  stroke-width: 5;
  stroke-dasharray: 8 10;
  transition: opacity 180ms ease;
}

.show-losses .flow-loss-path {
  opacity: 1;
  animation: lossDash 1.2s linear infinite;
}

.flow-node rect,
.flow-motor rect,
.flow-loss-node rect {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(45, 93, 123, 0.22);
  stroke-width: 2;
}

.flow-motor rect {
  fill: rgba(20, 121, 107, 0.09);
  stroke: rgba(20, 121, 107, 0.5);
}

.flow-motor circle {
  fill: rgba(192, 109, 46, 0.16);
  stroke: var(--orange);
  stroke-width: 4;
}

.flow-motor path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 8;
  stroke-linecap: round;
}

.flow-loss-node {
  opacity: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.show-losses .flow-loss-node {
  opacity: 1;
}

.power-flow-widget[data-focus="armature"] .loss-armature-node rect,
.power-flow-widget[data-focus="field"] .loss-field-node rect,
.power-flow-widget[data-focus="rotational"] .loss-rotational-node rect {
  fill: rgba(192, 109, 46, 0.16);
  stroke: rgba(192, 109, 46, 0.76);
}

.energy-pulse {
  fill: var(--orange);
  opacity: 0;
  animation: flowPulse 3.2s ease-in-out infinite;
}

.pulse-two {
  fill: var(--teal);
  animation-delay: 0.58s;
}

.pulse-three {
  fill: var(--blue);
  animation-delay: 1.08s;
}

.flow-loss-buttons {
  margin: 12px 0 0;
}

.flow-detail {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(20, 121, 107, 0.08);
  font-weight: 750;
}

.loss-explorer {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: stretch;
}

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

.loss-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  min-width: 0;
  min-height: 100px;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(45, 93, 123, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.loss-card:hover,
.loss-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 107, 0.42);
  background: #ffffff;
}

.loss-card.is-active {
  border-color: rgba(20, 121, 107, 0.56);
  background: rgba(20, 121, 107, 0.1);
}

.loss-card strong,
.loss-card small {
  display: block;
  min-width: 0;
}

.loss-card strong {
  line-height: 1.2;
}

.loss-card small {
  grid-column: 2;
  color: var(--muted);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 850;
}

.loss-icon {
  position: relative;
  grid-row: 1 / span 2;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(23, 32, 38, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 93, 123, 0.09), rgba(20, 121, 107, 0.08)),
    #ffffff;
}

.loss-icon::before,
.loss-icon::after {
  position: absolute;
  content: "";
}

.loss-icon-armature::before {
  inset: 14px 10px;
  border: 4px solid var(--orange);
  border-radius: 999px;
}

.loss-icon-armature::after {
  inset: 24px 8px auto;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
}

.loss-icon-field::before {
  inset: 9px 20px;
  border-radius: 999px;
  background: repeating-linear-gradient(180deg, var(--teal) 0 4px, transparent 4px 8px);
}

.loss-icon-field::after {
  inset: 12px 9px auto;
  height: 30px;
  border: 3px solid var(--blue);
  border-radius: 50%;
}

.loss-icon-iron::before {
  inset: 10px 12px;
  border: 3px solid var(--blue);
  border-radius: 8px;
}

.loss-icon-iron::after {
  inset: 17px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange), var(--teal));
}

.loss-icon-mechanical::before {
  inset: 10px;
  border: 4px solid var(--teal);
  border-radius: 50%;
}

.loss-icon-mechanical::after {
  inset: 24px 6px auto;
  height: 5px;
  border-radius: 999px;
  background: var(--orange);
  transform: rotate(-20deg);
}

.loss-detail-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.loss-detail-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.loss-detail-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(45, 93, 123, 0.12);
}

.loss-detail-list dt {
  color: var(--teal-dark);
  font-weight: 900;
}

.loss-detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--muted);
}

.equation-builder {
  padding: 16px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.equation-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(45, 93, 123, 0.12);
}

.equation-progress span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  transition: width 200ms ease;
}

.equation-stage {
  display: grid;
  min-height: 190px;
  align-content: center;
  gap: 8px;
  padding: 18px 0;
}

.equation-stage p:not(.eyebrow):not(.solution-equation) {
  margin: 0;
  color: var(--muted);
}

.equation-controls {
  justify-content: space-between;
  margin-bottom: 0;
}

.formula-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.formula-map-node {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.formula-map-node span {
  color: var(--muted);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 800;
}

.formula-map-result {
  border-color: rgba(192, 109, 46, 0.32);
  background: rgba(192, 109, 46, 0.08);
}

.max-efficiency-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.max-efficiency-chart {
  display: block;
  width: 100%;
  min-height: 280px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 93, 123, 0.08), rgba(20, 121, 107, 0.06)),
    #ffffff;
}

.max-efficiency-chart rect {
  fill: rgba(255, 253, 247, 0.92);
  stroke: rgba(45, 93, 123, 0.14);
}

.chart-axis {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.chart-grid-line {
  fill: none;
  stroke: rgba(45, 93, 123, 0.12);
  stroke-width: 1;
}

.max-curve {
  fill: none;
  stroke: var(--teal);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.max-marker-line {
  stroke: rgba(192, 109, 46, 0.6);
  stroke-width: 3;
  stroke-dasharray: 7 7;
}

.max-point {
  fill: var(--orange);
  stroke: #ffffff;
  stroke-width: 4;
}

.max-label {
  fill: var(--teal-dark);
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
}

.loss-bars {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.loss-bar-row {
  display: grid;
  gap: 7px;
}

.loss-bar-row span {
  color: var(--ink);
  font-weight: 850;
}

.loss-bar-row b {
  color: var(--orange);
  font-size: 1.1rem;
}

.loss-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(45, 93, 123, 0.12);
}

.loss-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #f0ad61);
  transition: width 180ms ease;
}

.loss-bar.constant span {
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.max-status {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(20, 121, 107, 0.08);
  font-weight: 800;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calc-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.calc-grid input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(45, 93, 123, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.calc-grid input:focus {
  outline: 3px solid rgba(20, 121, 107, 0.14);
  border-color: rgba(20, 121, 107, 0.5);
}

.calc-button {
  margin-top: 12px;
  color: #ffffff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.calc-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.calc-output .result-step {
  grid-column: 1 / -1;
}

.jump-thumb-out-torque-current::before,
.jump-thumb-out-speed-current::before,
.jump-thumb-out-torque-speed::before,
.jump-thumb-out-circuit::before,
.jump-thumb-out-back-emf::before,
.jump-thumb-out-torque-eq::before,
.jump-thumb-out-derive::before,
.jump-thumb-out-curve::before,
.jump-thumb-out-load::before {
  inset: 9px;
  border-width: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
}

.jump-thumb-out-torque-current::after {
  inset: 34px 9px auto 9px;
  height: 4px;
  border-radius: 999px;
  background: var(--teal-dark);
  box-shadow:
    11px -7px 0 -1px var(--orange),
    22px -14px 0 -1px var(--orange),
    33px -21px 0 -1px var(--orange);
  transform: none;
}

.jump-thumb-out-speed-current::after {
  inset: 18px 10px auto;
  height: 22px;
  border-width: 0 0 4px 4px;
  border-color: var(--blue);
  border-style: solid;
  border-radius: 0;
  background: transparent;
  box-shadow: 11px -5px 0 -8px var(--orange);
  transform: skewY(-8deg);
}

.jump-thumb-out-torque-speed::after {
  inset: 14px 10px auto;
  height: 32px;
  border-width: 0 0 4px 4px;
  border-color: var(--teal-dark);
  border-style: solid;
  border-radius: 0;
  background: linear-gradient(135deg, transparent 48%, var(--orange) 50%, transparent 54%);
  transform: none;
}

.jump-thumb-out-circuit::after {
  inset: 15px 12px auto;
  width: 35px;
  height: 25px;
  border: 3px solid var(--blue);
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 0 28%, var(--orange) 28% 34%, transparent 34% 64%, var(--teal) 64% 70%, transparent 70%),
    rgba(255, 255, 255, 0.7);
  transform: none;
}

.jump-thumb-out-back-emf::after {
  inset: 14px 12px auto;
  width: 35px;
  height: 28px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--blue) 0 70%, var(--orange) 70% 100%),
    #ffffff;
  box-shadow: 0 0 0 3px rgba(45, 93, 123, 0.16);
  transform: none;
}

.jump-thumb-out-torque-eq::after {
  inset: 13px auto auto 12px;
  content: "T";
  width: auto;
  height: auto;
  color: var(--teal-dark);
  background: none;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 16px 8px 0 rgba(192, 109, 46, 0.52);
  transform: none;
}

.jump-thumb-out-derive::after {
  inset: 12px auto auto 12px;
  content: "\03a3";
  width: auto;
  height: auto;
  color: var(--teal-dark);
  background: none;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  transform: none;
}

.jump-thumb-out-curve::after {
  inset: 17px 10px auto;
  height: 27px;
  border-width: 0 0 4px 4px;
  border-color: var(--blue);
  border-style: solid;
  border-radius: 0;
  background: linear-gradient(145deg, transparent 48%, var(--orange) 50%, transparent 54%);
  transform: none;
}

.jump-thumb-out-load::after {
  inset: 13px 13px auto;
  width: 32px;
  height: 32px;
  border: 5px solid var(--teal);
  border-right-color: var(--orange);
  border-radius: 50%;
  background: transparent;
  transform: none;
}

.jump-thumb-load-steady::before,
.jump-thumb-load-increase::before,
.jump-thumb-load-emf::before,
.jump-thumb-load-current::before,
.jump-thumb-load-torque::before,
.jump-thumb-load-balance::before {
  inset: 11px;
  border-color: var(--teal-dark);
}

.jump-thumb-load-steady::after {
  inset: 26px 8px auto;
  height: 4px;
  background: var(--teal);
  box-shadow:
    0 -12px 0 -1px var(--orange),
    0 12px 0 -1px var(--orange);
  transform: none;
}

.jump-thumb-load-increase::after {
  inset: 9px 11px auto;
  width: 34px;
  height: 38px;
  border-width: 0;
  border-radius: 50%;
  background:
    linear-gradient(var(--orange), var(--orange)) 16px 4px / 4px 30px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 4px 16px / 28px 4px no-repeat;
  box-shadow: 0 0 0 4px rgba(192, 109, 46, 0.14);
  transform: none;
}

.jump-thumb-load-emf::after {
  inset: 14px 9px auto;
  width: 40px;
  height: 30px;
  border-width: 0;
  border-radius: 0;
  background:
    linear-gradient(var(--blue), var(--blue)) 0 15px / 40px 3px no-repeat,
    linear-gradient(var(--teal), var(--teal)) 22px 5px / 4px 24px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 31px 9px / 4px 17px no-repeat;
  transform: none;
}

.jump-thumb-load-current::after {
  inset: 16px 8px auto;
  width: 42px;
  height: 28px;
  border-width: 0;
  border-radius: 0;
  background:
    linear-gradient(var(--teal), var(--teal)) 0 12px / 42px 4px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 26px 4px / 5px 20px no-repeat,
    linear-gradient(45deg, transparent 48%, var(--blue) 49% 55%, transparent 56%) 10px 0 / 24px 28px no-repeat;
  transform: none;
}

.jump-thumb-load-torque::after {
  inset: 12px;
  width: 34px;
  height: 34px;
  border: 4px solid var(--orange);
  border-left-color: transparent;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 8px rgba(20, 121, 107, 0.12);
  transform: rotate(-30deg);
}

.jump-thumb-load-balance::after {
  inset: 14px 8px auto;
  width: 42px;
  height: 30px;
  border-width: 0;
  border-radius: 0;
  background:
    linear-gradient(var(--blue), var(--blue)) 0 7px / 42px 4px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 0 22px / 42px 4px no-repeat,
    linear-gradient(var(--teal), var(--teal)) 19px 0 / 4px 30px no-repeat;
  transform: none;
}

.jump-thumb-speed-voltage::before,
.jump-thumb-speed-field::before,
.jump-thumb-speed-resistance::before,
.jump-thumb-speed-pwm::before,
.jump-thumb-speed-compare::before,
.jump-thumb-speed-simulator::before {
  inset: 10px;
  border-width: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.jump-thumb-speed-voltage::after {
  inset: 9px auto auto 21px;
  width: 17px;
  height: 40px;
  border-width: 0;
  background: var(--orange);
  clip-path: polygon(58% 0, 24% 43%, 58% 43%, 35% 100%, 88% 34%, 56% 34%);
  transform: none;
}

.jump-thumb-speed-field::after {
  inset: 12px 9px auto;
  width: 40px;
  height: 34px;
  border: 4px solid var(--teal);
  border-top-color: var(--orange);
  border-bottom-color: var(--orange);
  border-radius: 8px;
  background: transparent;
  transform: none;
}

.jump-thumb-speed-resistance::after {
  inset: 25px 7px auto;
  width: 44px;
  height: 12px;
  border-width: 0;
  background:
    linear-gradient(135deg, transparent 0 18%, var(--orange) 18% 32%, transparent 32% 48%, var(--orange) 48% 62%, transparent 62% 78%, var(--orange) 78% 100%);
  transform: none;
}

.jump-thumb-speed-pwm::after {
  inset: 15px 8px auto;
  width: 42px;
  height: 30px;
  border-width: 0;
  background:
    linear-gradient(var(--blue), var(--blue)) 0 22px / 42px 4px no-repeat,
    linear-gradient(var(--teal), var(--teal)) 0 4px / 14px 4px no-repeat,
    linear-gradient(var(--teal), var(--teal)) 0 4px / 4px 22px no-repeat,
    linear-gradient(var(--teal), var(--teal)) 14px 4px / 4px 22px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 22px 4px / 20px 4px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 22px 4px / 4px 22px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 42px 4px / 4px 22px no-repeat;
  transform: none;
}

.jump-thumb-speed-compare::after {
  inset: 15px 10px auto;
  width: 38px;
  height: 32px;
  border-width: 0 0 4px 4px;
  border-color: var(--blue);
  border-style: solid;
  border-radius: 0;
  background:
    linear-gradient(var(--teal), var(--teal)) 6px 12px / 7px 16px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 18px 5px / 7px 23px no-repeat,
    linear-gradient(var(--teal-dark), var(--teal-dark)) 30px 0 / 7px 28px no-repeat;
  transform: none;
}

.jump-thumb-speed-simulator::after {
  inset: 12px 10px auto;
  width: 38px;
  height: 34px;
  border: 3px solid var(--blue);
  border-radius: 7px;
  background:
    radial-gradient(circle at 12px 12px, var(--orange) 0 4px, transparent 5px),
    radial-gradient(circle at 26px 22px, var(--teal) 0 4px, transparent 5px),
    rgba(255, 255, 255, 0.74);
  transform: none;
}

.output-widget {
  min-width: 0;
}

.output-widget marker path {
  fill: currentColor;
}

.output-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.output-control-row label {
  color: var(--ink);
  font-weight: 900;
}

.output-control-row label span {
  color: var(--orange);
}

.output-control-row input[type="range"] {
  width: min(390px, 48%);
  accent-color: var(--teal);
}

.output-route-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.output-route-node {
  display: grid;
  min-height: 120px;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(45, 93, 123, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.output-route-node strong {
  color: var(--ink);
  font-size: 1rem;
}

.output-route-node span {
  color: var(--teal-dark);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 900;
}

.output-chain-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.output-chain-preview span {
  display: grid;
  min-height: 72px;
  place-items: center;
  padding: 10px;
  border: 1px solid rgba(20, 121, 107, 0.2);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.08);
  font-weight: 900;
  text-align: center;
}

.torque-current-layout,
.speed-current-layout,
.circuit-layout,
.back-emf-layout,
.curve-layout,
.load-response-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

.output-motor-svg,
.speed-current-plot,
.output-circuit-svg,
.torque-speed-plot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(45, 93, 123, 0.06), rgba(20, 121, 107, 0.08)),
    rgba(255, 255, 255, 0.74);
}

.output-motor-svg text,
.speed-current-plot text,
.output-circuit-svg text,
.torque-speed-plot text {
  fill: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 850;
}

.output-stator {
  fill: rgba(45, 93, 123, 0.14);
  stroke: var(--blue);
  stroke-width: 4;
}

.output-rotor {
  fill: rgba(192, 109, 46, 0.16);
  stroke: var(--orange);
  stroke-width: 5;
}

.output-shaft,
.output-current-path {
  fill: none;
  stroke: var(--teal-dark);
  stroke-linecap: round;
  stroke-width: 8;
}

.output-current-path {
  stroke: rgba(192, 109, 46, 0.6);
  stroke-width: 5;
}

.torque-arrow {
  color: var(--orange);
  stroke: var(--orange);
  stroke-linecap: round;
  marker-end: url("#torque-arrow-head");
  transition:
    x2 160ms ease,
    y2 160ms ease,
    stroke-width 160ms ease;
}

.torque-label,
.plot-readout,
.curve-readout,
.curve-label {
  fill: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.current-pulse {
  fill: var(--orange);
  animation: currentTravel var(--torque-current-duration, 1.6s) linear infinite;
}

.current-pulse-b {
  animation-delay: 0.45s;
}

.shunt-overview-widget {
  --shunt-current-ratio: 0.23;
  --shunt-pulse-duration: 1.6s;
  --shunt-rotor-duration: 0.9s;
}

.shunt-overview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.shunt-overview-controls button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(20, 121, 107, 0.26);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.74);
  font-weight: 900;
}

.shunt-overview-controls button.is-active,
.shunt-overview-controls button:hover,
.shunt-overview-controls button:focus-visible {
  color: #ffffff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.shunt-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.shunt-overview-svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 52% 38%, rgba(20, 121, 107, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(45, 93, 123, 0.09), rgba(192, 109, 46, 0.08)),
    rgba(255, 255, 255, 0.72);
}

.shunt-overview-svg marker path {
  fill: var(--orange);
}

.shunt-overview-svg text {
  fill: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-anchor: middle;
}

.shunt-wire,
.shunt-path,
.shunt-resistor,
.shunt-field-coil,
.shunt-motor-body path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shunt-wire {
  stroke: rgba(45, 93, 123, 0.36);
  stroke-width: 5;
}

.shunt-path {
  stroke: rgba(192, 109, 46, 0.42);
  stroke-width: 6;
  marker-end: url("#shunt-overview-arrow");
  opacity: 0.42;
  transition:
    opacity 180ms ease,
    stroke 180ms ease,
    stroke-width 180ms ease;
}

.shunt-path.is-active {
  stroke: var(--orange);
  stroke-width: 8;
  opacity: 1;
}

.shunt-field-path,
.shunt-overview-svg g[data-shunt-part="field"].is-active .shunt-resistor,
.shunt-overview-svg g[data-shunt-part="field"].is-active .shunt-field-coil {
  stroke: var(--teal);
}

.shunt-armature-path.is-active,
.shunt-overview-svg g[data-shunt-part="armature"].is-active .shunt-resistor {
  stroke: var(--orange);
}

.shunt-resistor,
.shunt-field-coil {
  stroke: rgba(45, 93, 123, 0.5);
  stroke-width: 6;
  transition:
    stroke 180ms ease,
    stroke-width 180ms ease;
}

.shunt-overview-svg g.is-active .shunt-resistor,
.shunt-overview-svg g.is-active .shunt-field-coil {
  stroke-width: 7;
}

.shunt-emf {
  fill: rgba(20, 121, 107, 0.08);
  stroke: rgba(45, 93, 123, 0.42);
  stroke-width: 5;
  transition:
    fill 180ms ease,
    stroke 180ms ease,
    stroke-width 180ms ease;
}

.shunt-emf.is-active {
  fill: rgba(192, 109, 46, 0.16);
  stroke: var(--orange);
  stroke-width: 7;
}

.shunt-node {
  fill: var(--teal-dark);
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 3;
}

.shunt-motor-body rect {
  fill: rgba(45, 93, 123, 0.18);
  stroke: rgba(45, 93, 123, 0.42);
  stroke-width: 3;
}

.shunt-motor-body path {
  stroke: var(--blue);
  stroke-width: 9;
}

.shunt-motor-body text {
  fill: var(--teal-dark);
  font-size: 18px;
  font-weight: 950;
}

.shunt-motor-rotor {
  fill: rgba(255, 255, 255, 0.78);
  stroke: var(--teal-dark);
  stroke-dasharray: 22 11;
  stroke-width: 7;
  transform-box: fill-box;
  transform-origin: center;
  animation: motorSpin var(--shunt-rotor-duration) linear infinite;
}

.shunt-current-dot {
  fill: var(--orange);
  filter: drop-shadow(0 0 7px rgba(192, 109, 46, 0.55));
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation-duration: var(--shunt-pulse-duration);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.shunt-current-dot.dot-one {
  animation-name: shuntLineCurrent;
}

.shunt-current-dot.dot-two {
  fill: var(--teal);
  animation-delay: 0.34s;
  animation-name: shuntBranchCurrent;
}

.shunt-current-dot.dot-three {
  animation-delay: 0.17s;
  animation-name: shuntBranchCurrent;
}

.shunt-overview-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.shunt-overview-readout div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(45, 93, 123, 0.14);
  border-radius: 8px;
  background: rgba(20, 121, 107, 0.06);
}

.shunt-overview-readout span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
}

.shunt-overview-readout b {
  display: block;
  margin-top: 5px;
  color: var(--teal-dark);
  font-size: 1.16rem;
  font-weight: 950;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.shunt-overview-readout p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(192, 109, 46, 0.08);
  font-weight: 760;
  line-height: 1.5;
}

.output-meter-panel,
.voltage-balance,
.circuit-detail-panel,
.back-emf-explain,
.curve-readout-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.output-meter {
  display: grid;
  gap: 8px;
}

.output-meter span,
.voltage-balance-title,
.curve-readout-panel span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.output-meter b,
.curve-readout-panel b {
  color: var(--teal-dark);
  font-size: 1.35rem;
  font-weight: 950;
}

.output-meter-track,
.voltage-stack,
.voltage-scale {
  position: relative;
  min-height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(45, 93, 123, 0.12);
}

.output-meter-track i {
  display: block;
  width: 0%;
  height: 18px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  transition: width 160ms ease;
}

.voltage-stack {
  display: flex;
  min-height: 62px;
  border-radius: 8px;
}

.voltage-segment {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 8px;
  color: #ffffff;
  font-weight: 900;
  text-align: center;
  transition: width 160ms ease;
}

.voltage-segment span {
  overflow-wrap: anywhere;
}

.voltage-segment.emf {
  background: var(--blue);
}

.voltage-segment.drop {
  background: var(--orange);
}

.speed-current-line,
.ideal-speed-line,
.torque-speed-line {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-width: 5;
}

.ideal-speed-line {
  stroke: rgba(45, 93, 123, 0.34);
  stroke-dasharray: 8 8;
  stroke-width: 3;
}

.torque-speed-line {
  stroke: var(--orange);
}

.speed-current-marker-line,
.curve-marker-line {
  stroke: rgba(45, 93, 123, 0.42);
  stroke-dasharray: 6 6;
  stroke-width: 3;
}

.speed-current-point,
.curve-point {
  fill: var(--orange);
  stroke: #ffffff;
  stroke-width: 4;
}

.circuit-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.circuit-controls button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(20, 121, 107, 0.26);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.74);
  font-weight: 900;
}

.circuit-controls button.is-active,
.circuit-controls button:hover,
.circuit-controls button:focus-visible {
  color: #ffffff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.circuit-wire,
.circuit-current,
.circuit-resistor path {
  fill: none;
  stroke: rgba(45, 93, 123, 0.42);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.circuit-current {
  color: var(--orange);
  stroke: var(--orange);
  marker-end: url("#circuit-arrow");
  opacity: 0.38;
}

.back-emf-symbol circle {
  fill: rgba(20, 121, 107, 0.08);
  stroke: rgba(45, 93, 123, 0.42);
  stroke-width: 5;
}

.output-circuit-svg [data-circuit-part] {
  opacity: 0.38;
  transition:
    opacity 160ms ease,
    stroke 160ms ease,
    fill 160ms ease;
}

.output-circuit-svg [data-circuit-part].is-active {
  opacity: 1;
}

.output-circuit-svg [data-circuit-part="ia"].is-active,
.output-circuit-svg [data-circuit-part="ra"].is-active path {
  stroke: var(--orange);
}

.output-circuit-svg [data-circuit-part="if"].is-active,
.output-circuit-svg [data-circuit-part="rf"].is-active path {
  stroke: var(--teal);
}

.output-circuit-svg [data-circuit-part="ea"].is-active circle {
  stroke: var(--blue);
  fill: rgba(45, 93, 123, 0.13);
}

.terminal-source text,
.circuit-resistor text,
.back-emf-symbol text {
  font-size: 19px;
  font-weight: 900;
}

.voltage-scale {
  display: flex;
  min-height: 72px;
  border-radius: 8px;
}

.voltage-scale span,
.voltage-scale i {
  display: block;
  transition: width 160ms ease;
}

.voltage-scale span {
  background:
    linear-gradient(90deg, rgba(45, 93, 123, 0.9), rgba(20, 121, 107, 0.82)),
    var(--blue);
}

.voltage-scale i {
  background: linear-gradient(90deg, var(--orange), rgba(192, 109, 46, 0.62));
}

.voltage-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.voltage-values b {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(45, 93, 123, 0.14);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.torque-eq-visual {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(220px, 1fr) minmax(0, 0.8fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.flux-column,
.torque-output {
  display: grid;
  min-height: 130px;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  background: rgba(20, 121, 107, 0.08);
}

.torque-output {
  border-color: rgba(192, 109, 46, 0.28);
  background: rgba(192, 109, 46, 0.08);
}

.flux-column strong,
.torque-output strong {
  color: var(--teal-dark);
  font-size: 1.24rem;
  font-weight: 950;
}

.flux-column span,
.torque-output span {
  color: var(--muted);
  font-weight: 800;
}

.rotating-motor {
  position: relative;
  display: grid;
  min-height: 210px;
  place-items: center;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.94) 0 28%, transparent 29%),
    linear-gradient(90deg, rgba(45, 93, 123, 0.12), rgba(20, 121, 107, 0.08));
  overflow: hidden;
}

.rotor-wheel {
  width: 92px;
  height: 92px;
  border: 12px solid rgba(45, 93, 123, 0.3);
  border-top-color: var(--orange);
  border-right-color: var(--teal);
  border-radius: 50%;
  animation: motorSpin var(--torque-eq-duration, 1.3s) linear infinite;
}

.torque-arc {
  position: absolute;
  width: var(--torque-arc-size, 130px);
  height: var(--torque-arc-size, 130px);
  border: 5px solid transparent;
  border-top-color: var(--orange);
  border-right-color: var(--orange);
  border-radius: 50%;
  transform: rotate(28deg);
  transition:
    width 160ms ease,
    height 160ms ease;
}

.curve-readout-panel {
  grid-template-columns: 1fr;
}

.curve-readout-panel div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(45, 93, 123, 0.12);
}

.torque-speed-plot {
  cursor: crosshair;
  touch-action: none;
}

.load-response-layout {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
}

.load-motor-scene {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.88) 0 30%, transparent 31%),
    linear-gradient(135deg, rgba(45, 93, 123, 0.1), rgba(20, 121, 107, 0.08));
}

.motor-body-demo {
  position: relative;
  width: min(280px, 78%);
  height: 150px;
  border: 8px solid rgba(45, 93, 123, 0.58);
  border-radius: 20px;
  background:
    repeating-linear-gradient(90deg, rgba(45, 93, 123, 0.22) 0 12px, rgba(45, 93, 123, 0.09) 12px 24px),
    rgba(255, 255, 255, 0.64);
}

.animated-rotor {
  position: absolute;
  top: 28px;
  left: 44px;
  width: 88px;
  height: 88px;
  border: 11px solid rgba(20, 121, 107, 0.24);
  border-top-color: var(--orange);
  border-bottom-color: var(--teal);
  border-radius: 50%;
  animation: motorSpin var(--load-speed, 0.7s) linear infinite;
}

.shaft-demo {
  position: absolute;
  top: 64px;
  right: 0;
  width: 86px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-dark), rgba(45, 93, 123, 0.5));
}

.load-brake {
  position: absolute;
  right: 28px;
  bottom: 36px;
  display: grid;
  gap: 6px;
  width: 126px;
  color: var(--orange);
  font-weight: 950;
  text-align: center;
}

.load-brake span {
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--orange) var(--brake-pressure, 54%), rgba(192, 109, 46, 0.18) 0),
    rgba(192, 109, 46, 0.18);
}

.load-chain {
  display: grid;
  gap: 10px;
}

.load-chain-node {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 93, 123, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.load-chain-node span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal-dark);
  font-weight: 950;
}

.load-chain-node strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.96rem;
}

.load-chain-node b {
  color: var(--orange);
  white-space: nowrap;
}

.load-chain-node.is-strong {
  border-color: rgba(192, 109, 46, 0.32);
  background: rgba(192, 109, 46, 0.08);
  transform: translateX(2px);
}

.response-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.response-progress span {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 72px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.response-progress span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -9px;
  z-index: 1;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--teal);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

.response-progress b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 0.84rem;
}

.response-progress small {
  max-width: 100%;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.22;
}

.response-progress .is-active {
  border-color: rgba(192, 109, 46, 0.5);
  color: var(--ink);
  background: rgba(192, 109, 46, 0.1);
}

.response-progress .is-active b {
  background: var(--orange);
}

.response-visual-grid,
.response-balance-layout,
.response-load-layout,
.response-current-layout,
.response-new-state-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.response-motor-stage {
  position: relative;
  display: grid;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 93, 123, 0.1), rgba(20, 121, 107, 0.08)),
    rgba(255, 255, 255, 0.64);
}

.response-motor-body {
  position: relative;
  width: min(340px, 80%);
  height: 132px;
  border: 1px solid rgba(45, 93, 123, 0.26);
  border-radius: 28px;
  background:
    repeating-linear-gradient(90deg, rgba(45, 93, 123, 0.22) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, rgba(45, 93, 123, 0.24), rgba(20, 121, 107, 0.12));
  box-shadow: inset 0 -14px 0 rgba(23, 32, 38, 0.06);
}

.response-motor-body::before,
.response-motor-body::after {
  position: absolute;
  top: 18px;
  bottom: 18px;
  width: 36px;
  content: "";
  border-radius: 18px;
  background: rgba(45, 93, 123, 0.22);
}

.response-motor-body::before {
  left: -18px;
}

.response-motor-body::after {
  right: -18px;
}

.response-rotor {
  position: absolute;
  top: 36px;
  left: 42px;
  width: 60px;
  height: 60px;
  border: 6px solid var(--teal-dark);
  border-top-color: var(--orange);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  animation: motorSpin 0.8s linear infinite;
}

.response-shaft {
  position: absolute;
  top: 62px;
  right: -82px;
  width: 120px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
}

.response-current-pulse {
  position: absolute;
  top: 150px;
  left: 26px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
  animation: currentTravel 2s linear infinite;
}

.response-current-pulse.pulse-b {
  animation-delay: 0.7s;
  background: var(--orange);
}

.response-load-wheel {
  position: absolute;
  right: 42px;
  bottom: 42px;
  display: grid;
  width: var(--response-load-size, 86px);
  height: var(--response-load-size, 86px);
  place-items: center;
  border: 8px solid rgba(192, 109, 46, 0.8);
  border-left-color: rgba(192, 109, 46, 0.22);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 950;
  transition:
    width 180ms ease,
    height 180ms ease,
    transform 180ms ease;
}

.response-load-wheel.is-heavy {
  transform: rotate(18deg);
}

.response-status-grid,
.response-readout-card,
.response-compare-panel {
  display: grid;
  min-width: 0;
  gap: 10px;
  align-content: center;
}

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

.response-status-grid div,
.response-readout-card div,
.response-compare-panel .compare-row,
.response-meter-block,
.response-gauge {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.response-status-grid span,
.response-readout-card span,
.response-compare-panel span,
.response-meter-block span,
.response-gauge span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.22;
}

.response-status-grid b,
.response-readout-card b,
.response-compare-panel b,
.response-meter-block b,
.response-gauge b {
  display: block;
  margin-top: 6px;
  color: var(--teal-dark);
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1.12;
}

.response-chain-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.response-chain-strip span {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 10px;
  border: 1px solid rgba(20, 121, 107, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(20, 121, 107, 0.08);
  text-align: center;
  font-weight: 900;
  line-height: 1.2;
}

.response-chain-strip span:not(:last-child)::after {
  position: absolute;
  right: -10px;
  width: 12px;
  height: 12px;
  content: "";
  background: var(--orange);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.response-balance-svg,
.response-armature-svg,
.response-speed-time-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 240px;
  border: 1px solid rgba(45, 93, 123, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.response-balance-svg text,
.response-armature-svg text,
.response-speed-time-svg text {
  fill: var(--ink);
  font-weight: 900;
}

.response-machine-shell {
  fill: rgba(45, 93, 123, 0.16);
  stroke: var(--blue);
  stroke-width: 3;
}

.response-machine-rotor {
  fill: rgba(20, 121, 107, 0.12);
  stroke: var(--teal-dark);
  stroke-width: 4;
}

.response-machine-shaft,
.response-wire,
.response-current-flow {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.response-torque-arrow {
  fill: none;
  stroke-linecap: round;
  stroke-width: 5;
  marker-end: url("#steady-arrow");
}

.response-torque-arrow.motor {
  stroke: var(--teal);
}

.response-torque-arrow.load {
  stroke: var(--orange);
}

.response-compare-panel .is-load {
  border-color: rgba(192, 109, 46, 0.34);
  background: rgba(192, 109, 46, 0.09);
}

.compare-result {
  padding: 14px;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  font-weight: 900;
  line-height: 1.42;
}

.response-gauge-layout,
.response-torque-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.response-gauge,
.response-meter-block {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 142px;
  align-content: end;
}

.response-gauge i,
.response-meter-block i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 8px;
  background: var(--teal);
  transition: width 180ms ease;
}

.response-meter-block.is-torque i,
.response-gauge:last-child i {
  background: var(--orange);
}

.response-link-symbol {
  display: grid;
  min-height: 142px;
  place-items: center;
  padding: 16px;
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 121, 107, 0.09);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-weight: 900;
  text-align: center;
}

.response-resistor,
.response-emf-source {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.response-current-flow {
  stroke: var(--teal);
  marker-end: url("#response-current-arrow");
  transition: stroke-width 180ms ease;
}

.response-current-label {
  fill: var(--teal-dark);
}

.response-spinning-motor {
  position: relative;
  display: grid;
  min-height: 170px;
  place-items: center;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(20, 121, 107, 0.12), transparent 54%),
    rgba(255, 255, 255, 0.7);
}

.response-spinning-motor .response-rotor {
  position: relative;
  top: auto;
  left: auto;
  width: 82px;
  height: 82px;
}

.response-torque-ring {
  position: absolute;
  width: 126px;
  height: 126px;
  border: 7px solid var(--orange);
  border-left-color: transparent;
  border-radius: 50%;
  transition: transform 180ms ease;
}

.response-speed-before,
.response-speed-curve {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.response-speed-curve {
  stroke: var(--orange);
}

.response-load-event {
  stroke: var(--blue);
  stroke-dasharray: 7 7;
  stroke-width: 3;
}

.response-new-speed-point {
  fill: var(--orange);
  stroke: #ffffff;
  stroke-width: 3;
}

.response-step-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.response-nav-link {
  display: grid;
  min-width: 0;
  width: min(320px, 48%);
  min-height: 72px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(45, 93, 123, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.response-nav-link:hover,
.response-nav-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 107, 0.42);
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.08);
}

.response-nav-link span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.response-nav-link strong {
  margin-top: 4px;
  color: var(--teal-dark);
  line-height: 1.25;
}

.response-nav-next {
  justify-items: end;
  margin-left: auto;
  text-align: right;
}

.speed-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.speed-progress span {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 72px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid rgba(45, 93, 123, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.speed-progress span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -9px;
  z-index: 1;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--teal);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

.speed-progress b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 0.84rem;
}

.speed-progress small {
  max-width: 100%;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.22;
}

.speed-progress .is-active {
  border-color: rgba(192, 109, 46, 0.5);
  color: var(--ink);
  background: rgba(192, 109, 46, 0.1);
}

.speed-progress .is-active b {
  background: var(--orange);
}

.speed-overview-layout,
.speed-method-layout,
.speed-field-layout,
.speed-resistance-layout,
.speed-pwm-layout,
.speed-comparison-layout,
.simulator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.speed-motor-orbit,
.speed-control-scene,
.simulator-stage {
  position: relative;
  display: grid;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(20, 121, 107, 0.12), transparent 48%),
    linear-gradient(135deg, rgba(45, 93, 123, 0.1), rgba(192, 109, 46, 0.08)),
    rgba(255, 255, 255, 0.64);
}

.speed-control-motor {
  position: relative;
  width: min(340px, 80%);
  height: 128px;
  border: 1px solid rgba(45, 93, 123, 0.26);
  border-radius: 28px;
  background:
    repeating-linear-gradient(90deg, rgba(45, 93, 123, 0.22) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, rgba(45, 93, 123, 0.26), rgba(20, 121, 107, 0.12));
  box-shadow: inset 0 -14px 0 rgba(23, 32, 38, 0.06);
}

.speed-control-motor::before,
.speed-control-motor::after {
  position: absolute;
  top: 18px;
  bottom: 18px;
  width: 36px;
  content: "";
  border-radius: 18px;
  background: rgba(45, 93, 123, 0.22);
}

.speed-control-motor::before {
  left: -18px;
}

.speed-control-motor::after {
  right: -18px;
}

.speed-control-rotor {
  position: absolute;
  top: 34px;
  left: 42px;
  width: 60px;
  height: 60px;
  border: 6px solid var(--teal-dark);
  border-top-color: var(--orange);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  animation: motorSpin 0.9s linear infinite;
}

.speed-control-shaft {
  position: absolute;
  top: 60px;
  right: -82px;
  width: 120px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
}

.speed-control-pulse {
  position: absolute;
  top: 146px;
  left: 26px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
  animation: currentTravel 2s linear infinite;
}

.speed-control-pulse.pulse-b {
  animation-delay: 0.65s;
  background: var(--orange);
}

.speed-control-signal {
  position: absolute;
  display: grid;
  min-width: 64px;
  min-height: 42px;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(45, 93, 123, 0.2);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.76);
  font-family: "Cambria Math", "Times New Roman", serif;
  font-weight: 900;
}

.signal-voltage {
  top: 24px;
  left: 42%;
}

.signal-field {
  top: 110px;
  left: 28px;
}

.signal-resistance {
  right: 28px;
  top: 110px;
}

.signal-pwm {
  right: 40%;
  bottom: 28px;
}

.speed-overview-panel,
.speed-readout-panel,
.speed-method-card,
.simulator-controls,
.simulator-readouts {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(45, 93, 123, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.speed-overview-panel h3,
.speed-method-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.speed-overview-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.speed-readout-panel {
  display: grid;
  gap: 10px;
  align-content: center;
}

.speed-readout-panel div,
.simulator-readouts div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(20, 121, 107, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
}

.speed-readout-panel span,
.simulator-readouts span,
.simulator-controls span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.22;
}

.speed-readout-panel b,
.simulator-readouts b {
  display: block;
  margin-top: 6px;
  color: var(--teal-dark);
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1.12;
}

.field-warning,
.resistance-warning {
  border-color: rgba(192, 109, 46, 0.28);
  background: rgba(192, 109, 46, 0.08);
}

.resistance-warning {
  margin: 0;
  padding: 12px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.45;
}

.speed-field-svg,
.speed-resistance-svg,
.pwm-wave-svg,
.speed-region-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 240px;
  border: 1px solid rgba(45, 93, 123, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.speed-field-svg text,
.speed-resistance-svg text,
.pwm-wave-svg text,
.speed-region-svg text {
  fill: var(--ink);
  font-weight: 900;
}

.field-flux-line {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  transition:
    stroke-width 180ms ease,
    opacity 180ms ease;
}

.field-flux-line.line-b {
  stroke: var(--orange);
}

.field-stator,
.field-rotor,
.resistance-motor {
  fill: rgba(45, 93, 123, 0.12);
  stroke: var(--blue);
  stroke-width: 4;
}

.field-rotor,
.resistance-motor {
  fill: rgba(20, 121, 107, 0.12);
  stroke: var(--teal-dark);
}

.field-shaft,
.resistance-wire,
.resistance-core,
.external-resistor,
.pwm-axis {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.resistance-core,
.external-resistor {
  stroke: var(--orange);
}

.pwm-wave-path {
  fill: none;
  stroke: var(--teal-dark);
  stroke-linecap: square;
  stroke-linejoin: round;
  stroke-width: 5;
}

.pwm-average-line {
  stroke: var(--orange);
  stroke-dasharray: 8 8;
  stroke-width: 4;
}

.pwm-average-label {
  fill: var(--orange);
}

.speed-method-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.speed-method-buttons button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(20, 121, 107, 0.26);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.74);
  font-weight: 900;
}

.speed-method-buttons button.is-active {
  color: #ffffff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.constant-torque-line,
.constant-power-line {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-width: 5;
}

.constant-power-line {
  stroke: var(--teal);
}

.base-speed-line {
  stroke: var(--blue);
  stroke-dasharray: 7 7;
  stroke-width: 3;
}

.method-highlight {
  fill: rgba(45, 93, 123, 0.06);
  opacity: 0;
  transition: opacity 160ms ease;
}

.method-highlight.is-active {
  opacity: 1;
}

.field-highlight.is-active {
  fill: rgba(20, 121, 107, 0.1);
}

.resistance-highlight.is-active {
  fill: rgba(192, 109, 46, 0.11);
}

.pwm-highlight.is-active {
  fill: rgba(45, 93, 123, 0.1);
}

.speed-method-card dl,
.simulator-readouts {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.speed-method-card div {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(45, 93, 123, 0.12);
}

.speed-method-card dt {
  color: var(--muted);
  font-weight: 900;
}

.speed-method-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.simulator-controls {
  display: grid;
  gap: 14px;
}

.simulator-controls label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 900;
}

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

.simulator-stage {
  gap: 14px;
  align-content: center;
}

.simulator-motor {
  width: min(340px, 78%);
}

.simulator-readouts {
  width: min(440px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@keyframes splitPulse {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  12% {
    opacity: 1;
  }
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(calc(100% + 110px));
  }
}

@keyframes flowPulse {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  12% {
    opacity: 1;
  }
  50% {
    opacity: 1;
    transform: translateX(310px);
  }
  100% {
    opacity: 0;
    transform: translateX(620px);
  }
}

@keyframes lossDash {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -36;
  }
}

@keyframes currentTravel {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  12% {
    opacity: 1;
  }
  86% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(350px);
  }
}

@keyframes shuntLineCurrent {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  12% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(184px);
  }
}

@keyframes shuntBranchCurrent {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  12% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(252px);
  }
}

@keyframes motorSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .energy-flow-track span,
  .energy-pulse,
  .show-losses .flow-loss-path,
  .current-pulse,
  .rotor-wheel,
  .animated-rotor,
  .response-rotor,
  .response-current-pulse,
  .speed-control-rotor,
  .speed-control-pulse,
  .shunt-motor-rotor,
  .shunt-current-dot {
    animation: none;
  }
}

.related-panel {
  margin-top: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.related-link {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  border: 1px solid rgba(45, 93, 123, 0.22);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  text-decoration: none;
}

.related-link:hover,
.related-link:focus-visible {
  border-color: rgba(45, 93, 123, 0.45);
  background: #ffffff;
}

.related-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 840px) {
  .hero,
  .learning-board,
  .content-grid,
  .detail-hero,
  .detail-section-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 18px;
  }

  .motor-visual svg {
    max-height: 300px;
  }
}

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

  .intro-feature,
  .machine-comparison,
  .type-detail {
    grid-template-columns: 1fr;
  }

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

  .efficiency-route-preview,
  .energy-split-stage,
  .loss-explorer,
  .max-efficiency-layout,
  .output-route-preview,
  .torque-current-layout,
  .speed-current-layout,
  .circuit-layout,
  .back-emf-layout,
  .curve-layout,
  .load-response-layout,
  .torque-eq-visual,
  .response-visual-grid,
  .response-balance-layout,
  .response-load-layout,
  .response-current-layout,
  .response-new-state-layout,
  .response-gauge-layout,
  .response-torque-layout,
  .speed-overview-layout,
  .speed-method-layout,
  .speed-field-layout,
  .speed-resistance-layout,
  .speed-pwm-layout,
  .speed-comparison-layout,
  .simulator-layout,
  .shunt-overview-layout {
    grid-template-columns: 1fr;
  }

  .route-arrow {
    width: 3px;
    height: 30px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--blue), var(--teal));
  }

  .route-arrow::after {
    top: auto;
    right: auto;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
  }

  .formula-map,
  .calc-grid,
  .calc-output,
  .output-chain-preview,
  .voltage-values,
  .response-progress,
  .response-chain-strip,
  .speed-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-page-shell {
    padding: 16px;
  }

  .detail-site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.25rem, 15vw, 3.8rem);
  }

  .detail-hero h1 {
    font-size: clamp(2.1rem, 14vw, 3.35rem);
  }

  .topic-button {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 76px;
  }

  .topic-number {
    width: 34px;
    height: 34px;
  }

  .subtopic-tabs {
    display: grid;
  }

  .landing-actions {
    display: grid;
  }

  .landing-actions a {
    justify-content: center;
  }

  .motor-route-grid {
    grid-template-columns: 1fr;
  }

  .type-jump-grid {
    grid-template-columns: 1fr;
  }

  .current-branches,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .shunt-path-controls label {
    flex: 1 1 120px;
  }

  .jump-family-heading {
    align-items: center;
  }

  .type-jump {
    grid-template-columns: 50px minmax(0, 1fr);
    min-height: 88px;
    padding: 10px;
  }

  .jump-thumb {
    width: 50px;
    height: 50px;
  }

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

  .efficiency-control-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .output-control-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .efficiency-control-row input[type="range"] {
    width: 100%;
  }

  .output-control-row input[type="range"] {
    width: 100%;
  }

  .formula-map,
  .loss-card-grid,
  .calc-grid,
  .calc-output,
  .output-chain-preview,
  .voltage-values,
  .response-status-grid,
  .response-progress,
  .response-chain-strip,
  .speed-progress,
  .response-gauge-layout,
  .response-torque-layout,
  .simulator-readouts {
    grid-template-columns: 1fr;
  }

  .shunt-overview-readout {
    grid-template-columns: 1fr;
  }

  .shunt-overview-controls button {
    flex: 1 1 160px;
  }

  .response-progress span:not(:last-child)::after,
  .response-chain-strip span:not(:last-child)::after,
  .speed-progress span:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
  }

  .response-step-nav {
    flex-direction: column;
  }

  .response-nav-link {
    width: 100%;
  }

  .response-nav-next {
    justify-items: start;
    margin-left: 0;
    text-align: left;
  }

  .response-motor-stage {
    min-height: 240px;
  }

  .response-motor-body {
    width: min(280px, 74%);
  }

  .speed-control-motor {
    width: min(280px, 74%);
  }

  .speed-method-card div {
    grid-template-columns: 1fr;
  }

  .speed-method-buttons button {
    flex: 1 1 150px;
  }

  .loss-detail-list div {
    grid-template-columns: 1fr;
  }

  .energy-card {
    min-height: 92px;
  }

  .power-flow-canvas svg {
    min-width: 560px;
  }

  .load-chain-node {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .load-chain-node b {
    grid-column: 2;
  }

  .intro-feature {
    gap: 16px;
  }

  .landing-header h3 {
    font-size: 1.28rem;
  }

  .formula {
    min-height: 82px;
    padding: 16px;
    font-size: 1.24rem;
  }

  .formula .equation,
  .formula .equation-pair,
  .formula .chain {
    gap: 0.28em;
  }
}
