/* ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   memhound[-<lang>].html (site decision S105): how MemHound tests the RAM of a NAS, the two recorded runs in an
   80x25 window, the commands and the downloads. The page also loads assets/entware.css (its sections, bands, steps
   and buttons); this file adds MemHound's own blocks. The words and the markup come from docs/site/memhound-page/
   through tools/site-product-pages.py; assets/memhound.js plays the recordings and moves the memory map.
   ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
@font-face{font-family:"MH VGA";src:url("memhound/Web437_IBM_VGA_8x16.woff") format("woff");font-display:swap}
.mh{--g-gate:#3987e5;--g-quick:#d95926;--g-std:#199e70;--g-cmp:#c98500;--ok:#4cd964;--bad:#ff5a52;--warn:#ffb020;
  --m-sys:#2f6f7a;--m-res:#273036;--m-un:#56636b;--m-act:#3987e5;--m-ok:#1f9d55;--m-keep:#ffb020}
.mh kbd{font-family:var(--mono);font-size:.86em;padding:1px 6px;border:1px solid var(--rule-hi);border-bottom-width:2px;border-radius:5px;color:var(--ink)}

/* the first screen: three numbers */
.mh-facts{margin:0;align-self:center}
.mh-facts ul{display:grid;gap:14px;margin:0;padding:0;list-style:none}
.mh-facts li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;align-items:center;padding:22px 24px;border:1px solid var(--rule-hi);border-radius:14px;background:color-mix(in srgb,var(--panel,#151C21) 80%,transparent)}
.mh-facts b{font-family:var(--cond);font-weight:700;font-size:clamp(44px,5vw,72px);line-height:1;color:var(--led);font-variant-numeric:tabular-nums;min-width:2.1ch;text-align:right}
.mh-facts span{color:var(--ink);font-size:clamp(16px,1.2vw,18px);line-height:1.4}
@media (min-width:1000px){.ew-track.mh-track{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* inside a pass: the memory map */
.mh-mem{margin:0;padding:clamp(18px,2.4vw,28px);border:1px solid var(--rule-hi);border-radius:14px;background:var(--term,#0B0F12)}
.mh-map{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}
.mh-c{display:block;aspect-ratio:1.6;border-radius:3px;background:var(--m-un)}
.mh-sys{background:var(--m-sys)}
.mh-res{background:repeating-linear-gradient(135deg,var(--m-res) 0 4px,#1a2126 4px 8px)}
.mh-un{background:var(--m-un);opacity:.55}
.mh-act{background:var(--m-act);box-shadow:0 0 0 2px #0B0F12,0 0 0 4px var(--m-act)}
.mh-ok{background:var(--m-ok)}
.mh-keep{background:repeating-linear-gradient(135deg,var(--m-keep) 0 3px,transparent 3px 7px);outline:1px solid var(--m-keep);outline-offset:-1px}
.mh-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:18px 0 0;padding:0;list-style:none}
.mh .mh-legend li{display:flex;gap:8px;align-items:center;font-size:14.5px;line-height:1.3;color:var(--dim)}
.mh-legend .mh-c{width:22px;flex:none}
.mh-mem figcaption,.mh-chart figcaption,.mh-addr figcaption,.mh-term figcaption{margin-top:14px;font-size:14.5px;line-height:1.5;color:var(--dim)}

/* the tests of an Extended pass: one bar per test, one linear scale */
.mh-chart{margin:0}
.mh .mh-ch{margin:0 0 8px;font-size:14.5px;color:var(--dim)}
.mh-bars{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.mh-bars-p{margin-bottom:22px}
.mh-b{position:relative;display:grid;grid-template-columns:minmax(7.5em,11em) minmax(0,1fr) 6.2em;gap:12px;align-items:center;min-height:30px;padding:2px 6px;border-radius:6px;outline:none}
.mh-b:hover,.mh-b:focus-visible{background:color-mix(in srgb,var(--ink) 7%,transparent)}
.mh-b:focus-visible{outline:2px solid var(--led);outline-offset:1px}
.mh .mh-bn{font-size:15px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mh-bn code{font-size:14px}
.mh-bt{display:block;height:14px}
.mh-bt i{display:block;height:100%;min-width:4px;border-radius:0 4px 4px 0;background:var(--g-std)}
.mh-gate .mh-bt i{background:var(--g-gate)}
.mh-quick .mh-bt i{background:var(--g-quick)}
.mh-cmp .mh-bt i{background:var(--g-cmp)}
.mh-pass .mh-bt i{background:var(--dim)}
.mh .mh-bv{font-family:var(--mono);font-size:14px;color:var(--ink);text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.mh-tip{position:absolute;z-index:3;left:calc(min(11em,40%) + 18px);bottom:calc(100% + 4px);max-width:min(440px,70vw);padding:9px 12px;border:1px solid var(--rule-hi);border-radius:8px;background:#0B0F12;color:var(--ink);font-size:14px;line-height:1.45;box-shadow:0 8px 24px rgba(0,0,0,.45);opacity:0;visibility:hidden;transition:opacity .12s;pointer-events:none}
.mh-b:hover .mh-tip,.mh-b:focus-visible .mh-tip{opacity:1;visibility:visible}
.mh-legend-k{margin:0 0 12px}
.mh-k{display:block;width:14px;height:14px;border-radius:3px;flex:none;background:var(--g-std)}
.mh-k.mh-gate{background:var(--g-gate)}
.mh-k.mh-quick{background:var(--g-quick)}
.mh-k.mh-cmp{background:var(--g-cmp)}
.mh-table{margin-top:18px}
.mh-table summary{cursor:pointer;color:var(--ink);font-size:15px}
.mh-tw{overflow-x:auto;margin-top:12px}
.mh table{border-collapse:collapse;width:100%;font-size:14.5px}
.mh th,.mh td{padding:7px 10px;border-bottom:1px solid var(--rule);text-align:left;vertical-align:top;color:var(--ink)}
.mh th{color:var(--dim);font-weight:600}
.mh .mh-num{text-align:right;font-variant-numeric:tabular-nums;font-family:var(--mono)}
@media (max-width:640px){
  .mh-b{grid-template-columns:minmax(0,1fr) 5.4em;grid-template-areas:"n v" "t t";row-gap:4px;padding-block:5px}
  .mh-bn{grid-area:n}.mh-bt{grid-area:t}.mh-bv{grid-area:v}
  .mh-tip{left:6px;max-width:calc(100% - 12px)}
}

/* the address test */
.mh-addr{margin:0}
.mh-ats{display:grid;gap:16px}
@media (min-width:560px){.mh-ats{grid-template-columns:1fr 1fr}}
.mh-at{padding:14px 16px;border:1px solid var(--rule-hi);border-radius:12px;background:var(--term,#0B0F12)}
.mh .mh-at>p{margin:0 0 8px;font-weight:600;color:var(--ok)}
.mh .mh-at-bad>p{color:var(--bad)}
.mh-at table{font-family:var(--mono);font-size:14px}
.mh-at td,.mh-at th{padding:4px 6px}
.mh-at td span{color:var(--ok)}
.mh-at tr.mh-bad td{color:#ffd0cc}
.mh-at tr.mh-bad td:last-child{color:var(--bad);font-weight:600}
.mh-at tr.mh-bad td span{color:var(--bad)}

/* the six results */
.mh-results{display:grid;gap:16px;margin:0;padding:0;list-style:none}
@media (min-width:700px){.mh-results{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1100px){.mh-results{grid-template-columns:repeat(3,minmax(0,1fr))}}
.mh-r{padding:20px 22px;border:1px solid var(--rule-hi);border-left:4px solid var(--warn);border-radius:12px;background:var(--term,#0B0F12)}
.mh-r-ok{border-left-color:var(--ok)}
.mh-r-bad{border-left-color:var(--bad)}
.mh-word{display:block;margin-bottom:10px;font-family:"MH VGA",var(--mono);font-weight:400;font-size:30px;line-height:1;letter-spacing:.02em;color:var(--warn)}
.mh-r-ok .mh-word{color:var(--ok)}
.mh-r-bad .mh-word{color:var(--bad)}
.mh .mh-r p{margin:0 0 6px;font-size:15.5px}
.mh .mh-r .mh-do{margin:0;color:var(--dim)}
.mh .mh-exit{margin:22px 0 0;color:var(--dim);font-size:15px}

/* the 80x25 window: the VGA font, one cell = 0.5em x 1em, so 80 columns are 40em */
.mh-term{margin:0 auto;max-width:1000px}
.mh-tbar{display:flex;gap:12px;align-items:center;padding:10px 14px;border:1px solid var(--rule-hi);border-bottom:0;border-radius:12px 12px 0 0;background:#1b2328}
.mh-dots{display:flex;gap:6px}.mh-dots i{width:10px;height:10px;border-radius:50%;background:#3a464d}
.mh .mh-cmd{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;color:var(--dim)}
.mh-size{font-family:var(--mono);font-size:12.5px;color:var(--dim)}
.mh-scr{container-type:inline-size;padding:10px;border:1px solid var(--rule-hi);background:#000}
.mh-tx{margin:0;padding:0;font-family:"MH VGA",monospace;font-size:calc(100cqw / 40);line-height:1;letter-spacing:0;white-space:pre;color:#aaa;background:#000;overflow:hidden;tab-size:8;font-kerning:none;font-variant-ligatures:none;-webkit-font-smoothing:none;font-smooth:never}
.mh-tx .l{display:block;height:1em;overflow:hidden;white-space:pre}
.mh-tx span{line-height:1}
.mh-tx i{display:inline-block;width:.5814em;overflow:hidden;vertical-align:top;font-style:normal;font-family:"DejaVu Sans Mono","Noto Sans Mono","Noto Sans Symbols 2",monospace;font-size:.86em;line-height:1.163;text-align:center}
.mh-ctl{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:center;padding:12px 14px;border:1px solid var(--rule-hi);border-top:0;border-radius:0 0 12px 12px;background:#1b2328}
.mh-ctl[hidden]{display:none}
.mh-tabs{display:flex;gap:8px}
.mh-tab,.mh-play{font:600 14px/1 var(--sans);padding:9px 14px;border-radius:999px;border:1px solid var(--rule-hi);background:transparent;color:var(--ink);cursor:pointer}
.mh-tab[aria-pressed="true"]{border-color:var(--led);color:var(--led)}
.mh-tab:hover,.mh-play:hover{border-color:var(--led)}
.mh-tab:focus-visible,.mh-play:focus-visible{outline:2px solid var(--led);outline-offset:2px}
.mh-prog{flex:1 1 160px;height:4px;border-radius:2px;background:var(--rule-hi);overflow:hidden}
.mh-prog i{display:block;height:100%;width:0;background:var(--led)}
.mh-term:not(:has(.mh-ctl:not([hidden]))) .mh-scr{border-radius:0 0 12px 12px}
.mh-term figcaption small{display:block;margin-top:4px;font-size:13px}

/* commands and downloads */
.mh-opts{display:grid;gap:12px;margin:0}
.mh-opts div{padding:12px 14px;border:1px solid var(--rule-hi);border-radius:10px;background:color-mix(in srgb,var(--term,#0B0F12) 70%,transparent)}
.mh-opts dt code{font-size:14px;color:var(--led)}
.mh .mh-opts dd{margin:6px 0 0;font-size:15.5px;line-height:1.5;color:var(--ink)}
.mh-dl{display:grid;gap:12px;margin:0 0 clamp(40px,5vw,72px);padding:0;list-style:none}
@media (min-width:760px){.mh-dl{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}}
.mh-dl a{display:grid;gap:6px;height:100%;padding:16px 18px;border:1px solid var(--rule-hi);border-radius:12px;text-decoration:none;background:color-mix(in srgb,var(--panel,#151C21) 80%,transparent)}
.mh-dl a:hover,.mh-dl a:focus-visible{border-color:var(--led)}
.mh-dl b{font-family:var(--mono);font-size:14.5px;font-weight:500;color:var(--led);overflow-wrap:anywhere}
.mh-dl small{font-size:14.5px;line-height:1.4;color:var(--ink)}
.mh-live h3{margin-bottom:12px}
.mh .mh-md{margin:26px 0 0;color:var(--dim);font-size:15px}

@media (prefers-reduced-motion:reduce){.mh-tip{transition:none}}
