/* ── Page Header ── */
/* Flex direction + alignment now come from d-flex / flex-md-row utilities */
.stk-page-hdr { padding: var(--ta-hdr-pad) 0; border-bottom: 1px solid var(--bd); margin-bottom: var(--ta-sec-gap); }
.stk-breadcrumb { font-size: 11px; color: var(--tx3); margin-bottom: 5px; }
/* Underlined at rest: the accent against the crumb's own --tx3 is 1.28:1, so
   colour alone cannot mark the link inside the sentence (SC 1.4.1). */
.stk-breadcrumb a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.stk-title { font-size: 26px; font-weight: 900; color: var(--tx); letter-spacing: -.5px; }
.stk-title span { color: var(--blue); }
.stk-meta { font-size: 11px; color: var(--tx3); }
.mkt-open-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; background: var(--green-lt); color: var(--green-ink); padding: 4px 11px; border-radius: 20px; }
.open-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse-dot 1.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── 4 Mini Cards — columns and gutters both come from .row .row-cols-* ── */
.stk-mini-row { margin-bottom: var(--ta-sec-gap); }
.stk-mini-card { height: 148px; overflow: hidden; transition: box-shadow .15s; }
.stk-mini-card:hover { box-shadow: var(--sh-md); }

/* ── Main Body — row gutters come from the shared .row default ── */
.stk-main { gap: var(--ta-sec-gap); }
#stk-chart-wrap { height: 500px; }

/* The sidebar's height comes from data (how many movers and broker picks
   there are) while the left column's comes from two fixed-height widgets,
   so the shorter of the two used to end in a dead strip. Stretching both
   columns to the row and letting the chart card absorb the slack keeps the
   two bottoms level whichever way the difference falls — which is why the
   chart widget is mounted autosize rather than at a fixed 500px. */
@media (min-width: 992px) {
    .stk-main { height: 100%; }
    .stk-chart-card { flex: 1 1 auto; min-height: 0; }
    #stk-chart-wrap { flex: 1 1 auto; height: auto; min-height: 500px; }
    #stk-chart-wrap .tradingview-widget-container,
    #stk-chart-wrap .tradingview-widget-container__widget { height: 100%; }
}

/* ── Generic card ── */
.stk-card { overflow: hidden; }
.stk-card-hdr { --bs-card-cap-padding-x: 18px; --bs-card-cap-padding-y: 14px; gap: 12px; }
.stk-card-ttl { font-size: 13px; font-weight: 800; color: var(--tx); display: flex; align-items: center; gap: 8px; }
.stk-tabs { display: flex; gap: 4px; }
.stk-tab { font-size: 12px; font-weight: 600; font-family: inherit; padding: 4px 13px; border-radius: 6px; border: 1px solid var(--bd); background: transparent; color: var(--tx2); cursor: pointer; transition: all .15s; }
.stk-tab.active { background: var(--blue-fill); color: #fff; border-color: var(--blue-fill); }
.stk-tab:not(.active):hover { color: var(--blue); border-color: var(--blue); }

/* ── Movers Table ── */
.mov-table { width: 100%; border-collapse: collapse; }
.mov-table th { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--tx3); padding: 9px 16px; text-align: left; border-bottom: 1px solid var(--bd); white-space: nowrap; }
.mov-table th:not(:first-child) { text-align: right; }
.mov-table td { padding: 10px 16px; font-size: 13px; color: var(--tx); border-bottom: 1px solid var(--bd); white-space: nowrap; }
.mov-table td:not(:first-child) { text-align: right; }
.mov-table tr:last-child td { border-bottom: none; }
.mov-table tr:hover td { background: var(--bg2); cursor: default; }
.mov-sym { font-weight: 800; color: var(--tx); }
.mov-name { font-size: 11px; color: var(--tx3); font-weight: 400; margin-top: 1px; }
.mov-chg { font-weight: 700; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.mov-chg.up { background: var(--green-lt); color: var(--green-ink); }
.mov-chg.dn { background: var(--red-lt); color: var(--red-ink); }
.mov-vol { font-size: 11px; color: var(--tx3); }

/* ── Chart Symbol Selector — buttons are .btn .btn-sm .btn-outline-secondary ── */
.chart-sym-bar { gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--bd); }
.chart-sym-btn { font-size: 12px; font-weight: 700; }

/* ── Sidebar ── */
.w-card { overflow: hidden; }
.w-hdr { --bs-card-cap-padding-x: 16px; --bs-card-cap-padding-y: 12px; }
.w-ttl { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--tx); }
.w-sub { font-size: 10px; color: var(--tx3); white-space: nowrap; }

/* ── Sidebar Top Movers ──────────────────────────────────────────────
   Rows are links, not table cells, because a 331px column has room for
   two stacked pairs and nothing else. .mov-sym/.mov-name/.mov-chg/.mov-vol
   are reused verbatim from the wide table above. */
.mov-tabbar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--bd); }
.mov-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 6px 14px; border-bottom: 1px solid var(--bd);
    text-decoration: none; color: inherit; transition: background .15s;
}
.mov-item:last-child { border-bottom: none; }
.mov-item:hover { background: var(--bg2); }
.mov-item .mov-left { min-width: 0; }
.mov-item .mov-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mov-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.mov-price { font-size: 12px; font-weight: 700; color: var(--tx); }

/* ── Where to Trade ── */
.bk-sub { font-size: 10px; color: var(--tx3); margin-top: 3px; line-height: 1.35; }
.bk-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    border-bottom: 1px solid var(--bd);
    text-decoration: none; color: inherit; transition: background .15s;
}
.bk-item:hover { background: var(--bg2); }
/* Favicons need a light backing even in dark mode, and are held back to
   grey until the row is the one being looked at — same rule as the register. */
.bk-logo {
    width: 28px; height: 28px; border-radius: 2px; flex-shrink: 0; padding: 3px;
    background: #fff; border: 1px solid var(--bd);
    display: flex; align-items: center; justify-content: center;
}
/* A mark drawn in white for a dark site header is nothing at all on that white
   plate, so it brings its own dark one — the same --ta-plate-ink every other
   surface and the admin contact sheet use, so a logo is judged on the shade it
   actually ships on. */
.bk-logo.is-light-ink { background: var(--ta-plate-ink); }
.bk-logo img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .15s, opacity .15s; }
.bk-item:hover .bk-logo img { filter: none; opacity: 1; }
.bk-id { min-width: 0; }
.bk-name { font-size: 12.5px; font-weight: 700; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-reg { font-size: 10px; color: var(--tx3); }
.bk-all { display: block; padding: 11px 14px; text-align: center; font-size: 11px; font-weight: 700; color: var(--blue); text-decoration: none; }
.bk-all:hover { background: var(--bg2); }
.bk-risk { padding: 0 14px 12px; font-size: 9.5px; line-height: 1.45; color: var(--tx3); }

/* ── Sector Table ── */
.sec-table { width: 100%; border-collapse: collapse; }
.sec-table td { padding: 8px 14px; font-size: 12px; border-bottom: 1px solid var(--bd); }
.sec-table tr:last-child td { border-bottom: none; }
.sec-table tr:hover td { background: var(--bg2); }
.sec-name { color: var(--tx2); }
.sec-bar-cell { width: 100px; }
.sec-bar-wrap { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.sec-bar { height: 100%; border-radius: 3px; transition: width .4s; }

/* ── TA dropdown — Bootstrap supplies the chevron and the dark-mode swap ── */
.ta-select { font-size: 12.5px; font-weight: 600; }

/* ── AI Pulse ── */
.amp-section { margin-top: var(--ta-sec-gap); }
.amp-section-hdr { margin-bottom: var(--ta-sec-gap); padding-bottom: 10px; border-bottom: 1px solid var(--bd); }
.amp-section-ttl { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .9px; color: var(--tx3); display: flex; align-items: center; gap: 8px; }
.amp-ai-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 700; background: var(--blue-lt); color: var(--blue-ink); padding: 2px 8px; border-radius: 4px; }
.amp-card { padding: 18px; height: 100%; }
.amp-card-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--bd); }
.amp-sym { font-size: 14px; font-weight: 800; color: var(--tx); }
.amp-chg { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.amp-chg.up { background: var(--green-lt); color: var(--green-ink); }
.amp-chg.dn { background: var(--red-lt); color: var(--red-ink); }
.amp-bullets { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.amp-bullets li { font-size: 12.5px; color: var(--tx2); line-height: 1.45; padding-left: 16px; position: relative; }
.amp-bullets li::before { content: '▸'; position: absolute; left: 0; color: var(--blue); font-size: 10px; top: 2px; }

/* Responsive behaviour is handled by the Bootstrap grid + flex utilities */
