/* Palantir Blueprint, dark theme: its gray scale, intent colors and system type. */
:root {
  --black: #111418;
  --dg1: #1c2127; --dg2: #252a31; --dg3: #2f343c; --dg4: #383e47; --dg5: #404854;
  --g1: #5f6b7c; --g2: #738091; --g3: #8f99a8; --g4: #abb3bf; --g5: #c5cbd3;
  --lg5: #f6f7f9;
  --blue1: #184a90; --blue2: #215db0; --blue3: #2d72d2; --blue4: #4c90f0; --blue5: #8abbff;
  --green3: #238551; --green4: #32a467; --green5: #72ca9b;
  --orange3: #c87619; --orange4: #ec9a3c; --orange5: #fbb360;
  --red3: #cd4246; --red4: #e76a6e; --red5: #fa999c;
  --text: var(--lg5); --text-2: var(--g5); --muted: var(--g4); --faint: var(--g3);
  --divider: rgba(255,255,255,.1);
  --font: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", sans-serif;
  --mono: monospace, "SF Mono", Menlo, Consolas, "Liberation Mono";
  --r: 2px;
  --elev1: 0 0 0 1px rgba(17,20,24,.4), 0 1px 1px rgba(17,20,24,.4);
  --elev3: 0 0 0 1px rgba(17,20,24,.4), 0 2px 4px rgba(17,20,24,.4), 0 8px 24px rgba(17,20,24,.4);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--dg2); color: var(--text); font: 400 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12px; } .grow { flex: 1; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--green5); } .neg { color: var(--red5); }
:focus-visible { outline: 2px solid rgba(76,144,240,.6); outline-offset: 2px; }
kbd { font: 11px var(--mono); color: var(--g4); background: var(--dg3); border-radius: var(--r); padding: 1px 5px; box-shadow: inset 0 0 0 1px var(--dg5); }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- navbar ---------- */
.navbar { position: sticky; top: 0; z-index: 10; height: 50px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--dg4); box-shadow: 0 0 0 1px rgba(17,20,24,.2), 0 1px 1px rgba(17,20,24,.4); }
.nav-group { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.nav-group.right { margin-left: auto; gap: 6px; }
.logo { width: 26px; height: 26px; display: block; }
.nav-title { font: 600 19px/1 "Outfit", var(--font); letter-spacing: -.01em; color: #fff; }
.nav-divider { width: 1px; height: 20px; background: var(--divider); }
.nav-sub { color: var(--muted); }
.omnibar { position: relative; flex: 0 1 440px; display: flex; align-items: center; }
.omnibar .icon { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--g4); }
.omnibar input { width: 100%; height: 30px; padding: 0 40px 0 34px; border: 0; border-radius: var(--r); background: rgba(17,20,24,.3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(17,20,24,.2), inset 0 1px 1px rgba(17,20,24,.5); outline: none; }
.omnibar input::placeholder { color: var(--g3); }
.omnibar input:focus { box-shadow: inset 0 0 0 1px var(--blue4), 0 0 0 2px rgba(76,144,240,.3); }
.omnibar kbd { position: absolute; right: 8px; }
.nav-run { height: 30px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: var(--r); background: rgba(200,118,25,.25); color: var(--orange5); cursor: pointer; font-weight: 500; }
.nav-run:hover { background: rgba(200,118,25,.35); }
/* Phase Orb (dotm-circular-6): 5×5 dots, corners masked, opacities set by app.js */
.orb { --s: 14px; display: inline-grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: calc(var(--s) * .1); width: var(--s); height: var(--s); flex: none; vertical-align: middle; color: currentColor; }
.orb i { border-radius: 50%; background: currentColor; opacity: .08; }
.orb i.off { visibility: hidden; }

/* ---------- buttons, tags, controls ---------- */
.bp-btn { height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 0; border-radius: var(--r); background: var(--dg3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 1px 2px rgba(17,20,24,.2); cursor: pointer; white-space: nowrap; font-size: 14px; }
.bp-btn:hover { background: var(--dg2); }
.bp-btn:active { background: var(--black); }
.bp-btn svg { width: 16px; height: 16px; }
.bp-btn.primary { background: var(--blue3); color: #fff; box-shadow: inset 0 0 0 1px rgba(17,20,24,.2), 0 1px 2px rgba(17,20,24,.2); }
.bp-btn.primary:hover { background: var(--blue2); }
.bp-btn.primary:active { background: var(--blue1); }
.bp-btn.primary svg { fill: currentColor; stroke: none; }
.bp-btn.danger { background: var(--red3); color: #fff; }
.bp-btn.minimal { background: none; box-shadow: none; color: var(--g5); }
.bp-btn.minimal:hover { background: rgba(143,153,168,.15); color: var(--text); }
.bp-btn.minimal.danger { color: var(--red5); }
.bp-btn.small { height: 24px; padding: 0 8px; font-size: 12px; }
.bp-btn.large { height: 40px; padding: 0 18px; font-size: 16px; }
.bp-btn.icon-only { width: 30px; padding: 0; }
.bp-btn:disabled { opacity: .5; cursor: not-allowed; }
.bp-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--g3); }
.bp-btn .dot.ok { background: var(--green4); } .bp-btn .dot.bad { background: var(--orange4); }

.bp-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--r); font-size: 12px; font-weight: 500; background: var(--g1); color: var(--lg5); white-space: nowrap; }
.bp-tag.minimal { background: rgba(143,153,168,.2); color: var(--g5); }
.bp-tag.primary { background: var(--blue3); color: #fff; } .bp-tag.primary.minimal { background: rgba(45,114,210,.25); color: var(--blue5); }
.bp-tag.success { background: var(--green3); color: #fff; } .bp-tag.success.minimal { background: rgba(35,133,81,.25); color: var(--green5); }
.bp-tag.warning { background: var(--orange3); color: #fff; } .bp-tag.warning.minimal { background: rgba(200,118,25,.25); color: var(--orange5); }
.bp-tag.danger { background: var(--red3); color: #fff; } .bp-tag.danger.minimal { background: rgba(205,66,70,.25); color: var(--red5); }

.seg { display: inline-flex; border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); background: var(--dg3); overflow: hidden; }
.seg button, .seg label span { display: block; padding: 0 12px; height: 30px; line-height: 30px; border: 0; background: none; color: var(--g5); cursor: pointer; font-size: 14px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg button + button, .seg label + label span { box-shadow: -1px 0 0 rgba(255,255,255,.08); }
.seg button:hover, .seg label:hover span { background: rgba(143,153,168,.15); color: var(--text); }
.seg button.on, .seg input:checked + span { background: var(--blue3); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid rgba(76,144,240,.6); outline-offset: -2px; }
.seg.small button { height: 24px; line-height: 24px; padding: 0 9px; font-size: 12px; }

input[type=date], .form-group input:not([type=checkbox]):not([type=radio]), .key-form input, .add-row input {
  height: 30px; padding: 0 10px; border: 0; border-radius: var(--r); background: rgba(17,20,24,.3); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(17,20,24,.2), inset 0 1px 1px rgba(17,20,24,.5); outline: none; color-scheme: dark; }
input[type=date]:focus, .form-group input:not([type=checkbox]):not([type=radio]):focus, .key-form input:focus, .add-row input:focus { box-shadow: inset 0 0 0 1px var(--blue4), 0 0 0 2px rgba(76,144,240,.3); }
input::placeholder { color: var(--g3); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { accent-color: var(--blue3); width: 16px; height: 16px; margin: 0; }
.check small { color: var(--muted); margin-left: 2px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - 50px); }
/* the whole sidebar scrolls on its own, so past analyses stay reachable below a long watchlist */
.sidebar { position: sticky; top: 50px; height: calc(100vh - 50px); background: var(--dg1); box-shadow: 1px 0 0 rgba(17,20,24,.6); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--dg5) transparent; }
.side-section { display: flex; flex-direction: column; flex: none; padding: 12px 8px 8px; }
.side-section.grow { flex: none; border-top: 1px solid var(--divider); padding-bottom: 16px; }
.side-head { position: sticky; top: 0; z-index: 1; background: var(--dg1); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px; }
.side-head h2 { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.add-row { display: flex; gap: 6px; padding: 0 8px 8px; }
.add-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li { position: relative; }
.menu .item { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; min-height: 32px; border: 0; border-radius: var(--r); background: none; color: var(--text); text-align: left; cursor: pointer; }
.menu .item:hover { background: rgba(143,153,168,.15); }
.menu .item.active { background: var(--blue3); color: #fff; }
.menu .item.active .pos, .menu .item.active .neg, .menu .item.active .sub { color: #fff; }
.menu .sym { font-weight: 600; }
.menu .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.menu .right { text-align: right; font-variant-numeric: tabular-nums; }
.menu .rm { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.menu .empty { color: var(--muted); padding: 6px 8px; font-size: 13px; }
.menu .orb { color: var(--orange5); margin-left: 7px; vertical-align: 0; }
.menu .item.active .orb { color: #fff; }

.main { padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- object header ---------- */
.object { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id price" "act act"; gap: 14px 24px; align-items: end; padding-bottom: 16px; border-bottom: 1px solid var(--divider); }
.obj-id { grid-area: id; min-width: 0; }
.obj-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.obj-line h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.obj-name { color: var(--g5); font-size: 16px; }
.obj-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.obj-price { grid-area: price; text-align: right; }
.obj-price .px { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.obj-price .chg { font-size: 14px; font-variant-numeric: tabular-nums; margin-left: 8px; }
.obj-price .asof { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.analyze { grid-area: act; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.field { display: grid; gap: 4px; }
.field > span { font-size: 12px; color: var(--muted); }
#run-btn { margin-left: auto; min-width: 180px; }
#stop-btn { min-width: 0; }

.callout { padding: 12px 14px 12px 16px; border-radius: var(--r); background: rgba(143,153,168,.15); color: var(--text); border-left: 3px solid var(--g3); display: flex; gap: 12px; align-items: center; }
.callout.primary { background: rgba(45,114,210,.15); border-left-color: var(--blue4); }
.callout.warning { background: rgba(200,118,25,.15); border-left-color: var(--orange4); }
.callout.danger { background: rgba(205,66,70,.15); border-left-color: var(--red4); }
.callout .bp-btn { margin-left: auto; }

/* ---------- cards ---------- */
/* chart and decision share one fixed height, side by side */
.row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 12px; height: 360px; }
.row > .card { min-height: 0; }
.card { background: var(--dg3); border-radius: var(--r); box-shadow: var(--elev1); min-width: 0; display: flex; flex-direction: column; }
.card-head { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--divider); }
.card-head h2 { font-size: 14px; font-weight: 600; }
.card-body { padding: 16px; min-width: 0; }
.chart-body { padding: 6px 10px 8px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* one fixed-height line: a wrapping legend would resize the chart under the pointer */
.legend { flex: none; height: 22px; display: flex; align-items: center; gap: 16px; overflow: hidden; white-space: nowrap; font-size: 12px; color: var(--muted); padding: 0 4px 4px; font-variant-numeric: tabular-nums; }
.legend .ohlc { display: flex; gap: 14px; min-width: 0; overflow: hidden; }
.legend .keys { display: flex; gap: 14px; margin-left: auto; flex: none; }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }
.chart { flex: 1; min-height: 0; }

/* ---------- verdict ---------- */
.verdict .card-body { display: flex; flex-direction: column; gap: 9px; padding: 12px 14px; flex: 1; min-height: 0; overflow: auto; }
.v-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.v-word { font-size: 28px; font-weight: 700; letter-spacing: .01em; line-height: 1; }
.v-status { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--orange5); line-height: 1.3; }
.v-status.stopped { color: var(--red5); }
.err-detail summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.err-detail pre { white-space: pre-wrap; word-break: break-word; font: 11.5px/1.5 var(--mono); color: var(--muted); background: var(--dg2); padding: 8px 10px; border-radius: var(--r); max-height: 160px; overflow: auto; margin: 6px 0 0; }
.v-actions a.bp-btn { text-decoration: none; }
.v-word.buy { color: var(--green5); } .v-word.sell { color: var(--red5); } .v-word.hold { color: var(--blue5); } .v-word.wait { color: var(--orange5); } .v-word.none { color: var(--g3); }
.v-en { color: var(--muted); }
.v-mean { font-size: 13px; color: var(--g5); margin: -3px 0 0; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.scale span { text-align: center; font-size: 11px; font-weight: 600; padding: 3px 0; background: var(--dg2); color: var(--g2); }
.scale span:first-child { border-radius: var(--r) 0 0 var(--r); } .scale span:last-child { border-radius: 0 var(--r) var(--r) 0; }
.scale span.on { background: var(--c); color: #fff; }
.props { display: grid; grid-template-columns: 92px minmax(0, 1fr); margin: 0; }
.props dt, .props dd { padding: 5px 0; border-top: 1px solid var(--divider); margin: 0; }
.props dt { color: var(--muted); font-size: 12px; }
.props dd { color: var(--text); font-size: 12.5px; line-height: 1.45; }
.voices { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.v-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.progress { height: 8px; border-radius: 4px; background: var(--dg2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--orange4); border-radius: 4px; transition: width .5s; }
.progress.stripes i { background-image: linear-gradient(-45deg, rgba(255,255,255,.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.2) 75%, transparent 75%); background-size: 16px 16px; animation: stripes .8s linear infinite; }
@keyframes stripes { to { background-position: 16px 0; } }
.empty-state { text-align: center; padding: 8px 6px; color: var(--muted); font-size: 13px; }
.empty-state svg { width: 28px; height: 28px; color: var(--g2); margin-bottom: 4px; }
.empty-state h3 { color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.empty-state p { margin: 0 auto 10px; max-width: 38ch; line-height: 1.45; }

/* ---------- stepper ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stepper li { position: relative; padding-top: 12px; border-top: 3px solid var(--dg5); }
.stepper li.done { border-top-color: var(--green4); }
.stepper li.run { border-top-color: var(--orange4); }
.stepper .st { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.stepper .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--dg5); color: var(--g5); flex: none; }
.stepper li.done .ic { background: var(--green3); color: #fff; }
.stepper li.run .ic { background: rgba(200,118,25,.25); color: var(--orange5); }
.stepper .d { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; line-height: 1.45; }
.stepper .t { color: var(--g3); font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------- report tabs ---------- */
.tabs-head { padding: 0 16px; }
.tabs { display: flex; gap: 20px; overflow-x: auto; }
.tabs button { position: relative; height: 40px; padding: 0; border: 0; background: none; color: var(--g5); cursor: pointer; font-size: 14px; white-space: nowrap; }
.tabs button:hover:not(:disabled) { color: var(--blue5); }
.tabs button[aria-selected="true"] { color: var(--blue5); box-shadow: inset 0 -3px 0 var(--blue4); }
.tabs button:disabled { color: var(--g1); cursor: default; }
.tabs .orb { color: var(--orange5); margin-left: 7px; vertical-align: 0; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.subtabs button { height: 26px; padding: 0 12px; border: 0; border-radius: 13px; background: var(--dg2); color: var(--g5); cursor: pointer; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.subtabs button[aria-selected="true"] { background: var(--blue3); color: #fff; box-shadow: none; }
.subtabs button:disabled { color: var(--g1); cursor: default; }

.md { max-width: 80ch; color: var(--g5); font-size: 14px; line-height: 1.65; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 { color: var(--text); font-weight: 600; line-height: 1.3; margin: 1.4em 0 .5em; }
.md h1 { font-size: 18px; } .md h2 { font-size: 16px; } .md h3, .md h4 { font-size: 14px; }
.md p { margin: 0 0 .9em; } .md ul, .md ol { margin: 0 0 .9em; padding-left: 22px; }
.md li { margin: 2px 0; } .md li::marker { color: var(--g3); }
.md strong { color: var(--text); font-weight: 600; }
.md a { color: var(--blue5); }
.md code { font: 12.5px var(--mono); background: var(--dg2); padding: 1px 4px; border-radius: var(--r); }
.md blockquote { margin: 0 0 .9em; padding: 8px 14px; background: rgba(200,118,25,.12); border-left: 3px solid var(--orange4); color: var(--g5); }
.md table { border-collapse: collapse; margin: 0 0 1em; display: block; overflow-x: auto; font-size: 13px; }
.md th, .md td { padding: 6px 11px; border-bottom: 1px solid var(--divider); text-align: left; }
.md th { color: var(--muted); font-weight: 600; }
.md tr:nth-child(even) td { background: rgba(143,153,168,.06); }
.md hr { border: 0; border-top: 1px solid var(--divider); }

.turn { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--r); background: var(--dg2); border-left: 3px solid var(--g1); }
.turn.bull { border-left-color: var(--green4); } .turn.bear { border-left-color: var(--red4); }
.turn.aggressive { border-left-color: var(--orange4); } .turn.conservative { border-left-color: var(--blue4); }
.turn-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.section-h { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 20px 0 10px; }

.bp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bp-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--divider); }
.bp-table td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--divider); vertical-align: top; }
.bp-table td.m { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-word; }
.bp-table td.t { font-variant-numeric: tabular-nums; color: var(--g3); white-space: nowrap; }

.foot { color: var(--g2); font-size: 12px; margin: 4px 0 0; }

/* ---------- dialogs ---------- */
.bp-dialog { width: min(520px, 94vw); padding: 0; border: 0; border-radius: 4px; background: var(--dg2); color: var(--text); box-shadow: var(--elev3); }
.bp-dialog::backdrop { background: rgba(17,20,24,.7); }
.dlg-head { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; background: var(--dg3); border-radius: 4px 4px 0 0; box-shadow: 0 1px 0 rgba(17,20,24,.4); }
.dlg-head h2 { font-size: 16px; font-weight: 600; }
.dlg-body { padding: 18px 20px; display: grid; gap: 14px; max-height: 70vh; overflow: auto; }
.dlg-body p { margin: 0; line-height: 1.5; }
.dlg-foot { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--divider); }
.key-form { display: flex; gap: 8px; }
.key-form input { flex: 1; min-width: 0; font-family: var(--mono); }
.key-state { display: flex; align-items: center; gap: 8px; }
.msg { font-size: 13px; min-height: 1.2em; } .msg.ok { color: var(--green5); } .msg.err { color: var(--red5); }
.form-group { display: grid; gap: 6px; }
.form-group .label { font-size: 13px; font-weight: 600; }
.form-group .label small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.form-group input:not([type=checkbox]):not([type=radio]) { width: 100%; font-family: var(--mono); font-size: 13px; }
.help-text { font-size: 12px; color: var(--muted); min-height: 1.3em; }
/* one aligned row per analyst: box · name · note */
.checks { display: grid; gap: 2px; }
.checks .check { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); align-items: center; column-gap: 10px; padding: 7px 8px; border-radius: var(--r); }
.checks .check:hover { background: rgba(143,153,168,.12); }
.checks .check input { width: 16px; height: 16px; margin: 0; }
.checks .check small { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.help h3 { font-size: 14px; font-weight: 600; margin-top: 4px; }
.help-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.help .bp-table td:first-child { width: 80px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .row { grid-template-columns: minmax(0, 1fr); height: auto; }
  .row > .card { height: 360px; }
  .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-sub, .nav-divider { display: none; }
}
.menu-btn { display: none; }
.scrim { position: fixed; inset: 0; z-index: 29; background: rgba(17,20,24,.6); }

/* ---------- phones and small tablets ---------- */
@media (max-width: 820px) {
  body { font-size: 14px; }
  .menu-btn { display: inline-flex; margin-left: -6px; }
  .navbar { flex-wrap: wrap; height: auto; padding: 8px 12px; row-gap: 8px; gap: 8px; }
  .nav-sub, .nav-divider { display: none; }
  .nav-group.right { gap: 2px; }
  #key-btn .lbl { display: none; }
  #key-btn { width: 30px; padding: 0; }
  .nav-run { order: 6; flex: 1 1 100%; justify-content: center; }
  .omnibar { order: 5; flex: 1 1 100%; margin: 0; }
  .omnibar kbd { display: none; }

  .layout { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  /* sidebar becomes a slide-in drawer */
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(86vw, 320px); z-index: 30;
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--elev3); padding-top: env(safe-area-inset-top); }
  body.drawer-open { overflow: hidden; }
  body.drawer-open .sidebar { transform: none; }

  .main { padding: 14px 12px 24px; gap: 12px; }
  .object { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "price" "act"; gap: 10px; padding-bottom: 12px; }
  .obj-line h1 { font-size: 24px; }
  .obj-price { text-align: left; }
  .obj-price .px { font-size: 24px; }
  .analyze { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
  .analyze .field:first-child { grid-column: 1 / -1; }
  .analyze .field:first-child input { width: 100%; }
  .analyze .field:nth-child(2) { grid-column: 1 / 2; min-width: 0; }
  .analyze .seg { width: 100%; display: flex; }
  .analyze .seg label { flex: 1; min-width: 0; }
  .analyze .seg label span { padding: 0 4px; text-align: center; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #adv-btn { grid-column: 2 / 3; }
  #run-btn { grid-column: 1 / -1; margin-left: 0; width: 100%; min-width: 0; }
  #stop-btn { grid-column: 1 / -1; width: 100%; }

  .row { grid-template-columns: minmax(0, 1fr); height: auto; gap: 12px; }
  .row > .card { height: auto; }
  .row > .card:first-child { height: 360px; }
  .verdict .card-body { overflow: visible; }
  .card-head { padding: 0 12px; flex-wrap: wrap; row-gap: 6px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
  .card-body { padding: 12px; }
  .chart-tools { flex-wrap: wrap; justify-content: flex-end; }
  .legend .ohlc span:nth-child(n+2):nth-child(-n+4) { display: none; }   /* keep date + close on narrow screens */
  .v-word { font-size: 26px; }
  .props { grid-template-columns: 84px minmax(0, 1fr); }
  .stepper { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stepper li { border-top: 0; border-left: 3px solid var(--dg5); padding: 8px 0 8px 12px; }
  .stepper li.done { border-left-color: var(--green4); } .stepper li.run { border-left-color: var(--orange4); }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 18px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs-head { padding: 0 12px; }
  .md { font-size: 14px; }
  .bp-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 8px 8px 0 0; max-height: 92dvh; }
  .dlg-head { border-radius: 8px 8px 0 0; }
  .dlg-body { max-height: 70dvh; padding: 16px; }
  .key-form { flex-direction: column; }
  .callout { flex-wrap: wrap; }
  .callout .bp-btn { margin-left: 0; }
}
@media (max-width: 380px) {
  .nav-title { font-size: 17px; }
  .analyze .seg label span { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* chart toolbar: indicator toggles + range */
.chart-tools { display: flex; gap: 8px; align-items: center; }
.seg .sw { display: inline-block; width: 10px; height: 2px; margin-right: 6px; vertical-align: middle; }
.seg button[aria-pressed="false"] .sw { opacity: .35; }
.chart.sub { flex: 0 0 78px; min-height: 78px; border-top: 1px solid var(--divider); }
.menu .group { padding: 8px 8px 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--g3); text-transform: uppercase; }

.chart-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.chart-wrap .chart { flex: 1; }
.chart-loading { position: absolute; inset: 0; background: var(--dg3); display: grid; place-items: center; }
.chart-loading .skeleton { width: 70%; height: 55%; border-radius: var(--r); background: linear-gradient(90deg, rgba(143,153,168,.08), rgba(143,153,168,.18), rgba(143,153,168,.08)); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* company logos: shown as they are; a monogram tile only when no logo loads */
.co-logo { --z: 22px; position: relative; flex: none; display: inline-grid; place-items: center; width: var(--z); height: var(--z); border-radius: calc(var(--z) * .24); background: var(--dg4); color: var(--g5); overflow: hidden; vertical-align: middle; }
.co-logo b { font-size: calc(var(--z) * .38); font-weight: 700; letter-spacing: -.02em; }
.co-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .15s; }
.co-logo.has-img { background: none; border-radius: 0; }
.co-logo.has-img b { visibility: hidden; }
.co-logo.has-img img { opacity: 1; }
.sym-wrap { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.obj-line { align-items: center; }
#o-logo:empty { display: none; }

/* sidebar rows never clip their tag: text shrinks and truncates instead */
.menu .item { grid-template-columns: minmax(0, 1fr) auto; }
.menu .item > .bp-tag { flex: none; }
.sym-wrap .txt { display: flex; flex-direction: column; min-width: 0; }
.menu .sym { display: inline-flex; align-items: center; white-space: nowrap; }
.menu .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* sign-in gate */
.bp-dialog.login { width: min(360px, 92vw); }
.bp-dialog.login::backdrop { background: var(--dg1); }
.login-body { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 28px 24px 22px; max-height: none; }
.login-body h2 { font: 600 22px "Outfit", var(--font); color: #fff; }
.login-body input { width: 100%; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r); background: rgba(17,20,24,.3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(17,20,24,.2), inset 0 1px 1px rgba(17,20,24,.5); outline: none; }
.login-body input:focus { box-shadow: inset 0 0 0 1px var(--blue4), 0 0 0 2px rgba(76,144,240,.3); }
.login-body .bp-btn { width: 100%; }
@media (max-width: 820px) {
  /* the sign-in card stays centred on phones (other dialogs become bottom sheets) */
  .bp-dialog.login { width: calc(100vw - 32px); max-width: 400px; margin: auto; border-radius: 6px; max-height: none; }
  .login-body { padding: 28px 20px 22px; max-height: none; }
  .login-body input { height: 44px; font-size: 16px; }   /* 16px stops iOS from zooming the field */
  .login-body .bp-btn.large { height: 44px; }
}

.key-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-actions a.bp-btn svg { width: 14px; height: 14px; }

/* phones: no sideways panning, and no iOS auto-zoom (inputs under 16px zoom the page) */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
.main, .row, .card, .object, .layout > * { min-width: 0; max-width: 100%; }
img, svg, canvas { max-width: 100%; }
@media (max-width: 820px) {
  input, select, textarea, .omnibar input { font-size: 16px !important; }
  .chart-tools .seg button { padding: 0 7px; }
  .legend { gap: 10px; }
  .obj-tags { overflow: hidden; }
  .md pre, .md table { max-width: 100%; }
  .props dd { word-break: break-word; }
}
#v-tag { display: inline-flex; align-items: center; gap: 8px; }
.pdf-btn { text-decoration: none; }
.pdf-btn svg { width: 14px; height: 14px; }

/* ---------- phones with the keyboard open ---------- */
@media (max-width: 820px) {
  .navbar { position: relative; }                 /* a sticky bar jumps under the iOS keyboard */
  .sidebar { top: 0; }
  .bp-dialog { margin: 12px auto auto; border-radius: 8px; max-height: calc(var(--vvh, 100dvh) - 24px); overflow: auto; }
  .bp-dialog .dlg-body { max-height: none; }
  .bp-dialog .dlg-head { position: sticky; top: 0; z-index: 1; border-radius: 8px 8px 0 0; }
  .bp-dialog .dlg-foot { position: sticky; bottom: 0; background: var(--dg2); }
  .bp-dialog.login { margin: max(12px, calc((var(--vvh, 100dvh) - 330px) / 2)) auto auto; }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* Any touch device: iOS zooms the page into a focused field under 16px and leaves it
   zoomed. Keep every field at 16px there (pinch zoom stays available). */
@media (pointer: coarse), (hover: none) {
  input, select, textarea, .omnibar input, .login-body input, .key-form input, .form-group input:not([type=checkbox]):not([type=radio]), input[type=date] { font-size: 16px !important; }
  .omnibar input { height: 36px; }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ---------- analysis room: a flow diagram (thin lines, ring nodes, lanes) ---------- */
.flow .card-head { background: var(--dg3); }
.flow-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; background: var(--black); min-height: 0; }
.flow-graph { min-width: 0; padding: 6px 8px; overflow-x: auto; }
.graph { width: 100%; min-width: 760px; height: auto; display: block; }
.graph text { stroke: none; fill: var(--g4); font: 500 11.5px var(--font); }
.graph .f-sub { fill: var(--g2); font-size: 10px; font-weight: 400; }
.graph .f-div { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.graph .f-lane { fill: var(--lg5); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.graph .f-lsub { fill: var(--g2); font-size: 10.5px; }
.graph .f-src text { fill: var(--g5); }
.graph .f-src .f-sub { fill: var(--g2); }
.graph .f-wire { fill: none; stroke-width: .9; opacity: .75; }
.graph .f-ghost { fill: none; stroke: none; }
.graph .f-edge { fill: none; stroke: var(--dg5); stroke-width: 1; }
.graph .f-edge.dash { stroke-dasharray: 4 4; }
.graph .f-edge.lit { stroke: var(--g4); }
.graph .f-edge.flow { stroke: var(--g5); stroke-dasharray: 3 4; animation: fdash 1.2s linear infinite; }
@keyframes fdash { to { stroke-dashoffset: -14; } }
.graph .f-rail { fill: none; stroke: var(--dg5); stroke-width: 1.6; }
.graph .f-rail.lit { stroke: var(--lg5); }
.graph .f-hub { fill: none; stroke: var(--g3); stroke-width: 1; }
.graph .f-hubdot { fill: var(--g4); }
.graph .f-turn { fill: var(--lg5); }
.graph .f-node .hit { fill: transparent; cursor: pointer; }
.graph .f-node .ring { fill: var(--black); stroke: var(--g1); stroke-width: 1.2; }
.graph .f-node .core { fill: var(--g1); }
.graph .f-node { cursor: pointer; }
.graph .f-node.run .ring { stroke: var(--g5); animation: fpulse 1.4s ease-in-out infinite; }
.graph .f-node.run .core { fill: var(--g5); }
.graph .f-node.run text { fill: var(--lg5); }
.graph .f-node.done .ring { stroke: var(--lg5); }
.graph .f-node.done .core { fill: var(--lg5); }
.graph .f-node.done text { fill: var(--lg5); }
.graph .f-node.off { opacity: .3; }
.graph .f-node.focus .ring { stroke: var(--blue5); stroke-width: 1.8; }
.graph .f-node:hover .ring { stroke-width: 1.8; }
@keyframes fpulse { 50% { stroke-opacity: .35; } }
.graph .f-verdict { font-size: 22px; font-weight: 600; fill: var(--lg5); letter-spacing: -.01em; }
.graph .f-verdict.buy { fill: var(--green5); } .graph .f-verdict.sell { fill: var(--red5); } .graph .f-verdict.hold { fill: var(--blue5); }
.graph .f-lvl { fill: var(--g5); font: 500 11px var(--mono); }
.graph .f-lvl.tp { fill: var(--green5); } .graph .f-lvl.sl { fill: var(--red5); }

.flow-side { border-left: 1px solid rgba(255,255,255,.08); background: var(--dg1); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.f-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.f-kicker { font-size: 11.5px; color: var(--g3); }
.f-status { font-size: 11.5px; padding: 1px 8px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--dg5); color: var(--g4); }
.f-status.run { color: var(--lg5); box-shadow: inset 0 0 0 1px var(--g3); }
.f-status.done { color: var(--green5); box-shadow: inset 0 0 0 1px rgba(114,202,155,.4); }
.f-status.err { color: var(--red5); box-shadow: inset 0 0 0 1px rgba(250,153,156,.4); }
.f-title { font-size: 22px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.f-subtitle { margin: -6px 0 0; color: var(--g3); font-size: 12.5px; }
.f-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.f-tile { padding: 10px 12px; background: var(--dg2); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); display: grid; gap: 2px; }
.f-tile b { font-size: 20px; font-weight: 500; }
.f-tile span { font-size: 11.5px; color: var(--g3); }
.f-now { display: grid; gap: 2px; }
.f-now b { font-weight: 500; }
.f-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12px; color: var(--g4); max-height: 150px; overflow: hidden; }
.f-feed li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-feed .num { color: var(--g2); margin-right: 8px; font-family: var(--mono); font-size: 11px; }
.f-note { margin: 0; color: var(--g3); font-size: 12.5px; }
.f-back { align-self: flex-start; margin-left: -8px; }
.f-out { max-height: 260px; overflow: auto; font-size: 13px; padding-right: 6px; }
.f-out h1, .f-out h2, .f-out h3 { font-size: 14px; margin: 10px 0 6px; }

/* ---------- chart overlay ---------- */
.chart-wrap { position: relative; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.ai-btn { gap: 6px; }
.ai-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g1); }
.ai-btn.on .dot { background: var(--blue4); }

/* ---------- company ---------- */
.co-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.co-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.co-kv { display: grid; grid-template-columns: auto 1fr; margin: 0; }
.co-kv dt, .co-kv dd { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.co-kv dt { color: var(--muted); }
.co-kv dd { text-align: right; font-variant-numeric: tabular-nums; }
.co-summary { margin: 0 0 10px; color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.co-summary.open { display: block; }
.co-rec { display: flex; align-items: baseline; gap: 10px; }
.co-rec b { font-size: 20px; font-weight: 600; }
.co-bar { position: relative; height: 46px; margin: 18px 6px 8px; }
.co-bar .track { position: absolute; left: 0; right: 0; top: 18px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(205,66,70,.5), rgba(50,164,103,.6)); }
.co-bar .mark { position: absolute; top: 12px; width: 2px; height: 16px; transform: translateX(-1px); background: var(--lg5); }
.co-bar .mark.mean { background: var(--blue5); }
.co-bar .lbl { position: absolute; top: -6px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.co-bar .lbl.under { top: 32px; }
.co-scroll { overflow-x: auto; }
.co-fin { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 8px; }
.co-fin th, .co-fin td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.co-fin th { color: var(--muted); font-weight: 500; }
.co-fin td:first-child { text-align: left; color: var(--text-2); white-space: normal; }
.co-fin tr.sep td { color: var(--blue5); font-weight: 600; padding-top: 12px; border-bottom: 0; }
.co-list { padding: 4px 0; max-height: 420px; overflow: auto; }
.co-list.short { max-height: 300px; }
.co-li { display: grid; gap: 2px; padding: 9px 16px; border-bottom: 1px solid var(--divider); color: inherit; text-decoration: none; }
.co-li:hover { background: rgba(255,255,255,.03); }
.co-li .t { font-size: 13px; }
.co-li .m { font-size: 11.5px; color: var(--faint); }
.co-li.dim .t { color: var(--muted); }
.co-list > p { padding: 0 16px; }
.co-skel { display: grid; gap: 8px; }
.co-skel i { height: 10px; background: var(--dg4); border-radius: 1px; animation: fpulse2 1.4s ease-in-out infinite; }
.co-skel i:nth-child(2) { width: 80%; } .co-skel i:nth-child(3) { width: 60%; }
@keyframes fpulse2 { 50% { opacity: .4; } }

@media (max-width: 1180px) {
  .flow-body { grid-template-columns: minmax(0, 1fr); }
  .flow-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .co-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .co-grid3, .co-grid2 { grid-template-columns: minmax(0, 1fr); }
}
/* the diagram needs width: keep the side panel beside it only on wide screens */
.graph text { font-size: 13px; }
.graph .f-sub { font-size: 11px; }
.graph .f-lane { font-size: 14.5px; }
.graph .f-lsub { font-size: 11.5px; }
.graph .f-verdict { font-size: 20px; }
.graph .f-lvl { font-size: 12px; }
@media (max-width: 1599px) {
  .flow-body { grid-template-columns: minmax(0, 1fr); }
  .flow-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .flow-side > .f-side-head, .flow-side > .f-title, .flow-side > .f-subtitle { grid-column: 1; }
  .flow-side > :not(.f-side-head):not(.f-title):not(.f-subtitle) { grid-column: 2; }
  .flow-side > .f-tiles { grid-row: 1 / span 3; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .f-out { max-height: 320px; }
}
@media (max-width: 820px) {
  .flow-side { display: flex; }
  .flow-side > .f-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* analysis room in the app's own Blueprint palette (same surfaces as the other cards) */
.flow-body { background: var(--dg3); }
.flow-side { background: var(--dg3); border-color: var(--divider); }
.f-tile { background: var(--dg2); box-shadow: var(--elev1); }
.graph .f-div { stroke: var(--divider); }
.graph .f-lane { fill: var(--text); }
.graph .f-lsub, .graph .f-sub { fill: var(--g3); }
.graph text { fill: var(--g5); }
.graph .f-edge { stroke: var(--dg5); stroke-width: 1.2; }
.graph .f-edge.lit { stroke: var(--g2); }
.graph .f-edge.flow { stroke: var(--blue4); }
.graph .f-rail { stroke: var(--dg5); stroke-width: 2; }
.graph .f-rail.lit { stroke: var(--g4); }
.graph .f-hub { stroke: var(--g2); }
.graph .f-turn { fill: var(--g5); }
.graph .f-node .ring { fill: var(--dg3); stroke: var(--g1); stroke-width: 1.4; }
.graph .f-node .core { fill: var(--g1); }
.graph .f-node.run .ring { stroke: var(--blue4); }
.graph .f-node.run .core { fill: var(--blue4); }
.graph .f-node.done .ring { stroke: var(--green4); }
.graph .f-node.done .core { fill: var(--green4); }
.graph .f-node.run text, .graph .f-node.done text { fill: var(--text); }
.graph .f-node.focus .ring { stroke: var(--blue5); stroke-width: 2; }
.graph .f-wire { opacity: .85; stroke-width: 1; }
.graph .f-verdict.hold { fill: var(--blue5); }
.graph .f-lvl { fill: var(--g4); }
.f-status.run { color: var(--blue5); box-shadow: inset 0 0 0 1px rgba(76,144,240,.5); }
/* the global "svg { stroke: currentColor }" rule must not outline the diagram's shapes */
.graph .f-node .hit { stroke: none; fill: transparent; }
.graph .f-node .core, .graph .f-turn, .graph .f-hubdot, .graph .f-src circle, .graph .f-packet { stroke: none; }
.graph text, .graph tspan { stroke: none; }
.nav-title, .nav-title:hover, .nav-title:visited { text-decoration: none; }
/* running state, readable at a glance: a turning dashed halo, a blue label and an orb on the column */
.flow-canvas { position: relative; min-width: 760px; }
.lane-orbs { position: absolute; inset: 0; pointer-events: none; }
.lane-orb { position: absolute; transform: translateY(-50%); line-height: 0; color: var(--blue5); }
.graph .f-node .spin { fill: none; stroke: none; }
.graph .f-node.run .spin { stroke: var(--blue4); stroke-width: 1.4; stroke-dasharray: 3 5; transform-box: fill-box; transform-origin: center; animation: fspin 2.4s linear infinite; }
@keyframes fspin { to { transform: rotate(360deg); } }
.graph .f-node.run .ring { fill: rgba(76,144,240,.14); stroke-width: 1.8; animation: none; }
.graph .f-node.run text { fill: var(--blue5); font-weight: 600; }
.graph .f-node.run .f-sub { fill: var(--blue5); font-weight: 500; }

/* ═══════════ layout v2: pages, a hideable sidebar, chart first ═══════════ */
/* type scale (desktop default 13–14 pt, nothing under 11): 12 caption · 14 body · 15 headline · 20 title · 28 large title */
:root { --t-cap: 12px; --t-body: 14px; --t-head: 15px; --t-title: 20px; --t-large: 28px; }
.card-head h2 { font-size: var(--t-head); font-weight: 600; }
.muted.small, .small { font-size: var(--t-cap); }

/* navbar tabs */
.nav-tabs { display: flex; gap: 2px; }
.nav-tab { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r); color: var(--g4); text-decoration: none; font-weight: 500; }
.nav-tab:hover { color: var(--text); background: rgba(143,153,168,.15); }
.nav-tab.on { color: var(--text); background: rgba(143,153,168,.22); }
.menu-btn { display: inline-flex; margin-left: -6px; }

/* sidebar: 240 px, hidden with one click on wide screens */
.layout { grid-template-columns: 240px minmax(0, 1fr); transition: grid-template-columns .2s ease; }
@media (min-width: 821px) {
  body.side-collapsed .layout { grid-template-columns: 0 minmax(0, 1fr); }
  body.side-collapsed .sidebar { visibility: hidden; }
}
.main { padding: 20px 28px 32px; gap: 18px; }
.view { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.view[hidden] { display: none; }

/* stock page: the chart leads, the decision sits beside it, narrower */
.view-stock .row { grid-template-columns: minmax(0, 1fr) 360px; height: clamp(460px, 64vh, 760px); }
.view-stock .object { padding-bottom: 14px; }
.view-stock .obj-line h1 { font-size: var(--t-large); }

/* ── home ── */
.tape { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tape::-webkit-scrollbar { display: none; }
.tape-i { flex: none; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px 12px; border: 0; border-radius: var(--r); background: var(--dg3); box-shadow: var(--elev1); color: var(--text); cursor: pointer; text-align: left; }
.tape-i:hover { background: var(--dg4); }
.tape-i .tn { grid-column: 1; font-size: var(--t-cap); color: var(--g4); white-space: nowrap; }
.tape-i b { grid-column: 1; font-size: var(--t-body); font-weight: 600; }
.tape-i > span.num { grid-column: 2; grid-row: 1; justify-self: end; font-size: var(--t-cap); }
.tape-i .spark { grid-column: 2; grid-row: 2; width: 56px; height: 18px; }

.ticker-news { position: relative; overflow: hidden; border-radius: var(--r); background: var(--dg1); box-shadow: var(--elev1); height: 36px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tn-track { display: flex; gap: 36px; width: max-content; height: 100%; align-items: center; animation: tape 90s linear infinite; padding-left: 16px; }
.ticker-news:hover .tn-track { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }
.tn-i { white-space: nowrap; color: var(--g5); text-decoration: none; font-size: 13px; }
.tn-i:hover { color: var(--text); text-decoration: underline; }
.tn-src { color: var(--blue5); font-weight: 600; margin-right: 8px; font-size: var(--t-cap); }
@media (prefers-reduced-motion: reduce) { .tn-track { animation: none; } .ticker-news { overflow-x: auto; } }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-head h2 { font-size: var(--t-title); font-weight: 600; letter-spacing: -.01em; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mini { display: grid; gap: 8px; padding: 14px 14px 12px; border: 0; color: var(--text); text-align: left; cursor: pointer; transition: background .15s; }
.mini:hover { background: var(--dg4); }
.mini-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-id { display: grid; min-width: 0; }
.mini-id b { font-size: var(--t-head); font-weight: 600; }
.mini-id small, .mv-id small { color: var(--g3); font-size: var(--t-cap); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-px { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mini-px b { font-size: var(--t-title); font-weight: 600; }
.mini-px span { font-size: 13px; font-weight: 500; }
.mini-chart .spark { width: 100%; height: 64px; display: block; }
.mini-foot { display: flex; justify-content: space-between; font-size: var(--t-cap); color: var(--g3); }
.mini-foot b { font-weight: 500; }
.movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.mv-list { list-style: none; margin: 0; padding: 4px 6px 8px; }
.mv-list button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto 76px; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: var(--r); background: none; color: var(--text); cursor: pointer; text-align: left; }
.mv-list button:hover { background: rgba(143,153,168,.12); }
.mv-id { display: grid; min-width: 0; }
.mv-id b { font-weight: 600; }
.chip { display: inline-block; min-width: 68px; padding: 3px 6px; border-radius: var(--r); text-align: right; font-weight: 600; font-size: 13px; }
.chip.pos { background: rgba(35,133,81,.22); color: var(--green5); }
.chip.neg { background: rgba(205,66,70,.22); color: var(--red5); }
.home-news { position: sticky; top: 68px; max-height: calc(100vh - 88px); }
.news-list { overflow-y: auto; padding: 4px 0; }
.nl-i { display: grid; gap: 4px; padding: 10px 16px; border-bottom: 1px solid var(--divider); color: var(--text); text-decoration: none; }
.nl-i:hover { background: rgba(255,255,255,.03); }
.nl-i .t { font-size: 13.5px; line-height: 1.4; }
.nl-i .m { display: flex; align-items: center; gap: 6px; font-size: var(--t-cap); color: var(--g3); }
.mk { width: 6px; height: 6px; border-radius: 50%; background: var(--g2); flex: none; }
.mk-us { background: var(--blue4); } .mk-bist { background: var(--red4); } .mk-crypto { background: var(--orange4); } .mk-macro { background: #d1980b; } .mk-eu { background: var(--green4); } .mk-cn { background: #bd6bbd; }

/* ── markets ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: var(--t-large); font-weight: 600; letter-spacing: -.015em; }
.page-head p { margin: 4px 0 0; }
.mk-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mk-filter { height: 30px; width: 240px; padding: 0 10px; border: 0; border-radius: var(--r); background: rgba(17,20,24,.3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(17,20,24,.2), inset 0 1px 1px rgba(17,20,24,.5); outline: none; }
.mk-filter:focus { box-shadow: inset 0 0 0 1px var(--blue4), 0 0 0 2px rgba(76,144,240,.3); }
.mk-scroll { overflow-x: auto; }
.mk-table { width: 100%; border-collapse: collapse; }
.mk-table th { position: sticky; top: 0; z-index: 1; background: var(--dg3); text-align: left; font-size: var(--t-cap); font-weight: 600; color: var(--g4); padding: 10px 12px; border-bottom: 1px solid var(--divider); white-space: nowrap; cursor: default; }
.mk-table th[data-sort] { cursor: pointer; }
.mk-table th[data-sort]:hover, .mk-table th[aria-sort] { color: var(--text); }
.mk-table th[aria-sort="ascending"]::after { content: " ↑"; } .mk-table th[aria-sort="descending"]::after { content: " ↓"; }
.mk-table td { padding: 9px 12px; border-bottom: 1px solid var(--divider); white-space: nowrap; font-size: var(--t-body); }
.mk-table .r { text-align: right; }
.mk-table tbody tr { cursor: pointer; }
.mk-table tbody tr:hover, .mk-table tbody tr:focus-visible { background: rgba(143,153,168,.1); outline: none; }
.mk-table .c-rank { width: 44px; color: var(--g3); font-size: var(--t-cap); }
.mk-table .pad { padding: 24px 16px; }
.mk-table.no-cap .c-cap, .mk-table.no-cap th[data-sort="mcap"] { display: none; }
.mk-sym { display: flex; align-items: center; gap: 12px; }
.mk-sym > span { display: grid; min-width: 0; }
.mk-sym b { font-weight: 600; }
.mk-sym small { color: var(--g3); font-size: var(--t-cap); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.rng { position: relative; display: block; width: 120px; height: 4px; border-radius: 2px; background: var(--dg5); }
.rng i { position: absolute; top: -4px; width: 3px; height: 12px; border-radius: 1px; background: var(--g5); transform: translateX(-1px); }
.rng-l { display: flex; justify-content: space-between; width: 120px; margin-top: 4px; font-size: 11px; color: var(--g3); }
.mk-table .spark { width: 110px; height: 30px; display: block; }

@media (max-width: 1280px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-news { position: static; max-height: 520px; }
  .view-stock .row { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) { .mk-table .hide-m { display: none; } }
@media (max-width: 1180px) { .view-stock .row { grid-template-columns: minmax(0, 1fr); height: auto; } .view-stock .row > .card:first-child { height: 520px; } }
@media (max-width: 820px) {
  .nav-tabs { display: none; }
  .main { padding: 14px 12px 24px; }
  .movers { grid-template-columns: minmax(0, 1fr); }
  .mk-table .hide-s { display: none; }
  .mk-filter { width: 100%; }
  .mk-tools { width: 100%; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mini-px b { font-size: 17px; }
}
@media (max-width: 820px) { .view-stock .row > .card:first-child { height: 400px; } }
@media (max-width: 820px) { #feat-mkt, #mk-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; } #feat-mkt button, #mk-tabs button { flex: none; } }

/* ── the summary: one calm, readable screen ── */
.brief { max-width: 880px; display: grid; gap: 22px; }
.brief-wait { display: flex; align-items: center; gap: 12px; color: var(--g4); padding: 18px 0; }
.brief-wait .orb { color: var(--blue5); }
.b-head { display: flex; align-items: center; gap: 10px; }
.b-rating { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r); font-weight: 600; font-size: 13px; }
.b-rating.buy { background: rgba(35,133,81,.25); color: var(--green5); }
.b-rating.sell { background: rgba(205,66,70,.25); color: var(--red5); }
.b-rating.hold { background: rgba(45,114,210,.25); color: var(--blue5); }
.b-conf { font-size: var(--t-cap); color: var(--g3); }
.b-headline { font-size: 22px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; text-wrap: balance; }
.b-action { margin: -10px 0 0; font-size: 16px; line-height: 1.55; color: var(--g5); text-wrap: pretty; }
.b-sec h4 { margin: 0 0 10px; font-size: var(--t-cap); font-weight: 600; color: var(--g3); }
.b-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.b-why { list-style: none; padding: 0 !important; gap: 10px !important; }
.b-why li { display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--r); background: var(--dg2); box-shadow: var(--elev1); }
.b-why b { font-size: 15px; font-weight: 600; color: var(--text); }
.b-why span { color: var(--text-2); line-height: 1.55; }
.b-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.b-for h4 { color: var(--green5); } .b-against h4 { color: var(--red5); }
.b-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.b-tile { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r); background: var(--dg2); box-shadow: var(--elev1); }
.b-tile span { font-size: var(--t-cap); color: var(--g3); }
.b-tile b { font-size: 13.5px; font-weight: 500; line-height: 1.45; }
.b-note { margin: 0; font-size: var(--t-cap); color: var(--g3); }
@media (max-width: 820px) { .b-two { grid-template-columns: minmax(0, 1fr); } .b-headline { font-size: 19px; } }

/* debate: bull and bear side by side, one row per round */
.debate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; margin-bottom: 8px; }
.db-col-head { position: sticky; top: 0; z-index: 1; padding: 8px 12px; border-radius: var(--r); background: var(--dg2); font-weight: 600; font-size: var(--t-head); }
.db-col-head.bull { color: var(--green5); box-shadow: inset 3px 0 0 var(--green4); }
.db-col-head.bear { color: var(--red5); box-shadow: inset 3px 0 0 var(--red4); }
.db-cell { min-width: 0; }
.db-cell .turn { margin: 0; height: 100%; }
@media (max-width: 900px) { .debate-grid { grid-template-columns: minmax(0, 1fr); } .db-col-head { display: none; } }

/* filings fill their card down to the bottom of the row (as tall as the financials beside it), then scroll */
.co-grid2 { align-items: stretch; }
.co-grid2 > .card { min-height: 0; }
.co-grid2 .co-list { flex: 1 1 0; min-height: 380px; max-height: none; overflow-y: auto; }
.co-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.co-cmp > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r); background: var(--dg2); box-shadow: var(--elev1); }
.co-cmp span { font-size: var(--t-cap); color: var(--g3); }
.co-cmp b { font-size: 17px; font-weight: 600; }
.co-cmp small { font-size: 11.5px; color: var(--g3); }
.co-differ { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r); background: rgba(45,114,210,.12); border-left: 3px solid var(--blue4); font-size: 13px; line-height: 1.5; color: var(--text-2); }

/* ═══ home v2 ═══ */
.tape.hidden { display: none; }
/* six headline numbers */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; display: grid; gap: 6px; padding: 14px 14px 0; border: 0; color: var(--text); text-align: left; cursor: pointer; overflow: hidden; transition: background .15s; }
.tile:hover { background: var(--dg4); }
.t-n { font-size: var(--t-cap); color: var(--g4); font-weight: 500; }
.t-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.t-v { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.t-c.chip { min-width: 0; font-size: 12px; }
.t-m { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--g3); }
.t-m b { font-weight: 500; }
.t-s { margin: 2px -14px 0; height: 46px; }
.t-s .spark { width: 100%; height: 46px; display: block; }

/* heat map and the AI list side by side */
.home-pair { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 12px; margin-bottom: 18px; align-items: stretch; }
.heat { padding: 10px 12px 12px; display: grid; gap: 5px; }
.hr { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: stretch; gap: 8px; }
.hr-l { display: flex; align-items: center; font-size: var(--t-cap); font-weight: 600; color: var(--g4); }
.hr-c { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.hc { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; padding: 6px 8px; border: 0; border-radius: var(--r); color: #fff; text-align: left; cursor: pointer; min-height: 46px; transition: filter .12s, transform .12s; }
.hc:hover { filter: brightness(1.15); }
.hc-n { grid-column: 1 / -1; font-size: 11.5px; color: rgba(255,255,255,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc b { font-size: 14px; font-weight: 600; }
.hc-p { justify-self: end; font-size: 11px; color: rgba(255,255,255,.72); }
.ai-card { display: flex; flex-direction: column; }
.ai-runs { padding: 4px 6px 8px; display: grid; align-content: start; }
.ai-run { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 8px; border: 0; border-radius: var(--r); background: none; color: var(--text); cursor: pointer; text-align: left; }
.ai-run:hover { background: rgba(143,153,168,.12); }
.ai-run + .ai-run { box-shadow: 0 -1px 0 var(--divider); }
.ai-id { display: grid; min-width: 0; }
.ai-id b { font-weight: 600; }
.ai-id small { color: var(--g3); font-size: var(--t-cap); }
.ai-px { font-size: 12.5px; color: var(--g5); white-space: nowrap; }
.ai-r { padding: 2px 7px; border-radius: var(--r); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.ai-r.buy { background: rgba(35,133,81,.25); color: var(--green5); }
.ai-r.sell { background: rgba(205,66,70,.25); color: var(--red5); }
.ai-r.hold { background: rgba(45,114,210,.25); color: var(--blue5); }
.pad { padding: 14px 10px; }

/* market breadth */
.breadth { margin: -2px 0 12px; display: grid; gap: 6px; }
.br-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--dg4); }
.br-bar i { display: block; height: 100%; }
.br-bar .up { background: var(--green4); } .br-bar .fl { background: var(--g1); } .br-bar .dn { background: var(--red4); }
.br-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--t-cap); color: var(--g4); }
.br-legend b { font-weight: 600; }
.br-avg { margin-left: auto; }

/* movers with proportional bars */
.mv-list button { grid-template-columns: auto minmax(0, 1fr) auto 90px 76px; }
.mv-bar { height: 6px; border-radius: 3px; background: var(--dg4); overflow: hidden; }
.mv-bar i { display: block; height: 100%; border-radius: 3px; }
.mv-bar i.pos { background: var(--green4); } .mv-bar i.neg { background: var(--red4); }

/* richer mini cards */
.mini { padding: 14px 14px 10px; }
.mini-chart .spark { height: 72px; }

@media (max-width: 1440px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .home-pair { grid-template-columns: minmax(0, 1fr); } .hr-c { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .t-v { font-size: 18px; }
  .hr { grid-template-columns: minmax(0, 1fr); }
  .hr-c { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv-list button { grid-template-columns: auto minmax(0, 1fr) auto 76px; }
  .mv-bar { display: none; }
  .br-avg { margin-left: 0; }
}
/* heat cells: name on top, move and price below, never overlapping */
.hr-c { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.hc { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 56px; padding: 7px 9px; }
.hc-n { width: 100%; }
.hc b { font-size: 14px; }
.hc-p { align-self: flex-start; font-size: 11px; }
.home-pair { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
@media (max-width: 1440px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1320px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hr-c { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hr-c { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
@media (max-width: 820px) { .layout, body.side-collapsed .layout { grid-template-columns: minmax(0, 1fr); } .tile { min-width: 0; } .t-row { flex-wrap: wrap; } }
@media (max-width: 1100px) { .home-pair { grid-template-columns: minmax(0, 1fr); } }

/* ── Palantir workspace pass: grey tiles, header strips, denser rows, minimal tags, status bar ── */
.nav-title { font: 600 16px/1 var(--font); letter-spacing: 0; }
.login-body h2 { font-family: var(--font); }
.card-head { min-height: 34px; padding: 0 12px; background: rgba(17,20,24,.18); }
.card-head h2 { font-size: 13px; font-weight: 600; }
.card-body { padding: 12px; }
.home-grid { gap: 10px; }
.home-pair { gap: 10px; margin-bottom: 10px; }
.hr-c { gap: 4px; }
.hc { background: var(--dg2) !important; box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px rgba(17,20,24,.35); color: var(--text); min-height: 50px; padding: 6px 8px 6px 11px; }
.hc:hover { filter: none; background: var(--dg4) !important; }
.hc-n { color: var(--g4); font-size: 11px; }
.hc b { font-size: 13.5px; }
.hc b.pos { color: var(--green5); } .hc b.neg { color: var(--red5); }
.hc-p { color: var(--g3); }
.ai-run { padding: 5px 8px; gap: 8px; }
.ai-r { background: none !important; padding: 0; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.nl-i { padding: 7px 12px; gap: 2px; }
.nl-i .t { font-size: 13px; }
body { padding-bottom: 24px; }
.statusbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 24px; display: flex; align-items: center; gap: 18px; padding: 0 12px; background: var(--dg1); box-shadow: 0 -1px 0 rgba(17,20,24,.6); font-size: 11.5px; color: var(--g3); }
.statusbar span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.statusbar .sb-r { margin-left: auto; color: var(--g4); }
.sb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green4); }
@media (max-width: 720px) { .statusbar span:nth-child(3) { display: none; } }

/* ── premium pass: no marquee, one market strip, a focused table, colour only on numbers ── */
#news-tape { display: none !important; }
.tiles { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 !important; margin: 0 0 10px; background: var(--dg3); border-radius: var(--r); box-shadow: var(--elev1); }
.tile { display: grid !important; grid-template-columns: 1fr auto; grid-template-areas: "n s" "v c"; align-items: center; gap: 2px 10px; min-height: 0 !important; padding: 10px 14px !important; background: none !important; border: 0; box-shadow: none !important; border-radius: 0 !important; color: var(--text); text-align: left; cursor: pointer; }
.tile + .tile { box-shadow: inset 1px 0 0 var(--divider) !important; }
.tile:hover { background: rgba(143,153,168,.08) !important; }
.tile .t-n { grid-area: n; font-size: 12px; color: var(--g3); }
.tile .t-v { grid-area: v; font-size: 16px; font-weight: 600; }
.tile .t-c { grid-area: c; justify-self: end; font-size: 12.5px; background: none !important; padding: 0 !important; }
.tile .t-s { grid-area: s; justify-self: end; width: 72px; }
.tile .t-s .spark { width: 72px; height: 20px; }
.feat-card { margin-bottom: 10px; }
.feat-card .breadth { padding: 10px 12px 0; }
.feat-card .minis { display: block !important; padding: 4px 0 6px; }
.ft { width: 100%; border-collapse: collapse; }
.ft th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--g3); padding: 6px 12px; border-bottom: 1px solid var(--divider); }
.ft td { padding: 5px 12px; font-size: 13px; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.ft .r { text-align: right; }
.ft tbody tr { cursor: pointer; }
.ft tbody tr:hover, .ft tbody tr:focus-visible { background: rgba(143,153,168,.1); outline: none; }
.ft-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ft-id b { font-weight: 600; }
.ft-id small { color: var(--g3); font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ft-w { font-style: normal; color: var(--orange5); font-size: 11px; }
.ft .spark { width: 96px; height: 22px; display: block; }
.ft td.pos { color: var(--green5); } .ft td.neg { color: var(--red5); }
.br-bar { height: 4px !important; }
.br-bar .up { background: rgba(50,164,103,.7) !important; } .br-bar .dn { background: rgba(231,106,110,.7) !important; }
.mv .mv-bar i { opacity: .55; }
.sec-head h2 { font-size: 13px !important; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tile:nth-child(4) { box-shadow: none !important; } }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ft .hide-s { display: none; } }
.tile { grid-template-areas: "n c" "v s" !important; }
.tile .t-c { align-self: baseline; }
.tile .t-s { align-self: end; }
.home-pair { grid-template-columns: minmax(280px, 1fr) minmax(0, 1.7fr) !important; }
@media (max-width: 1100px) { .home-pair { grid-template-columns: minmax(0, 1fr) !important; } }
.mv-list { padding: 2px 4px 6px; }
.mv-list button { padding: 5px 10px; gap: 8px; }
.mv-list .chip, .mv-list button > span:last-child { background: none !important; padding: 0 !important; text-align: right; font-weight: 500; }
.mv-bar { height: 3px; }

/* ── polish: logos sit on a light tile so dark marks stay readable ─────── */
.co-logo.has-img { background: #f5f8fa; border-radius: calc(var(--z) * .24); box-shadow: 0 0 0 1px rgba(16,22,26,.4); }
.co-logo.has-img img { padding: 12%; }
.co-logo:not(.has-img) { background: var(--dg4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.ft td { padding: 6px 12px; }
.ft-id { gap: 10px; }
.co-logo.has-img.lt { background: #30404d; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
/* the analyses list fills the panel beside the world grid instead of leaving a gap */
.ai-card { display: flex; flex-direction: column; }
.ai-card .ai-runs { flex: 1; display: flex; flex-direction: column; }
.ai-card .ai-run { flex: 1; min-height: 44px; }
