/* Heating curve: the direction buttons, time slider, stage buttons, the chart, the readout and the list of parts.
   Builds on the shared .explorer, .btn and .cx styles in styles.css. */
.heating-curve { min-width: 0; }

.hc-body { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: flex-start; }
.hc-panel { flex: 1 1 15rem; min-width: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.hc-stage { flex: 1 1 20rem; min-width: 0; max-width: 460px; }

.hc-modes, .hc-stages { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hc-mode, .hc-stage-button { flex: 1 1 auto; min-height: 44px; }
.hc-mode[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.hc-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow-wrap: anywhere; align-items: center; gap: 0.1rem 0.6rem; font-weight: 600; font-size: 0.95rem; }
.hc-value { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }
.hc-range { grid-column: 1 / -1; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); }
.hc-range:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* The picture. The curve is thin where the temperature moves and thick on a plateau, so colour is never the only cue. */
.hc-chart-wrap { max-width: 460px; border-radius: 10px; }
.hc-grid { stroke: var(--grid); stroke-width: 1; }
.hc-seg { fill: none; stroke: var(--line); stroke-linecap: round; }
.hc-seg--slope { stroke-width: 2.5; }
.hc-seg--plateau { stroke-width: 5; }
.hc-plateau-label { fill: var(--text); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.hc-marker { fill: var(--user-line); stroke: var(--surface); stroke-width: 2; }

/* The readout is the live region: it is also what the student reads. Its height holds still while the slider moves. */
.hc-readout { margin: 0.7rem 0 0; min-height: 13em; padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--accent-soft); font-weight: 600; font-size: 0.95rem; line-height: 1.4; overflow-wrap: anywhere; }

/* The parts in words, next to a sample of their line; the current one is bold with a bar beside it. */
.hc-parts { list-style: none; margin: 0.7rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; }
.hc-part { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.1rem 0 0.1rem 0.5rem; border-left: 4px solid transparent; overflow-wrap: anywhere; }
.hc-part > :not(.hc-swatch) { min-width: 0; } /* the words wrap beside the swatch instead of running out of the card */
.hc-part.is-current { border-left-color: var(--user-line); font-weight: 700; }
.hc-swatch { flex: none; width: min(1.6rem, 25.6px); border-top: 2.5px solid var(--line); align-self: center; }
.hc-part--plateau .hc-swatch { border-top-width: 5px; }
.hc-tick { font-size: 13px; }
@media (min-width: 700px) {
  .hc-readout { min-height: 10em; }
}
