/* Chapter 4: equation text, particle pictures, the mole-ratio step calculator and the particle-box simulator. */

.eq-big { font: 800 120px system-ui, sans-serif; fill: #fff; }
.eq-big.small { font-size: 84px; }
.eq-mid { font: 800 52px system-ui, sans-serif; fill: #fff; }
.eq-line { font: 600 36px system-ui, sans-serif; fill: #e8eefc; }
.scene-note { font: 600 26px system-ui, sans-serif; fill: #9fb4dd; }
.gold-fill, .coef, .gold-note { fill: #ffd166; }
.red-fill { fill: #ff8a8a; }
.mass-fill { fill: #9fb4dd; }
.atom-letter { font-family: system-ui, sans-serif; font-weight: 800; pointer-events: none; }

.part-box { fill: rgba(77, 171, 247, .18); stroke: #4dabf7; stroke-width: 3; }
.panel-box { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .3); stroke-width: 2; }
.arrow-line { fill: none; stroke: #ffd166; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.leftover-ring { fill: none; stroke: #ffd166; stroke-width: 3; stroke-dasharray: 6 5; }

.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; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; color: #cfd9ef; }
.calc-input {
  width: 6em;
  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; }

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: max(10px, 1.6cqw);
  width: 100%;
  align-items: start;
}
.sim-col { 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; }
.lab-controls .chip-btn.on { border-color: var(--gold); background: #3a3420; }
.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; }
.react-btn { align-self: flex-start !important; }

.amount-row { display: flex; align-items: center; gap: 8px; }
.amount-name { min-width: 2.6em; font-weight: 800; color: #ffe7a8; }
.amount-value { min-width: 4.4em; text-align: center; font: 800 1em ui-monospace, SFMono-Regular, Menlo, monospace; }
.amount-btn { min-width: 2.4em; padding: .3em .7em !important; font-weight: 800; }
.amount-note { margin: 0; font-size: .8em; color: #9fb4dd; line-height: 1.35; }
.amount-note[hidden] { display: none; }

.box-wall { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.tray-wall { fill: rgba(255, 209, 102, .06); stroke: rgba(255, 209, 102, .5); stroke-width: 2; stroke-dasharray: 8 6; }
.box-title { font: 700 19px system-ui, sans-serif; fill: #cfd9ef; }

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