/* ════════════════════════════════════════════════════════════════════════════
   109-home.css  the Overview, the SEC area's start page (/overview),
   2026-11-21: a launcher. static/js/sec-home.js builds it in #shm-root.
   Mock: research_notes/premium_1121/mock/home2/.

   APPENDED LAST; owns only .shm-* (checked against every other prefix).
   Colours only from tokens.css.

   ONE UNIT. Every size is N x --shm-u, N being the mock's px at 1680 wide,
   where the app's fluid root is 15.37px: the page grows with the root on
   big screens, floored at 0.85px on small ones, exactly 1px on a phone.
   ════════════════════════════════════════════════════════════════════════════ */

.shm-surface{
  --shm-u:max(0.85px, calc(1rem / 15.372));
  position:absolute;inset:0;display:none;flex-direction:column;min-width:0;min-height:0;
  background:var(--bg-primary);color:var(--text-primary);
  font-family:var(--font-sans);font-size:calc(15 * var(--shm-u));line-height:1.4;
}
:root.phone .shm-surface{--shm-u:1px;}
#research-view[data-rsx-mode="overview"] .shm-surface{display:flex;}
#research-view[data-rsx-mode="overview"] #research-iframe{display:none;}
#research-view[data-rsx-mode="overview"] .research-panel{display:none!important;}
#research-view[data-rsx-mode="overview"] .rf-surface{display:none;}
.shm-surface [hidden]{display:none!important;}

/* ── head: the app's page bar (main's geometry): code + title, the state ── */
.shm-bar{flex:none;display:flex;align-items:center;gap:max(8px, 0.5683rem);min-width:0;
  height:max(36px, 2.557rem);padding:0 max(12px, 0.8525rem);box-sizing:border-box;
  box-shadow:inset 0 -1px 0 var(--border-default);}
.shm-title{flex:none;margin:0;font-size:max(14px, 0.9946rem);font-weight:600;line-height:1;white-space:nowrap;}
.shm-code{color:var(--text-muted);font-weight:600;margin-right:6px;}
.shm-live{margin-left:auto;display:flex;align-items:center;gap:6px;min-width:0;color:var(--text-muted);
  font-size:max(12px, 0.8525rem);white-space:nowrap;}
.shm-live i{flex:none;width:6px;height:6px;border-radius:50%;background:var(--status-ok);}
.shm-live:not([data-state="ok"]) i{background:var(--status-warn);}

/* ── the launcher: one centred column ───────────────────────────────────── */
.shm-main{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;display:flex;justify-content:center;
  padding:calc(120 * var(--shm-u)) calc(24 * var(--shm-u)) calc(48 * var(--shm-u));}
.shm-col{width:100%;max-width:calc(560 * var(--shm-u));min-width:0;animation:shm-in 200ms cubic-bezier(0.22,0.8,0.18,1) both;}
/* a refused competition join: one quiet line over the field, first visit only */
.shm-note{margin:0 0 calc(16 * var(--shm-u));padding:calc(10 * var(--shm-u)) calc(14 * var(--shm-u));border-radius:calc(10 * var(--shm-u));
  background:var(--bg-secondary);box-shadow:inset 0 0 0 1px var(--border-default);
  color:var(--text-primary);font-size:calc(13 * var(--shm-u));line-height:1.45;}
.shm-note[hidden]{display:none;}
@keyframes shm-in{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}

/* the field (Premium: an input; Free: a locked button of the same look) */
.shm-find{display:flex;align-items:center;gap:calc(12 * var(--shm-u));width:100%;height:calc(48 * var(--shm-u));
  padding:0 calc(14 * var(--shm-u)) 0 calc(16 * var(--shm-u));box-sizing:border-box;margin:0;border:0;
  border-radius:calc(10 * var(--shm-u));background:var(--bg-secondary);color:var(--text-muted);
  font:inherit;text-align:left;cursor:text;box-shadow:inset 0 0 0 1px var(--border-subtle);
  transition:box-shadow 120ms linear;}
button.shm-find{cursor:pointer;}
.shm-find:hover{box-shadow:inset 0 0 0 1px var(--border-default);transition:none;}
.shm-find:focus-within,button.shm-find:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--accent);}
.shm-sico{flex:none;width:calc(16 * var(--shm-u));height:calc(16 * var(--shm-u));fill:none;stroke:currentColor;stroke-width:1.6;}
.shm-q{flex:1 1 auto;min-width:0;height:100%;padding:0;border:0;outline:none;background:transparent;
  color:var(--text-primary);font:inherit;}
.shm-q::placeholder{color:var(--text-muted);opacity:1;}
.shm-ph{flex:1 1 auto;min-width:0;}
.shm-kbd{flex:none;display:grid;place-items:center;min-width:calc(20 * var(--shm-u));height:calc(20 * var(--shm-u));
  border-radius:4px;font:inherit;font-size:calc(12 * var(--shm-u));color:var(--text-muted);
  box-shadow:inset 0 0 0 1px var(--border-default);}
.shm-find:focus-within .shm-kbd{display:none;}
button.shm-find .pln-lk{margin-left:auto;}

/* the rows */
.shm-list{display:flex;flex-direction:column;margin-top:calc(32 * var(--shm-u));}
.shm-row{position:relative;display:flex;align-items:center;gap:calc(14 * var(--shm-u));height:calc(56 * var(--shm-u));
  padding:0 calc(16 * var(--shm-u));margin:0 calc(-16 * var(--shm-u));border-radius:calc(10 * var(--shm-u));
  color:var(--text-primary);text-decoration:none;font-weight:500;outline:none;
  transition:background 120ms linear,transform 80ms cubic-bezier(0.22,0.8,0.18,1);}
.shm-row + .shm-row::before{content:"";position:absolute;left:calc(16 * var(--shm-u));right:calc(16 * var(--shm-u));top:0;
  height:1px;background:var(--border-subtle);}
.shm-row:hover::before,.shm-row:hover + .shm-row::before,
.shm-row:focus-visible::before,.shm-row:focus-visible + .shm-row::before{opacity:0;}
.shm-row:hover{background:var(--bg-row-hover);transition:none;}
.shm-row:active{transform:scale(0.995);}
.shm-row:focus-visible{box-shadow:inset 0 0 0 2px var(--accent);}
.shm-ico{flex:none;width:calc(18 * var(--shm-u));height:calc(18 * var(--shm-u));color:var(--text-secondary);}
.shm-name{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.shm-n{flex:none;color:var(--text-muted);font-size:calc(13 * var(--shm-u));font-weight:400;font-variant-numeric:tabular-nums;}
.shm-n:empty{display:none;}
.shm-row .pln-lk{margin-left:auto;}

/* ── phone: the same column, full width ─────────────────────────────────── */
:root.phone .shm-main{padding:24px 16px;}
:root.phone .shm-row{margin:0 -8px;padding:0 8px;}
:root.phone .shm-row + .shm-row::before{left:8px;right:8px;}
:root.phone .shm-kbd{display:none;}

@media (prefers-reduced-motion: reduce){
  .shm-col{animation:none;}
  .shm-row:active{transform:none;}
}
