/* Chapter 2: scene text, coils and poles, the right-hand rule pictures, the B = KI/d step calculator and the electromagnet lab. */

.eq-big { font: 800 120px system-ui, sans-serif; fill: #fff; }
.eq-big.small { font-size: 96px; }
.eq-mid { font: 800 52px system-ui, sans-serif; fill: #fff; }
.eq-line { font: 600 36px system-ui, sans-serif; fill: #e8eefc; }
.eq-note { font: 600 26px system-ui, sans-serif; fill: #9fb4dd; }
.eq-tag { font: 800 30px system-ui, sans-serif; fill: #e8eefc; }
.eq-tag.gold { fill: #ffd166; }
.eq-tag.dim { fill: #9fb4dd; }

.truss { stroke: #f59f00; stroke-width: 6; stroke-linecap: round; }
.truss.thin { stroke-width: 3; }

.pole-letter { font: 900 64px system-ui, sans-serif; }
.pole-letter.small { font-size: 46px; }
.pole-letter.n { fill: #ff6b6b; }
.pole-letter.s { fill: #4dabf7; }

/* Right-hand rule practice */
.rule-picture { width: min(100%, 44cqw); border-radius: .8em; background: #0d1730; }
.rule-picture svg { display: block; width: 100%; height: auto; }
.rule-options .chip-btn { min-width: 8em; }
.mini-label { font: 800 22px system-ui, sans-serif; fill: #e8eefc; }
.mini-label.gold { fill: #ffd166; }
.badge-circle { fill: #2c3d66; stroke: #9fb4dd; stroke-width: 3; }
.badge-circle.n { fill: #c92a2a; stroke: #ffc9c9; }
.badge-circle.s { fill: #1864ab; stroke: #a5d8ff; }
.badge-letter { font: 900 26px system-ui, sans-serif; fill: #fff; pointer-events: none; }

/* Step calculator */
.calc-question { margin: 0; font-size: 1.1em; line-height: 1.45; text-align: center; }
.calc-question b { color: var(--gold); }
.calc-tip { margin: 0; font-size: .85em; color: #9fb4dd; text-align: center; }
.calc-body { display: flex; flex-direction: column; gap: max(8px, 1.2cqw); width: 100%; align-items: center; }
.calc-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.calc-values { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
.calc-field { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #cfd9ef; }
.calc-input {
  width: 8em;
  font: 700 1em ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: .45em .6em;
  border-radius: .6em;
  border: 2px solid #3a4f7d;
  background: #0f1a33;
  color: #fff;
}
.calc-input:focus { outline: none; border-color: var(--gold); }
.calc-input:disabled { opacity: .85; }
.calc-input.wrong { border-color: var(--bad); }
.calc-input.correct { border-color: var(--ok); background: #143a28; }
.calc-unit { font-weight: 700; color: #cfd9ef; }

/* Electromagnet lab */
.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: max(10px, 1.6cqw);
  width: 100%;
  align-items: start;
}
.lab-left { display: flex; flex-direction: column; gap: 6px; }
.lab-picture { width: 100%; border-radius: .8em; overflow: hidden; background: #0d1730; }
.lab-controls { display: flex; flex-direction: column; gap: 6px; }
.lab-controls .lab-tools { justify-content: flex-start; }
.lab-controls .chip-btn { padding: .35em .7em; font-size: .9em; }
.slider-row { display: flex; align-items: center; gap: 8px; }
.angle-slider { flex: 1; min-width: 0; accent-color: #ffd166; height: 28px; }
.slider-value { min-width: 4.6em; font-weight: 800; color: #ffe7a8; text-align: right; }
.lab-readout { margin: 0; font-weight: 600; font-size: .9em; color: #cfd9ef; line-height: 1.4; }
.lab-readout b { color: #fff; }
.lab-note { margin: 0; font-size: .78em; color: #9fb4dd; }
.lab-task-list { display: flex; flex-direction: column; gap: 6px; }
.lab-task { text-align: left; font-size: .88em; }
.lab-task.correct { border-color: var(--ok); background: #143a28; }
.lab-small { font: 700 18px system-ui, sans-serif; fill: #cfd9ef; }
.lab-small.gold { font-size: 22px; fill: #ffd166; }
.lab-big { font: 800 26px system-ui, sans-serif; fill: #fff; }
.pole-badge { cursor: pointer; }
.pole-badge:focus { outline: none; }
.pole-badge:focus-visible .badge-circle, .pole-badge.hint .badge-circle { stroke: #ffd166; stroke-width: 5; }
.badge-pointer { stroke: #9fb4dd; stroke-width: 3; }

@container (max-width: 620px) {
  .lab-grid { grid-template-columns: 1fr; }
  .calc-input { width: 6.5em; }
  .rule-picture { width: 100%; }
}
