:root {
  --bg: #0E1013;
  --pane: #16191E;
  --pane-line: #22262D;
  --row-line: #1E2228;
  --raised: #1D2128;
  --tape: #14171B;
  --text: #ECEEF1;
  --text-2: #AEB3BB;
  --muted: #8B919B;
  --blue: #4C8DFF;
  --blue-soft: #9DC0FF;
  --blue-bg: #1F2A3D;
  --up: #2FC48A;
  --down: #F2555A;
  --up-bg: rgba(47, 196, 138, 0.12);
  --down-bg: rgba(242, 85, 90, 0.12);
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: 'Fragment Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden; }
body { font: 13px/1.4 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue-soft); }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

.app { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 12px 16px 10px; }
.brand { display: flex; align-items: center; gap: 10px; width: 200px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.cmd { position: relative; flex: 1 1 420px; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  background: var(--pane); border: 1px solid #2A2F37; border-radius: 12px; padding: 6px 8px 6px 14px; min-height: 44px; transition: border-color .15s; }
.cmd:focus-within { border-color: var(--blue); }
.cmd input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 14px var(--sans); outline: none; }
.cmd input::placeholder { color: var(--muted); }
.chip { background: #23272E; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
kbd { color: var(--muted); font-size: 11px; border: 1px solid #2A2F37; border-radius: 6px; padding: 3px 6px; }
.clock { width: 200px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; transition: background .3s; }
.dot.live { background: var(--up); }
.dot.stale { background: #E8B04B; }

/* Tape */
.tape { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0 16px 10px 88px; height: 30px; overflow: hidden; }
.tk { display: flex; align-items: baseline; gap: 8px; height: 30px; padding: 6px 12px; border-radius: 8px; background: var(--tape); white-space: nowrap; }
.tk .n { color: var(--muted); font-size: 12px; }
.tk .v, .tk .c { font-family: var(--mono); font-size: 12px; }

/* Layout */
.body { flex: 1; display: flex; gap: 12px; padding: 0 16px 12px; min-width: 0; }
.rail { flex: none; width: 60px; align-self: flex-start; position: sticky; top: 12px; background: var(--tape); border-radius: 14px;
  padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail a { width: 44px; height: 48px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); transition: background .12s, color .12s; }
.rail a:hover { background: var(--raised); color: var(--text); }
.rail a.on { background: var(--blue-bg); color: var(--blue-soft); }
.rail span { font-family: var(--mono); font-size: 9px; }

.grid { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; }
.pane { min-width: 0; background: var(--pane); border: 1px solid var(--pane-line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; }
.ph { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; min-height: 28px; }
.ph h2 { margin: 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { color: var(--muted); font-weight: 400; }
.code { font-family: var(--mono); font-size: 10px; color: var(--muted); background: var(--raised); border-radius: 5px; padding: 2px 6px; }
.seg { display: flex; gap: 2px; background: #0F1215; border-radius: 8px; padding: 3px; flex: none; }
.seg button { border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; padding: 5px 10px; cursor: pointer; }
.seg button.on { background: #2A2F37; color: var(--text); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--down); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.stories { flex: 7 1 620px; }
.markets { flex: 3 1 300px; padding-left: 12px; padding-right: 12px; }
.wire { flex: 4 1 380px; }
.sectors { flex: 6 1 540px; }
.movers { flex: 3 1 300px; padding-left: 12px; padding-right: 12px; }
.watch { flex: 4 1 340px; padding-left: 12px; padding-right: 12px; }
.earnings { flex: 3 1 300px; }
.macro { flex: 3 1 300px; padding-left: 12px; padding-right: 12px; }
.eco { flex: 3 1 300px; }
.markets .ph, .movers .ph, .watch .ph, .macro .ph { padding: 0 6px; }

/* Stories */
.stories-in { display: flex; flex-wrap: wrap; gap: 18px; }
.lead { flex: 3 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.lead .img { height: 260px; }
.lead h3 { margin: 0; font-size: 23px; font-weight: 600; line-height: 1.22; letter-spacing: -0.015em; }
.lead p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.side { flex: 2 1 260px; min-width: 0; display: flex; flex-direction: column; }
.sm { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.sm:last-child { border-bottom: 0; }
.sm .img { width: 92px; height: 66px; flex: none; }
.sm div.t { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sm b { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.img { border-radius: 10px; background: #1F2733 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #5E6876; }
.meta { font-size: 11px; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.tag { font-family: var(--mono); font-size: 11px; border-radius: 5px; padding: 1px 6px; background: var(--blue-bg); color: var(--blue-soft); }

/* Rows */
.region { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; padding: 8px 6px 4px; }
.row { display: grid; gap: 8px; align-items: center; padding: 6px; border-radius: 7px; }
.row:hover { background: var(--raised); }
.r-mkt { grid-template-columns: minmax(0, 1fr) 44px 78px 62px; }
.r-mov { grid-template-columns: minmax(0, 1fr) 78px 72px; }
.r-watch { grid-template-columns: minmax(0, 1fr) 64px 78px 70px; padding: 7px 8px; }
.r-macro { grid-template-columns: minmax(0, 1fr) 84px 66px; border-bottom: 1px solid var(--row-line); border-radius: 0; }
.row .num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row .nm { min-width: 0; display: flex; flex-direction: column; }
.row .nm b { font-weight: 500; }
.row .nm small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-family: var(--mono); font-size: 12px; text-align: right; border-radius: 6px; padding: 3px 6px; }
.pill.up { background: var(--up-bg); }
.pill.down { background: var(--down-bg); }
svg.spark { width: 100%; height: 20px; display: block; }

/* Wire */
.w { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--row-line); }
.w:last-child { border-bottom: 0; }
.w time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.w span.h { line-height: 1.35; }
.w.fresh span.h { font-weight: 600; }
.w .tag { background: var(--raised); color: var(--text); }
#wire { max-height: 520px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #2A2F37 transparent; }

/* Sectors */
.tiles { display: flex; flex-wrap: wrap; gap: 4px; }
.tile { border-radius: 8px; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.tile b { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { font-family: var(--mono); font-size: 12px; }

/* Earnings */
.day { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--row-line); align-items: center; }
.day:last-child { border-bottom: 0; }
.dbox { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; border-radius: 8px; padding: 5px 0; }
.dbox.today { background: var(--blue-bg); }
.dbox small { font-size: 10px; color: var(--muted); }
.dbox b { font-family: var(--mono); font-size: 15px; font-weight: 400; }
.names { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.names span { font-family: var(--mono); font-size: 12px; border: 1px solid #2A2F37; border-radius: 6px; padding: 3px 7px; }
.none { color: var(--muted); font-size: 12px; }

.empty { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; }
.empty span { font-weight: 500; }
.empty p { margin: 0; color: var(--muted); max-width: 300px; }

/* Value flash on update */
.flash-up { animation: fu .9s ease-out; }
.flash-down { animation: fd .9s ease-out; }
@keyframes fu { from { background: rgba(47, 196, 138, .28); } }
@keyframes fd { from { background: rgba(242, 85, 90, .28); } }

.status { display: flex; flex-wrap: wrap; gap: 20px; padding: 8px 16px 12px 88px; color: var(--muted); font-size: 11px; }
.status .r { margin-left: auto; }
.status .warn { color: #E8B04B; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: #23272E; border: 1px solid #2F343C;
  border-radius: 10px; padding: 10px 16px; transition: opacity .18s, transform .18s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skel { height: 14px; border-radius: 6px; background: var(--raised); margin: 10px 0; }

@media (max-width: 720px) {
  .brand, .clock { width: auto; }
  .tape { margin-left: 16px; }
  .status { padding-left: 16px; }
  .rail { display: none; }
  .lead .img { height: 190px; }
}

/* ---------- Command bar suggestions */
.suggest { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none;
  background: #1A1D23; border: 1px solid #2A2F37; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); max-height: 420px; overflow-y: auto; overflow-x: hidden; }
.suggest li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.suggest li.on, .suggest li:hover { background: #262A31; }
.suggest .s-sym { font-family: var(--mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .s-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .s-ex { color: var(--muted); font-size: 11px; white-space: nowrap; }
.suggest .s-head { display: block; padding: 6px 10px 4px; color: var(--muted); font-size: 11px; cursor: default; }
.suggest .s-head:hover { background: none; }

/* clickable rows */
[data-sym] { cursor: pointer; }

/* ---------- Company view */
.co-chart { flex: 8 1 760px; padding-bottom: 12px; }
.co-key { flex: 3 1 300px; }
.co-about { flex: 4 1 420px; }
.co-news { flex: 5 1 420px; }
.co-filings { flex: 3 1 300px; }
.co-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; margin-bottom: 12px; }
.co-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.co-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-id h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-px { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.co-px .big { font-size: 40px; letter-spacing: -0.04em; line-height: 1.05; border-radius: 6px; }
.co-px span:last-child { font-size: 15px; }
.readout { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--muted); padding-bottom: 6px; min-height: 20px; }
.readout b { color: var(--text); font-weight: 400; }
.co-head .seg { margin-left: auto; }
.co-head .seg button { min-width: 38px; min-height: 30px; font-family: var(--mono); }
.chart-host { position: relative; height: 420px; min-width: 0; }
.chart-host canvas { display: block; cursor: crosshair; }
.chart-host.loading::after { content: ''; position: absolute; left: 0; right: 64px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--blue), transparent);
  background-size: 50% 100%; background-repeat: no-repeat; animation: load 1s linear infinite; }
@keyframes load { from { background-position: -50% 0; } to { background-position: 150% 0; } }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--row-line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); white-space: nowrap; }
.kv span:last-child { font-family: var(--mono); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.range52 { position: relative; height: 4px; border-radius: 2px; background: #2A2F37; margin: 4px 0 10px; }
.range52 i { position: absolute; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--text); transform: translateX(-50%); }

.about p { margin: 0 0 12px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.about.open p { -webkit-line-clamp: unset; }
.about button.more { border: 0; background: none; color: var(--blue-soft); padding: 0; cursor: pointer; font-size: 12px; margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts small { color: var(--muted); font-size: 11px; }
.facts span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cn { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.cn:last-child { border-bottom: 0; }
.cn .img { width: 96px; height: 64px; flex: none; }
.cn .t { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cn b { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#coNews { max-height: 460px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #2A2F37 transparent; }

.fl { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--row-line); }
.fl:last-child { border-bottom: 0; }
.fl .form { text-align: center; font-family: var(--mono); font-size: 11px; background: var(--raised); border-radius: 6px; padding: 3px 0; white-space: nowrap; overflow: hidden; }
.fl .d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl time { color: var(--muted); font-size: 12px; font-family: var(--mono); }

.sk { display: block; height: 12px; border-radius: 6px; background: var(--raised); margin: 12px 0; animation: skp 1.2s ease-in-out infinite; }
@keyframes skp { 50% { opacity: .5; } }

@media (max-width: 720px) {
  .chart-host { height: 300px; }
  .co-px .big { font-size: 32px; }
}

/* ---------- FA view */
.fa-top { flex: 1 1 100%; }
.fa-table-pane { flex: 1 1 100%; }
.fa-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.fa-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
.fa-ctl .seg button { padding: 6px 12px; font-size: 12px; min-height: 30px; }
.fa-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 6px; }
.fa-chart-head h2 { margin: 0; font-size: 13px; font-weight: 600; }
#faStat { font-size: 12px; color: var(--muted); }
#faStat b { color: var(--text); font-weight: 400; }
.fa-chart { height: 220px; min-width: 0; }
.fa-chart canvas { display: block; }
.fa-table { min-width: 0; }
.fr { display: grid; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.fr:not(.fh):hover { background: var(--raised); }
.fr.sel { background: var(--blue-bg); }
.fr.sel span:first-child { color: var(--blue-soft); }
.fr span { font-family: var(--mono); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.fr span:first-child { font-family: var(--sans); text-align: left; font-size: 13px; color: var(--text-2); }
.fr.em span:first-child { color: var(--text); font-weight: 500; }
.fr.em span { color: var(--text); }
.fr span.neg { color: var(--down); }
.fr span svg.spark { margin-left: auto; width: 56px; }
.fr.fh { cursor: default; color: var(--muted); border-bottom: 1px solid var(--pane-line); border-radius: 0; margin-bottom: 4px; }
.fr.fh span { font-size: 11px; color: var(--muted); }
.fr:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.fa-note { margin-top: 12px; color: var(--muted); font-size: 11px; }

/* ---------- EQS view */
.eqs-side { flex: 1 1 300px; max-width: 360px; gap: 14px; align-self: flex-start; }
.eqs-main { flex: 4 1 560px; min-width: 0; }
.eqs-sec { display: flex; flex-direction: column; gap: 8px; }
.eqs-sec > small { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.eqs-input, .frow select, .frow input { background: #0F1215; border: 1px solid #2A2F37; border-radius: 8px; color: var(--text); font: 13px var(--sans); }
.eqs-input { width: 100%; padding: 9px 12px; min-height: 38px; }
.eqs-input:focus, .frow select:focus, .frow input:focus { outline: none; border-color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid #2A2F37; background: transparent; color: var(--text-2); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: #3A404A; color: var(--text); }
.chip.on { background: var(--blue-bg); border-color: #2F4A75; color: var(--blue-soft); }
.chip.saved { display: inline-flex; padding: 0; overflow: hidden; }
.chip.saved button { border: 0; background: none; color: inherit; font-size: 12px; padding: 5px 4px 5px 11px; cursor: pointer; }
.chip.saved button.x { padding: 5px 9px 5px 4px; color: var(--muted); }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) 54px 92px 28px; gap: 6px; align-items: center; margin-bottom: 6px; }
.frow select, .frow input { padding: 7px 8px; min-height: 34px; min-width: 0; width: 100%; }
.frow select.op { font-family: var(--mono); padding: 7px 4px; text-align: center; }
.num-in { position: relative; display: block; }
.num-in input { padding-right: 22px; font-family: var(--mono); }
.num-in i { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 11px; pointer-events: none; }
.frow .x, .btn-ghost { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.frow .x { font-size: 18px; min-height: 34px; border-radius: 8px; }
.frow .x:hover { background: var(--raised); color: var(--text); }
.btn-ghost { align-self: flex-start; padding: 6px 2px; color: var(--blue-soft); }
.btn-ghost:hover { color: var(--text); }
.eqs-row-btns { display: flex; gap: 16px; }
.eqs-actions { display: flex; align-items: center; gap: 14px; }
#eqsStat { font-size: 11px; color: var(--muted); }
.sr-row { display: grid; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 7px; }
a.sr-row:hover { background: var(--raised); }
.sr-row > span { font-family: var(--mono); font-size: 12.5px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-row > span.txt { font-family: var(--sans); font-size: 12px; color: var(--text-2); text-align: left; }
.sr-row .co { display: flex; flex-direction: column; text-align: left; font-family: var(--sans); min-width: 0; }
.sr-row .co b { font-weight: 500; font-size: 13px; }
.sr-row .co small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.sr-row.sh { border-bottom: 1px solid var(--pane-line); border-radius: 0; margin-bottom: 4px; position: sticky; top: 0; background: var(--pane); z-index: 1; }
.sr-row.sh button { border: 0; background: none; color: var(--muted); font: 11px var(--sans); text-align: right; cursor: pointer; padding: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-row.sh button:first-child { text-align: left; }
.sr-row.sh button:hover, .sr-row.sh button[aria-sort] { color: var(--text); }
@media (max-width: 720px) { .eqs-side { max-width: none; } }
.names span[data-sym]:hover { border-color: #3A404A; color: var(--blue-soft); }
.names span.more { border: 0; color: var(--muted); padding: 3px 2px; }

/* ---------- Home filters */
.hfilter { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 10px 16px; }
.hf-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hf-group small, .hf-group label { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.hf-select { background: #0F1215; color: var(--text); border: 0; border-radius: 8px; padding: 7px 30px 7px 10px; font: inherit; font-size: 12px;
  cursor: pointer; appearance: none; -webkit-appearance: none; max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238B919B' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.hf-select:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 1px; }
.hf-select.on { background-color: var(--blue-bg); color: var(--blue-soft); }
.hf-note { font-size: 12px; color: var(--muted); margin-left: auto; }
.hf-note.on { color: var(--blue-soft); }
.hf-reset { padding: 5px 12px; }
.fsub:empty { display: none; }
@media (max-width: 720px) {
  .hfilter { gap: 10px 14px; }
  .hf-note { margin-left: 0; flex: 1 1 auto; }
}

/* ---------- Buttons shared by watchlists */
.btn-solid { border: 0; border-radius: 8px; background: var(--blue); color: #fff; font: 500 12.5px var(--sans); padding: 0 14px; min-height: 36px; cursor: pointer; white-space: nowrap; }
.btn-solid:hover { filter: brightness(1.08); }
.btn-solid:focus-visible, .btn-ghost:focus-visible, .ic:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 2px; }
.btn-ghost.danger { color: #F2858A; }
.ic { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.ic:hover { background: #2A2F37; color: var(--text); }
.ic.on { color: #E8B04B; }
.ic em { position: absolute; top: 1px; right: 0; font: 600 9px var(--mono); font-style: normal; color: #E8B04B; }

/* ---------- W screen */
.w-side { flex: 1 1 290px; max-width: 340px; gap: 10px; align-self: flex-start; }
.w-main { flex: 4 1 560px; min-width: 0; }
.w-lists { display: flex; flex-direction: column; gap: 2px; }
.w-li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; color: var(--text-2); }
.w-li:hover { background: var(--raised); color: var(--text); }
.w-li.on { background: var(--blue-bg); color: var(--blue-soft); }
.w-li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.w-li .ct { font-size: 11px; color: var(--muted); }
.w-tag { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid #2F343C; border-radius: 5px; padding: 1px 5px; }
.w-inline { display: flex; gap: 8px; }
.w-inline .eqs-input { flex: 1; min-width: 0; }
.w-alert-head { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--pane-line); }
.w-alert-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.w-alert-form #wAlSym, .w-alert-form .w-sel { grid-column: 1 / -1; }
.w-alert-form .btn-solid { min-width: 72px; }
.w-sel { width: 100%; min-height: 38px; }
.w-alerts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.w-al { border: 1px solid var(--pane-line); border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column; gap: 4px; }
.w-al.triggered { border-color: #5A4A24; background: rgba(232, 176, 75, .07); }
.w-al-main { display: flex; align-items: baseline; gap: 8px; cursor: pointer; min-width: 0; }
.w-al-main b { font-family: var(--mono); font-weight: 400; font-size: 13px; }
.w-al-main .cond { color: var(--text-2); font-size: 12.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-al-main .now { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.w-al-main .now i { font-style: normal; }
.w-al-sub { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--muted); }
.w-al-sub > span { flex: 1; min-width: 0; }
.w-al-sub .btn-ghost { padding: 2px 0; font-size: 12px; }
.w-al-sub .trig { color: #E8B04B; }
.w-al-empty { font-size: 12px; color: var(--muted); line-height: 1.5; padding: 4px 2px; }
.w-head { flex-wrap: wrap; }
.w-head h2 { font-size: 15px; min-width: 0; }
.w-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.w-actions .btn-ghost { padding: 4px 0; font-size: 12.5px; }
#wStat { font-size: 11px; color: var(--muted); }
.w-rename { background: #0F1215; border: 1px solid var(--blue); border-radius: 7px; color: var(--text); font: 600 15px var(--sans); padding: 4px 8px; width: min(320px, 60vw); }
.w-add { position: relative; margin-bottom: 10px; }
.w-add .suggest { top: calc(100% + 4px); }
.wl-row { display: grid; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; position: relative; }
.wl-row:not(.sh):hover, .wl-row:focus-visible { background: var(--raised); outline: none; }
.wl-row:focus-visible { box-shadow: inset 0 0 0 1px #3A4A66; }
.wl-row > span { font-family: var(--mono); font-size: 12.5px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wl-row .co { display: flex; flex-direction: column; text-align: left; font-family: var(--sans); }
.wl-row .co b { font-weight: 500; font-size: 13px; font-family: var(--mono); }
.wl-row .co small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.w-delay { color: var(--muted); font-style: normal; }
.wl-row .pill { font-weight: 400; }
.wl-row .sp { display: flex; justify-content: flex-end; }
.wl-row .sp .spark { width: 100%; max-width: 110px; height: 24px; }
.wl-row .soon { color: #E8B04B; }
.wl-row .hot { color: var(--blue-soft); }
.wl-row .grip { color: #4A515C; cursor: grab; display: flex; justify-content: center; }
.wl-row:hover .grip { color: var(--muted); }
.wl-row.dragging { opacity: .45; }
.wl-row.drop-b { box-shadow: inset 0 2px 0 var(--blue); }
.wl-row.drop-a { box-shadow: inset 0 -2px 0 var(--blue); }
.w-acts { display: flex; justify-content: flex-end; gap: 2px; }
.wl-row .w-acts .ic { opacity: .55; }
.wl-row:hover .w-acts .ic, .wl-row:focus-within .w-acts .ic, .wl-row .w-acts .ic.on { opacity: 1; }
.rng { display: flex; align-items: center; justify-content: flex-end; }
.rng .bar { position: relative; width: 100%; max-width: 96px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(242,85,90,.45), #2A2F37 50%, rgba(47,196,138,.45)); }
.rng i { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px var(--pane); }
.wl-row.sh { border-bottom: 1px solid var(--pane-line); border-radius: 0; margin-bottom: 4px; position: sticky; top: 0; background: var(--pane); z-index: 1; cursor: default; }
.wl-row.sh button { border: 0; background: none; color: var(--muted); font: 11px var(--sans); text-align: right; cursor: pointer; padding: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-row.sh button[disabled] { cursor: default; }
.wl-row.sh button:nth-child(-n+2) { text-align: left; }
.wl-row.sh button:not([disabled]):hover, .wl-row.sh button[aria-sort] { color: var(--text); }
.wl-row.sh .w-order { color: var(--blue-soft); }
.w-empty { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 28px 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.w-empty b { color: var(--text); font-weight: 500; }
kbd { font-size: 11px; background: var(--raised); border-radius: 4px; padding: 1px 5px; }

/* Home pane list picker */
.w-pick { display: flex; align-items: center; gap: 8px; min-width: 0; }
.w-pick .hf-select { max-width: 190px; padding-top: 5px; padding-bottom: 5px; }
.w-pick a.code:hover { color: var(--text); }

/* Company page: watch button + popover */
.w-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #2A2F37; background: transparent; color: var(--text-2); border-radius: 999px;
  padding: 4px 11px; font: 12px var(--sans); cursor: pointer; align-self: center; max-width: 220px; }
.w-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-btn:hover { border-color: #3A404A; color: var(--text); }
.w-btn.on { background: var(--blue-bg); border-color: #2F4A75; color: var(--blue-soft); }
.w-btn.on svg { fill: currentColor; }
.w-pop { position: fixed; z-index: 40; background: #1B1F25; border: 1px solid #2F343C; border-radius: 12px; padding: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
  display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 32px); overflow-y: auto; }
.w-pop[hidden] { display: none !important; }
.wp-sec { display: flex; flex-direction: column; gap: 4px; }
.wp-sec > small { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.wp-li { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text-2); padding: 7px 8px; border-radius: 8px; font: 13px var(--sans); cursor: pointer; text-align: left; }
.wp-li:hover, .wp-li:focus-visible { background: #262B33; color: var(--text); outline: none; }
.wp-li .ck { width: 16px; color: var(--blue-soft); }
.wp-li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-li .ct { font-size: 11px; color: var(--muted); }
.wp-li.on { color: var(--text); }
.wp-new { margin-top: 4px; }
.wp-new .eqs-input { min-height: 34px; padding: 6px 10px; font-size: 12.5px; }
.wp-al { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.wp-al .w-sel { grid-column: 1 / -1; }

/* Alert cards + notices (bottom right on desktop, bottom on phones) */
.alert-stack { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.a-card { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #1F232A; border: 1px solid #5A4A24; border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.4); animation: a-in .18s ease-out; }
.a-card.note { border-color: #2F343C; }
.a-ic { color: #E8B04B; display: flex; }
.a-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.a-body b { font-weight: 500; font-size: 13px; }
.a-body span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.a-card .btn-ghost { padding: 4px 2px; font-size: 12.5px; align-self: center; }
@keyframes a-in { from { opacity: 0; transform: translateY(8px); } }
.rail a { position: relative; }
.rail .badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: #E8B04B; color: #14161A;
  font: 600 10px var(--mono); font-style: normal; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
@media (max-width: 720px) {
  .w-side { max-width: none; }
  .w-main { order: -1; }
  .alert-stack { right: 16px; left: 16px; width: auto; }
}

/* ---------- Market map */
.hm-ctl { display: flex; align-items: center; gap: 12px; }
.hm-ctl .btn-ghost { padding: 4px 0; font-size: 12px; white-space: nowrap; }
.hm { position: relative; height: 352px; border-radius: 10px; overflow: hidden; background: #14171B; }
.hm canvas { display: block; touch-action: manipulation; }
.hm-tip { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; background: #1F232A; border: 1px solid #2F343C; border-radius: 10px;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-2); max-width: 240px; box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.hm-tip b { color: var(--text); font: 500 13px var(--mono); }
.hm-tip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-tip .up { color: var(--up); } .hm-tip .down { color: var(--down); }
.hm-tip em { font-style: normal; color: var(--muted); font-size: 11px; }
@media (max-width: 720px) { .hm { height: 300px; } }

/* ---------- N: news screen */
.n-side { position: sticky; top: 12px; }
.n-side .cnt, .chip .cnt { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-left: 2px; }
.chip.on .cnt { color: inherit; opacity: .7; }
.n-sym { align-self: flex-start; }
.n-sym b { font-family: var(--mono); font-weight: 600; }
.n-main { flex: 4 1 560px; min-width: 0; }
.n-stat { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.n-new { position: sticky; top: 10px; z-index: 2; align-self: center; margin: 0 0 8px; border: 0; border-radius: 999px; padding: 7px 14px;
  background: var(--blue); color: #fff; font: 600 12.5px var(--sans); cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.nday { margin: 18px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nday:first-child { margin-top: 2px; }
.nrow { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--row-line); align-items: start; }
.nrow time { color: var(--muted); font-size: 12px; padding-top: 2px; }
.nrow.fresh { animation: nfresh 2.4s ease-out; }
@keyframes nfresh { from { background: var(--blue-bg); } to { background: transparent; } }
.nbody { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.nt { color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 600; line-height: 1.38; overflow-wrap: anywhere; }
.nt:hover { color: var(--blue-soft); }
.nt:visited { color: var(--text-2); }
.nbody p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nbody mark { background: rgba(77,141,255,.22); color: inherit; border-radius: 3px; padding: 0 1px; }
.nmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--text-2); }
.nmeta .dim { color: var(--muted); }
.nmeta button.tag { border: 0; cursor: pointer; }
.nmeta button.tag:hover { background: #2A3A55; }
.nmeta .tag.mk { background: var(--raised); color: var(--text); }
.nimg { width: 96px; height: 64px; border-radius: 8px; background: var(--raised) center / cover no-repeat; flex: none; }
.n-more { align-self: center; margin-top: 14px; }
@media (max-width: 720px) {
  .n-side { position: static; }
  .nrow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .nrow time { display: none; }
  .nimg { width: 72px; height: 52px; }
}
.n-filters { display: flex; flex-direction: column; }
.n-filters > summary { list-style: none; display: none; cursor: pointer; color: var(--text-2); font-size: 13px; padding: 4px 0; }
.n-filters > summary::-webkit-details-marker { display: none; }
.n-filters > summary::before { content: '▸'; display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; }
.n-filters[open] > summary::before { transform: rotate(90deg); }
.n-filters[open] { gap: 14px; }
.n-filters .eqs-sec + .eqs-sec { margin-top: 14px; }
.n-filters[open] .eqs-sec + .eqs-sec { margin-top: 0; }
@media (max-width: 720px) { .n-filters > summary { display: block; } }

/* ---------- ECO: economic calendar */
a.code { text-decoration: none; }
a.code:hover { color: var(--text); }
.imp { display: inline-flex; gap: 2px; align-items: center; vertical-align: middle; }
.imp i { width: 5px; height: 5px; border-radius: 50%; background: #343A44; }
.imp.i1 i:nth-child(-n+1), .imp.i2 i:nth-child(-n+2) { background: #C9A54A; }
.imp.i3 i { background: #F2555A; }
.chip .imp { margin-right: 6px; }
.ehead, .erow { display: grid; grid-template-columns: 50px 34px 22px minmax(0, 1fr) 76px 76px 76px; gap: 10px; align-items: baseline; }
.ehead { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 0 0 6px; border-bottom: 1px solid var(--row-line); }
.ehead span:nth-child(n+5) { text-align: right; }
.erow { padding: 9px 0; border-bottom: 1px solid var(--row-line); font-size: 13.5px; }
.erow.past .en { color: var(--text-2); }
.erow.fresh { animation: nfresh 3s ease-out; }
.erow .et { color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; }
.erow .et small, .ehrow .et small { color: var(--blue-soft); font-size: 11px; }
.ec { font-size: 11px; color: var(--text-2); background: var(--raised); border-radius: 5px; padding: 1px 0; text-align: center; }
.en { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.en .dim, .dim { color: var(--muted); }
.ev { text-align: right; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev i { display: none; font-style: normal; }
.ev b { font-weight: 600; }
.ev sup { color: var(--muted); font-size: 9px; margin-left: 1px; }
.enow { display: flex; align-items: center; gap: 10px; margin: 2px 0; color: var(--blue-soft); font: 600 11px var(--mono); }
.enow::after { content: ''; flex: 1; height: 1px; background: var(--blue); opacity: .6; }
.eco-home { display: flex; flex-direction: column; }
.ehrow { display: grid; grid-template-columns: 74px 30px 20px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 7px 0;
  border-bottom: 1px solid var(--row-line); color: var(--text); text-decoration: none; font-size: 13px; }
.ehrow:last-child { border-bottom: 0; }
.ehrow:hover .en { color: var(--blue-soft); }
.ehrow .et { color: var(--muted); font-size: 12px; }
.ehrow .en { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evs { display: contents; }
@media (max-width: 720px) {
  .ehead { display: none; }
  .erow { grid-template-columns: 44px 30px minmax(0, 1fr); grid-template-areas: "t c n" ". i v"; row-gap: 6px; }
  .erow .et { grid-area: t; } .erow .ec { grid-area: c; } .erow .en { grid-area: n; }
  .erow .ei { grid-area: i; justify-self: center; }
  .evs { grid-area: v; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .erow .ev { text-align: left; font-size: 12.5px; }
  .erow .ev.none-v { display: none; }
  .erow .ev i { display: inline; color: var(--muted); font-family: var(--sans); font-size: 11px; margin-right: 4px; }
  .ehrow { grid-template-columns: 64px 28px minmax(0, 1fr) auto; }
  .ehrow .imp { display: none; }
}
.hm-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.hm-empty[hidden] { display: none; }
