/* Host memory admission: loaded only on its Learn page, after style.css. */
.hma-req { display: grid; gap: 8px; }
.hma-req .label, .hma-gauges .label, .hma-cg .label { margin: 0; }
.hma-askrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font: 13px var(--mono); color: var(--quiet); }
.chip.hma-ask { border-color: var(--purple); color: var(--purple); transition: color .3s; }
.hma-reswrap { display: inline-flex; align-items: center; gap: 10px; opacity: 0; transition: opacity .4s; }
.hma-reswrap.on { opacity: 1; }
.chip.hma-res { border-style: dashed; border-color: var(--purple); color: var(--purple); }
.hma-total { font-weight: 600; color: var(--fg); }
.chip.hma-verdict { margin-left: auto; border-style: dashed; color: var(--quiet); transition: color .3s, border-color .3s, background .3s; }
.chip.hma-verdict.no { border-color: var(--fg); color: var(--fg); }
.chip.hma-verdict.yes { border-style: solid; border-color: var(--red); background: var(--glow-red); color: var(--red); }

.hma-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.hma-gauges { display: grid; gap: 10px; }
.hma-g { display: grid; gap: 4px; transition: opacity .4s; }
.hma-g.idle { opacity: .35; }
.hma-g-h { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.hma-g-n { font-weight: 600; color: var(--fg); }
.hma-g-src { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 11px var(--mono); color: var(--quiet); }
.hma-g-v { margin-left: auto; font: 600 12px var(--mono); color: var(--fg); }
.hma-g-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 10px; }
.hma-track { position: relative; height: 20px; overflow: hidden; border: 1px solid transparent; border-radius: 5px; background: var(--surface-2); transition: box-shadow .3s; }
.hma-track.unknown { border: 1px dashed var(--border-strong); background: none; }
.hma-room { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--quiet); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.hma-gask, .hma-gres { position: absolute; top: 3px; bottom: 3px; width: 0; opacity: 0; transition: width .6s cubic-bezier(.2, .8, .2, 1), left .6s cubic-bezier(.2, .8, .2, 1), opacity .3s, background .3s, border-color .3s; }
.hma-gask { left: 0; border: 1.5px solid var(--purple); border-radius: 4px; background: var(--glow); }
.hma-gask.taken { border-color: var(--red); background: var(--red); }
.hma-gres { border: 1.5px dashed var(--purple); border-left: 0; border-radius: 0 4px 4px 0; }
.hma-note { position: absolute; inset: 0 8px; display: flex; align-items: center; font: 11px var(--mono); color: var(--quiet); white-space: nowrap; }
.hma-tag { font: 11.5px var(--mono); color: var(--quiet); white-space: nowrap; }
.hma-tag.fit { color: var(--soft); }
.hma-tag.short { font-weight: 600; color: var(--fg); }
.hma-g.binding .hma-track { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }

.hma-cg { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: opacity .4s; }
.hma-cg.idle { opacity: .35; }
.hma-cbar { position: relative; height: 24px; margin-top: 4px; border-radius: 5px; background: linear-gradient(90deg, var(--surface-2) 80%, transparent 80%); }
.hma-cs { position: absolute; top: 0; bottom: 0; opacity: 0; transition: left .7s cubic-bezier(.2, .8, .2, 1), width .7s cubic-bezier(.2, .8, .2, 1), opacity .4s, background .4s; }
.hma-cbar.in .hma-cs { opacity: 1; }
.hma-cs.use { background: var(--border-strong); box-shadow: inset -1px 0 0 var(--surface-2); }
.hma-cs.use:first-child { border-radius: 5px 0 0 5px; }
.hma-cs.keep.on { background: repeating-linear-gradient(90deg, var(--soft) 0 1.5px, var(--border-strong) 1.5px 5px); }
.hma-cs.clean.on { background: repeating-linear-gradient(135deg, var(--quiet) 0 3px, var(--border-strong) 3px 6px); }
.hma-cs.free { background: var(--quiet); }
.hma-cs.new { background: var(--red); }
.hma-lim { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--fg); }
.hma-cask, .hma-cres { position: absolute; top: 4px; bottom: 4px; opacity: 0; transition: left .6s cubic-bezier(.2, .8, .2, 1), width .6s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.hma-cask { border: 1.5px solid var(--purple); border-radius: 4px; background: var(--glow); }
.hma-cres { border: 1.5px dashed var(--purple); border-left: 0; border-radius: 0 4px 4px 0; }
.hma-cbar::after { content: ''; position: absolute; top: 0; bottom: 0; left: 80%; right: 0; border-radius: 0 5px 5px 0; background: repeating-linear-gradient(135deg, var(--fg) 0 1.5px, transparent 1.5px 6px); opacity: 0; transition: opacity .4s; }
.hma-cbar.over::after { opacity: .4; }
.hma-cscale { position: relative; height: 14px; font: 11px var(--mono); color: var(--quiet); }
.hma-limt, .hma-overt { position: absolute; top: 0; white-space: nowrap; }
.hma-limt { padding-right: 5px; color: var(--fg); }
.hma-overt { padding-left: 5px; color: var(--fg); opacity: 0; transition: opacity .4s; }
.hma-cbar.over + .hma-cscale .hma-overt { opacity: 1; }
.hma-legend { display: grid; gap: 4px; }
.hma-li { display: flex; align-items: center; gap: 8px; font: 11.5px var(--mono); color: var(--soft); opacity: 0; transition: opacity .4s; }
.hma-li.on { opacity: 1; }
.hma-li i { flex: none; width: 14px; height: 10px; border-radius: 2px; }
.hma-li.use i { background: var(--border-strong); }
.hma-li.keep i { margin-left: 14px; background: repeating-linear-gradient(90deg, var(--soft) 0 1.5px, var(--border-strong) 1.5px 5px); }
.hma-li.clean i { margin-left: 14px; background: repeating-linear-gradient(135deg, var(--quiet) 0 3px, var(--border-strong) 3px 6px); }
.hma-li.free i { background: var(--quiet); }
.hma-li.new i { background: var(--red); }
.hma-formula, .hma-anc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hma-formula { height: 18px; font: 600 12px/18px var(--mono); color: var(--fg); }
.hma-anc { height: 16px; font: 11.5px/16px var(--mono); color: var(--quiet); }

@media (max-width: 600px) {
  .hma-main { grid-template-columns: 1fr; gap: 18px; }
  .hma-askrow { gap: 6px 8px; font-size: 12px; }
  .chip.hma-verdict { margin-left: 0; }
  .hma-gauges { gap: 8px; }
  .hma-g { gap: 3px; }
  .hma-g-row { grid-template-columns: minmax(0, 1fr) 80px; gap: 8px; }
  .hma-track { height: 17px; }
  .hma-cg { gap: 7px; padding: 10px; }
  .hma-legend { gap: 3px; }
  .hma-li { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .hma-room, .hma-gask, .hma-gres, .hma-cs, .hma-cask, .hma-cres { transition: none; }
}
