/* Home (static/js/home.js) */
.home { position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hm-hello h1 { font-size: 28px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.hm-hello h1 .hm-name { color: var(--ink-2); }
.hm-hello p { margin: 6px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.hm-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.hm-main, .hm-side { min-width: 0; }

/* market depth */
.hm-depth { padding: 16px 18px 18px; overflow: hidden; }
.hm-depth-h { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.hm-depth-h > .kicker { justify-self: end; }
.hm-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.hm-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.hm-live.on i { background: var(--bull); animation: pulse 2s infinite; }
.hm-live.stale { color: var(--amber); } .hm-live.stale i { background: var(--amber); }
.hm-bb { display: flex; gap: 34px; }
.hm-b { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.hm-b b { font-weight: 800; position: relative; } .hm-b .mono { font-size: 18px; letter-spacing: -.02em; font-weight: 700; position: relative; }
.hm-b.bull { color: var(--bull); } .hm-b.bear { color: var(--bear); }
.hm-b .blob { width: 70px; height: 34px; top: 2px; left: 50%; transform: translateX(-50%); opacity: .35; }
.hm-depth-ch { margin-top: 6px; }
.hm-depth-svg text { font: 600 10px/1 var(--font-mono); fill: var(--ink-3); }
.hm-depth-svg .hit { cursor: crosshair; }
.hm-depth-svg .hm-cross, .hm-sec-svg .hm-cross { stroke: var(--ink-3); stroke-dasharray: 2 2; }
.hm-depth-sub { display: flex; justify-content: center; gap: 6px 22px; flex-wrap: wrap; font-size: 11.5px; margin-top: 2px; text-align: center; }
.hm-ds { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; } .hm-ds .kicker { font-size: 9.5px; flex: none; }
.hm-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.hm-board { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hm-bh { display: flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.hm-bh b { font-weight: 800; }
.hm-bh .sub { margin-left: auto; font-size: 11.5px; letter-spacing: 0; text-transform: none; }
.hm-bi { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; }
.hm-bi svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.hm-bi.bull { color: var(--bull); background: var(--bull-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bull) 35%, transparent); }
.hm-bi.bear { color: var(--bear); background: var(--bear-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bear) 35%, transparent); }
.hm-bc { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(0, 1.4fr); grid-template-rows: 1fr auto; grid-template-areas: "id ch" "f ch"; gap: 6px 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); min-width: 0; height: 86px; transition: border-color var(--fast), transform var(--fast), box-shadow var(--fast); }
.hm-bc:hover { text-decoration: none; transform: translateY(-1px); }
.hm-bc.bull { border: 1px solid color-mix(in srgb, var(--bull) 30%, var(--line)); background: radial-gradient(100% 120% at 0% 0%, color-mix(in srgb, var(--bull) 12%, transparent), transparent 60%), var(--surface-2); }
.hm-bc.bear { border: 1px solid color-mix(in srgb, var(--bear) 30%, var(--line)); background: radial-gradient(100% 120% at 100% 0%, color-mix(in srgb, var(--bear) 12%, transparent), transparent 60%), var(--surface-2); }
.hm-bc.bull:hover { border-color: var(--bull); box-shadow: 0 0 24px -8px var(--bull); }
.hm-bc.bear:hover { border-color: var(--bear); box-shadow: 0 0 24px -8px var(--bear); }
.hm-bc-l { grid-area: id; display: flex; align-items: center; gap: 9px; min-width: 0; }
.hm-bc-id { display: flex; flex-direction: column; min-width: 0; }
.hm-bc-id > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hm-bc-id b { font: 800 13px/1.15 var(--font-ui); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-bc-id .tag { font-size: 8.5px; padding: 2px 5px; }
.hm-bc-id small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-bc-ch { grid-area: ch; min-width: 0; border-radius: 8px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line); overflow: hidden; }
.hm-bc-ch svg { display: block; width: 100%; height: 100%; }   /* home.js redraws on resize; this only bridges the frame */
.hm-bc-f { grid-area: f; display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.hm-conv { flex: 1 1 auto; height: 4px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.hm-conv i { display: block; height: 100%; border-radius: 3px; }
.hm-bc.bull .hm-conv i { background: var(--bull); box-shadow: 0 0 6px var(--bull); } .hm-bc.bear .hm-conv i { background: var(--bear); box-shadow: 0 0 6px var(--bear); }

/* sectors + news */
.hm-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
.hm-sec-b { display: flex; flex-direction: column; gap: 10px; }
.hm-sec-top { display: flex; align-items: center; gap: 12px; }
.hm-sec-top b { margin-left: auto; font-size: 14px; }
.hm-sec-k { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.hm-sec-svg text { font: 600 9.5px/1 var(--font-mono); fill: var(--ink-3); }
.hm-sec-svg .sl { opacity: .55; transition: opacity var(--fast); stroke-linejoin: round; }
.hm-sec-svg .sl.on { opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
.hm-sec-svg .sl.dim { opacity: .14; }
.hm-sec-svg .sl-l { fill: var(--ink); font-weight: 700; }
.hm-sec-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hm-sec-lists ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.hm-sec-lists li { display: grid; grid-template-columns: minmax(0, 1fr) 40px 54px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 6px; border-radius: 6px; cursor: default; }
.hm-sec-lists li:hover { background: var(--surface-3); }
.hm-sec-lists .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-weight: 600; }
.hm-sec-lists b { text-align: right; font-size: 11.5px; }
.hm-mb { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: var(--line-2); }
.hm-mb .u { background: var(--bull); } .hm-mb .d { background: var(--bear); margin-left: auto; }
.hm-news .news-list li { grid-template-columns: 54px 1fr; padding: 9px 14px; }
.hm-news .news-list .txt { display: none; }

/* long-term compass */
.hm-picks-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.hm-pick { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); min-width: 0; transition: border-color var(--fast), transform var(--fast); }
.hm-pick:hover { text-decoration: none; border-color: var(--brand-line); transform: translateY(-1px); }
/* a long ticker + CANDIDATE badge is wider than a 190 px card: the badge wraps under it instead of poking out */
.hm-pk-h { display: flex; align-items: center; gap: 4px 7px; flex-wrap: wrap; min-width: 0; } .hm-pk-h b { font: 800 13px/1.1 var(--font-ui); letter-spacing: -.02em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hm-pk-h .badge { margin-left: auto; flex: none; }
.hm-pick small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.hm-pk-f { display: flex; align-items: center; gap: 9px; margin-top: 2px; font-size: 11.5px; }
.hm-pk-s { font-size: 17px; font-weight: 700; }
.hm-pk-f > .mono:last-child { margin-left: auto; }

/* right column */
.hm-idx-b { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; }
.hm-ix { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 6px; border-radius: 8px; }
.hm-ix:hover { background: var(--surface-2); }
.hm-ix > div:first-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hm-ix .kicker { font-size: 9.5px; } .hm-ix b { font-size: 14px; }
.hm-ix-r { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.hm-ix-sp svg { display: block; }
.hm-tile { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; color: var(--ink); border-radius: var(--r-lg); }
.hm-tile:hover { text-decoration: none; background: var(--surface-2); }
.hm-ti { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--amber); background: var(--amber-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 30%, transparent); }
.hm-ti.brand { color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.hm-ti svg, .hm-go { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hm-go { flex: none; color: var(--ink-3); margin-left: auto; }
.hm-tt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hm-tt b { font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.hm-tt small { font-size: 11.5px; line-height: 1.4; }
.hm-prog { display: block; height: 4px; width: 100%; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.hm-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 3px; }
.hm-actions { padding: 6px; }
.hm-act { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.hm-act:hover { background: var(--surface-2); text-decoration: none; }
.hm-ai { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); }
.hm-ai svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-ai.trade { color: var(--amber); background: var(--amber-soft); } .hm-ai.flow { color: var(--bull); background: var(--bull-soft); }
.hm-ai.brief { color: var(--sky); background: var(--sky-soft); } .hm-ai.radar { color: var(--violet); background: var(--violet-soft); } .hm-ai.feedback { color: var(--pink); background: rgba(244, 114, 182, .12); }
.hm-at { display: flex; flex-direction: column; min-width: 0; } .hm-at b { font-size: 13px; } .hm-at small { font-size: 11px; color: var(--ink-3); }
.hm-pop { z-index: 30; }

/* the BULL/BEAR tag repeats the board header; below 1700 px its 37 px would ellipsize 10-letter tickers */
@media (max-width: 1700px) { .hm-bc-id .tag { display: none; } }
@media (max-width: 1500px) { .hm-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1280px) { .hm-grid { grid-template-columns: minmax(0, 1fr); } .hm-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (max-width: 900px) { .hm-boards { grid-template-columns: minmax(0, 1fr); } .hm-depth-h { grid-template-columns: 1fr; justify-items: center; } .hm-depth-h > .kicker { justify-self: center; } }
@media (max-width: 560px) { .hm-bc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "ch" "f"; height: auto; } .hm-bc-ch { height: 60px; } .hm-hello h1 { font-size: 23px; } .hm-sec-lists { grid-template-columns: 1fr; } }
