/* Chapter 2: scene text, the path walker and the acceleration calculator. */

.sc-text { font: 700 36px system-ui, sans-serif; fill: #e8eefc; }
.sc-head { font: 800 44px system-ui, sans-serif; fill: #fff; }
.sc-note { font: 600 28px system-ui, sans-serif; fill: #9fb4dd; }
.sc-small { font: 700 28px system-ui, sans-serif; fill: #e8eefc; }
.sc-tiny { font: 600 22px system-ui, sans-serif; fill: #9fb4dd; }
.sc-big { font: 800 52px system-ui, sans-serif; fill: #fff; }
.sc-q { font: 800 40px system-ui, sans-serif; fill: #ffd166; }
.sc-text.gold, .sc-big.gold { fill: #ffd166; }
.sc-text.orange, .sc-big.orange, .sc-small.orange { fill: #ff9f68; }
.sc-big.blue { fill: #74c0fc; }
.map-label { font: 800 22px system-ui, sans-serif; fill: #fff; }
.map-note { font: 600 22px system-ui, sans-serif; fill: #9fb4dd; }

/* Path walker */
.walk-layout { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: max(8px, 1.4cqw); width: 100%; }
.walk-map { flex: 1 1 320px; max-width: 50cqw; }
.walk-map svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.walk-side { flex: 0 1 260px; display: flex; flex-direction: column; align-items: center; gap: max(8px, 1.2cqw); }
.walk-readouts { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.walk-read { margin: 0; display: flex; flex-direction: column; padding: .4em .8em; border-radius: .7em; background: rgba(255, 255, 255, .07); }
.walk-key { font-size: .8em; font-weight: 700; color: #9fb4dd; }
.walk-key::before { content: ''; display: inline-block; width: 1.4em; height: .35em; border-radius: 4px; margin-right: .5em; vertical-align: middle; background: currentColor; }
.walk-key.blue::before { background: #74c0fc; }
.walk-key.orange::before { background: #ff9f68; }
.walk-value { font-size: 1.15em; }
.walk-value.blue { color: #a5d8ff; }
.walk-value.orange { color: #ffc29e; }
.walk-pad {
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-template-areas: ". n ." "w . e" ". s .";
  gap: 6px;
}
.walk-pad .chip-btn { text-align: center; font-weight: 800; min-width: 5.2em; }
.walk-N { grid-area: n; }
.walk-W { grid-area: w; }
.walk-E { grid-area: e; }
.walk-S { grid-area: s; }
.walk-tools { display: flex; gap: 8px; }
.walk-tools .chip-btn { text-align: center; font-weight: 700; }
.walk-tools .chip-btn:disabled, .walk-pad .chip-btn:disabled { opacity: .45; }

/* Step-by-step calculator */
.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-step[hidden] { display: none; }
.calc-values { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; }
.calc-field { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-weight: 700; color: #cfd9ef; }
.calc-input {
  width: 7em;
  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) {
  .walk-map { max-width: 100%; flex-basis: 100%; }
  .walk-side { flex-basis: 100%; }
  .walk-readouts { flex-direction: row; }
  .walk-read { flex: 1; }
}
