/* Chapter 3: enzyme scene text, the fit activity, the graph-description builder and the enzyme lab. */

.lbl.pink { border-color: #ff8fab; color: #ffd6e0; }

.axis { stroke: #cfd9ef; stroke-width: 5; stroke-linecap: round; }
.axis.thin { stroke-width: 3; }
.axis-text { font: 700 34px system-ui, sans-serif; fill: #e8eefc; }
.axis-text.small { font-size: 28px; fill: #cfd9ef; }
.enz-label { font: 800 42px system-ui, sans-serif; fill: #0b3b2e; }
.mech-title { font: 800 34px system-ui, sans-serif; fill: #ffe7a8; }
.mech-note { font: 700 26px system-ui, sans-serif; fill: #c9f7d4; }
.lab-display { font: 700 40px ui-monospace, SFMono-Regular, Menlo, monospace; fill: #8ce99a; }

.fit-picture { width: min(100%, 360px); align-self: center; }
.fit-picture svg { display: block; width: 100%; height: auto; }
.fit-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip-btn.fit-opt { display: flex; align-items: center; justify-content: center; width: 7.5em; padding: .3em; }
.chip-btn.fit-opt svg { width: 100%; height: auto; display: block; }
.chip-btn.fit-opt.wrong { opacity: .45; }

.chip-btn.hint { box-shadow: 0 0 0 3px var(--gold); }
.build-paragraph {
  margin: 0;
  width: 100%;
  min-height: 2.6em;
  padding: .7em 1em;
  border-radius: .8em;
  background: rgba(255, 255, 255, .06);
  border-left: 4px solid var(--gold);
  line-height: 1.5;
  box-sizing: border-box;
}
.build-lead { color: #cfd9ef; }
.build-pick { color: #ffe7a8; font-weight: 700; animation: build-in .4s ease-out; }
@keyframes build-in { from { opacity: 0; } to { opacity: 1; } }

.elab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: max(10px, 1.6cqw);
  width: 100%;
  align-items: start;
}
.elab-left, .elab-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.elab-tank svg { display: block; width: 100%; height: auto; border-radius: .8em; }
.elab-water { fill: rgba(116, 192, 252, .14); stroke: #a5d8ff; stroke-width: 4; }
.elab-count { font: 700 18px system-ui, sans-serif; fill: #ffe7a8; }
.elab-sliders { display: grid; gap: 4px; }
.elab-slider { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 4.2em; align-items: center; gap: 8px; }
.elab-slider input { width: 100%; accent-color: var(--gold); }
.elab-slider input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.elab-value { font: 700 .95em ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff; text-align: right; }
.elab-status { font-size: .85em; }
.elab-left .act-actions { justify-content: flex-start; flex-wrap: wrap; }
.elab-graphs { display: grid; grid-template-columns: 1fr; gap: 4px; }
.elab-graph svg { display: block; width: 100%; height: auto; background: rgba(255, 255, 255, .04); border-radius: .6em; }
.elab-axis { stroke: #cfd9ef; stroke-width: 2; }
.elab-g-tick { font: 600 11px system-ui, sans-serif; fill: #9fb4dd; }
.elab-g-title { font: 700 12px system-ui, sans-serif; fill: #cfd9ef; }
.elab-g-note { font: 800 12px system-ui, sans-serif; fill: #ffe7a8; }
.elab-g-note.bad { fill: #ff8fab; }
.elab-curve { animation: build-in .8s ease-out; }
.elab-tasks { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.elab-tasks li { border-radius: .6em; font-size: .82em; }

.exam-table { border-collapse: collapse; margin: .5em auto; font-size: .85em; font-weight: 600; }
.exam-table th, .exam-table td { border: 1px solid rgba(255, 255, 255, .25); padding: .25em .6em; text-align: center; }
.exam-table th { text-align: left; color: #cfd9ef; }

@container (max-width: 620px) {
  .elab-grid { grid-template-columns: 1fr; }
  .elab-graphs { grid-template-columns: 1fr 1fr; }
  .elab-slider { grid-template-columns: 5.5em minmax(0, 1fr) 3.8em; }
  .chip-btn.fit-opt { width: 5.5em; }
  .exam-table { font-size: .75em; }
  .exam-table th, .exam-table td { padding: .2em .35em; }
}

@media (prefers-reduced-motion: reduce) {
  .build-pick, .elab-curve { animation: none; }
}
