/* Chapter 5: scene text, friction lab, skydiver simulator, pressure lab. */

.c5-text { font: 700 30px system-ui, sans-serif; fill: #e8eefc; }
.c5-note { font: 600 26px system-ui, sans-serif; fill: #9fb4dd; }
.c5-small { font: 700 22px system-ui, sans-serif; fill: #cfd9ef; }
.c5-big { font: 800 72px system-ui, sans-serif; fill: #ffd166; }
.c5-mid { font: 800 46px system-ui, sans-serif; fill: #e8eefc; }
.c5-calc { font: 700 34px system-ui, sans-serif; fill: #e8eefc; }
.c5-badge { font: 800 22px system-ui, sans-serif; fill: #14213d; }
.c5-lab { font: 700 22px system-ui, sans-serif; fill: #e8eefc; }
.c5-lab-small { font: 600 17px system-ui, sans-serif; fill: #9fb4dd; }
.c5-sim { font: 800 22px system-ui, sans-serif; fill: #e8eefc; }
.c5-sim-small { font: 700 17px system-ui, sans-serif; fill: #cfd9ef; }
.c5-sim-badge { font: 800 16px system-ui, sans-serif; fill: #14213d; }

:is(.c5-text, .c5-note, .c5-small, .c5-mid, .c5-calc, .c5-lab, .c5-sim, .c5-sim-small).gold { fill: #ffd166; }
:is(.c5-text, .c5-note, .c5-lab, .c5-sim, .c5-sim-small).red { fill: #ff8787; }
:is(.c5-text, .c5-note, .c5-lab, .c5-sim, .c5-sim-small).blue { fill: #74c0fc; }
:is(.c5-text, .c5-lab).orange { fill: #ff9f68; }
:is(.c5-note, .c5-sim, .c5-sim-small).purple { fill: #da77f2; }
:is(.c5-text, .c5-small, .c5-lab).dark { fill: #14213d; }

/* Shared calculator and lab controls (same look as other chapters' calculators). */
.lab-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; }
.lab-field { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-weight: 700; color: #cfd9ef; }
.lab-slider { width: max(140px, 18cqw); accent-color: #ffd166; height: 28px; }
.lab-readout { min-width: 3.6em; font-weight: 800; color: var(--gold); }
.lab-field .chip-btn { text-align: center; font-weight: 700; }
.lab-field .chip-btn.on { border-color: var(--gold); background: #2c3d66; }

.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-step[hidden] { display: none; }
.calc-values { display: flex; flex-wrap: wrap; justify-content: center; align-items: 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; }

/* Answer-chip rows (friction lab and skydiver stages). */
.c5-question { display: flex; flex-direction: column; gap: max(8px, 1cqw); width: 100%; align-items: center; }
.c5-question[hidden] { display: none; }
.c5-choice-row { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.c5-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.c5-chips .chip-btn { text-align: center; }
.c5-chips .chip-btn.hint { box-shadow: 0 0 0 3px var(--gold); }
.c5-panel-title { color: var(--gold); font-weight: 800; }
.c5-note-line { margin: 0; font-size: .85em; color: #9fb4dd; text-align: center; }

.c5-lab-stage { align-self: center; }
.c5-lab-stage svg { display: block; width: 100%; height: auto; }

/* Skydiver simulator */
.c5-sim-row { display: flex; flex-wrap: wrap; justify-content: center; gap: max(8px, 1.2cqw); width: 100%; }
.c5-sim-scene { flex: 0 1 30%; min-width: 180px; }
.c5-sim-graph { flex: 0 1 44%; min-width: 240px; }
.c5-sim-row svg { display: block; width: 100%; height: auto; }
.c5-stage-chip {
  margin: 0;
  padding: .35em .9em;
  border-radius: 999px;
  border: 2px solid var(--stage, #9fb4dd);
  color: #fff;
  font-weight: 800;
  text-align: center;
}
.c5-readouts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: .95em; color: #cfd9ef; }
.c5-readouts b { color: #fff; }
.c5-readouts .red b { color: #ff8787; }
.c5-readouts .blue b { color: #74c0fc; }

/* Pressure lab */
.c5-stance-pic { width: min(100%, 46cqw); align-self: center; }
.c5-stance-pic:empty { display: none; }
.c5-stance-pic svg { display: block; width: 100%; height: auto; }
.c5-results { display: flex; flex-direction: column; gap: 4px; width: min(100%, 60cqw); }
.c5-results:empty { display: none; }
.c5-result-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 8px; padding: .3em .6em; border-radius: .5em; background: #1d2b4b; }
.c5-result-row b { color: var(--gold); text-align: right; }

@container (max-width: 620px) {
  .lab-slider { width: 40vw; }
  .c5-sim-scene, .c5-sim-graph { flex-basis: 100%; }
  .c5-sim-scene { max-width: 260px; }
  .c5-stance-pic, .c5-results { width: 100%; }
  .c5-result-row { grid-template-columns: 1fr 1fr; }
  .c5-result-row b { grid-column: 1 / -1; text-align: left; }
}
