/* Chapter 4: scene text, force tiles, the force sandbox and the F = ma step calculator. */

.f-big { font: 800 120px system-ui, sans-serif; fill: #fff; }
.f-mid { font: 800 52px system-ui, sans-serif; fill: #fff; }
.f-line { font: 600 36px system-ui, sans-serif; fill: #e8eefc; }
.f-text { font: 700 30px system-ui, sans-serif; fill: #e8eefc; }
.f-note { font: 600 24px system-ui, sans-serif; fill: #9fb4dd; }
.f-tag { font: 800 32px system-ui, sans-serif; fill: #fff; }
.f-panel { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .2); stroke-width: 3; }

.f-mid.gold, .f-line.gold, .f-text.gold, .f-note.gold, .f-tag.gold, .sb-text.gold { fill: #ffd166; }
.f-mid.blue, .f-note.blue, .sb-small.blue { fill: #74c0fc; }
.f-mid.green, .f-note.green, .f-tag.green, .sb-small.green { fill: #69db7c; }
.f-note.red, .f-tag.red, .sb-small.red, .sb-axis.red { fill: #ff8787; }
.f-note.purple, .sb-small.purple { fill: #da77f2; }

.t-name { font: 700 21px system-ui, sans-serif; fill: #fff; }
.t-pole { font: 800 20px system-ui, sans-serif; fill: #fff; }
.t-charge { font: 800 32px system-ui, sans-serif; fill: #fff; }

.sb-text { font: 800 26px system-ui, sans-serif; fill: #fff; }
.sb-small { font: 700 19px system-ui, sans-serif; fill: #e8eefc; }
.sb-axis { font: 600 18px system-ui, sans-serif; fill: #9fb4dd; }

.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-picture { width: 100%; border-radius: .8em; overflow: hidden; background: #0d1730; }
.lab-picture svg { display: block; width: 100%; height: auto; }
.lab-controls { display: flex; flex-direction: column; gap: 6px; }
.sb-field { display: flex; flex-direction: column; gap: 2px; }
.slider-row { display: flex; align-items: center; gap: 6px; }
.slider-row .btn { min-width: 2.2em; padding-left: .5em; padding-right: .5em; }
.sb-slider { flex: 1; min-width: 0; accent-color: #ffd166; height: 28px; }
.lab-readout { min-width: 4.2em; text-align: right; font-weight: 800; color: var(--gold); }
.sb-readouts { padding: .4em .7em; border-radius: .6em; background: rgba(255, 255, 255, .06); }
.sb-read { margin: 0; font-size: .88em; line-height: 1.45; color: #e8eefc; font-variant-numeric: tabular-nums; }
.sb-motion { font-weight: 800; color: var(--gold); }
.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; }

.calc-question { margin: 0; font-size: 1.1em; line-height: 1.45; text-align: center; }
.calc-question b { color: var(--gold); }
.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: 6.5em;
  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; }

@container (max-width: 620px) {
  .lab-grid { grid-template-columns: 1fr; }
  .calc-input { width: 5.5em; }
}
