/* Chapter 9: scene text, tables, the heat-to-constant-mass lab, the step calculator and the titration simulator. */

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

.balance-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; fill: #69db7c; }
.station-text { font: 700 28px system-ui, sans-serif; fill: #9fb4dd; }
.reading-head { font: 800 28px system-ui, sans-serif; fill: #ffd166; }
.reading-text { font: 600 28px system-ui, sans-serif; fill: #e8eefc; }
.reading-text.dim { fill: #7d8db0; }
.reading-note { font: 600 22px system-ui, sans-serif; fill: #9fb4dd; }
.reading-hl { font: 800 28px system-ui, sans-serif; fill: #ffd166; }
.reading-hl.big { font-size: 34px; }
.reading-marker { font: 800 26px system-ui, sans-serif; fill: #ffd166; }
.badge-num { font: 800 32px system-ui, sans-serif; fill: #14213d; }
.tbl-head { font: 800 30px system-ui, sans-serif; fill: #ffd166; }
.tbl-label { font: 700 30px system-ui, sans-serif; fill: #9fb4dd; }
.tbl-cell { font: 700 34px system-ui, sans-serif; fill: #fff; }
.tbl-cell.given { fill: #a5d8ff; }
.burette-num { font: 600 18px system-ui, sans-serif; fill: #9fb4dd; }
.zoom-num { font: 800 30px system-ui, sans-serif; fill: #fff; }
.ind-text { font: 800 26px system-ui, sans-serif; fill: #ff8787; }

.steam { opacity: .9; animation: steam-rise 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
.steam-1 { animation-delay: .6s; }
.steam-2 { animation-delay: 1.2s; }
@keyframes steam-rise {
  0% { opacity: 0; transform: translateY(10px) scaleY(.7); }
  40% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-30px) scaleY(1.1); }
}

/* Step calculator */
.calc-question { margin: 0; font-size: 1.05em; 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; align-items: center; gap: 8px 14px; }
.calc-values[hidden] { display: none; }
.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;
  user-select: text;
}
.calc-input.sci { width: 9em; }
.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; }

.calc-table-box { width: 100%; overflow-x: auto; display: flex; justify-content: center; }
.calc-table-box[hidden] { display: none; }
.table-scroll { width: 100%; overflow-x: auto; }
.calc-table { border-collapse: collapse; margin: 0 auto; font-size: .92em; }
.calc-table th, .calc-table td { padding: .35em .7em; border: 1px solid rgba(255, 255, 255, .18); text-align: center; white-space: nowrap; }
.calc-table thead th { color: var(--gold); font-weight: 800; }
.calc-table tbody th { color: #9fb4dd; text-align: left; }
.calc-table td.given { color: #a5d8ff; }
.calc-table td.blank { color: #6b7a99; }
.calc-table td.new { color: #c9f7d4; background: rgba(74, 222, 128, .15); animation: land .35s ease-out; }
.calc-table td.note { font-size: .85em; color: #9fb4dd; }
.calc-table td.note.bad { color: #ffb3b3; }
.calc-table td.note.good { color: #c9f7d4; font-weight: 800; }
.calc-table tr.struck td:not(.note) { text-decoration: line-through; color: #8a95ad; }

/* Heat-to-constant-mass lab */
.heat-picture { border-radius: .8em; background: #0d1730; align-self: center; }
.lab-station { font: 700 20px system-ui, sans-serif; fill: #9fb4dd; }
.lab-tools .chip-btn.hint { box-shadow: 0 0 0 3px var(--gold); }

/* Titration simulator */
.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: max(10px, 1.6cqw);
  width: 100%;
  align-items: start;
}
.titration-picture { width: 100%; border-radius: .8em; overflow: hidden; background: #0d1730; }
.lab-controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lab-controls .act-counter { text-align: left; }
.lab-controls .lab-tools { justify-content: flex-start; }
.lab-controls .calc-values { justify-content: flex-start; }
.lab-controls .chip-btn { padding: .4em .7em; font-size: .9em; }
.lab-controls .chip-btn[hidden] { display: none; }
.lab-controls .btn[hidden] { display: none; }
.chip-btn.end-btn { border-color: #f783ac; }
.tsim-instr { margin: 0; line-height: 1.4; color: #e8eefc; }
.tsim-num { font: 600 11px system-ui, sans-serif; fill: #9fb4dd; }
.tsim-label { font: 700 15px system-ui, sans-serif; fill: #9fb4dd; }
.tsim-zoom-num { font: 800 24px system-ui, sans-serif; fill: #fff; }

@container (max-width: 620px) {
  .lab-grid { grid-template-columns: 1fr; }
  .titration-picture { max-width: 420px; justify-self: center; }
  .calc-input { width: 5.5em; }
  .calc-input.sci { width: 8em; }
  .calc-table { font-size: .82em; }
  .calc-table th, .calc-table td { padding: .3em .45em; }
}
