/* Ausgeology · How fast did this rock cool?: styles for this lesson's rocks, hand lens and models.
   The first block (the brief, number answers, the shared parts of the models) is carried over from the Shark Bay lesson. */
:root {
  --hf-magma: #e8590c; --hf-hot: #ffb703; --hf-glow: rgba(255, 140, 40, 0.35); --hf-granite: #aeb4b8; --hf-granite-2: #8e969b; --hf-dyke: #3a4136;
  --hf-sky: #dcecf5; --hf-ground: #c9b48c; --hf-ground-2: #a8936b; --hf-crust: #b9a98a; --hf-crust-2: #9a8a6c; --hf-deep: #7d6f58;
  --hf-water: #2f80c1; --hf-water-soft: rgba(47, 128, 193, 0.22); --hf-li: #7c3aed; --hf-ash: #c9b796; --hf-ash-2: #a99670;
  --hf-e-heat: #b23a0b; --hf-e-kin: #1d4ed8; --hf-e-grav: #166534; --hf-e-light: #ca8a04; --hf-e-sound: #7e22ce;
  --hf-paper: #fdfdf9; --hf-thing: #5b6b70; --hf-tank: rgba(47, 128, 193, 0.18); --hf-tank-2: rgba(47, 128, 193, 0.35);
  --hf-c-lava: #c2410c; --hf-c-dyke: #8a2f0f; --hf-c-deep: #6b21a8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hf-granite: #6f777c; --hf-granite-2: #596166; --hf-sky: #233441; --hf-ground: #6f6347; --hf-ground-2: #57503b; --hf-crust: #5d5546; --hf-crust-2: #4b4438; --hf-deep: #3d372d;
    --hf-water: #5aa7e0; --hf-water-soft: rgba(90, 167, 224, 0.25); --hf-li: #a78bfa; --hf-ash: #8f826a; --hf-ash-2: #74684f;
    --hf-e-heat: #ff7a45; --hf-e-kin: #7aa7ff; --hf-e-grav: #4ade80; --hf-e-light: #facc15; --hf-e-sound: #c79bff;
    --hf-paper: #151c1f; --hf-thing: #8e9ea3; --hf-tank: rgba(90, 167, 224, 0.16); --hf-tank-2: rgba(90, 167, 224, 0.3);
    --hf-c-lava: #ff8a50; --hf-c-dyke: #fbbf24; --hf-c-deep: #c084fc;
  }
}
:root[data-theme="dark"] {
  --hf-granite: #6f777c; --hf-granite-2: #596166; --hf-sky: #233441; --hf-ground: #6f6347; --hf-ground-2: #57503b; --hf-crust: #5d5546; --hf-crust-2: #4b4438; --hf-deep: #3d372d;
  --hf-water: #5aa7e0; --hf-water-soft: rgba(90, 167, 224, 0.25); --hf-li: #a78bfa; --hf-ash: #8f826a; --hf-ash-2: #74684f;
  --hf-e-heat: #ff7a45; --hf-e-kin: #7aa7ff; --hf-e-grav: #4ade80; --hf-e-light: #facc15; --hf-e-sound: #c79bff;
  --hf-paper: #151c1f; --hf-thing: #8e9ea3; --hf-tank: rgba(90, 167, 224, 0.16); --hf-tank-2: rgba(90, 167, 224, 0.3);
  --hf-c-lava: #ff8a50; --hf-c-dyke: #fbbf24; --hf-c-deep: #c084fc;
}

/* the syllabus quotes in the teacher notes */
blockquote.scsa { margin: 0; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface); max-width: 72ch; }
blockquote.scsa p { margin: 0 0 6px; }
blockquote.scsa ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }

/* the brief and how the lesson works */
.wd-brief { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--ochre); max-width: 860px; }
.wd-brief > * { margin: 0; }
.wd-brief > .label { color: var(--ochre); }
.wd-brief ul { padding-left: 1.3em; display: grid; gap: 4px; }
.wd-cycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wd-cycle > li { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.wd-cycle h3 { font-size: 1.04rem; margin: 0; }
.wd-cycle p { margin: 0; font-size: 0.97rem; line-height: 1.5; }
.wd-cycle .small { color: var(--ink-2); font-size: 0.9rem; }
@media (max-width: 860px) { .wd-cycle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 520px) { .wd-cycle { grid-template-columns: minmax(0, 1fr); } }
.key-idea p.hf-ki-body { font-size: 1rem; font-weight: 400; line-height: 1.55; }
.screen-head.hf-first { margin-top: 18px; padding-top: 22px; border-top: 2px solid var(--line); }

/* number answers */
.num { display: grid; gap: 8px; }
.num label { font-weight: 700; line-height: 1.4; }
.num-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.num-row input { width: 9.5em; max-width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 1.04rem; color: var(--ink); background: var(--surface); font-variant-numeric: tabular-nums; }
.num-row input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.num.is-right .num-row input { border-color: var(--good); }
.num.is-wrong .num-row input { border-color: var(--bad); }
.num-unit { color: var(--ink-2); }
.num .fb { margin: 0; }
.nums { display: grid; gap: 18px; max-width: 820px; }
.chk { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 650; cursor: pointer; min-height: 40px; line-height: 1.4; padding: 4px 0; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin-top: 2px; }

/* the models: shared pieces */
.lab.viz { margin: 4px 0 6px; }
.viz-lead { margin: 0; color: var(--ink-2); max-width: 72ch; }
.viz-read { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); line-height: 1.5; max-width: 820px; }
.wd-opt { min-height: 40px; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 650; cursor: pointer; text-align: left; line-height: 1.3; }
.wd-opt:hover { border-color: var(--accent); }
.wd-opt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wd-opt:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wd-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-ctl { display: grid; gap: 10px; align-content: start; min-width: 0; }
.hf-ctl .slider-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
.hf-ctl .slider-row .label { white-space: normal; line-height: 1.25; }
.hf-ctl .slider-row input { grid-column: 1 / -1; grid-row: 2; }
.hf-ctl .slider-row output { font-weight: 700; font-variant-numeric: tabular-nums; }
.hf-q { margin: 0; font-weight: 750; }
.hf-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .hf-split { grid-template-columns: minmax(0, 1fr); } }
.hf-fig { display: grid; gap: 8px; min-width: 0; }
.hf-fig svg { width: 100%; height: auto; display: block; border-radius: 12px; }
.hf-fig .hf-cap { margin: 0; font-size: 0.92rem; color: var(--ink-2); }
.hf-fig.hf-chart svg { max-width: 760px; }
.hf-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.hf-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hf-swipe { display: none; margin: 0; font-size: 0.88rem; color: var(--ink-2); }
@media (max-width: 620px) { .hf-swipe { display: block; } }
@media (max-width: 620px) { .hf-scroll > svg { min-width: 560px; } .hf-scroll.hf-mapbox > svg { min-width: 470px; } .hf-scroll.hf-wide2 > svg { min-width: 520px; } }
.hf-fig.hf-wide2 svg { max-width: 680px; }
.hf-fig.hf-gaugebox svg { max-width: 300px; }
.hf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px 12px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.hf-facts div { display: grid; gap: 1px; }
.hf-facts dt { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.hf-facts dd { margin: 0; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hf-sub { margin: 6px 0 0; font-size: 1.02rem; }

.hf-fs { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.hf-fs legend { font-weight: 700; line-height: 1.4; padding: 0; margin-bottom: 6px; }
.hf-checklist { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.hf-checklist .chk { font-weight: 600; }

/* ---------- the rock and its hand lens ---------- */
.hf-spec { display: grid; gap: 6px; min-width: 0; }
.hf-spec-box { position: relative; overflow: hidden; border-radius: 12px; background: #2a2a2a; cursor: none; touch-action: pan-y; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.hf-spec-box:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hf-rock, .hf-rock-old { position: absolute; left: 0; top: 0; display: block; }
.hf-rock-old { pointer-events: none; transition: opacity 0.5s ease; }
.hf-rock-old.is-gone { opacity: 0; }
.hf-lens { position: absolute; left: 0; top: 0; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); will-change: transform; }
.hf-spec-wait { position: absolute; inset: 0; display: none; place-items: center; color: #ddd; font-size: 0.9rem; }
.hf-spec-box.is-wait .hf-spec-wait { display: grid; }
.hf-spec-box.is-wait .hf-lens { opacity: 0; }
.hf-read { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--ink-2); min-height: 2.8em; }
.hf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.hf-tip { margin: 0; font-size: 0.88rem; color: var(--ink-2); }

/* rocks side by side, to compare */
.hf-compare { display: grid; gap: 10px; }
.hf-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.hf-card { display: grid; gap: 8px; align-content: start; padding: 12px 12px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.hf-card h4, .hf-card h3.hf-cardh { margin: 0; font-size: 1.05rem; }
.hf-card .hf-place { margin: -4px 0 0; font-size: 0.88rem; color: var(--ink-2); }
.hf-cmp-head { display: grid; gap: 4px; }
.hf-cmp-head > * { margin: 0; }
.hf-cmp-notes { margin-top: -4px; }

/* ---------- screen 1: the bench ---------- */
.hf-bench { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; padding: 12px; border-radius: 14px; background: linear-gradient(#a37a4f, #8a6440); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18); }
.hf-smp { position: relative; display: grid; gap: 4px; padding: 5px 5px 6px; border-radius: 10px; border: 2px solid transparent; background: rgba(255, 255, 255, 0.86); color: #1d2224; font: inherit; cursor: pointer; text-align: center; }
.hf-smp canvas { width: 100%; aspect-ratio: 3 / 2; border-radius: 6px; display: block; background: #555; }
.hf-smp b { font-size: 0.95rem; }
.hf-smp .hf-gtag { position: absolute; top: 2px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; font-weight: 800; line-height: 20px; }
.hf-smp:hover { border-color: #fff; }
.hf-smp[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hf-smp:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hf-smp.is-new { animation: none; }
.hf-view { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 820px) { .hf-view { grid-template-columns: minmax(0, 1fr); } }
.hf-sortbox { display: grid; gap: 10px; align-content: start; }
.hf-sortbox > * { margin: 0; }
.hf-trays { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hf-tray { display: grid; gap: 6px; align-content: start; padding: 8px 10px 10px; border-radius: 12px; background: var(--surface-2); border: 1.5px dashed var(--line); min-height: 86px; }
.hf-tray input { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 0.92rem; background: var(--surface); color: var(--ink); }
.hf-tray input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.hf-tray-list { display: flex; flex-wrap: wrap; gap: 5px; min-height: 30px; }
.hf-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px 3px 3px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 0.85rem; }
.hf-chip canvas { width: 30px; height: 20px; border-radius: 4px; display: block; }

/* ---------- models: shared ---------- */
.hf-ctl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hf-ctl-row .label { margin-right: 4px; }
.hf-play { min-width: 8.5em; }
.hf-svg { width: 100%; height: auto; display: block; border-radius: 12px; background: var(--hf-paper); border: 1px solid var(--line); }
.hf-lab-t { font-family: var(--font-body, inherit); font-size: 13px; fill: var(--ink); }
.hf-lab-s { font-size: 11.5px; fill: var(--ink-2); }
.hf-lab-b { font-weight: 700; }
.hf-halo { paint-order: stroke; stroke: var(--hf-paper); stroke-width: 4px; stroke-linejoin: round; }
.hf-axis { stroke: var(--ink-2); stroke-width: 1.2; fill: none; }
.hf-grid-l { stroke: var(--line); stroke-width: 1; fill: none; }
.hf-head { fill: var(--ink-2); }
.hf-bar-bg { fill: var(--surface-2); stroke: var(--line); }
.hf-out { font-variant-numeric: tabular-nums; font-weight: 700; }
.hf-two { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .hf-two { grid-template-columns: minmax(0, 1fr); } }
.hf-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
.hf-side > * { margin: 0; }
.hf-pane { width: 100%; max-width: 300px; aspect-ratio: 1; display: block; border-radius: 50%; box-shadow: 0 0 0 6px #6b5a3a, 0 0 0 7px #d8c48e, 0 8px 18px rgba(0, 0, 0, 0.35); background: #111; margin: 8px auto; }
.hf-place-btns { display: grid; gap: 6px; }
.hf-place-btns .wd-opt { width: 100%; }
.hf-result { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); line-height: 1.5; }
.hf-result b { font-weight: 750; }

/* screen 3: the dyke */
.hf-ebars { display: grid; gap: 8px; }
.hf-ebar { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 3.6em; gap: 8px; align-items: center; font-size: 0.92rem; }
.hf-ebar .hf-track { height: 18px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: flex; }
.hf-ebar .hf-fill { height: 100%; }
.hf-ebar output { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.hf-f-dyke { background: var(--hf-magma); }
.hf-f-gran { background: #a8553a; }
.hf-f-tot1 { background: var(--hf-magma); }
.hf-f-tot2 { background: #a8553a; }

/* screen 4: the mineral mix */
.hf-stops { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-stops .wd-opt { flex: 1 1 7.5em; }
.hf-stops .wd-opt { text-align: center; }
.hf-minbars { display: grid; gap: 6px; }
.hf-minbar { display: grid; grid-template-columns: 11em minmax(0, 1fr) 3em; gap: 8px; align-items: center; font-size: 0.9rem; }
.hf-minbar .hf-track { height: 16px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.hf-minbar .hf-fill { height: 100%; width: 0; }
.hf-minbar output { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.hf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .hf-pair { grid-template-columns: minmax(0, 1fr); } }

/* screen 6: the float tank */
.hf-water { fill: var(--hf-tank); }
.hf-water-top { fill: none; stroke: var(--hf-water); stroke-width: 2; }

/* screen 8: the grid */
.hf-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 520px; }
.hf-order li { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--line); transition: transform 0.25s ease; }
.hf-order li b { text-align: center; color: var(--ink-2); }
.hf-order .hf-mv { display: flex; gap: 4px; }
.hf-order .hf-mv button { min-width: 40px; min-height: 36px; }
.hf-order li.is-right { border-color: var(--good); }
.hf-order li.is-wrong { border-color: var(--bad); }
.hf-gridbox { display: grid; gap: 4px; min-width: 520px; }
.hf-gr { display: grid; grid-template-columns: 7.5em repeat(6, minmax(0, 1fr)); gap: 4px; }
.hf-gh { font-size: 0.8rem; font-weight: 750; color: var(--ink-2); padding: 4px; line-height: 1.2; display: flex; align-items: end; }
.hf-gl { font-size: 0.84rem; font-weight: 750; padding: 6px; display: flex; align-items: center; border-radius: 8px; background: var(--surface-2); }
.hf-cell { min-height: 58px; padding: 4px; border-radius: 8px; border: 1.5px dashed var(--line); background: var(--surface); display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.hf-cell:hover { border-color: var(--accent); }
.hf-cell:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.hf-cell.is-any { grid-row: span 3; }
.hf-cell .hf-nm { display: inline-block; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.8rem; font-weight: 750; }
.hf-cell .hf-nm.is-right { border-color: var(--good); background: rgba(21, 128, 61, 0.1); }
.hf-cell .hf-nm.is-wrong { border-color: var(--bad); background: rgba(185, 28, 28, 0.08); }
.hf-names { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-names .wd-opt.is-placed { opacity: 0.55; }
.hf-gcols { display: grid; grid-template-columns: 7.5em minmax(0, 4fr) minmax(0, 2fr); gap: 4px; }

/* screen 9: the mystery samples */
.hf-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.85rem; font-weight: 800; cursor: pointer; }
.hf-dot[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hf-dot.is-right { background: var(--good); border-color: var(--good); color: #fff; }
.hf-dot.is-wrong { background: var(--surface-2); border-color: var(--bad); }
.hf-dot:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hf-mcard { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .hf-mcard { grid-template-columns: minmax(0, 1fr); } }
.hf-mcard.is-in { animation: none; }
.hf-clue { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); line-height: 1.5; }
.hf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-opts .wd-opt { font-size: 0.9rem; min-height: 38px; }
.hf-score { margin: 0; font-weight: 750; }

/* screen 10: the quarry wall */
.hf-wall { position: relative; }
.hf-wall svg.hf-over { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.hf-unit-lab { font-size: 15px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, 0.7); stroke-width: 4px; }
.hf-tl { display: grid; gap: 4px; }
.hf-tl svg { width: 100%; height: auto; display: block; }
.hf-tap { font-size: 0.9rem; }

/* ---------- movement, only for readers who haven't asked for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hf-m-dash { animation: hf-dash 1.4s linear infinite; }
  .hf-m-rise { animation: hf-rise 2.6s ease-in infinite; transform-box: fill-box; }
  .hf-m-fall { animation: hf-fall 2.2s ease-in infinite; transform-box: fill-box; }
  .hf-m-glow { animation: hf-glow 2.4s ease-in-out infinite; }
  .hf-m-ring { animation: hf-ring 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
  .hf-m-bob { animation: hf-bob 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .hf-m-shim { animation: hf-shim 1.6s ease-in-out infinite; }
  .hf-smp.is-new { animation: hf-pop 0.45s cubic-bezier(.2, 1.4, .5, 1) both; }
  .hf-mcard.is-in { animation: hf-slide 0.4s ease-out both; }
  .hf-chip.is-new { animation: hf-pop 0.35s ease-out both; }
}
@keyframes hf-dash { to { stroke-dashoffset: -36; } }
@keyframes hf-rise { 0% { transform: translateY(10px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
@keyframes hf-fall { 0% { transform: translateY(-10px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@keyframes hf-glow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes hf-ring { 0% { transform: scale(0.7); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes hf-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(3px) rotate(1deg); } }
@keyframes hf-shim { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.8; } }
@keyframes hf-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hf-slide { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* screen 7: the energy steps of one piece of ash */
.hf-esteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: es; }
.hf-esteps li { position: relative; display: grid; gap: 2px; align-content: start; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 2px solid transparent; font-size: 0.88rem; line-height: 1.3; }
.hf-esteps li b { font-size: 0.95rem; }
.hf-esteps li span { color: var(--ink-2); }
.hf-esteps li.is-on { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.hf-esteps li.is-past { opacity: 0.8; }
.hf-esteps li:nth-child(1) b, .hf-esteps li:nth-child(5) b { color: var(--hf-e-heat); }
.hf-esteps li:nth-child(2) b, .hf-esteps li:nth-child(4) b { color: var(--hf-e-kin); }
.hf-esteps li:nth-child(3) b { color: var(--hf-e-grav); }
@media (max-width: 640px) { .hf-esteps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* screen 5: the race */
.hf-race { width: 100%; aspect-ratio: 1 / 0.62; display: block; border-radius: 10px; background: #c2410c; }
/* screen 8 */
.hf-gstep { display: grid; gap: 10px; padding-top: 6px; }
.hf-gstep + .hf-gstep { border-top: 1px solid var(--line); padding-top: 14px; }
.hf-gstep > * { margin: 0; }
.hf-gr.hf-grows { grid-template-rows: repeat(3, minmax(58px, auto)); }
.hf-gh i { font-style: normal; font-weight: 500; }
.hf-mine { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
/* screen 9 */
.hf-mplace { margin: 0; font-size: 1.15rem; }
.hf-opts .wd-opt.is-right { border-color: var(--good); background: rgba(21, 128, 61, 0.12); color: var(--ink); }
.hf-opts .wd-opt.is-wrong { border-color: var(--bad); background: rgba(185, 28, 28, 0.08); color: var(--ink); }
.hf-opts .wd-opt:disabled { cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .hf-minbar .hf-fill, .hf-ebar .hf-fill { transition: width 0.6s ease; }
  .hf-esteps li { transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; }
}
.hf-minbar .hf-fill { display: block; }
.viz-read:empty, .hf-result:empty { display: none; }
.hf-fs.hf-checklist legend { float: left; width: 100%; margin-bottom: 6px; }
.hf-fs.hf-checklist legend + * { clear: both; }
.hf-wall .hf-spec-box svg.hf-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hf-wlab { font-size: 34px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, 0.75); stroke-width: 7px; stroke-linejoin: round; }
.hf-sbox { min-width: 0; }
@media (max-width: 620px) { .hf-sbox.hf-scroll > svg { min-width: 560px; } }

