/* TradeNuro web dashboard. Builds on /assets/styles.css (tokens mirror the iOS Theme.swift dark palette). */
[hidden] { display: none !important; }
body { min-height: 100vh; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-xs { width: 13px; height: 13px; }
.ic-lg { width: 30px; height: 30px; }
.ic-fill { fill: currentColor; stroke: none; }
.ic-accent { color: var(--accent-soft); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.big { font-size: 22px; font-weight: 700; }
.h3 { font-size: 18px; margin: 0; }
.tone-bull { color: var(--bull); } .tone-bear { color: var(--bear); } .tone-hold { color: var(--hold); }
.tone-accent { color: var(--accent-soft); } .tone-muted { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- boot / gate ---------- */
.boot { min-height: 100vh; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--text-2); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--sep-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; outline: none;
  background: radial-gradient(ellipse at top, rgba(25,195,177,.12), transparent 60%), var(--bg); }
.gate-card { width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-sheet); padding: 32px 28px; box-shadow: var(--shadow); }
.gate-card img { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 18px; }
.gate-card h1 { font-size: 28px; }
.gate-card p { color: var(--text-2); }
.gate-card .small { color: var(--text-3); margin-top: 12px; }
.plan-points { padding-left: 18px; color: var(--text-2); margin: 0 0 20px; display: grid; gap: 8px; }
.apple-btn { background: #fff; color: #000; border: 0; border-radius: 12px; padding: 13px 22px; font-weight: 600; font-size: 16px; cursor: pointer;
  display: inline-flex; gap: 10px; align-items: center; justify-content: center; width: 100%; min-height: 50px; font-family: inherit; }
.apple-btn:disabled { opacity: .6; cursor: default; }
.apple-btn .ic { width: 18px; height: 20px; }
.msg { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; }
.msg.err { color: var(--bear); } .msg.ok { color: var(--bull); }
.link-btn { background: none; border: 0; color: var(--accent-soft); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.noscript { padding: 24px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px;
  background: rgba(6,11,20,.86); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--sep); }
.topbar .brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; }
.topbar .brand img { width: 28px; height: 28px; border-radius: 7px; }
.freshness { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); background: var(--card);
  border: 1px solid var(--sep); border-radius: 999px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.freshness .muted { color: var(--text-3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hold); display: inline-block; flex: none; }
.dot.live { background: var(--bull); }
.plan-chip { font-size: 12px; font-weight: 700; color: var(--accent-soft); border: 1px solid rgba(61,219,200,.35); border-radius: 999px; padding: 4px 10px; text-decoration: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--sep);
  background: var(--card); color: var(--text); cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--sep-strong); }
.icon-btn:disabled { opacity: .5; }
.sidebar { position: fixed; top: 58px; bottom: 0; left: 0; width: min(288px, 86vw); z-index: 39; background: var(--bg-2); border-right: 1px solid var(--sep);
  padding: 10px 10px 12px; overflow-y: auto; overflow-x: hidden; transform: translateX(-100%); visibility: hidden; display: flex; flex-direction: column; }
.menu-open .sidebar { transform: none; visibility: visible; }
.scrim { position: fixed; inset: 58px 0 0 0; background: rgba(0,0,0,.5); z-index: 38; display: none; }
.menu-open .scrim { display: block; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item[aria-current="page"] { background: rgba(25,195,177,.12); color: var(--text); }
.nav-item[aria-current="page"] .ic { color: var(--accent-soft); }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--hold); border: 1px solid rgba(255,159,10,.35); border-radius: 999px; padding: 1px 7px; }
.content { min-width: 0; display: flex; flex-direction: column; }
#view { outline: none; flex: 1; }
@media (min-width: 960px) and (hover: hover), (min-width: 960px) and (pointer: fine) {
  .shell { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .topbar { grid-column: 1 / -1; }
  .content { grid-column: 2; }
  .menu-toggle { display: none; }
  .sidebar { transform: none; visibility: visible; width: var(--rail-w); }
  .scrim { display: none !important; }
}
.offline-bar { position: sticky; top: 0; z-index: 60; background: var(--hold); color: #1A0F00; font-weight: 600; font-size: 14px; padding: 8px 16px; text-align: center; }

/* ---------- page ---------- */
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 22px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 720px) { .page { padding: 28px 28px 40px; } }
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 4px; }
.page-head .sub { color: var(--text-2); margin: 0; max-width: 640px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.spaced { margin-top: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.card { padding: 18px; }
@media (min-width: 720px) { .card { padding: 22px; } }
.page > .card, .section-box > .card, .stack > .card { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.eyebrow-s { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px; }
.btn-xs { min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 10px; }
.btn.danger { color: var(--bear); }
.btn:disabled { opacity: .55; cursor: default; }
.btn .ic { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2.tight { gap: 18px; }
.grid-2 h4 { font-size: 14px; margin: 0 0 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--sep); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-3); }
.kv .v { text-align: right; }
.kv .v.tone-accent { color: var(--accent-soft); }
.muted-card { background: var(--bg-2); box-shadow: none; }
.muted-card p { color: var(--text-3); margin: 0; }
.disclaimer-line { display: flex; gap: 6px; align-items: flex-start; color: var(--text-3); font-size: 13px; margin: 4px 0 0; }
.disclaimer-line .ic { margin-top: 3px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: rgba(25,195,177,.08);
  border: 1px solid rgba(25,195,177,.25); color: var(--text-2); text-decoration: none; font-size: 14px; }
.callout { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); border: 1px solid rgba(255,159,10,.3); background: rgba(255,159,10,.07); }
.callout p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.callout strong { color: var(--hold); font-size: 14px; }
.callout .ic { color: var(--hold); margin-top: 2px; }
.tone-border-bear { border-color: rgba(255,69,58,.35); }

/* states */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 20px; color: var(--text-2); }
.state.loading { flex-direction: row; justify-content: center; padding: 28px; }
.state h3 { color: var(--text); margin: 0; font-size: 18px; }
.state p { margin: 0; max-width: 520px; }
.state.error .ic { color: var(--bear); width: 26px; height: 26px; }
.state.locked { background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-card); padding: 36px 22px; }
.state.locked .ic { color: var(--accent-soft); }
.state.locked .small { color: var(--text-3); }
.state.empty { background: var(--card); border: 1px dashed var(--sep-strong); border-radius: var(--r-card); }

/* badges & pills */
.tn-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: 7px; }
.tn-badge.tone-bull { background: rgba(52,199,89,.15); } .tn-badge.tone-bear { background: rgba(255,69,58,.15); }
.tn-badge.tone-hold { background: rgba(255,159,10,.15); } .tn-badge.tone-muted { background: rgba(255,255,255,.06); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--sep); color: var(--text-2); }
.pill.tone-bull { color: var(--bull); border-color: rgba(52,199,89,.3); } .pill.tone-bear { color: var(--bear); border-color: rgba(255,69,58,.3); }
.pill.tone-hold { color: var(--hold); border-color: rgba(255,159,10,.3); } .pill.tone-accent { color: var(--accent-soft); border-color: rgba(61,219,200,.3); }
.ticker-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; flex: none; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(145deg, var(--card-elev), #0B1424); border: 1px solid var(--sep); color: var(--text); }
.score-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.score-ring .ring-bg { stroke: rgba(255,255,255,.08); }
.score-ring .band-high { stroke: var(--bull); } .score-ring .band-medium { stroke: var(--hold); } .score-ring .band-low { stroke: var(--text-3); }
.score-num { position: absolute; font-weight: 700; font-size: 13px; }
.score-big { display: flex; gap: 16px; align-items: center; }
.score-big .score-num { font-size: 22px; }
.change { font-size: 13px; font-weight: 600; }

/* overview */
.index-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.index-card { display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-md); padding: 14px; }
.feed { display: inline-flex; gap: 5px; align-items: center; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.regime { display: flex; gap: 14px; align-items: center; }
.regime-ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.regime-ic .ic { width: 22px; height: 22px; }
.tone-bg-bull { background: rgba(52,199,89,.13); color: var(--bull); } .tone-bg-bear { background: rgba(255,69,58,.13); color: var(--bear); }
.tone-bg-hold { background: rgba(255,159,10,.13); color: var(--hold); } .tone-bg-muted { background: rgba(255,255,255,.06); color: var(--text-2); }
.regime p { margin: 2px 0 0; }
.regime .eyebrow-s { margin-bottom: 2px; }
.heatmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.heat-cell { border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-height: 78px; border: 1px solid var(--sep); }
.heat-cell.pos { background: rgba(52,199,89, var(--heat)); } .heat-cell.neg { background: rgba(255,69,58, var(--heat)); }
.heat-name { font-size: 13px; color: var(--text); font-weight: 600; line-height: 1.25; }
.heat-val { font-size: 17px; font-weight: 700; }
.heat-n { font-size: 11px; color: var(--text-2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-card); padding: 16px; color: var(--text); text-decoration: none; }
.tile:hover { border-color: var(--sep-strong); background: var(--card-elev); }

/* signal rows */
.list-card { padding: 4px 0; }
.signal-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--sep); }
.signal-row:last-child { border-bottom: 0; }
.signal-row:hover { background: rgba(255,255,255,.03); }
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sr-sub { color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.list-count { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tn-chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--sep-strong); background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tn-chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chips.small .tn-chip { min-height: 30px; padding: 3px 11px; font-size: 13px; }
select, input, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--sep-strong); border-radius: 12px; padding: 8px 12px; min-height: 40px; }
select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 1px; }
input:disabled { opacity: .7; }
.search-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; }
.search-wrap .ic { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.search-wrap input, .filters .search { width: 100%; padding-left: 38px; }
.filters .search { padding-left: 12px; flex: 1; min-width: 180px; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-2); cursor: pointer; }
.toggle input { min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); }

/* detail */
.back { color: var(--text-2); text-decoration: none; font-size: 14px; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.dh-left { display: flex; gap: 14px; align-items: center; }
.dh-title { display: flex; gap: 10px; align-items: center; }
.dh-title h1 { margin: 0; font-size: 30px; }
.dh-left p { margin: 2px 0 0; }
.dh-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.price-hero { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.star-btn[aria-pressed="true"] { border-color: rgba(255,159,10,.4); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-box { position: relative; min-height: 200px; }
.chart-box.short { min-height: 180px; }
.tn-chart { position: relative; }
.tn-chart canvas { display: block; border-radius: 8px; touch-action: pan-y; }
.tn-chart canvas:focus-visible { outline: 2px solid var(--accent-soft); }
.tn-tip { position: absolute; top: 8px; width: 140px; background: rgba(14,24,40,.95); border: 1px solid var(--sep-strong); border-radius: 10px; padding: 8px 10px; font-size: 12px; pointer-events: none; }
.tn-tip div { display: flex; justify-content: space-between; gap: 8px; }
.tn-tip strong { display: block; margin-bottom: 4px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .ic { margin-top: 3px; }
.evidence { list-style: none; padding: 0; margin: 0; }
.evidence li { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--sep); font-size: 14px; }
.evidence li:last-child { border-bottom: 0; }
.evidence .ic { align-self: center; }
.ev-name { color: var(--text-2); flex: 1; }
.ev-val { text-align: right; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.metric { display: flex; flex-direction: column; gap: 3px; }
.metric.m-hero { grid-column: 1 / -1; }
details summary { cursor: pointer; color: var(--accent-soft); font-weight: 600; font-size: 14px; margin-top: 10px; }
details.card summary { margin-top: 0; }
.fill-model { white-space: pre-wrap; font-size: 12px; color: var(--text-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin: 10px 0 0; }

/* stock page */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pick { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-md); padding: 10px 12px; color: var(--text); text-decoration: none; }
.pick div { display: flex; flex-direction: column; min-width: 0; }
.pick .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick:hover { border-color: var(--sep-strong); }
.analysis { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.analysis .lead { font-size: 16px; margin: 0; }
.an-sec h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 0 0 4px; }
.an-sec p { margin: 0 0 6px; }
.ev-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-chip { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--sep); }

/* watchlist / alerts / orders */
.add-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-list, .alert-list, .order-list { list-style: none; margin: 0; padding: 0; }
.wl-list li, .alert-list li, .order-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sep); }
.wl-list li:last-child, .alert-list li:last-child, .order-list li:last-child { border-bottom: 0; }
.wl-main { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.wl-main div { display: flex; flex-direction: column; min-width: 0; }
.wl-main .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-sig { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; color: var(--text); }
.alert-list li > div:first-child, .order-list li > div:first-child { flex: 1; min-width: 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tn-table { overflow-x: auto; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--sep); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { color: var(--text-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
table.data a { font-weight: 700; color: var(--text); }
.sim-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255,159,10,.08);
  border: 1px solid rgba(255,159,10,.3); color: var(--text-2); font-size: 14px; }
.sim-banner strong { color: var(--hold); }
.sim-banner .ic { color: var(--hold); margin-top: 2px; }
.disclosure { margin: 0; }
.plan-name { font-size: 30px; font-weight: 800; margin: 0 0 8px; }

/* analyst */
.chat { display: flex; flex-direction: column; gap: 12px; }
.ctx-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble p { margin: 0; }
.bubble.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.bubble.answer { align-self: flex-start; background: var(--card-elev); border-bottom-left-radius: 6px; }
.bubble.refusal { align-self: flex-start; background: rgba(255,159,10,.08); border: 1px solid rgba(255,159,10,.3); }
.bubble.failure { align-self: flex-start; background: rgba(255,69,58,.08); border: 1px solid rgba(255,69,58,.3); }
.bubble.failure .link-btn { margin-top: 6px; }
.typing { display: inline-flex; gap: 5px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.suggestions .eyebrow-s { width: 100%; margin: 0; }
.sugg { background: rgba(25,195,177,.12); color: var(--accent-soft); border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.ask-form { display: flex; flex-direction: column; gap: 8px; }
.ask-form textarea { width: 100%; resize: vertical; min-height: 64px; }
.ask-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.consent { max-width: 640px; }
.consent h2 { margin-top: 10px; }

/* dialogs */
.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--sep-strong); border-radius: var(--r-card);
  background: var(--card); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.modal::backdrop { background: rgba(0,0,0,.6); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 14px 18px 18px; }
.tn-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select { width: 100%; }
.tn-seg { display: inline-flex; border: 1px solid var(--sep-strong); border-radius: 12px; overflow: hidden; width: 100%; }
.tn-seg label { flex: 1; position: relative; }
.tn-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; min-height: 0; }
.tn-seg span { display: block; text-align: center; padding: 8px 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.tn-seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.tn-seg input:focus-visible + span { outline: 2px solid var(--accent-soft); outline-offset: -2px; }

/* footer + toast */
.app-footer { border-top: 1px solid var(--sep); background: var(--bg-2); padding: 18px 16px 26px; font-size: 12px; color: var(--text-3); }
.app-footer p { max-width: 1040px; margin: 0 auto 8px; }
.app-footer a { color: var(--text-2); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); background: var(--card-elev); border: 1px solid var(--sep-strong);
  color: var(--text); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); z-index: 100; max-width: min(92vw, 520px); font-size: 14px;
  transition: transform .2s ease, visibility 0s linear .2s; pointer-events: none; visibility: hidden; }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .2s ease; }
.toast.err { border-color: rgba(255,69,58,.5); }
@media (max-width: 520px) {
  .brand-name { display: none; }
  .freshness { max-width: none; }
  .detail-head { flex-direction: column; align-items: flex-start; }
  .dh-right { flex-direction: row; align-items: center; gap: 10px; }
  .freshness .muted { display: none; }
  .price-hero { font-size: 28px; }
  .dh-right { align-items: flex-start; }
  .sr-meta span:nth-child(3) { display: none; }
}
.mb { margin-bottom: 14px; }

/* subscription & billing (Account) */
.billing-card .card-head { margin-bottom: 4px; }
.billing-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.billing-top .plan-name { margin: 0; }
.billing-price { margin: 2px 0 0; color: var(--text-2); font-size: 16px; font-weight: 600; }
.billing-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.billing-actions .btn { min-height: 44px; }
.billing-rows { margin-top: 10px; }
.billing-note { margin-top: 12px; }
.callout.tone-bear { border-color: rgba(255,69,58,.35); background: rgba(255,69,58,.07); }
.callout.tone-bear strong, .callout.tone-bear .ic { color: var(--bear); }
.callout.tone-muted { border-color: var(--sep-strong); background: var(--bg-2); }
.callout.tone-muted strong, .callout.tone-muted .ic { color: var(--text-2); }
.other-access { margin-top: 14px; padding: 14px; border: 1px solid var(--sep); border-radius: var(--r-md); background: var(--bg-2); }
.other-access .oa-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.other-access p { margin: 6px 0 0; }
.billing-dialog p { margin: 0 0 10px; color: var(--text-2); }
.billing-dialog .billing-rows { margin: 4px 0 12px; }
.dialog-actions { margin-top: 6px; }
@media (max-width: 520px) {
  .billing-actions { flex-direction: column; }
  .billing-actions .btn { width: 100%; justify-content: center; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; justify-content: center; }
  .billing-card .kv { flex-direction: column; gap: 2px; }
  .billing-card .kv .v { text-align: left; }
}

/* ---------------- Brokerage (Alpaca Connect) ---------------- */
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
#bk-symbol { text-transform: uppercase; }
.bk-head .card-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bk-head .card-head p { margin: 4px 0 0; }
.bk-head .row-actions { align-items: center; gap: 10px; }
.bk-intro .checklist { margin: 14px 0 6px; }
.bk-notice { margin-bottom: 14px; }
.bk-review { border: 1px solid var(--sep); border-radius: var(--r-md); background: var(--bg-2); padding: 6px 14px; }
.btn.danger-fill { background: var(--bear); border-color: var(--bear); color: #fff; }
.bk-auth-dialog { width: min(480px, calc(100vw - 24px)); }
.bk-auth-dialog .modal-head h2 { font-size: 22px; }
.bk-auth-sub { margin: -6px 0 14px; color: var(--text-2); font-size: 14px; }
.bk-disclosure { border: 1px solid var(--sep-strong); border-radius: var(--r-md); background: var(--bg-2); padding: 14px 16px; }
.bk-disclosure-text { margin: 0; line-height: 1.6; font-size: 15px; color: var(--text); }
.bk-disclosure-text strong { color: var(--text); font-weight: 700; }
.bk-disclosure-text a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.bk-ack { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.bk-ack input { flex: none; width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--accent); }
.bk-auth-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.bk-auth-actions .btn { min-width: 104px; justify-content: center; font-weight: 800; letter-spacing: .04em; }
@media (max-width: 560px) {
  .bk-auth-actions { flex-direction: column-reverse; }
  .bk-auth-actions .btn { width: 100%; }
  .bk-head .row-actions { width: 100%; justify-content: space-between; }
}

/* ================= TradeNuro AI Intelligence ================= */
.nav-badge.tone-accent { color: var(--accent-soft); border-color: rgba(61,219,200,.4); background: rgba(25,195,177,.08); }
.page.ix { max-width: 1200px; gap: 18px; }
.ix-panel, .ix-hero { position: relative; border-radius: 22px; border: 1px solid rgba(61,219,200,.14);
  background: linear-gradient(180deg, rgba(22,34,58,.72), rgba(10,18,32,.78));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 50px rgba(0,0,0,.35); padding: 20px; }
@media (min-width: 720px) { .ix-panel { padding: 24px; } }
.ix-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-soft); }
.ix-eyebrow .ic { filter: drop-shadow(0 0 6px rgba(61,219,200,.8)); }
.ix-k { display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ix-h2 { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 14px 0 0; letter-spacing: -.01em; }
.ix-h2.flat { margin: 0; }
.ix-h2-k { font-family: var(--font-num); font-size: 12px; color: var(--accent-soft); border: 1px solid rgba(61,219,200,.3); border-radius: 8px; padding: 2px 7px; }
.ix-spark { color: var(--accent-soft); filter: drop-shadow(0 0 8px rgba(61,219,200,.7)); }
.ix-search { max-width: 520px; }

/* hero */
.ix-hero { overflow: hidden; padding: 22px; border-color: rgba(61,219,200,.22); }
.ix-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 320px at 85% 10%, var(--ix-glow, rgba(25,195,177,.16)), transparent 70%),
    linear-gradient(rgba(61,219,200,.05) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(61,219,200,.04) 1px, transparent 1px) 0 0 / 32px 100%;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.ix-hero.tone-bull { --ix-glow: rgba(52,199,89,.16); }
.ix-hero.tone-bear { --ix-glow: rgba(255,69,58,.16); }
.ix-hero.tone-hold { --ix-glow: rgba(255,159,10,.14); }
.ix-hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61,219,200,.7), transparent); }
.ix-hero > * { position: relative; }
.ix-intro h1 { font-size: clamp(26px, 4vw, 36px); margin: 10px 0 6px; letter-spacing: -.02em; }
.ix-intro p { max-width: 640px; }
.ix-hero-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .ix-hero-grid { grid-template-columns: 1.25fr 1fr; align-items: center; gap: 28px; } }
.ix-title-row { display: flex; gap: 14px; align-items: center; margin: 12px 0 6px; }
.ix-title-row h1 { font-size: clamp(26px, 4vw, 36px); margin: 0; letter-spacing: -.02em; line-height: 1.15; }
.ix-title-row p { margin: 2px 0 0; }
.ix-co { font-weight: 500; color: var(--text-2); font-size: .62em; letter-spacing: 0; }
.ix-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.ix-price { font-size: clamp(30px, 5vw, 42px); font-weight: 700; letter-spacing: -.02em; }
.ix-outlook { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.ix-outlook-v { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: .06em; line-height: 1.1; }
.ix-outlook-v.tone-bull { text-shadow: 0 0 22px rgba(52,199,89,.45); }
.ix-outlook-v.tone-bear { text-shadow: 0 0 22px rgba(255,69,58,.45); }
.ix-outlook-v.tone-hold { text-shadow: 0 0 22px rgba(255,159,10,.4); }
.ix-outlook.small-o .ix-outlook-v { font-size: 20px; }
.ix-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ix-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: rgba(6,11,20,.45); border: 1px solid var(--sep); }
.ix-stat-v { font-size: 22px; font-weight: 700; }
.ix-stat-u { font-size: 13px; color: var(--text-3); margin-left: 2px; }
.ix-stat-v.ix-na { font-size: 16px; color: var(--text-2); font-weight: 600; }
.ix-stat-n { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.ix-glow { box-shadow: 0 0 0 1px rgba(61,219,200,.4), 0 8px 28px rgba(25,195,177,.35); }
.ix-hero-gauge { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ix-gauge-wrap { position: relative; width: 100%; max-width: 340px; }
.ix-gauge-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ix-gauge-lbl { fill: var(--text-3); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.ix-needle { transform-origin: 150px 160px; transform: rotate(-90deg); transition: transform 1.4s cubic-bezier(.2,.9,.25,1.12); }
.ix-needle.settled { transform: rotate(var(--deg)); }
.ix-gauge-center { position: absolute; left: 0; right: 0; bottom: -2px; display: flex; flex-direction: column; align-items: center; }
.ix-gauge-label { font-weight: 800; letter-spacing: .14em; font-size: 15px; margin-top: 4px; }
.ix-gauge-sub { font-size: 12px; color: var(--text-3); }
.ix-nodes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 10px; width: 100%; max-width: 380px; }
.ix-node { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.ix-node-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-node-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-3); }
.ix-node.tone-bull .ix-node-dot { background: var(--bull); box-shadow: 0 0 10px rgba(52,199,89,.8); }
.ix-node.tone-bear .ix-node-dot { background: var(--bear); box-shadow: 0 0 10px rgba(255,69,58,.8); }
.ix-node.tone-bull, .ix-node.tone-bear { color: var(--text); }
.ix-rule { width: 100%; max-width: 420px; font-size: 13px; }
.ix-rule summary { cursor: pointer; color: var(--accent-soft); font-size: 13px; }
.ix-rule p { color: var(--text-2); }

/* chart */
.ix-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ix-chart-ctrls { display: flex; gap: 8px; flex-wrap: wrap; }
.ix-seg { display: inline-flex; border: 1px solid var(--sep); border-radius: 11px; overflow: hidden; background: rgba(6,11,20,.5); }
.ix-seg button { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; cursor: pointer; min-height: 36px; }
.ix-seg button + button { border-left: 1px solid var(--sep); }
.ix-seg button[aria-pressed="true"] { background: rgba(25,195,177,.16); color: var(--accent-soft); }
.ix-seg button:hover { color: var(--text); }
.ix-toggles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ix-tog { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; font-weight: 600; color: var(--text-3);
  background: transparent; border: 1px solid var(--sep); border-radius: 999px; padding: 5px 11px; cursor: pointer; min-height: 32px; }
.ix-tog i { width: 10px; height: 3px; border-radius: 2px; opacity: .35; }
.ix-tog[aria-pressed="true"] { color: var(--text); border-color: var(--sep-strong); background: rgba(255,255,255,.04); }
.ix-tog[aria-pressed="true"] i { opacity: 1; }
.ix-chart-box { min-height: 300px; }
.ix-chart { position: relative; }
.ix-chart canvas { display: block; touch-action: pan-y; cursor: crosshair; border-radius: 10px; }
.ix-chart canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ix-tip { position: absolute; top: 8px; width: 168px; background: rgba(8,14,26,.94); border: 1px solid rgba(61,219,200,.28); border-radius: 12px;
  padding: 9px 11px; font-size: 12px; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.ix-tip strong { display: block; margin-bottom: 4px; font-size: 12px; }
.ix-tip div { display: flex; justify-content: space-between; gap: 8px; color: var(--text-2); }
.ix-tip .num { color: var(--text); }
.ix-chart-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.ix-chart-foot .dot { vertical-align: middle; }

/* why */
.ix-why-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ix-why .ix-h2 { text-transform: uppercase; letter-spacing: .08em; font-size: 16px; }
.ix-why-grid { display: grid; gap: 14px; margin-top: 6px; }
@media (min-width: 820px) { .ix-why-grid { grid-template-columns: 1fr 1fr; } }
.ix-why-col { padding: 14px 16px; border-radius: 16px; background: rgba(6,11,20,.42); border: 1px solid var(--sep); }
.ix-why-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 8px; }
.ix-why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ix-why-list li { display: grid; gap: 2px; font-size: 14px; line-height: 1.5; padding-left: 12px; border-left: 2px solid rgba(61,219,200,.25); }
.ix-why-list.tight { gap: 6px; }
.ix-why-list.tight li { font-size: 13px; }
.ix-why-l { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.ix-why-col .ix-why-h.tone-bull ~ .ix-why-list li { border-left-color: rgba(52,199,89,.5); }
.ix-why-col .ix-why-h.tone-bear ~ .ix-why-list li { border-left-color: rgba(255,69,58,.5); }
.ix-why-ctx { margin-top: 14px; }

/* cards */
.ix-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
.ix-card { border-radius: 18px; border: 1px solid var(--sep); background: linear-gradient(180deg, rgba(22,34,58,.6), rgba(12,20,36,.7));
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.ix-card:hover { border-color: rgba(61,219,200,.35); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.35), 0 0 0 1px rgba(61,219,200,.08); }
.ix-card[open] { border-color: rgba(61,219,200,.3); }
.ix-card summary { list-style: none; cursor: pointer; padding: 16px; display: grid; gap: 8px; }
.ix-card summary::-webkit-details-marker { display: none; }
.ix-card summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 18px; }
.ix-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ix-card-t { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.ix-card-v { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.ix-card-more { font-size: 12px; color: var(--accent-soft); }
.ix-card[open] .ix-card-more { display: none; }
.ix-chip { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; border: 1px solid currentColor; white-space: nowrap; }
.ix-chip.tone-muted { color: var(--text-2); border-color: var(--sep-strong); }
.ix-card-body { padding: 0 16px 16px; }
.ix-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 10px; font-size: 13px; }
.ix-dl dt { color: var(--text-2); }
.ix-dl dd { margin: 0; text-align: right; }
.ix-learn { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.ix-learn .ic { margin-top: 3px; }
.ix-meter { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(255,69,58,.5), rgba(255,159,10,.4), rgba(52,199,89,.5)); margin: 4px 0; }
.ix-meter-mark { position: absolute; top: -3px; width: 1px; height: 12px; background: rgba(255,255,255,.35); }
.ix-meter-dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(61,219,200,.35), 0 0 12px rgba(61,219,200,.8); }

/* scenarios */
.ix-scen { display: grid; gap: 12px; }
@media (min-width: 820px) { .ix-scen { grid-template-columns: repeat(3, 1fr); } }
.ix-sc { border-radius: 18px; padding: 18px; border: 1px solid var(--sep); background: rgba(14,24,40,.7); position: relative; overflow: hidden; display: grid; gap: 10px; align-content: start; }
.ix-sc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: currentColor; opacity: .8; }
.ix-sc.tone-bull { color: var(--bull); } .ix-sc.tone-bear { color: var(--bear); } .ix-sc.tone-hold { color: var(--hold); }
.ix-sc > * { color: var(--text); }
.ix-sc h3 { margin: 0; font-size: 16px; color: inherit; }
.ix-sc.tone-bull h3 { color: var(--bull); } .ix-sc.tone-bear h3 { color: var(--bear); } .ix-sc.tone-hold h3 { color: var(--hold); }
.ix-sc-row { display: grid; gap: 2px; font-size: 14px; }
.ix-sc p { margin: 0; }
.ix-sc-note { grid-column: 1 / -1; margin: 0; }

/* risk */
.ix-rtiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 16px; }
.ix-rtile { display: grid; gap: 3px; padding: 14px; border-radius: 14px; background: rgba(6,11,20,.45); border: 1px solid var(--sep); }
.ix-rtile-v { font-size: 22px; font-weight: 700; }
.ix-risk-grid { display: grid; gap: 18px; margin-bottom: 8px; }
@media (min-width: 820px) { .ix-risk-grid { grid-template-columns: 1fr 1fr; } }

/* chat */
.ix-chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ix-thread { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.ix-thread:empty { display: none; }
.ix-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }

/* foot */
.ix-foot-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); font-size: 13px; margin-bottom: 8px; }
.ix-foot-grid > div { display: grid; gap: 2px; }

/* brokerage compact panel */
.bk-trade-grid { display: grid; gap: 16px; align-items: start; }
.bk-trade-grid > .card { margin: 0; }
@media (min-width: 1100px) { .bk-trade-grid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); } }
.ix-mini { padding: 18px; display: grid; gap: 10px; }
.ix-mini-body { display: grid; gap: 10px; }
.ix-mini-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ix-mini-g { width: 120px; flex: none; }
.ix-mini-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; border-top: 1px solid var(--sep); padding-top: 10px; }
.ix-mini-note .ic { margin-top: 3px; }
.ix-mini p { margin: 0; }

/* ================= TradeNuro Terminal (Brokerage redesign — in design review) ================= */
.page.tx { max-width: 1680px; padding: 14px 14px 90px; gap: 12px;
  background: radial-gradient(900px 500px at 70% -10%, rgba(25,195,177,.08), transparent 60%),
    radial-gradient(700px 500px at 100% 40%, rgba(139,92,246,.06), transparent 60%); }
@media (min-width: 960px) { .page.tx { padding: 16px 18px 40px; } }
.tx-panel { border: 1px solid var(--sep); border-radius: 16px; background: linear-gradient(180deg, rgba(16,26,44,.9), rgba(10,17,30,.92)); padding: 14px 16px; }
.tx-ph { margin-bottom: 10px; }
.tx-ph h2 { font-size: 15px; margin: 0; letter-spacing: .01em; }
.tx-ph-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tx-ph-row.wrap { flex-wrap: wrap; }
.tx-note { font-size: 11.5px; color: var(--text-3); margin: 8px 0 0; line-height: 1.45; }
.tx-empty { margin: 6px 0; }
.tx-env { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.tx-env.paper { color: var(--accent-soft); background: rgba(25,195,177,.1); border: 1px solid rgba(61,219,200,.35); }
.tx-env.live { color: #fff; background: rgba(255,69,58,.85); border: 1px solid var(--bear); }

/* top bar */
.tx-bar { display: grid; gap: 10px 16px; align-items: center; grid-template-columns: 1fr; padding: 12px 16px; border-radius: 16px;
  border: 1px solid rgba(61,219,200,.18); background: linear-gradient(90deg, rgba(16,30,46,.95), rgba(18,20,44,.95));
  box-shadow: 0 0 0 1px rgba(139,92,246,.06), 0 10px 30px rgba(0,0,0,.3); }
@media (min-width: 1100px) { .tx-bar { grid-template-columns: auto minmax(200px, 280px) 1fr auto; } }
.tx-brand { display: flex; align-items: center; gap: 10px; }
.tx-brand strong { display: block; font-size: 14px; line-height: 1.2; }
.tx-brand .muted { display: block; line-height: 1.2; }
.tx-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-soft);
  background: radial-gradient(circle at 30% 30%, rgba(61,219,200,.35), rgba(139,92,246,.18)); box-shadow: 0 0 18px rgba(61,219,200,.35); }
.tx-searchwrap { display: flex; align-items: center; gap: 8px; border: 1px solid var(--sep); border-radius: 11px; padding: 0 10px; background: rgba(6,11,20,.6); color: var(--text-3); }
.tx-search { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; font-size: 14px; padding: 9px 0; outline: none; }
.tx-quote { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; min-width: 0; }
.tx-sym { font-size: 18px; }
.tx-quote-px { display: flex; align-items: baseline; gap: 8px; }
.tx-px { font-size: 22px; font-weight: 700; }
.tx-ohlc { font-size: 12px; color: var(--text-2); white-space: pre-wrap; }
.tx-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
@media (min-width: 1100px) { .tx-chips { justify-content: flex-end; } }
.tx-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); border: 1px solid var(--sep); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.tx-chip.sample { color: #1A0F00; background: var(--hold); border-color: var(--hold); font-weight: 800; letter-spacing: .04em; }

/* grid */
.tx-grid { display: grid; gap: 12px; grid-template-columns: 1fr; grid-template-areas: "center" "right" "left"; }
.tx-left { grid-area: left; } .tx-center { grid-area: center; } .tx-right { grid-area: right; }
.tx-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1000px) { .tx-grid { grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: "center right" "left right"; } }
@media (min-width: 1360px) { .tx-grid { grid-template-columns: 290px minmax(0, 1fr) 330px; grid-template-areas: "left center right"; } }

/* account */
.tx-acct-eq { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.tx-hist { margin: 8px -4px 6px; min-height: 40px; }
.tx-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 6px 0 0; font-size: 13px; }
.tx-dl dt { color: var(--text-2); } .tx-dl dd { margin: 0; text-align: right; text-transform: capitalize; }
.tx-acct-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sep); }

/* quote rows */
.tx-qrow { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) 64px auto; align-items: center; gap: 4px 10px; background: none; border: 0;
  border-radius: 10px; padding: 7px 6px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tx-qrow:hover, .tx-qrow:focus-visible { background: rgba(255,255,255,.04); outline: none; }
.tx-qrow:focus-visible { box-shadow: 0 0 0 2px var(--accent) inset; }
.tx-rank { width: 16px; font-size: 11px; color: var(--text-3); }
.tx-qrow:not(:has(.tx-rank)) { grid-template-columns: minmax(0, 1fr) 64px auto; }
.tx-qsym { display: grid; min-width: 0; line-height: 1.25; }
.tx-qsym strong { font-size: 13.5px; } .tx-qsym .muted { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-qpx { font-size: 13px; text-align: right; grid-column: -2; grid-row: 1; }
.tx-qchg { font-size: 12px; text-align: right; grid-column: -2; grid-row: 2; margin-top: -4px; }
.tx-spark { display: block; grid-row: 1 / span 2; }
.tx-tabs button { padding: 4px 10px; min-height: 28px; font-size: 12px; }

/* chart */
.tx-chart-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tx-chart-sym { font-size: 20px; margin: 0; }
.tx-chart-ctrls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tx-trade { font: inherit; font-weight: 800; font-size: 13px; border-radius: 10px; padding: 7px 16px; min-height: 36px; cursor: pointer; border: 0; }
.tx-trade.buy { background: var(--bull); color: #03140A; box-shadow: 0 6px 18px rgba(52,199,89,.25); }
.tx-trade.sell { background: var(--bear); color: #fff; box-shadow: 0 6px 18px rgba(255,69,58,.22); }
.tx-chart { min-height: 320px; }

/* AI Intelligence panel (terminal size) */
.tx-ai { position: relative; border-radius: 18px; padding: 16px 18px; overflow: hidden;
  border: 1px solid rgba(61,219,200,.28);
  background: linear-gradient(135deg, rgba(14,40,52,.92), rgba(24,20,52,.92));
  box-shadow: 0 0 0 1px rgba(139,92,246,.12), 0 0 40px rgba(25,195,177,.12), 0 18px 50px rgba(0,0,0,.4); }
.tx-ai::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(61,219,200,.05) 1px, transparent 1px) 0 0 / 100% 28px, linear-gradient(90deg, rgba(139,92,246,.05) 1px, transparent 1px) 0 0 / 28px 100%,
    radial-gradient(500px 220px at 15% 0%, rgba(61,219,200,.16), transparent 70%), radial-gradient(500px 260px at 100% 100%, rgba(139,92,246,.18), transparent 70%); }
.tx-ai::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(61,219,200,.8), rgba(167,139,250,.8), transparent); }
.tx-ai > * { position: relative; }
.tx-ai-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tx-ai-tag { font-size: 11px; color: #C4B5FD; border: 1px solid rgba(167,139,250,.35); border-radius: 999px; padding: 2px 9px; }
.tx-ai-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .tx-ai-grid { grid-template-columns: 250px minmax(0, 1fr); } .tx-ai-tiles { grid-column: 1 / -1; } }
@media (min-width: 1500px) { .tx-ai-grid { grid-template-columns: 250px minmax(0, 1fr) 260px; } .tx-ai-tiles { grid-column: auto; } }
.tx-ai-gauge { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tx-ai-gauge .ix-gauge-wrap { max-width: 250px; }
.tx-ai-outlook { text-align: center; display: grid; gap: 2px; }
.tx-ai-outlook .ix-outlook-v { font-size: 26px; }
.tx-ai-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; text-align: center; font-size: 13px; }
.tx-ai-meta strong { display: block; font-size: 14px; }
.tx-ai-gauge .ix-nodes { grid-template-columns: repeat(2, 1fr); max-width: 250px; }
.tx-ai-h { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #C4B5FD; margin: 0 0 8px; }
.tx-ai-why { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tx-why-block { border-radius: 12px; padding: 10px 12px; background: rgba(6,11,20,.4); border: 1px solid var(--sep); border-left: 3px solid currentColor; }
.tx-why-block.tone-bull { color: var(--bull); } .tx-why-block.tone-bear { color: var(--bear); }
.tx-why-block > * { color: var(--text); }
.tx-why-block .ix-k { color: inherit; }
.tx-why-block.tone-bull .ix-k { color: var(--bull); } .tx-why-block.tone-bear .ix-k { color: var(--bear); }
.tx-why-block ul { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; }
.tx-ai-open { align-self: flex-start; }
.tx-ai-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; align-content: start; }
.tx-ai-tile { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(6,11,20,.45); border: 1px solid rgba(139,92,246,.16); }
.tx-ai-tv { font-size: 18px; font-weight: 700; }
.tx-ai-ts { font-size: 11px; color: var(--text-3); text-transform: capitalize; }
.tx-ai-foot { font-size: 11px; color: var(--text-3); margin: 10px 0 0; }

/* order ticket */
.tx-order { border-color: rgba(61,219,200,.22); }
.tx-ticket { display: grid; gap: 10px; }
.tx-ticket .field { margin: 0; }
.tx-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tx-side { font: inherit; font-weight: 800; font-size: 15px; padding: 10px; border-radius: 12px; cursor: pointer; background: rgba(6,11,20,.5); border: 1px solid var(--sep); color: var(--text-2); min-height: 44px; }
.tx-side.buy[aria-pressed="true"] { background: var(--bull); color: #03140A; border-color: var(--bull); }
.tx-side.sell[aria-pressed="true"] { background: var(--bear); color: #fff; border-color: var(--bear); }
.ix-seg.tx-full { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.tx-est { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(6,11,20,.45); border: 1px solid var(--sep); }
.tx-est strong { font-size: 18px; }
.tx-review { width: 100%; min-height: 46px; font-weight: 800; }
.tx-review.buy { background: var(--bull); color: #03140A; } .tx-review.sell { background: var(--bear); color: #fff; }

/* tables */
.tx-table { overflow-x: auto; margin: 0 -4px; }
.tx-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tx-table th, .tx-table td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--sep); vertical-align: top; }
.tx-table thead th { font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tx-table td.num, .tx-table th.num { text-align: right; }
.tx-table tbody th small, .tx-table td small { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; }
.tx-table tbody tr[tabindex] { cursor: pointer; }
.tx-table tbody tr[tabindex]:hover { background: rgba(255,255,255,.03); }
.tx-table .pill { font-size: 11px; padding: 1px 8px; }
.tx-disclaimer { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; color: var(--text-3); margin: 0; }
.tx-disclaimer .ic { margin-top: 2px; }

/* mobile trade bar */
.tx-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(6,11,20,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--sep); }
.tx-mobile-bar .tx-trade { min-height: 46px; font-size: 15px; }
@media (min-width: 1000px) { .tx-mobile-bar { display: none; } }
.tx-table table { min-width: 0; font-size: 13px; }
.tx-table th, .tx-table td { color: var(--text); background: none; white-space: nowrap; }
.tx-table thead th { background: none; }
.tx-qrow, .tx-qrow:not(:has(.tx-rank)) { grid-template-columns: minmax(0, 1fr) 64px 78px; grid-template-rows: auto; padding: 6px 4px; }
.tx-qrow:has(.tx-rank) { grid-template-columns: 16px minmax(0, 1fr) 64px 78px; }
.tx-spark { grid-row: auto; }
.tx-qpx, .tx-qchg { grid-column: auto; grid-row: auto; margin: 0; }
.tx-qprice { display: grid; text-align: right; line-height: 1.25; }
@media (min-width: 1500px) { .tx-ai-grid { grid-template-columns: 250px minmax(0, 1fr); } .tx-ai-tiles { grid-column: 1 / -1; grid-template-columns: repeat(6, 1fr); } }
/* review fixes: labels, outlook vs signal, mobile positions */
.tx-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tx-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.tx-tag.paper { color: var(--accent-soft); background: rgba(25,195,177,.12); border: 1px solid rgba(61,219,200,.4); }
.tx-tag.live { color: #fff; background: var(--bear); }
.tx-tag.sample { color: #1A0F00; background: var(--hold); }
.tx-ai-caption { font-size: 11.5px; color: var(--text-2); }
.tx-ai-sigline { font-size: 12px; line-height: 1.45; color: var(--text-2); text-align: center; margin: 0; padding: 8px 10px; border-radius: 10px;
  border: 1px dashed rgba(167,139,250,.35); background: rgba(6,11,20,.35); }
.tx-ai-sigline.on { border-style: solid; border-color: rgba(61,219,200,.45); color: var(--text); }
.tx-pcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tx-pcard { border: 1px solid var(--sep); border-radius: 12px; padding: 10px 12px; background: rgba(6,11,20,.4); cursor: pointer; }
.tx-pc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 14px; }
.tx-pc-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0 0; font-size: 13px; }
.tx-pc-dl div { display: flex; justify-content: space-between; gap: 6px; }
.tx-pc-dl dt { color: var(--text-3); } .tx-pc-dl dd { margin: 0; }
@media (min-width: 1000px) { .tx-pcards { display: none; } }
@media (max-width: 999px) { .tx-pcards + .tx-table { display: none; } }

/* ================= Shared terminal design system for redesigned pages (nx-*) — in design review ================= */
.nx-title { font-size: 16px; margin: 0; line-height: 1.2; letter-spacing: .01em; }
.nx-bar { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .nx-bar { grid-template-columns: auto 1fr auto; } }
.nx-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nx-actions .nx-sw { min-width: 240px; }
.nx-ph-right { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nx-sw { min-width: 200px; flex: 1; }
.nx-select { background: rgba(6,11,20,.6); color: var(--text); border: 1px solid var(--sep); border-radius: 11px; padding: 8px 10px; font: inherit; font-size: 13px; min-height: 38px; }
.nx-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border: 1px solid var(--sep); border-radius: 14px; background: rgba(10,17,30,.7); }
.nx-grid { display: grid; gap: 12px; }
@media (min-width: 1000px) {
  .nx-g-main { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
  .nx-g-3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .nx-g-3b { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
  .nx-g-2 { grid-template-columns: 1fr 1fr; }
  .nx-g-2w { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
.nx-grid > * { min-width: 0; }
.nx-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.nx-stats.tight { grid-template-columns: repeat(2, 1fr); }
.nx-stat { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--sep); background: linear-gradient(180deg, rgba(16,26,44,.9), rgba(10,17,30,.92)); }
.nx-stat-v { font-size: 22px; font-weight: 700; }
.nx-stat-n { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.nx-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 22px 12px; color: var(--text-2); }
.nx-empty h3 { margin: 4px 0 0; font-size: 15px; color: var(--text); }
.nx-empty p { margin: 0; font-size: 13px; max-width: 320px; }
.nx-empty-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-soft); background: radial-gradient(circle at 30% 30%, rgba(61,219,200,.25), rgba(139,92,246,.12)); }
.nx-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; line-height: 1.45; }
.nx-bullets li { padding-left: 12px; border-left: 2px solid rgba(61,219,200,.3); }
.nx-bullets li.tone-bull { border-left-color: var(--bull); } .nx-bullets li.tone-bear { border-left-color: var(--bear); } .nx-bullets li.tone-hold { border-left-color: var(--hold); }
.nx-bullets li span { color: var(--text); }
.nx-center { text-align: center; margin: 0; }
.nx-full { width: 100%; justify-content: center; }
.nx-outlook { font-size: 11px; font-weight: 800; letter-spacing: .08em; border-radius: 999px; padding: 3px 9px; border: 1px solid currentColor; }
.nx-outlook.tone-bull { background: rgba(52,199,89,.1); } .nx-outlook.tone-bear { background: rgba(255,69,58,.1); } .nx-outlook.tone-hold { background: rgba(255,159,10,.1); }
.nx-sig { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 3px 8px; color: #04121C; white-space: nowrap; }
.nx-sig.tone-bull { background: var(--bull); } .nx-sig.tone-bear { background: var(--bear); color: #fff; } .nx-sig.tone-hold { background: var(--hold); }
.nx-nosig { font-size: 11.5px; color: var(--text-3); border: 1px dashed var(--sep-strong); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.tone-bg-bear { background: var(--bear); } .tone-bg-bull { background: var(--bull); }

/* overview */
.nx-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.nx-idx { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--sep); text-decoration: none; color: var(--text); position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(16,26,44,.92), rgba(10,17,30,.94)); }
.nx-idx:hover { border-color: rgba(61,219,200,.35); }
.nx-idx-top { display: flex; gap: 8px; align-items: baseline; }
.nx-idx-px { font-size: 24px; font-weight: 700; }
.nx-idx-spark { position: absolute; right: 14px; top: 16px; opacity: .9; }
.nx-feed { font-size: 11px; color: var(--text-3); }
.nx-regime { border-color: rgba(61,219,200,.25); background: linear-gradient(135deg, rgba(14,40,52,.92), rgba(24,20,52,.92)); }
.nx-regime.tone-bull .nx-idx-px { color: var(--bull); } .nx-regime.tone-bear .nx-idx-px { color: var(--bear); }
.nx-chart { min-height: 280px; }
.nx-ai .tx-ai-outlook .ix-outlook-v { font-size: 28px; }
.nx-ai-body { display: grid; gap: 10px; justify-items: center; }
.nx-ai-g { max-width: 240px; margin: 0 auto; }
.nx-ai .nx-bullets { width: 100%; }
.nx-siglist { display: grid; gap: 4px; }
.nx-sigrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
.nx-sigrow:hover { background: rgba(255,255,255,.04); }
.nx-sigrow-m { display: grid; min-width: 0; } .nx-sigrow-m .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-heat { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.nx-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nx-alerts li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.nx-alerts li div { display: grid; }
.nx-al-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; background: currentColor; box-shadow: 0 0 8px currentColor; }
.nx-pf { display: grid; gap: 6px; }
.nx-quick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.nx-qa { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--sep); color: var(--text); text-decoration: none;
  background: linear-gradient(135deg, rgba(16,30,46,.95), rgba(18,20,44,.95)); transition: border-color .2s, transform .2s; }
.nx-qa:hover { border-color: rgba(61,219,200,.45); transform: translateY(-2px); }
.nx-qa div { display: grid; flex: 1; } .nx-qa-go { color: var(--text-3); }

/* signals */
.nx-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.nx-scard { display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: 18px; border: 1px solid var(--sep); position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(16,26,44,.94), rgba(10,17,30,.96)); transition: border-color .2s, transform .2s, box-shadow .2s; }
.nx-scard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: currentColor; opacity: .85; }
.nx-scard.tone-bull { color: var(--bull); } .nx-scard.tone-bear { color: var(--bear); } .nx-scard.tone-hold { color: var(--hold); }
.nx-scard > * { color: var(--text); }
.nx-scard:hover { border-color: rgba(61,219,200,.35); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.nx-scard.expired { opacity: .6; }
.nx-scard-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.nx-scard-t { display: grid; min-width: 0; } .nx-scard-t strong { font-size: 18px; } .nx-scard-t .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-scard-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nx-warn { display: inline-flex; gap: 4px; align-items: center; }
.nx-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(6,11,20,.45); border: 1px solid var(--sep); }
.nx-levels div { display: grid; gap: 1px; } .nx-levels dt { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; } .nx-levels dd { margin: 0; font-size: 13.5px; font-weight: 600; }
.nx-trig { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.nx-trig li { display: flex; gap: 6px; align-items: flex-start; } .nx-trig .ic { margin-top: 3px; }
.nx-scard-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.nx-scard-f .tx-note { margin: 0; }
.nx-drawer { display: grid; gap: 14px; }
.nx-drawer-g { display: grid; gap: 14px; align-items: center; } @media (min-width: 640px) { .nx-drawer-g { grid-template-columns: 220px 1fr; } }
.nx-drawer-sig { padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(61,219,200,.35); background: rgba(6,11,20,.4); }
.nx-drawer-sig p { margin: 4px 0 0; font-size: 13px; }

/* charts */
.nx-charts-grid { grid-template-areas: "center" "right" "left"; }
@media (min-width: 1000px) { .nx-charts-grid { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "center right" "left right"; } }
@media (min-width: 1360px) { .nx-charts-grid { grid-template-columns: 250px minmax(0, 1fr) 290px; grid-template-areas: "left center right"; } }
.nx-chart-id { display: flex; gap: 12px; align-items: center; min-width: 0; }
.nx-chart-id > div { min-width: 0; }   /* lets the OHLC line wrap on phones instead of widening the page */
.nx-chart-id .tx-quote-px { display: flex; gap: 10px; align-items: baseline; }
.nx-bigchart { min-height: 420px; }
.nx-chart-ai { align-self: start; }
.nx-ai-dl { width: 100%; }
.tx-qrow.on { background: rgba(25,195,177,.12); box-shadow: inset 2px 0 0 var(--accent); }
a.tx-qrow { text-decoration: none; }
.tx-panel:fullscreen { overflow: auto; padding: 24px; background: var(--bg); }

/* watchlist */
.nx-add { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.nx-wtable { padding: 6px 10px; }
.nx-wl-sym { display: inline-flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; }
.nx-wl-sym span { display: grid; line-height: 1.25; }
.nx-acts { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.nx-wcards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.nx-wcard { display: grid; gap: 10px; padding: 14px; border-radius: 18px; border: 1px solid var(--sep); background: linear-gradient(180deg, rgba(16,26,44,.94), rgba(10,17,30,.96)); }
.nx-wcard header, .nx-ctx-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.nx-wcard header div, .nx-ctx-head div { display: grid; min-width: 0; }
.nx-wc-px { text-align: right; } .nx-wc-px .num:first-child { font-weight: 700; }
.nx-wc-g { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.nx-wc-g p { margin: 6px 0; }
.nx-wcard .tx-spark { width: 100%; height: 36px; }

/* analyst */
.nx-an-grid { grid-template-areas: "center" "left" "right"; }
@media (min-width: 1000px) { .nx-an-grid { grid-template-columns: 290px minmax(0, 1fr); grid-template-areas: "left center" "right center"; } }
@media (min-width: 1360px) { .nx-an-grid { grid-template-columns: 290px minmax(0, 1fr) 280px; grid-template-areas: "left center right"; } }
.nx-an-grid .tx-left .tx-panel { display: grid; gap: 10px; }
.nx-chat { min-height: 620px; display: flex; flex-direction: column; gap: 10px; }
.nx-thread { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 260px; }
.nx-ans { max-width: 92%; display: grid; gap: 8px; background: rgba(6,11,20,.55); border: 1px solid rgba(61,219,200,.22); }
.nx-answer { display: grid; gap: 10px; }
.nx-ans-sec h4 { margin: 0 0 3px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-soft); }
.nx-ans-sec p { margin: 0; white-space: pre-wrap; }
.nx-ans-sec:nth-child(2) h4 { color: #C4B5FD; } .nx-ans-sec:nth-child(3) h4 { color: var(--hold); } .nx-ans-sec:nth-child(4) h4 { color: var(--bear); }
.nx-ask textarea { background: rgba(6,11,20,.6); }
.nx-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.nx-hist li { display: grid; } .nx-hist li .link-btn { text-align: left; text-decoration: none; color: var(--text); }
.nx-hist:empty::before { content: "No questions yet."; color: var(--text-3); font-size: 13px; }

/* alerts */
.nx-conds { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.nx-cond { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--sep); background: rgba(6,11,20,.45); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.nx-cond:hover { border-color: rgba(61,219,200,.45); transform: translateY(-2px); }
.nx-cond.locked { opacity: .6; }
.nx-cond .tx-logo { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 4px; }
.nx-al-st { font-size: 12px; font-weight: 600; }
.nx-switch { width: 38px; height: 22px; border-radius: 999px; border: 1px solid var(--sep-strong); background: rgba(255,255,255,.08); position: relative; cursor: pointer; padding: 0; }
.nx-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .2s; }
.nx-switch.on { background: rgba(52,199,89,.35); border-color: var(--bull); } .nx-switch.on::after { transform: translateX(16px); background: #fff; }
.nx-switch:disabled { opacity: .4; cursor: default; }

/* record */
.nx-curve { min-height: 200px; }
.nx-rbars { display: grid; gap: 6px; }
.nx-rbar { display: grid; grid-template-columns: 56px 1fr 64px; gap: 8px; align-items: center; font-size: 12.5px; }
.nx-rbar-t { position: relative; height: 12px; border-radius: 6px; background: rgba(255,255,255,.04); }
.nx-rbar-t::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--sep-strong); }
.nx-rbar-t i { position: absolute; top: 0; bottom: 0; border-radius: 6px; opacity: .85; }
.nx-rbar-v { text-align: right; }

/* mobile */
@media (max-width: 759px) {
  .nx-filters { padding: 8px; } .nx-filters > * { flex: 1 1 140px; } .nx-add { flex-basis: 100%; }
  .nx-levels { grid-template-columns: repeat(2, 1fr); }
  .nx-cards, .nx-wcards { grid-template-columns: 1fr; }
  .nx-stats { grid-template-columns: repeat(2, 1fr); }
  .nx-actions .nx-sw { min-width: 0; width: 100%; }
  .nx-alerts-pg .tx-table td:nth-child(5), .nx-alerts-pg .tx-table th:nth-child(5) { display: none; }
}
.nx-cards { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.tx-table thead th.num { text-align: right; }
.nx-wtable td.num { padding-right: 14px; }
.nx-ans, .nx-answer { align-content: start; white-space: normal; }
.nx-thread { justify-content: flex-start; }
.nx-thread > .bubble { flex: none; }
.nx-cond { align-content: start; grid-template-rows: auto auto 1fr auto; }

/* ---------- Stocks hub + Forex / Metals / Crypto market pages (mk-*; only reachable with FLAG_FX_CRYPTO) ---------- */
.mk-page .nx-actions .mk-search { min-width: 280px; }
.mk-tools { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mk-tools .nx-qa .muted { line-height: 1.35; }
.mk-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .mk-grid { grid-template-columns: minmax(420px, 5fr) minmax(0, 7fr); align-items: start; } }
.mk-head, .mk-row { display: grid; align-items: center; gap: 4px 12px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.2fr); }
.mk-fx .mk-head, .mk-fx .mk-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.2fr); }
.mk-head { padding: 0 8px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--sep); }
.mk-head .r, .mk-row > span:not(.mk-sym) { text-align: right; }
.mk-list { display: grid; }
.mk-row { padding: 10px 8px; border-bottom: 1px solid var(--sep); color: var(--text); text-decoration: none; border-radius: 10px; min-height: 52px; }
.mk-row:hover, .mk-row:focus-visible { background: rgba(255,255,255,.04); outline: none; }
.mk-row:focus-visible { box-shadow: 0 0 0 2px var(--accent) inset; }
.mk-row.on { background: rgba(25,195,177,.09); box-shadow: inset 2px 0 0 var(--accent-soft); }
.mk-sym { display: grid; min-width: 0; line-height: 1.25; }
.mk-sym strong { font-size: 14px; }
.mk-sym .muted { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-px { font-size: 14.5px; font-weight: 700; }
.mk-chg, .mk-ba, .mk-time { display: grid; line-height: 1.3; font-size: 13px; }
.mk-chg .small, .mk-time .small { font-size: 11px; opacity: .85; }
.mk-ba { font-size: 12px; color: var(--text-2); }
.mk-time { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.mk-time { justify-items: end; gap: 3px; }
.mk-badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--sep); color: var(--text-3); white-space: nowrap; }
.mk-badge.mk-stale { color: var(--hold); border-color: rgba(255,159,10,.45); background: rgba(255,159,10,.08); }
.mk-badge.mk-closed { color: var(--text-2); border-color: var(--sep-strong); background: rgba(255,255,255,.05); }
.mk-badge.mk-unavailable { color: var(--bear); border-color: rgba(255,69,58,.4); }
.mk-chart-head { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; justify-content: space-between; }
.mk-ch-t h2 { margin: 0; font-size: 18px; }
.mk-ch-t { display: grid; }
.mk-ch-px { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mk-ch-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; width: 100%; }
.mk-ohlc { font-size: 12px; color: var(--text-2); margin: 10px 0 6px; white-space: pre-wrap; min-height: 18px; }
.mk-chart { height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--sep); background: #0A1220; }
.mk-lwc { width: 100%; height: 100%; }
.mk-chart > .state, .mk-chart > .nx-empty { height: 100%; display: grid; place-content: center; }
.mk-notes { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.mk-notes strong { color: var(--text); }
@media (max-width: 759px) {
  .mk-page .nx-actions .mk-search { min-width: 0; width: 100%; }
  .mk-head { display: none; }
  .mk-row, .mk-fx .mk-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "sym px" "time chg" "ba ba"; gap: 2px 10px; }
  .mk-sym { grid-area: sym; } .mk-px { grid-area: px; } .mk-chg { grid-area: chg; } .mk-time { grid-area: time; text-align: left !important; justify-items: start; }
  .mk-ba { grid-area: ba; display: flex; gap: 10px; justify-content: flex-start; text-align: left !important; }
  .mk-ba span:first-child::before { content: "Bid "; color: var(--text-3); } .mk-ba span:last-child::before { content: "Ask "; color: var(--text-3); }
  .mk-chart { height: 320px; }
}

/* Phones: a panel header's search/filters drop under the title instead of widening the page. */
@media (max-width: 480px) { .tx-ph-row { flex-wrap: wrap; } .nx-sw, .nx-actions .nx-sw { min-width: 0; } }

/* ---------------- Experimental forex / metals / crypto signals (allowlisted testers only) ---------------- */
.ex-tabs { margin: 0 0 14px; max-width: 100%; overflow-x: auto; }
.ex-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--hold);
  border: 1px solid rgba(255,159,10,.5); background: rgba(255,159,10,.1); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.ex-disclaimer { margin: 0 0 14px; }
.ex-disclaimer p { margin: 4px 0 0; font-size: 13px; }
.ex-page .nx-cards, .ex-section .nx-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ex-section { display: grid; gap: 14px; margin: 14px 0; }
.ex-agree { display: grid; justify-items: end; text-align: right; }
.ex-agree .num { font-size: 20px; font-weight: 700; }
.ex-why { margin: 8px 0 0; border-top: 1px solid var(--sep); padding-top: 8px; }
.ex-why summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); min-height: 28px; }
.ex-evidence { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.ex-evidence li { display: grid; grid-template-columns: 16px 1fr auto; gap: 6px; align-items: center; min-width: 0; }
.ex-evidence li span { overflow-wrap: anywhere; }
.ex-table { display: grid; gap: 0; font-size: 12.5px; margin: 8px 0; overflow-x: auto; }
.ex-tr { display: grid; grid-template-columns: 1.6fr repeat(6, minmax(64px, 1fr)); gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--sep); align-items: center; min-width: 560px; }
.ex-th { color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.ex-verdict { font-size: 12px; font-weight: 700; }
.ex-page .stack { display: grid; gap: 14px; margin-top: 14px; }
@media (max-width: 759px) {
  .ex-tabs { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
  .ex-tabs button { padding: 7px 4px; }
}
.ex-page > *, .ex-section > *, .ex-page .stack > *, .ex-section .tx-panel, .ex-page .tx-panel { min-width: 0; max-width: 100%; }
.ex-table { max-width: 100%; }
.ex-page .tx-ph-row, .ex-section .tx-ph-row { flex-wrap: wrap; gap: 6px; }
.ex-page .nx-ph-right, .ex-section .nx-ph-right { flex-wrap: wrap; }
.ex-page .tx-chips { flex-wrap: wrap; } .ex-page .tx-chip { white-space: normal; }

/* ---------- Live Stocks page (lv-*; only reachable with FLAG_LIVE_STOCKS). Builds on the mk-* market page blocks. ---------- */
@media (min-width: 1100px) { .lv-grid { grid-template-columns: minmax(560px, 6fr) minmax(0, 5fr); } }
.lv-tabs, .lv-range { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.lv-tab { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: rgba(255,255,255,.03); border: 1px solid var(--sep); border-radius: 999px; padding: 5px 12px; cursor: pointer; min-height: 32px; }
.lv-tab:hover { color: var(--text); border-color: var(--sep-strong); }
.lv-tab.on { color: var(--accent); border-color: rgba(25,195,177,.55); background: rgba(25,195,177,.10); }
.lv-tab:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 1px; }
.lv-head, .lv-row { grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr) minmax(0, .85fr) minmax(0, 1.25fr) minmax(0, .7fr) minmax(0, 1.15fr); }
.lv-list { max-height: 680px; overflow-y: auto; overscroll-behavior: contain; }
.lv-dr, .lv-vol { font-size: 12px; color: var(--text-2); }
.lv-bh { display: inline-flex; }
.mk-badge.lv-b-current { color: var(--bull); border-color: rgba(52,199,89,.4); background: rgba(52,199,89,.07); }
.mk-badge.lv-b-pre, .mk-badge.lv-b-after { color: var(--accent); border-color: rgba(25,195,177,.45); background: rgba(25,195,177,.08); }
.lv-dot-regular { background: var(--bull); } .lv-dot-pre_market, .lv-dot-after_hours { background: var(--accent); } .lv-dot-closed { background: var(--text-3); }
.lv-chartbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-top: 12px; }
.lv-chartbar .lv-range { margin: 0; }
.lv-links { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-links .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.lv-sig { display: flex; align-items: center; gap: 4px; }
@media (min-width: 1100px) and (max-width: 1439px) {
  .lv-head, .lv-row { grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, .75fr) minmax(0, 1.2fr); }
  .lv-c-range { display: none !important; }
}
@media (max-width: 759px) {
  .lv-head { display: none; }
  .lv-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "sym px" "time chg" "range vol"; gap: 2px 10px; }
  .lv-row .lv-dr { grid-area: range; text-align: left !important; }
  .lv-row .lv-vol { grid-area: vol; }
  .lv-row .lv-vol::before { content: "Vol "; color: var(--text-3); }
  .lv-row .mk-time { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
  .lv-list { max-height: none; overflow: visible; }
  .lv-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .lv-tabs::-webkit-scrollbar { display: none; }
  .lv-tab { flex: none; }
  .lv-links { width: 100%; }
  .lv-links .btn { flex: 1 1 0; justify-content: center; }
}

/* ---------------- Customer forex / metals / crypto signals (release-gated; views-signals-customer.js) ---------------- */
.cs-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; white-space: nowrap; max-width: 100%; }
.cs-badge.tone-hold { color: var(--hold); border-color: rgba(255,159,10,.4); background: rgba(255,159,10,.08); }
.cs-badge.tone-accent { color: var(--accent-soft); border-color: rgba(61,219,200,.4); background: rgba(61,219,200,.08); }
.cs-disclosure { margin: 0 0 14px; }
.cs-disclosure p { margin: 4px 0 0; font-size: 13px; }
.cs-hypo { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--sep-strong); border-radius: 10px; background: rgba(255,255,255,.02); }
.cs-hypo strong { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.cs-hypo p { margin: 0; font-size: 10.5px; line-height: 1.5; color: var(--text-3); letter-spacing: .01em; overflow-wrap: anywhere; }
.cs-model { display: grid; gap: 8px; padding: 6px 0 10px; border-bottom: 1px solid var(--sep); min-width: 0; }
.cs-model:last-of-type { border-bottom: 0; }
.cs-model-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-model .nx-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); }
.cs-fig { margin: 4px 0 0; min-width: 0; }
.cs-curve { display: block; width: 100%; height: 96px; }
.cs-zero { stroke: var(--sep-strong); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.cs-table .ex-tr { grid-template-columns: 1.2fr repeat(5, minmax(60px, 1fr)); min-width: 480px; }
.cs-paper.tone-bull { color: var(--bull); } .cs-paper.tone-bear { color: var(--bear); }
.cs-alert-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.cs-alert-row > div { min-width: 0; flex: 1 1 200px; }
.cs-alert-row p { margin: 2px 0 0; }
.cs-upgrade .state { margin: 0; }
.cs-page .nx-scard-badges, .cs-section .nx-scard-badges { flex-wrap: wrap; }
.cs-page .tx-chip, .cs-section .tx-chip { white-space: normal; overflow-wrap: anywhere; }
.cs-page .nx-levels dd, .cs-section .nx-levels dd { overflow-wrap: anywhere; }
@media (max-width: 759px) {
  .ex-tabs.cs-tabs { display: grid; grid-template-columns: repeat(var(--cs-n, 4), 1fr); width: 100%; }
}
@media (max-width: 540px) {
  .cs-table .ex-tr { grid-template-columns: 1.1fr .8fr 1.2fr .9fr; min-width: 0; }
  .cs-table .ex-tr > :nth-child(4), .cs-table .ex-tr > :nth-child(5) { display: none; }
}

/* Forex / Metals / Crypto signal cards: status chip, account id (signal-levels.js, views-user.js) */
.sl-status { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.sl-note { grid-column: 1 / -1; margin: 0; }
.sl-id { font-size: 12px; user-select: all; word-break: break-all; }

/* ===== Premium market pages + internal preview signal cards / paper record (2026-10-22) ===== */
.mk-page, .ex-page { --neon: #3DDBC8; --neon-2: #7FB2FF; --glass: linear-gradient(180deg, rgba(18,30,52,.92), rgba(9,15,28,.95)); }
.mk-page .tx-panel, .ex-page .tx-panel, .ex-section .tx-panel { background: var(--glass); border-color: rgba(61,219,200,.14);
  box-shadow: 0 0 0 1px rgba(127,178,255,.04) inset, 0 18px 40px -28px rgba(61,219,200,.35); }
.mk-page .tx-bar, .ex-page .tx-bar { background: radial-gradient(120% 140% at 0% 0%, rgba(61,219,200,.12), transparent 55%),
  radial-gradient(90% 120% at 100% 0%, rgba(127,178,255,.10), transparent 60%); border-radius: 16px; }
.mk-row.on { background: linear-gradient(90deg, rgba(61,219,200,.14), rgba(61,219,200,.02)); box-shadow: inset 3px 0 0 var(--neon); }
.mk-chartpanel .mk-lwc { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(61,219,200,.12); }
.mk-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; margin-top: 8px; }
.mk-levels:empty { display: none; }
.mk-lv-k { color: var(--text-3); }
.mk-lv::before { content: ""; display: inline-block; width: 16px; height: 0; border-top: 2px solid; margin-right: 5px; vertical-align: middle; }
.mk-lv-entry::before { border-color: #7FB2FF; } .mk-lv-tp::before { border-color: var(--bull); border-top-style: dashed; } .mk-lv-sl::before { border-color: var(--bear); border-top-style: dashed; }

/* direction + status badges: colour AND icon AND words */
.pr-side { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em;
  border-radius: 7px; padding: 2px 8px; border: 1px solid currentColor; }
.pr-side.tone-bull { background: rgba(52,199,89,.14); box-shadow: 0 0 12px -4px rgba(52,199,89,.7); }
.pr-side.tone-bear { background: rgba(255,69,58,.14); box-shadow: 0 0 12px -4px rgba(255,69,58,.7); }
.pr-status { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.pr-status.tone-accent { background: rgba(61,219,200,.10); } .pr-status.tone-bull { background: rgba(52,199,89,.10); }
.pr-status.tone-bear { background: rgba(255,69,58,.10); } .pr-status.tone-hold { background: rgba(255,159,10,.08); }

/* beginner signal card */
.pc-card { display: grid; gap: 10px; padding: 14px; border-radius: 16px; color: var(--text); background: var(--glass, rgba(12,20,36,.95));
  border: 1px solid rgba(127,178,255,.14); position: relative; overflow: hidden; }
.pc-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, currentColor, transparent); opacity: .8; }
.pc-card.tone-bull { color: var(--bull); } .pc-card.tone-bear { color: var(--bear); }
.pc-card > * { color: var(--text); }
.pc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.pc-asset { display: grid; } .pc-asset strong { font-size: 17px; }
.pc-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pc-prices, .pc-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-px, .pc-lv { display: grid; gap: 2px; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--sep); min-width: 0; }
.pc-k { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.pc-v { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.pc-tp { border-color: rgba(52,199,89,.35); } .pc-tp .pc-v { color: var(--bull); }
.pc-sl { border-color: rgba(255,69,58,.35); } .pc-sl .pc-v { color: var(--bear); }
.pc-sub { font-size: 11px; color: var(--text-3); }
.pc-fresh { justify-self: start; font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 1px 7px; border: 1px solid var(--sep); color: var(--text-3); }
.pc-fresh.pc-live { color: var(--neon, #3DDBC8); border-color: rgba(61,219,200,.45); }
.pc-fresh.pc-live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; vertical-align: 1px; animation: pc-pulse 2s ease-in-out infinite; }
.pc-fresh.pc-stale { color: var(--hold); border-color: rgba(255,159,10,.45); background: rgba(255,159,10,.08); }
.pc-fresh.pc-closed { color: var(--text-2); }
@keyframes pc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.pc-rr { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0; font-size: 13px; font-weight: 600; }
.pc-result { margin: 0; font-size: 13px; }
.pc-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; font-size: 12px; }
.pc-times dt { color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; } .pc-times dd { margin: 0; overflow-wrap: anywhere; }
.pc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.ex-page .nx-cards .pc-card, .ex-section .nx-cards .pc-card { transition: transform .2s ease, box-shadow .2s ease; }
.ex-page .nx-cards .pc-card:hover, .ex-section .nx-cards .pc-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px currentColor; }

/* paper record: summary, banner, progress, realized / unrealized tables */
.pr-h { font-size: 13px; margin: 14px 0 6px; letter-spacing: .02em; }
.pr-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; color: var(--hold);
  background: rgba(255,159,10,.08); border: 1px solid rgba(255,159,10,.35); margin-bottom: 10px; }
.pr-banner p { margin: 2px 0 0; color: var(--text-2); font-size: 12.5px; }
.pr-progress { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 12px; margin-bottom: 10px; }
.pr-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.pr-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--neon, #3DDBC8), var(--neon-2, #7FB2FF)); }
.nx-stats.tight.pr-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
@media (max-width: 480px) { .nx-stats.tight.pr-stats { grid-template-columns: 1fr 1fr; } }
.pr-note { margin: 10px 0; padding: 8px 10px; border-left: 3px solid var(--hold); background: rgba(255,159,10,.05); border-radius: 0 10px 10px 0; }
.pr-note p { margin: 2px 0; }
.pr-table { display: grid; font-size: 12.5px; margin: 6px 0; }
.pr-tr { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.2fr) repeat(5, minmax(0, 1fr)) minmax(0, 1.4fr);
  gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--sep); align-items: center; }
.pr-th { color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.pr-td { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.pr-sub { font-size: 10.5px; color: var(--text-3); }
.pr-unreal { justify-self: start; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--hold);
  border: 1px dashed rgba(255,159,10,.6); border-radius: 6px; padding: 0 5px; }
.pr-tag { display: inline-flex; align-items: center; gap: 4px; justify-self: start; font-size: 10.5px; font-weight: 700; color: var(--hold);
  background: rgba(255,159,10,.1); border: 1px solid rgba(255,159,10,.4); border-radius: 6px; padding: 1px 6px; }
.pr-overlap { background: linear-gradient(90deg, rgba(255,159,10,.06), transparent 60%); }
@media (max-width: 1100px) { .pr-tr { grid-template-columns: repeat(5, minmax(0, 1fr)); } .pr-th { display: none; }
  .pr-tr { padding: 10px 6px; } .pr-td::before { content: attr(data-label); font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; } }
@media (max-width: 480px) {
  .pr-tr { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; margin: 8px 0; border: 1px solid var(--sep); border-radius: 14px; background: rgba(255,255,255,.03); }
  .pr-td:first-child { grid-column: 1 / -1; }
  .pc-times { grid-template-columns: 1fr 1fr; }
  .pr-progress { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-fresh.pc-live::before { animation: none; }
  .ex-page .nx-cards .pc-card, .ex-section .nx-cards .pc-card { transition: none; }
  .ex-page .nx-cards .pc-card:hover, .ex-section .nx-cards .pc-card:hover { transform: none; }
}
.pc-card { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.pc-prices, .pc-levels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pc-card .ex-badge { white-space: normal; max-width: 100%; }
.pc-head > *, .pc-foot > * { min-width: 0; }
.pr-td > .pr-side, .pr-td > .pr-status { justify-self: start; }

/* ---------------- AI Market Intelligence (crypto / forex / gold / silver; owner-only preview) ----------------
   Additive only: new .mi-* classes for the overview cards, badges and beginner panels. The approved AI Intelligence
   gauge, hero, chart and card styles (the ix classes) are reused as-is and are NOT overridden here
   (tests/approved-gauge.test.mjs checks them byte for byte). */
.mi-sub { font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.mi-preview { margin-left: 8px; font-size: 10px; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(255,159,10,.5); color: #FFB340; }
.mi-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mi-flag, .mi-upd { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.35; padding: 6px 10px;
  border-radius: 10px; border: 1px solid var(--sep); background: rgba(6,11,20,.5); color: var(--text-2); max-width: 100%; }
.mi-flag { border-color: rgba(61,219,200,.28); color: var(--text); }
.mi-upd.tone-hold { border-color: rgba(255,159,10,.5); color: #FFB340; }
.mi-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.mi-card { position: relative; display: grid; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--sep);
  background: linear-gradient(180deg, rgba(22,34,58,.6), rgba(12,20,36,.7)); color: inherit; text-decoration: none; min-width: 0;
  transition: border-color .2s, transform .2s, box-shadow .2s; }
.mi-card:hover { border-color: rgba(61,219,200,.35); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.mi-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mi-card.tone-bull { box-shadow: inset 0 1px 0 rgba(52,199,89,.25); }
.mi-card.tone-bear { box-shadow: inset 0 1px 0 rgba(255,69,58,.25); }
.mi-card-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.mi-card-id { display: grid; min-width: 0; }
.mi-card-id span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-card-px { display: grid; justify-items: end; font-weight: 700; font-size: 14px; }
.mi-card-g { display: flex; justify-content: center; }
.mi-card-o { text-align: center; margin-top: -4px; }
.mi-card-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 12.5px; }
.mi-card-dl dt { color: var(--text-3); }
.mi-card-dl dd { margin: 0; text-align: right; color: var(--text); }
.mi-card-pxk { font-size: 10.5px; font-weight: 500; color: var(--text-3); font-family: inherit; }
.mi-stale { font-size: 11px; color: #FFB340; }
.mi-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--accent-soft); text-decoration: none; margin-bottom: 4px; }
.mi-rule { max-width: 720px; }
.mi-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.5; }
.mi-steps li { display: grid; gap: 2px; }
.mi-steps li span { color: var(--text-2); }
.mi-limits .mi-disc { margin: 12px 0 0; color: var(--text-2); }
@media (max-width: 480px) {
  .mi-card-top { grid-template-columns: auto minmax(0, 1fr); }
  .mi-card-px { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; gap: 8px; }
}
/* Customer release: locked "Available on Pro" card for Basic and Free (the plan is enforced by the API). */
.mi-locked { display: grid; gap: 16px; align-content: start; }
.mi-lock-intro { display: grid; gap: 8px; padding: 0; margin: 0; }
.mi-lock-intro h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); line-height: 1.2; }
.mi-lock-intro p { margin: 0; }
.mi-lock-eyebrow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-soft); }
.mi-pro { font-size: 10px; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(61,219,200,.45);
  color: var(--accent-soft); }
.mi-locked .mi-disc { margin: 0; color: var(--text-2); }

/* ================= Sidebar rail + phone drawer / bottom bar =================
   Desktop (wide screen with a mouse or trackpad): a slim icon rail. Hover or keyboard focus expands it OVER the page
   (body.rail-open); the pin (body.nav-pinned) keeps it open and pushes the page. Rows keep the same position in both
   states. (body.tx-mode, the terminal page layout, no longer changes the menu: the rail is compact by default.)
   Phones and touch-only screens: the same menu as a drawer (☰) plus a bottom bar of five destinations. */
:root { --rail-w: 68px; --rail-open-w: 252px; --bb-h: 60px; }
.nav-groups { display: grid; gap: 2px; }
.nav-group { display: grid; gap: 0; padding: 2px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--sep); }
.nav-gl { margin: 2px 0 0; padding: 0 14px; height: 14px; line-height: 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap; overflow: hidden; }
.sidebar .nav-item { position: relative; gap: 14px; padding: 6px 14px; min-height: 34px; font-size: 14.5px; white-space: nowrap; }
.nav-ic { position: relative; display: inline-flex; flex: none; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent-soft); box-shadow: 0 0 10px rgba(61,219,200,.55); }
.nav-item.has-badge .nav-ic::after { content: ""; position: absolute; top: -3px; right: -4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--hold); box-shadow: 0 0 0 2px var(--bg-2); opacity: 0; }
.nav-item.dot-accent .nav-ic::after { background: var(--accent-soft); }
.nav-foot { margin-top: auto !important; padding-top: 4px !important; border-top: 1px solid var(--sep); gap: 0 !important; }
.nav-foot .nav-item { font-size: 13.5px; min-height: 32px; }
.nav-pin { display: none; }
.nav-item:focus-visible, .nav-pin:focus-visible, .bb-item:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: -2px; }

@media (min-width: 960px) and (hover: hover), (min-width: 960px) and (pointer: fine) {
  .sidebar { padding: 4px 10px 6px; }
  .nav-pin { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 30px; margin: 0; padding: 5px 14px; border: 0; border-radius: 10px;
    background: none; color: var(--text-3); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; text-align: left; }
  .nav-pin:hover { color: var(--text); background: rgba(255,255,255,.04); }
  .nav-pin[aria-pressed="true"] { color: var(--accent-soft); }
  /* collapsed rail: icons only (labels, headings and badges fade out; a dot marks a badge) */
  .sidebar .nav-label, .sidebar .nav-badge, .nav-gl { opacity: 0; }
  .sidebar .nav-item.has-badge .nav-ic::after { opacity: 1; }
  /* expanded: over the page on hover / focus; pinned pushes the page (not on the brokerage terminal) */
  .rail-open .sidebar, .nav-pinned .sidebar { width: var(--rail-open-w); }
  .rail-open .sidebar { box-shadow: 18px 0 40px rgba(0,0,0,.5); border-right-color: var(--sep-strong); }
  .rail-open .sidebar .nav-label, .rail-open .sidebar .nav-badge, .rail-open .nav-gl,
  .nav-pinned .sidebar .nav-label, .nav-pinned .sidebar .nav-badge, .nav-pinned .nav-gl { opacity: 1; }
  .rail-open .sidebar .nav-item.has-badge .nav-ic::after, .nav-pinned .sidebar .nav-item.has-badge .nav-ic::after { opacity: 0; }
  .nav-pinned .shell { grid-template-columns: var(--rail-open-w) minmax(0, 1fr); }
  .bottom-bar { display: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .sidebar { transition: transform .2s ease, visibility 0s linear .2s, width .18s ease, box-shadow .18s ease; }
  .menu-open .sidebar { transition: transform .2s ease, visibility 0s; }
  .sidebar .nav-label, .sidebar .nav-badge, .nav-gl, .nav-ic::after { transition: opacity .14s ease; }
}

/* phones / touch: bottom bar (the brokerage terminal page has its own bottom Buy / Sell bar instead) */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 37; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--bb-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom);
  background: rgba(6,11,20,.94); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-top: 1px solid var(--sep); }
.bb-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
  color: var(--text-3); text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 10px; }
.bb-item .ic { width: 21px; height: 21px; }
.bb-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-item[aria-current="page"] { color: var(--accent-soft); }
.bb-item[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 0 0 2px 2px;
  background: var(--accent-soft); box-shadow: 0 0 10px rgba(61,219,200,.6); }
body:has(.tx-mobile-bar) .bottom-bar { display: none; }
@media (max-width: 959px), (hover: none) and (pointer: coarse) {
  body:not(:has(.tx-mobile-bar)) .content { padding-bottom: calc(var(--bb-h) + env(safe-area-inset-bottom)); }
  body:not(:has(.tx-mobile-bar)) .toast { bottom: calc(var(--bb-h) + 16px + env(safe-area-inset-bottom)); }
  .sidebar { bottom: 0; z-index: 41; }
  .scrim { z-index: 40; }
}
