/* ─────────────────────────────────────────────────────────────────────────────
   MOWGLI·SCAN — history.css (ticker-history-blade task 2, R2.1, D3)
   The ⌥H history blade only (`hist-` prefix). Geometry copied from the ⌥A
   alert-log blade (alerts.css #alr-blade): a fixed right-hand drawer over any
   screen (the page does not move), under the top bar, above the status bar,
   380px; above the detail modal (500), below dialogs (900) and toasts (950).
   No transition — it appears. The toast offset for either blade lives in
   alerts.css (body[data-right-blade]).
   ───────────────────────────────────────────────────────────────────────── */
#hist-blade{display:none;position:fixed;top:var(--topbar-h,40px);right:0;bottom:var(--statusbar-h,24px);width:380px;max-width:100vw;box-sizing:border-box;z-index:600;background:var(--bg-1);border:0;border-left:1px solid var(--border);border-radius:0;box-shadow:var(--shadow-menu);font-family:var(--font-mono)}
#hist-blade[data-open="1"]{display:flex}
#hist-blade:focus{outline:none}
.hist-blade__hd{justify-content:flex-start;gap:8px}
.hist-blade__status{flex:1 1 auto;min-width:0;font-variant-numeric:tabular-nums}
.hist-blade__hd .mws-btn{padding:0 5px}

/* rows: ticker · ago · source tag, one terminal line each */
.hist-row{display:grid;grid-template-columns:minmax(0,1fr) auto 72px;align-items:center;column-gap:8px;width:100%;box-sizing:border-box;padding:6px 8px;background:transparent;border:0;border-bottom:1px solid var(--border-dim);border-radius:0;color:var(--fg-1);font-family:var(--font-mono);font-size:12px;text-align:left;cursor:pointer}
.hist-row:hover{background:var(--bg-4)}
.hist-row:focus{outline:none;background:var(--bg-3);box-shadow:inset 2px 0 0 var(--green)}
.hist-row__t{color:var(--green);font-weight:700;letter-spacing:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hist-row__ago{color:var(--fg-mute);font-variant-numeric:tabular-nums;white-space:nowrap}
.hist-row__src{justify-self:end}
.hist-empty{padding:12px 8px;font-size:.66rem;color:var(--fg-mute)}

/* row-open progress / miss line — an off-grid ticker is probed before it opens */
.hist-note{flex-shrink:0;padding:4px 8px;border-top:1px solid var(--border-dim);font-size:.62rem;color:var(--fg-mute)}
.hist-note:empty{display:none}
.hist-note--miss{color:var(--amber)}

/* footer: clear history, with a confirm step */
.hist-foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-shrink:0;padding:6px 8px;border-top:1px solid var(--border-dim)}
.hist-foot:empty{display:none}
.hist-foot__q{flex:1 1 auto;min-width:0;font-size:.62rem;color:var(--fg-2)}

/* phone: the rail is a bottom tab bar (app.css) — the alerts blade's rule:
   full width, stopping above the tab bar */
@media (max-width:768px){
  #hist-blade{left:0;width:auto;border-left:0;bottom:calc(var(--statusbar-h,24px) + var(--mtab-h,44px))}
}
