
  /* ---- Theme Rotation Desk ---- */
  .mctx { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; font-size:12.5px;
    background:var(--panel2); border:1px solid var(--line); border-radius:9px; padding:8px 12px; margin:6px 0 12px; }
  .mctx b { font-weight:650; }
  .mctx .mc-k { color:var(--muted); }
  .desk { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:13px; }
  .tcard { background:var(--panel); border:1px solid var(--line); border-left:4px solid var(--tc,#888);
    border-radius:11px; padding:12px 13px 11px; scroll-margin-top:14px; transition:border-color .15s; }
  .tcard:hover { border-color:var(--muted); }
  .tcard .top { display:flex; align-items:center; gap:8px; }
  .tcard .nm { font-weight:660; font-size:14.5px; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .tcard .sc { font-size:23px; font-weight:720; font-variant-numeric:tabular-nums; line-height:1; }
  .tcard .sc small { font-size:11px; color:var(--muted); font-weight:500; }
  .tlabel { font-size:10px; font-weight:700; letter-spacing:.05em; padding:2px 7px; border-radius:6px; text-transform:uppercase; white-space:nowrap; }
  .treco { font-size:11px; font-weight:700; letter-spacing:.03em; padding:2px 9px; border-radius:7px; white-space:nowrap; }
  .tcard .subrow { display:flex; align-items:center; gap:10px; margin:8px 0 7px; font-size:12px; color:var(--muted); }
  .tcard .subrow .spark { margin-left:auto; }
  .cbar { display:flex; height:7px; border-radius:5px; overflow:hidden; background:var(--line); margin:7px 0 6px; }
  .cbar i { display:block; height:100%; }
  .clegend { display:flex; flex-wrap:wrap; gap:3px 11px; font-size:10.5px; color:var(--muted); margin-bottom:6px; }
  .clegend span b { color:var(--text); font-variant-numeric:tabular-nums; font-weight:600; }
  .clegend .sw { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:3px; vertical-align:middle; }
  .treason { font-size:11.5px; color:var(--text); opacity:.85; line-height:1.4; margin:2px 0 6px; }
  .tstats { display:flex; flex-wrap:wrap; gap:4px 6px; font-size:10.5px; }
  .tpill { background:var(--panel2); border:1px solid var(--line); border-radius:6px; padding:1px 6px; color:var(--muted); }
  .tpill b { color:var(--text); font-variant-numeric:tabular-nums; }
  .tcard details > summary { font-size:11.5px; margin:6px 0 0; }
  .tcard .why { font-size:11.5px; color:var(--muted); margin:5px 0 0; max-width:none; }
  .tmore > summary { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted);
    cursor:pointer; list-style:none; user-select:none; margin:6px 0 0; display:flex; align-items:center; gap:4px; }
  .tmore > summary::-webkit-details-marker { display:none; }
  .tmore > summary::before { content:'▾'; display:inline-block; transition:transform .18s; }
  .tmore[open] > summary::before { transform:rotate(-180deg); }
  .tglyph { margin:3px 0 0; }

  /* ---- mobile: 2-up compact desk cards ----
     On phones the desk would otherwise stack one big card per row and scroll on and on.
     Pack two smaller cards per row + shrink type/padding so more fits per screen; the
     3-row cap (data-showmore-rows) then keeps the initial list short. Decorative micro-
     tags (shape-read labels) are dropped here to keep the dense card legible when narrow. */
  @media (max-width:680px){
    .desk { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .desk .tcard { padding:9px 9px 8px; border-left-width:3px; border-radius:9px; }
    .desk .tcard .top { gap:5px; }
    .desk .tcard .nm { font-size:12.5px; }
    .desk .tcard .sc { font-size:17px; } .desk .tcard .sc small { font-size:9px; }
    .desk .tlabel { font-size:8.5px; letter-spacing:.02em; padding:1px 5px; }
    .desk .treco { font-size:8.5px; padding:1px 5px; }
    .desk .tcard .subrow { flex-wrap:wrap; gap:4px 7px; margin:6px 0 5px; font-size:10.5px; }
    .desk .tcard .subrow .spark svg { width:52px; height:18px; }
    .desk .cbar { height:6px; margin:6px 0 5px; }
    .desk .termstrip { font-size:9.5px; gap:3px 5px; }
    .desk .tsc { padding:1px 4px; }
    .desk .termstrip .tspat, .desk .termstrip .tstag, .desk .flipcap .tstag { display:none; }
    .desk .flipcap { font-size:9.5px; }
    .desk .txrow { gap:3px 5px; margin:2px 0 5px; font-size:9.5px; }
    .desk .tflag { font-size:9px; padding:1px 4px; }
    .desk .tstats { font-size:9.5px; gap:3px 5px; } .desk .tpill { padding:1px 5px; }
    .desk .treason { font-size:10.5px; line-height:1.35; }
    .desk .tcard details > summary { font-size:10.5px; }
    .desk .tcard .why { font-size:10.5px; }
    .desk .detail-link { font-size:10.5px; margin-top:6px; padding-top:6px; }
  }

  /* ---- 5-day rotation ---- */
  .rotwrap { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
  @media (max-width:640px){ .rotwrap{ grid-template-columns:1fr; } }
  .rotcol { background:var(--panel); border:1px solid var(--line); border-radius:11px; padding:10px 12px; }
  .rotcol h4 { margin:0 0 6px; font-size:13px; display:flex; align-items:center; gap:6px; }
  .rotrow { display:flex; align-items:center; gap:8px; padding:5px 0; border-top:1px solid var(--line); font-size:12.5px; }
  .rotrow:first-of-type { border-top:0; }
  .rotrow .rn { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .rotrow .rv { font-variant-numeric:tabular-nums; font-weight:650; }
  .rotrow .rk { font-size:10.5px; color:var(--muted); width:34px; text-align:right; }

  /* ---- impulse / extremes scorecards ---- */
  .scards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:13px; }
  .scard { background:var(--panel); border:1px solid var(--line); border-radius:11px; padding:13px 15px; }
  .scard .sk { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
  .scard .bigrow { display:flex; align-items:baseline; gap:14px; margin:7px 0 8px; }
  .scard .big { font-size:30px; font-weight:720; font-variant-numeric:tabular-nums; line-height:1; }
  .scard .big.dn { color:var(--down); } .scard .big.up { color:var(--up); }
  .scard .sublbl { font-size:11px; color:var(--muted); }
  .duo { display:flex; height:9px; border-radius:6px; overflow:hidden; background:var(--line); margin-top:4px; }
  .duo i { height:100%; display:block; }
  .scard .net { font-size:12.5px; font-variant-numeric:tabular-nums; margin-top:7px; }
  .scard.clk { cursor:pointer; transition:border-color .15s, transform .08s; }
  .scard.clk:hover { border-color:var(--muted); }
  .scard.clk:active { transform:translateY(1px); }
  .scm-hint { font-size:10.5px; color:var(--link); margin-top:9px; opacity:.9; }
  /* ---- scorecard detail popup ---- */
  .scmodal { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:200; display:none;
    align-items:flex-start; justify-content:center; padding:6vh 14px; }
  .scmodal.open { display:flex; }
  .scm-card { background:var(--panel); border:1px solid var(--line); border-radius:14px;
    box-shadow:0 24px 60px rgba(0,0,0,.45); width:min(760px,96vw); max-height:84vh; overflow:auto;
    padding:16px 18px 18px; position:relative; }
  .scm-x { position:absolute; top:10px; right:12px; background:none; border:0; color:var(--muted);
    font-size:17px; cursor:pointer; line-height:1; }
  .scm-x:hover { color:var(--text); }
  .scm-hd { font-size:16px; font-weight:740; margin:0 24px 2px 0; }
  .scm-sub { font-size:12px; color:var(--muted); margin:0 0 12px; }
  .scm-2col { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
  .scm-3col { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }
  @media (max-width:620px){ .scm-2col,.scm-3col { grid-template-columns:1fr; } }
  .scm-col { min-width:0; }
  .scm-colh { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted);
    padding-bottom:6px; border-bottom:1px solid var(--line); margin-bottom:2px; }
  .scm-colh b { color:var(--text); font-variant-numeric:tabular-nums; }
  .scm-colh.up { color:var(--up); } .scm-colh.dn { color:var(--down); }
  .scm-row { display:flex; align-items:center; gap:8px; padding:5px 2px; border-bottom:1px solid var(--line); font-size:12.5px; color:inherit; }
  .scm-row:last-child { border-bottom:0; }
  a.scm-row:hover { background:var(--panel2); }
  .scm-nm { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:620; }
  .scm-tk { color:var(--muted); font-weight:400; font-size:11px; margin-left:5px; }
  .scm-th { font-size:10.5px; color:var(--muted); border:1px solid var(--line); border-radius:5px;
    padding:0 6px; white-space:nowrap; max-width:130px; overflow:hidden; text-overflow:ellipsis; }
  a.scm-th:hover { color:var(--link); border-color:var(--link); }
  .scm-r { font-variant-numeric:tabular-nums; font-weight:700; min-width:46px; text-align:right; }
  .scm-empty { color:var(--muted); font-size:12px; padding:8px 2px; }

  /* ---- bell dropdown ---- */
  .bell { position:relative; }
  .bell-btn { background:var(--panel); border:1px solid var(--line); border-radius:9px; cursor:pointer;
    font-size:15px; line-height:1; padding:6px 9px; color:var(--text); position:relative; }
  .bell-btn:hover { border-color:var(--muted); }
  .bell-badge { position:absolute; top:-6px; right:-6px; background:var(--down); color:#fff; font-size:10px;
    font-weight:700; min-width:16px; height:16px; border-radius:9px; padding:0 4px; display:none;
    align-items:center; justify-content:center; }
  .bell-badge.on { display:flex; }
  .bell-menu { position:absolute; right:0; top:calc(100% + 8px); width:340px; max-width:86vw; max-height:60vh;
    overflow-y:auto; background:var(--panel); border:1px solid var(--line); border-radius:12px;
    box-shadow:0 18px 44px rgba(0,0,0,.34); padding:8px; z-index:60; display:none; }
  .bell-menu.open { display:block; }
  .bell-menu .bhd { font-size:12px; font-weight:650; padding:4px 6px 7px; display:flex; align-items:center; gap:6px; border-bottom:1px solid var(--line); }
  .bell-item { display:block; padding:8px 7px; border-radius:8px; border-bottom:1px solid var(--line); cursor:pointer; }
  .bell-item:last-child { border-bottom:0; }
  .bell-item:hover { background:var(--panel2); }
  .bell-item .bi-hl { font-size:12.5px; font-weight:600; line-height:1.35; }
  .bell-item .bi-dt { font-size:10.5px; color:var(--muted); margin-top:2px; }
  .bell-empty { padding:14px 8px; color:var(--muted); font-size:12px; text-align:center; }
  .sect-tag { font-size:11px; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:1px 6px; font-weight:600; }
  /* ---- card textures + detail link ---- */
  .tcard .nm { color:inherit; } .tcard a.nm:hover { color:var(--link); }
  .txrow { display:flex; flex-wrap:wrap; gap:4px 6px; margin:2px 0 6px; }
  .tpill.warn { color:var(--warn); } .tpill.neg { color:var(--down); }
  .tflag { font-size:10px; font-weight:700; border:1px solid; border-radius:6px; padding:1px 6px; }
  .tflag.up { color:var(--up); border-color:var(--up); } .tflag.dn { color:var(--down); border-color:var(--down); } .tflag.wn { color:var(--warn); border-color:var(--warn); }
  .detail-link { display:inline-block; margin-top:8px; font-size:11.5px; color:var(--link); border-top:1px solid var(--line); padding-top:7px; width:100%; }
  .detail-link:hover { text-decoration:underline; }
  /* ---- concentration ---- */
  .adgrid { display:flex; gap:14px; }
  .adc { text-align:center; } .adc .k { font-size:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
  .adc .v { font-size:17px; font-weight:700; font-variant-numeric:tabular-nums; }
  /* ---- what to act on now ---- */
  .anwrap { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .anwrap.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .anwrap.four  { grid-template-columns:repeat(4,minmax(0,1fr)); }
  @media (max-width:1200px){ .anwrap.four{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
  @media (max-width:980px){ .anwrap.three,.anwrap.four{ grid-template-columns:1fr; } }
  @media (max-width:680px){ .anwrap{ grid-template-columns:1fr; } }
  .ancol { background:var(--panel); border:1px solid var(--line); border-radius:11px; padding:10px 13px; min-width:0; }
  .anh { margin:0 0 4px; font-size:13px; } .anh.buy { color:var(--up); } .anh.red { color:var(--down); }
  .anh.wait { color:var(--warn); }
  .anrow { display:flex; align-items:center; gap:9px; padding:7px 4px; border-top:1px solid var(--line); border-radius:7px; color:inherit; min-width:0; }
  .anrow:hover { background:var(--panel2); }
  .anverb { font-size:10px; font-weight:700; border:1px solid; border-radius:6px; padding:1px 6px; white-space:nowrap; }
  .anrow .rn { font-weight:650; white-space:nowrap; min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .anwhy { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ansc { font-variant-numeric:tabular-nums; font-weight:700; }
  /* ---- W4 Velocity / Heat pills (DESCRIPTIVE — rank/score trajectory, not a forecast) ---- */
  /* heat-pill: inline chip next to the label on each theme card */
  .heat-pill { font-size:9.5px; font-weight:700; letter-spacing:.04em; padding:1px 5px; border-radius:5px;
    white-space:nowrap; border:1px solid; margin-left:3px; }
  .heat-pill.heating { color:var(--up); border-color:var(--up); background:rgba(34,197,94,.10); }
  .heat-pill.hot     { color:var(--orange); border-color:var(--orange); background:color-mix(in srgb, var(--orange) 12%, transparent); }
  .heat-pill.cooling { color:var(--warn); border-color:var(--warn); background:rgba(251,146,60,.10); }
  .heat-pill.broken  { color:var(--down); border-color:var(--down); background:rgba(248,113,113,.10); opacity:.8; }
  /* heat-dot: compact no-text indicator used in rotrow / lead row contexts */
  .heat-dot { width:7px; height:7px; border-radius:50%; display:inline-block; flex-shrink:0;
    vertical-align:middle; margin-right:4px; border:0; padding:0; font-size:0; }
  /* rotation subtitle */
  .rot-sub { font-size:11.5px; color:var(--muted); margin:4px 0 8px; font-style:italic; }
  /* 20d rank trajectory context appended in rk span */
  .rk20 { font-size:9.5px; opacity:.72; font-variant-numeric:tabular-nums; }
  /* act-now merged pulse strip */
  .pulse-bar { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; font-size:12px;
    padding:7px 10px; border:1px solid var(--line); border-radius:9px;
    background:var(--panel2); margin:0 0 10px; }
  .pulse-grp { white-space:normal; }
  .pulse-grp a { color:var(--link); text-decoration:none; }
  .pulse-grp a:hover { text-decoration:underline; }
  .pulse-size { border:1px solid color-mix(in srgb, var(--warn) 45%, var(--line));
    border-left:3px solid var(--warn); border-radius:7px; padding:2px 8px;
    background:color-mix(in srgb, var(--warn) 8%, transparent); cursor:default; }

  /* ---- Leadership Health (display-only shape/fragility reads) ---- */
  .tflag.mut { color:var(--muted); border-color:var(--line); font-weight:600; }
  .flipcap { font-size:10.5px; color:var(--warn); margin:3px 0 0; font-variant-numeric:tabular-nums; }
  .termstrip { display:flex; flex-wrap:wrap; align-items:center; gap:4px 7px; margin:2px 0 6px; font-size:10.5px; }
  .tsc { background:var(--panel2); border:1px solid var(--line); border-radius:6px; padding:1px 6px; color:var(--muted); }
  .tsc b { font-variant-numeric:tabular-nums; font-weight:650; }
  .tsc.pos b { color:var(--up); } .tsc.neg b { color:var(--down); }
  .tspat { font-weight:650; color:var(--text); opacity:.85; }
  .tstag { color:var(--muted); font-size:9.5px; border:1px solid var(--line); border-radius:5px; padding:0 4px; }
  /* validated sleeve-size chip (CN drawdown radar; payload-gated, display-only) */
  .sleeve-chip { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; background:var(--panel2);
    border:1px solid var(--line); border-radius:9px; padding:8px 12px; margin:8px 0 2px; font-size:12.5px; }
  .sleeve-chip .sl-main b { font-weight:680; }
  .sleeve-chip .sl-tag { font-size:10.5px; font-style:italic; }

  /* ---- W8-R5 CN basket turn-state chips (display-tier, expected-NULL; FT-R1) ---- */
  /* Tape-state chip: inline, descriptive, no forward verbs. */
  .tape-chip { font-size:9.5px; font-weight:700; letter-spacing:.04em; padding:1px 6px;
    border-radius:5px; white-space:nowrap; border:1px solid; margin-left:3px; cursor:default; }
  .tape-chip.TURNING  { color:var(--up);   border-color:var(--up);   background:rgba(34,197,94,.10); }
  .tape-chip.CONFIRMED{ color:var(--up);   border-color:var(--up);   background:rgba(34,197,94,.16); }
  .tape-chip.WASHED_OUT{ color:var(--warn);border-color:var(--warn); background:rgba(251,146,60,.10); }
  .tape-chip.BASING   { color:var(--warn); border-color:var(--warn); background:rgba(251,146,60,.08); }
  .tape-chip.FALLING  { color:var(--down); border-color:var(--down); background:rgba(248,113,113,.10); }
  /* Dual-read chip: when trend DISAGREES with tape turn (FT-R1 — never merged) */
  .dual-chip { display:inline-flex; align-items:center; gap:3px; font-size:9.5px; font-weight:700;
    letter-spacing:.03em; padding:1px 6px; border-radius:5px; border:1px solid var(--warn);
    background:rgba(251,146,60,.10); color:var(--text); cursor:default; white-space:nowrap; }
  .dual-chip .dc-trend { color:var(--down); }
  .dual-chip .dc-sep   { color:var(--muted); font-weight:400; }
  .dual-chip .dc-tape  { color:var(--up); }
