/* Hess's Law Builder: the Thermochemistry Desk inside the practice shell's stage (about 1066 × 628 at 1366 × 768). */
html { --hl-ink: #1b2733; --hl-soft: #46586a; --hl-paper: #fffdf8; --hl-paper2: #f5f0e6; --hl-line: #c8bfae; --hl-bench1: #e4edf1; --hl-bench2: #cddbe2; --hl-grid: rgba(24, 94, 113, .08);
  --hl-accent: #185e71; --hl-accent-bg: #dff0f4; --hl-a: #187489; --hl-b: #a85a14; --hl-c: #6b4fa0; --hl-a-bg: #e3f3f6; --hl-b-bg: #fbeedd; --hl-c-bg: #efe9f8;
  --hl-exo: #c2410c; --hl-endo: #1d5bd8; --hl-ok: #17683a; --hl-ok-bg: #e2f5e8; --hl-bad: #b42318; --hl-bad-bg: #fde8e5; --hl-axis: #33495a; --hl-stick: #c4ccd5; --hl-stick-o: #59636f;
  --hl-sel: #1f5fbf; --hl-sel-bg: #e6efff; --hl-shadow: 0 6px 14px rgba(20, 40, 55, .16); }
html[data-theme="dark"] { --hl-ink: #eef3f7; --hl-soft: #b9c7d4; --hl-paper: #1c2631; --hl-paper2: #17202a; --hl-line: #4a5b6d; --hl-bench1: #0f1a21; --hl-bench2: #0b141a; --hl-grid: rgba(120, 200, 220, .07);
  --hl-accent: #6fc3d6; --hl-accent-bg: #123642; --hl-a: #6fc3d6; --hl-b: #f0a964; --hl-c: #b9a2ea; --hl-a-bg: #123642; --hl-b-bg: #3a2814; --hl-c-bg: #2a2140;
  --hl-exo: #ff9a6a; --hl-endo: #8db4ff; --hl-ok: #86e0a6; --hl-ok-bg: #153a25; --hl-bad: #ffb4a8; --hl-bad-bg: #4a1e1a; --hl-axis: #a9bccb; --hl-stick: #aab3bd; --hl-stick-o: #2b323a;
  --hl-sel: #8ab8ff; --hl-sel-bg: #1b2d4d; --hl-shadow: 0 6px 14px rgba(0, 0, 0, .5); }

.hl { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 10px 14px 14px; font-size: 17px; line-height: 1.35; color: var(--hl-ink);
  background: linear-gradient(var(--hl-grid) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--hl-grid) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(180deg, var(--hl-bench1), var(--hl-bench2)); }
.hl *, .hl *::before, .hl *::after { box-sizing: border-box; }
.hl p { margin: 0; }
.hl button { font: inherit; color: inherit; }
.hl button:focus-visible, .hl input:focus-visible, .hl summary:focus-visible { outline: 3px solid var(--tlg-focus, #e0912a); outline-offset: 2px; }
.hl-body { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.hl-body.is-in { animation: hl-in .35s ease-out; }
@keyframes hl-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* head strip */
.hl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none; }
.hl-plaque { display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 14px; border-radius: 8px; color: #fff; background: linear-gradient(180deg, #2a7f95, #185e71 60%, #114856); border: 2px solid #0d3a46; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.hl-plaque-k { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.hl-plaque-t { font-size: 18px; font-weight: 800; }
.hl-level { font-size: 16px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--hl-accent-bg); color: var(--hl-accent); border: 1px solid var(--hl-accent); }
.hl-about { margin-left: auto; }
.hl-about summary { cursor: pointer; font-size: 16px; font-weight: 700; min-height: 44px; display: flex; align-items: center; padding: 0 10px; border-radius: 8px; list-style: none; }
.hl-about summary::-webkit-details-marker { display: none; }
.hl-about summary::before { content: 'ⓘ'; margin-right: 6px; }
.hl-about[open] { flex: 1 1 100%; margin-left: 0; order: 5; }
.hl-about[open] summary { margin-left: auto; width: max-content; }
.hl-about[open] p { padding: 10px 14px; background: var(--hl-paper); border: 1px solid var(--hl-line); border-radius: 10px; font-size: 16px; }

/* equations */
.hl-eq { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 2px; font-size: 20px; }
.hl-term { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; position: relative; border-radius: 5px; padding: 0 2px; }
.hl-coef { font-weight: 800; color: var(--hl-accent); }
.hl-frac { display: inline-flex; flex-direction: column; align-items: center; font-size: 16px; line-height: 1.02; vertical-align: middle; }
.hl-frac span:first-child { border-bottom: 2px solid currentColor; padding: 0 2px; }
.hl-sp sub { font-size: 16px; line-height: 0; vertical-align: -0.3em; }
.hl-st { font-size: 16px; color: var(--hl-soft); margin-left: 1px; }
.hl-plus { color: var(--hl-soft); font-weight: 700; }
.hl-arrow { font-weight: 800; padding: 0 4px; color: var(--hl-ink); }
.hl-term.is-cancel { color: var(--hl-soft); }
.hl-term.is-cancel::after { content: ''; position: absolute; left: -2px; right: -2px; top: 52%; height: 2.5px; background: var(--hl-bad); transform: rotate(-8deg); border-radius: 2px; }
.hl-term.is-striking::after { animation: hl-strike .4s ease-out both; transform-origin: left center; }
@keyframes hl-strike { from { transform: rotate(-8deg) scaleX(0); } to { transform: rotate(-8deg) scaleX(1); } }

/* target strip */
.hl-target, .hl-askcard { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: var(--hl-paper); border: 2px solid var(--hl-accent); box-shadow: var(--hl-shadow); flex: none; }
.hl-target-k { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--hl-accent); }
.hl-target-words, .hl-askwords { font-size: 19px; font-weight: 700; }
.hl-askcard { flex-direction: column; align-items: flex-start; gap: 4px; }

/* cards */
.hl-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); flex: none; }
.hl-cards.n1 { grid-template-columns: minmax(0, 560px); justify-content: center; }
.hl-card { --c: var(--hl-a); --cbg: var(--hl-a-bg); position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0 12px 10px; border-radius: 14px; background: linear-gradient(180deg, var(--hl-paper), var(--hl-paper2)); border: 2px solid var(--c); box-shadow: var(--hl-shadow); overflow: hidden; transition: box-shadow .2s, border-color .2s; perspective: 600px; }
.hl-card.is-b { --c: var(--hl-b); --cbg: var(--hl-b-bg); }
.hl-card.is-c { --c: var(--hl-c); --cbg: var(--hl-c-bg); }
.hl-card-top { display: flex; align-items: center; gap: 10px; margin: 0 -12px; padding: 5px 12px; background: var(--cbg); border-bottom: 1px solid var(--c); }
.hl-card-letter { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--c); color: var(--hl-paper); font-weight: 800; font-size: 18px; }
html[data-theme="dark"] .hl-card-letter { color: #0e1820; }
.hl-card-given { font-size: 16px; color: var(--hl-soft); }
.hl-card-given b { color: var(--hl-ink); }
.hl-card-eq { min-height: 56px; display: flex; align-items: center; transform-origin: center; }
.hl-card-eq.is-flipping { animation: hl-flip .5s cubic-bezier(.3, .7, .3, 1); }
.hl-card-eq.is-scaling .hl-coef { animation: hl-pop .4s ease-out; display: inline-block; }
@keyframes hl-flip { 0% { transform: rotateX(90deg); opacity: .2; } 60% { transform: rotateX(-12deg); opacity: 1; } 100% { transform: none; } }
@keyframes hl-pop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.hl-card-op { font-size: 16px; font-weight: 700; color: var(--c); min-height: 22px; }
.hl-card.is-rev .hl-card-op::before { content: '⇄ '; }
.hl-card-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hl-flip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--c); background: var(--hl-paper); font-weight: 700; cursor: pointer; }
.hl-flip svg { width: 22px; height: 22px; }
.hl-flip[aria-pressed="true"] { background: var(--c); color: var(--hl-paper); }
html[data-theme="dark"] .hl-flip[aria-pressed="true"] { color: #0e1820; }
.hl-mults { display: inline-flex; align-items: center; gap: 4px; }
.hl-x { font-weight: 800; color: var(--hl-soft); margin-right: 2px; }
.hl-mult { min-width: 44px; min-height: 44px; padding: 0 6px; border-radius: 9px; border: 1.5px solid var(--hl-line); background: var(--hl-paper); font-weight: 700; cursor: pointer; }
.hl-mult.is-on { background: var(--c); border-color: var(--c); color: var(--hl-paper); }
html[data-theme="dark"] .hl-mult.is-on { color: #0e1820; }
.hl-flip:hover:not(:disabled), .hl-mult:hover:not(:disabled) { border-color: var(--c); }
.hl-card.is-ok { box-shadow: 0 0 0 3px var(--hl-ok), var(--hl-shadow); }
.hl.is-locked .hl-card-ctl { opacity: .75; }

/* sum panel */
.hl-sum { flex: none; padding: 8px 14px; border-radius: 12px; background: var(--hl-paper); border: 1.5px dashed var(--hl-line); }
.hl-sum-k { font-size: 16px; font-weight: 800; color: var(--hl-soft); text-transform: uppercase; letter-spacing: .05em; }
.hl-sum-eq .hl-eq { font-size: 18px; }
.hl-sumterm { border-bottom: 3px solid var(--hl-a); }
.hl-sumterm.is-b { border-bottom-color: var(--hl-b); }
.hl-sumterm.is-c { border-bottom-color: var(--hl-c); }
.hl-net { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--hl-line); }
.hl-net-k { font-size: 16px; font-weight: 800; color: var(--hl-accent); text-transform: uppercase; }
.hl-match { font-size: 16px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--hl-paper2); color: var(--hl-soft); border: 1px solid var(--hl-line); }
.hl-match:empty { display: none; }
.hl-match.is-ok { background: var(--hl-ok-bg); color: var(--hl-ok); border-color: var(--hl-ok); }
.hl-net .hl-match { margin-left: auto; }

/* answer box */
.hl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; flex: none; }
.hl-foot .hl-match { margin-right: auto; }
.hl-ans { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hl-ans-k { font-size: 18px; font-weight: 800; }
.hl-ans-box { display: inline-flex; align-items: stretch; border: 2px solid var(--hl-accent); border-radius: 10px; background: var(--hl-paper); overflow: hidden; }
.hl-pm { min-width: 46px; min-height: 48px; border: 0; border-right: 1.5px solid var(--hl-line); background: var(--hl-accent-bg); color: var(--hl-accent); font-size: 22px; font-weight: 800; cursor: pointer; }
.hl-in { width: 8.5em; min-height: 48px; border: 0; padding: 0 10px; font: 700 20px/1 var(--tlg-font-body, system-ui); color: var(--hl-ink); background: transparent; text-align: right; }
.hl-in:focus { outline: none; }
.hl-ans-box:focus-within { box-shadow: 0 0 0 3px var(--tlg-focus, #e0912a); }
.hl-ans-u { display: grid; place-items: center; padding: 0 12px; font-weight: 700; color: var(--hl-soft); background: var(--hl-paper2); border-left: 1.5px solid var(--hl-line); }
.hl-reveal { font-size: 17px; padding: 6px 12px; border-radius: 10px; background: var(--hl-ok-bg); color: var(--hl-ink); border: 1.5px solid var(--hl-ok); }

/* two-column benches */
.hl-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 12px; flex: 1 1 auto; min-height: 0; align-items: start; }
.hl-two--dia { grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr); }
.hl-two--cmp { grid-template-columns: minmax(0, 1fr) minmax(320px, 1.1fr); }
.hl-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hl-side { padding: 12px 14px; border-radius: 14px; background: var(--hl-paper); border: 1.5px solid var(--hl-line); box-shadow: var(--hl-shadow); }
.hl-formula { font-size: 17px; font-weight: 700; padding: 8px 10px; border-radius: 8px; background: var(--hl-accent-bg); color: var(--hl-ink); border-left: 4px solid var(--hl-accent); }
.hl-note { font-size: 16px; color: var(--hl-soft); }
.hl-qk { font-size: 17px; font-weight: 800; }
.hl-fig { min-width: 0; width: 100%; }
.hl-fig svg { display: block; max-width: 100%; height: auto; }
.hl-diafig { padding: 8px; border-radius: 14px; background: var(--hl-paper); border: 1.5px solid var(--hl-line); box-shadow: var(--hl-shadow); }

/* tables */
.hl-tablewrap { border-radius: 14px; background: var(--hl-paper); border: 1.5px solid var(--hl-line); box-shadow: var(--hl-shadow); overflow: hidden; }
.hl-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.hl-table caption { text-align: left; padding: 8px 12px 4px; font-size: 16px; font-weight: 800; color: var(--hl-soft); text-transform: uppercase; letter-spacing: .04em; }
.hl-table th, .hl-table td { padding: 5px 12px; border-top: 1px solid var(--hl-line); text-align: left; }
.hl-table thead th { font-size: 16px; color: var(--hl-soft); background: var(--hl-paper2); }
.hl-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.hl-table .hl-sp { font-size: 18px; }
.hl-grp th { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--hl-a-bg); color: var(--hl-a); }
.hl-grp.is-r th { background: var(--hl-b-bg); color: var(--hl-b); }
.hl-el { font-size: 16px; color: var(--hl-soft); font-style: italic; }
.hl-blank { display: inline-block; width: 3.2em; height: 1.4em; vertical-align: middle; border: 2px dashed var(--hl-line); border-radius: 6px; }
.hl-btable th[scope="row"] { font-weight: 800; white-space: nowrap; }
.hl-stepcell { position: relative; white-space: nowrap; }
.hl-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--hl-line); border-radius: 10px; overflow: hidden; background: var(--hl-paper); }
.hl-sb { width: 44px; height: 44px; border: 0; background: var(--hl-paper2); font-size: 22px; font-weight: 800; cursor: pointer; color: var(--hl-accent); }
.hl-sb:hover:not(:disabled) { background: var(--hl-accent-bg); }
.hl-sv { display: inline-block; min-width: 40px; text-align: center; font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.hl-sv.is-bump { animation: hl-pop .3s ease-out; }
.hl-key { display: inline-grid; place-items: center; min-width: 32px; height: 32px; margin-left: 6px; border-radius: 8px; background: var(--hl-ok-bg); color: var(--hl-ok); border: 1.5px solid var(--hl-ok); font-weight: 800; font-size: 17px; }

/* molecules */
.hl-mwrap { flex: none; padding: 8px 12px; border-radius: 14px; background: var(--hl-paper); border: 1.5px solid var(--hl-line); box-shadow: var(--hl-shadow); }
.hl-mstrip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; }
.hl-mside { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 10px 6px; border-radius: 12px; }
.hl-mside.is-react { background: color-mix(in srgb, var(--hl-exo) 7%, transparent); }
.hl-mside.is-prod { background: color-mix(in srgb, var(--hl-ok) 8%, transparent); }
.hl-mside-k { font-size: 16px; font-weight: 800; color: var(--hl-soft); }
.hl-mside-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.hl-mitem { display: inline-flex; align-items: center; gap: 4px; }
.hl-mcoef { font-size: 24px; font-weight: 800; color: var(--hl-accent); }
.hl-mfig { display: inline-flex; flex-direction: column; align-items: center; gap: 0; }
.hl-mlabel .hl-sp { font-size: 17px; }
.hl-mplus { font-size: 22px; font-weight: 800; color: var(--hl-soft); }
.hl-marrow { font-size: 30px; font-weight: 800; }
.hl-stick { stroke: var(--hl-stick); stroke-linecap: round; }
.hl-stick-o { stroke: var(--hl-stick-o); stroke-linecap: round; }
.hl-stick-hi { stroke: #fff; stroke-linecap: round; opacity: .55; transform: translate(-0.8px, -0.8px); }
.hl-bond.is-broken .hl-stick { stroke: #f08a4b; }
.hl-bond.is-formed .hl-stick { stroke: #45b26b; }
.hl-bond.is-broken, .hl-bond.is-formed { animation: hl-glow 1.2s ease-in-out 2; }
@keyframes hl-glow { 50% { opacity: .45; } }
.hl-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 4px; font-size: 16px; color: var(--hl-soft); }
.hl-legend span { display: inline-flex; align-items: center; gap: 4px; }
.hl-legend-note { font-style: italic; }

/* SVG text and lines */
.hl-t { fill: var(--hl-ink); font-family: var(--tlg-font-body, system-ui); }
.hl-t-soft { fill: var(--hl-soft); }
.hl-t-level { font-weight: 700; }
.hl-t-dh { font-weight: 800; }
.hl-t-dh.is-q { fill: var(--hl-accent); }
.hl-axis line, .hl-axis-l { stroke: var(--hl-axis); stroke-width: 2.5; }
.hl-axis path { fill: var(--hl-axis); }
.hl-level { stroke: var(--hl-ink); stroke-width: 5; stroke-linecap: round; }
.hl-level-0 { stroke: var(--hl-a); } .hl-level-1 { stroke: var(--hl-b); } .hl-level-2 { stroke: var(--hl-c); }
.hl-harrow line { stroke-width: 3.5; }
.hl-harrow.is-down line { stroke: var(--hl-exo); } .hl-harrow.is-down path { fill: var(--hl-exo); }
.hl-harrow.is-up line { stroke: var(--hl-endo); } .hl-harrow.is-up path { fill: var(--hl-endo); }
.hl-harrow.is-ask line { stroke-dasharray: 9 7; stroke: var(--hl-accent); } .hl-harrow.is-ask path { fill: var(--hl-accent); }
.hl-harrow.is-found line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: hl-draw .8s ease-out forwards; }
@keyframes hl-draw { to { stroke-dashoffset: 0; } }
.hl-cbox { fill: var(--hl-paper2); stroke: var(--hl-line); stroke-width: 2; }
.hl-cbox.is-r { stroke: var(--hl-b); } .hl-cbox.is-p { stroke: var(--hl-a); } .hl-cbox.is-e { stroke: var(--hl-soft); stroke-dasharray: 6 4; }
.hl-carrow line { stroke: var(--hl-soft); stroke-width: 2.5; } .hl-carrow path { fill: var(--hl-soft); }
.hl-carrow.is-main line { stroke: var(--hl-accent); stroke-width: 3.5; } .hl-carrow.is-main path { fill: var(--hl-accent); }
.hl-bar.is-hess { fill: var(--hl-a); } .hl-bar.is-bond { fill: var(--hl-b); } .hl-bar.is-corr { fill: var(--hl-c); }
.hl-sa-axis line { stroke: #28414d; stroke-width: 3; } .hl-sa-axis path { fill: #28414d; }
.hl-sa-exo line { stroke: #c2410c; stroke-width: 5; } .hl-sa-exo path { fill: #c2410c; }
.hl-sa-total line { stroke: #185e71; stroke-width: 5; } .hl-sa-total path { fill: #185e71; stroke-dasharray: none; }

/* compare */
.hl-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hl-route { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--hl-paper); border: 2px solid var(--hl-a); box-shadow: var(--hl-shadow); }
.hl-route.is-bond { border-color: var(--hl-b); border-style: dashed; }
.hl-route-k { font-size: 16px; font-weight: 800; color: var(--hl-soft); }
.hl-route b { font-size: 24px; }
.hl-route-s { font-size: 16px; color: var(--hl-soft); }

/* choices */
.hl-choices { display: grid; gap: 8px; }
.hl-choices--err { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hl-choices--sign { grid-template-columns: 1fr 1fr; }
.hl-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; text-align: left; border-radius: 10px; border: 2px solid var(--hl-line); background: var(--hl-paper); cursor: pointer; font-size: 17px; line-height: 1.3; }
.hl-choice:hover:not(:disabled) { border-color: var(--hl-sel); }
.hl-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--hl-soft); }
.hl-choice.is-on { border-color: var(--hl-sel); background: var(--hl-sel-bg); }
.hl-choice.is-on .hl-dot { border-color: var(--hl-sel); background: radial-gradient(circle, var(--hl-sel) 0 45%, transparent 50%); }
.hl-choice.is-key, .hl-step.is-key { border-color: var(--hl-ok); background: var(--hl-ok-bg); }
.hl-choice.is-key::after, .hl-step.is-key::after { content: '✓'; margin-left: auto; font-weight: 800; color: var(--hl-ok); }
.hl-choice.is-miss, .hl-step.is-miss { border-color: var(--hl-bad); background: var(--hl-bad-bg); }
.hl-choice.is-miss::after, .hl-step.is-miss::after { content: '✗'; margin-left: auto; font-weight: 800; color: var(--hl-bad); }
.hl-choice:disabled, .hl-step:disabled { cursor: default; opacity: 1; color: var(--hl-ink); }

/* spot the error */
.hl-given { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-radius: 12px; background: var(--hl-paper); border: 1.5px solid var(--hl-line); flex: none; }
.hl-given-k { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--hl-soft); }
.hl-given .hl-eq { font-size: 18px; }
.hl-gcard { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 10px; border-radius: 8px; border-left: 5px solid var(--hl-a); background: var(--hl-a-bg); }
.hl-gcard.is-b { border-left-color: var(--hl-b); background: var(--hl-b-bg); } .hl-gcard.is-c { border-left-color: var(--hl-c); background: var(--hl-c-bg); }
.hl-gdh { font-weight: 700; white-space: nowrap; }
.hl-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.hl-chip { font-size: 16px; padding: 2px 10px; border-radius: 999px; background: var(--hl-paper2); border: 1px solid var(--hl-line); white-space: nowrap; }
.hl-work { flex: none; padding: 8px 12px 10px; border-radius: 12px; border: 1.5px solid var(--hl-line); box-shadow: var(--hl-shadow);
  background: repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, var(--hl-endo) 14%, transparent) 31px 32px), var(--hl-paper); }
.hl-work-k { font-size: 16px; font-weight: 800; color: var(--hl-soft); margin-bottom: 4px; }
.hl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hl-step { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 12px; border-radius: 10px; border: 2px solid transparent; background: color-mix(in srgb, var(--hl-paper) 85%, transparent); text-align: left; cursor: pointer; font-family: var(--tlg-font-body, system-ui); }
.hl-step:hover:not(:disabled) { border-color: var(--hl-sel); }
.hl-step.is-on { border-color: var(--hl-sel); background: var(--hl-sel-bg); }
.hl-step-n { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--hl-accent); color: var(--hl-paper); font-weight: 800; }
html[data-theme="dark"] .hl-step-n { color: #0e1820; }
.hl-step-t { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 17px; }
.hl-step-t .hl-eq { font-size: 18px; }
.hl-step-w { font-weight: 700; }
.hl-step-v { flex: none; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hl-step.is-total { border-top: 2px solid var(--hl-ink); border-radius: 0 0 10px 10px; }

/* Briefing worked example */
.hl-ex { display: grid; gap: 8px; color: var(--hl-ink); }
.hl-ex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-radius: 10px; background: var(--hl-paper); border: 1.5px solid var(--hl-line); }
.hl-ex-row.is-sum { border: 2px solid var(--hl-accent); }
.hl-ex-tag { font-size: 16px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--hl-paper2); }
.hl-ex-tag.is-a { background: var(--hl-a); color: #fff; } .hl-ex-tag.is-b { background: var(--hl-b); color: #fff; }
.hl-ex-eq { flex: 1 1 260px; }
.hl-ex-dh { margin-left: auto; font-weight: 800; font-size: 18px; white-space: nowrap; }

/* narrow layouts: stack the two columns */
@media (max-width: 900px) {
  .hl { position: static; overflow: visible; min-height: 100%; }
  .hl-two, .hl-two--dia, .hl-two--cmp { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .hl { padding: 8px 8px 12px; }
  .hl-eq { font-size: 19px; }
  .hl-routes { grid-template-columns: 1fr; }
  .hl-choices--sign { grid-template-columns: 1fr; }
  .hl-table th, .hl-table td { padding: 5px 7px; }
  .hl-in { width: 6.5em; }
  .hl-step { flex-wrap: wrap; }
  .hl-step-v { margin-left: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hl *, .hl { animation: none !important; transition: none !important; }
}
.hl-in::placeholder { font-weight: 400; font-size: 16px; color: var(--hl-soft); opacity: 1; }
.hl-btable th, .hl-btable td { padding-top: 2px; padding-bottom: 2px; }
.hl-btable caption { padding-top: 6px; }
.hl--bond .hl-mwrap { padding: 4px 12px; }
.hl--bond .hl-mside { padding: 2px 10px 4px; }
.hl--bond .hl-legend { margin-top: 0; }
.hl-key { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin: 0; }
.hl-table thead th { white-space: nowrap; }
.hl.is-wrong .hl-stepcell { padding-right: 44px !important; }
.hl-two--bond { grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); }
.hl-btable th, .hl-btable td { padding-left: 8px; padding-right: 8px; }

/* medium stages (the shell's stage is under ~800 px wide below 1100 px): one column, the page scrolls */
@media (max-width: 1100px) {
  .hl-two, .hl-two--dia, .hl-two--cmp, .hl-two--bond { grid-template-columns: minmax(0, 1fr); }
}
/* phones: the bond tally becomes one card per bond type */
@media (max-width: 600px) {
  .hl-btable thead { display: none; }
  .hl-btable, .hl-btable tbody { display: block; }
  .hl-btable tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 6px 10px; border-top: 1px solid var(--hl-line); }
  .hl-btable th, .hl-btable td { border: 0; padding: 0 !important; }
  .hl-btable th[scope="row"] { align-self: center; }
  .hl-btable td.num { align-self: center; }
  .hl-btable td.num::after { content: ' kJ/mol'; color: var(--hl-soft); font-size: 16px; }
  .hl-btable .hl-stepcell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .hl-btable .hl-stepcell::before { content: attr(data-label); font-size: 16px; font-weight: 700; color: var(--hl-soft); }
  .hl-btable .hl-key { position: static; transform: none; }
  .hl.is-wrong .hl-btable .hl-stepcell { padding-right: 0 !important; }
  .hl-btable caption { display: block; width: 100%; }
  .hl-btable .hl-stepcell .hl-key { align-self: flex-start; }
}
