:root {
  --bg: #0b0e14;
  --panel: #131722;
  --panel-2: #1a1f2e;
  --line: #242b3d;
  --text: #e6e9f0;
  --muted: #8b93a7;
  --accent: #7aa2ff;
  --up: #2ecc71;
  --down: #e74c3c;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3 { margin: 0; font-weight: 650; }
.muted { color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: rgba(11, 14, 20, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand h1 { font-size: 16px; letter-spacing: .2px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--up); box-shadow: 0 0 10px var(--up);
  transition: background .3s, box-shadow .3s;
}
.dot.stale { background: var(--muted); box-shadow: none; }
.breadth { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.breadth b { font-weight: 600; }
.icon-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; width: 34px; height: 34px; font-size: 17px; cursor: pointer;
}
.icon-btn:active { transform: scale(.94); }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 6px; padding: 10px 14px 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--panel-2); color: var(--text); }

/* ---------- board toolbar and editor ---------- */
.board-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.board-hint { font-size: 12px; color: var(--muted); flex: 1; }
.ghost-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 6px 13px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ghost-btn.active { color: var(--accent); border-color: var(--accent); }
.primary-btn {
  background: var(--accent); border: none; color: #0b0e14; padding: 9px 16px;
  border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.editor {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 12px;
}
.editor input, .editor select {
  flex: 1; min-width: 120px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 8px; padding: 9px 11px; font-size: 14px;
}
.editor select { flex: 0 1 auto; }
.editor input:focus { outline: none; border-color: var(--accent); }
.editor-msg { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.editor-msg.ok { color: var(--up); }
.editor-msg.bad { color: var(--down); }
.empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 34px 10px; font-size: 14px; }

.tile-del {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%;
  width: 22px; height: 22px; font-size: 15px; line-height: 1; cursor: pointer;
}
.tile .pos { font-size: 11px; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ---------- holdings summary, sentiment, event banner ---------- */
.summary-card {
  display: flex; flex-wrap: wrap; gap: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; margin-bottom: 12px;
}
.summary-card .lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.summary-card .val { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 6px; }
@media (min-width: 720px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.gauge { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.g-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.g-score { font-size: 20px; font-weight: 700; margin: 2px 0 5px; font-variant-numeric: tabular-nums; }
.g-bar { height: 4px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.g-bar span { display: block; height: 100%; }
.g-caption { font-size: 11px; color: var(--muted); margin-top: 5px; }
.strip-note { font-size: 11px; color: var(--muted); margin: 0 0 12px; }

.banner {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 13px; margin-bottom: 10px; font-size: 13.5px;
}
.banner.hot { border-left-color: #f39c12; background: rgba(243,156,18,.08); }
.banner-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- calendar ---------- */
.cal-day { margin-bottom: 22px; }
.cal-day h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 10px; }
.cal-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 0 10px 10px 0; padding: 11px 13px; margin-bottom: 8px;
}
.cal-item.high { border-left-color: #f39c12; }
.cal-item.medium { border-left-color: var(--accent); }
.cal-time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 62px; }
.cal-body { flex: 1; }
.cal-name { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-plain { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.cal-nums { font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.cal-away { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tab-panel { display: none; padding: 12px 14px 40px; }
.tab-panel.active { display: block; }

/* ---------- heatmap ---------- */
.heatmap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 70px;
  grid-auto-flow: dense;
  gap: 8px;
}
@media (min-width: 560px)  { .heatmap { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px)  { .heatmap { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 92px; } }
@media (min-width: 1300px) { .heatmap { grid-template-columns: repeat(8, 1fr); } }

.tile {
  position: relative;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  color: #fff;
  transition: transform .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.tile:active { transform: scale(.975); }
@media (hover: hover) { .tile:hover { filter: brightness(1.18); } }
.tile.big  { grid-column: span 2; grid-row: span 2; }
.tile.wide { grid-column: span 2; }

.tile .tick { font-weight: 700; font-size: 14px; letter-spacing: .3px; }
.tile.big .tick { font-size: 19px; }
.tile .nm { font-size: 11px; opacity: .7; margin-top: 1px; }
.tile .chg { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile.big .chg { font-size: 30px; }
.tile .px { font-size: 11px; opacity: .85; font-variant-numeric: tabular-nums; }
.tile .spark { position: absolute; inset: auto 0 0 0; height: 30px; opacity: .3; pointer-events: none; }
.tile .flag {
  position: absolute; top: 7px; right: 8px; font-size: 9px; letter-spacing: .5px;
  text-transform: uppercase; opacity: .75; font-weight: 700;
}
.tile.err { background: var(--panel-2); color: var(--muted); }

.updated { color: var(--muted); font-size: 12px; text-align: center; margin: 16px 0 0; }

/* ---------- news ---------- */
.news-wrap { display: block; }  /* the grid moved to .news-wrap-inner */
.news-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 10px; }
.news-item {
  display: block; padding: 11px 12px; margin-bottom: 8px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.news-item:active { background: var(--panel-2); }
.news-item .t { font-size: 14px; font-weight: 550; line-height: 1.35; }
.news-item .m { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ---------- detail sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 30; }
.sheet {
  position: fixed; z-index: 31; inset: auto 0 0 0;
  max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--panel);
  border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--line);
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom));
  animation: rise .22s ease-out;
}
@keyframes rise { from { transform: translateY(26px); opacity: .4; } }
@media (min-width: 820px) {
  .sheet {
    inset: 50% auto auto 50%; transform: translate(-50%, -50%);
    width: min(860px, 94vw); max-height: 90vh; border-radius: 16px; border: 1px solid var(--line);
  }
  @keyframes rise { from { transform: translate(-50%, -48%); opacity: .4; } }
}
.sheet-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer;
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-right: 30px; }
.sheet-head h2 { font-size: 19px; }
.sheet-head .muted { font-size: 12px; margin: 3px 0 0; }
.price-block { text-align: right; }
.price { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.change { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }

.spans { display: flex; gap: 6px; margin: 14px 0 10px; }
.spans button {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 7px 0; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.spans button.active { color: var(--text); border-color: var(--accent); }
.chart-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
#chart { height: 260px; }

/* ---------- why panel ---------- */
.why { margin-top: 18px; }
.why-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.why-head h3 { font-size: 15px; }
.mode-toggle { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.mode-toggle button {
  background: none; border: none; color: var(--muted); font-size: 12px; font-weight: 650;
  padding: 5px 11px; border-radius: 6px; cursor: pointer;
}
.mode-toggle button.active { background: var(--accent); color: #0b0e14; }

.why-body { font-size: 14.5px; }
.why-headline { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
.why-text { color: #d7dcea; }
.block { margin-top: 16px; }
.block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0 0 8px; }
.driver { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.driver .d-title { font-weight: 650; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.driver .d-detail { color: var(--muted); font-size: 13px; margin-top: 4px; }
.badge { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; padding: 2px 7px; border-radius: 20px; font-weight: 700; white-space: nowrap; }
.badge.high { background: rgba(46,204,113,.16); color: var(--up); }
.badge.medium { background: rgba(122,162,255,.16); color: var(--accent); }
.badge.low { background: rgba(139,147,167,.16); color: var(--muted); }
.note { background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 9px 12px; margin-bottom: 8px; font-size: 13.5px; color: #cdd4e4; }
.watch li { margin-bottom: 5px; color: #cdd4e4; font-size: 13.5px; }
.footnote { color: var(--muted); font-size: 11.5px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.spinner { color: var(--muted); font-size: 14px; padding: 20px 0; text-align: center; }

/* ---------- trades tab ---------- */
.import-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.import-box h3 { font-size: 16px; margin-bottom: 12px; }
.steps { margin: 0 0 14px; padding-left: 20px; color: #cdd4e4; font-size: 13.5px; }
.steps li { margin-bottom: 7px; }
.steps code, .note code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.file-btn {
  display: inline-block; background: var(--accent); color: #0b0e14; padding: 9px 16px;
  border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; }
.stat .lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.stat .val { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 8px 4px 0;
        background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar { width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; }
.bar.up { background: var(--up); } .bar.down { background: var(--down); }
.bar-col span { font-size: 10px; color: var(--muted); margin-top: 5px; }

table.mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.mini td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.mini tr:last-child td { border-bottom: none; }

.setting { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 13.5px; color: #cdd4e4; }
.setting input[type=number] {
  width: 78px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 9px; font-size: 14px;
}
.setting.checkbox { gap: 8px; }
.setting input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
#settings-sheet h2 { font-size: 18px; margin-bottom: 14px; }

/* ---------- speedometers and positioning ---------- */
.dials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
.strip.two { grid-template-columns: 1fr; }
@media (min-width: 720px) { .strip.two { grid-template-columns: repeat(2, 1fr); } }
.speedo { text-align: center; }
.speedo .g-label { text-align: left; }
.speedo .dial { display: block; width: 100%; max-width: 210px; height: auto; margin: 2px auto 0; }
.dial-tick { font-size: 9px; fill: #8b93a7; }
.dial-read { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dial-band { display: block; font-size: 12px; font-weight: 600; letter-spacing: .3px; }
.speedo .g-caption { text-align: center; margin-top: 3px; }

.ls-bar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; margin: 8px 0 7px; background: var(--panel-2); }
.ls-long, .ls-short {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #0b0e14; white-space: nowrap; overflow: hidden;
}
.ls-long { background: var(--up); }
.ls-short { background: var(--down); color: #fff; }

/* ---------- calendar extras ---------- */
.cal-name .cat {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent);
  background: rgba(122,162,255,.12); padding: 2px 7px; border-radius: 20px; font-weight: 700;
}
.cal-affects { font-size: 12.5px; margin-top: 7px; color: var(--muted); }
.cal-affects b {
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  padding: 1px 7px; border-radius: 6px; margin-right: 3px; font-size: 12px;
}
.cal-time { display: flex; flex-direction: column; gap: 3px; }
.cal-time .cal-away { font-size: 11px; font-weight: 500; }

.mood { margin-bottom: 10px; }
.mood > summary {
  cursor: pointer; list-style: none; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--muted);
  padding: 9px 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; align-items: center; gap: 8px;
}
.mood > summary::-webkit-details-marker { display: none; }
.mood > summary::before { content: '▸'; font-size: 12px; transition: transform .15s; }
.mood[open] > summary::before { transform: rotate(90deg); }
.mood[open] > summary { margin-bottom: 8px; border-color: var(--accent); color: var(--text); }

/* ---------- symbol search dropdown ---------- */
.combo { position: relative; flex: 1; min-width: 180px; display: flex; }
.combo input { width: 100%; }
.suggest {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 40;
  background: var(--panel-2); border: 1px solid var(--accent); border-radius: 10px;
  overflow: hidden; max-height: 290px; overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.sg {
  display: flex; align-items: baseline; gap: 9px; padding: 10px 12px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.sg:last-child { border-bottom: none; }
.sg.on, .sg:hover { background: rgba(122,162,255,.14); }
.sg-sym { font-weight: 700; font-size: 13.5px; min-width: 54px; }
.sg-name { flex: 1; font-size: 13px; color: #cdd4e4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-meta { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

.import-box.dragging, .block.dragging {
  border-color: var(--accent);
  background: rgba(122,162,255,.07);
}
.block#drop-zone { border: 1px dashed transparent; border-radius: var(--radius); padding: 4px; }

/* ---------- sign in ---------- */
.login-screen {
  position: fixed; inset: 0; z-index: 60; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: var(--bg);
}
.login-card {
  width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px 22px; display: flex; flex-direction: column; gap: 11px;
}
.login-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 2px; }
.login-brand h1 { font-size: 19px; }
.login-card .muted { font-size: 13px; margin: 0 0 6px; }
.login-card input {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 11px 12px; font-size: 15px;
}
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-card .primary-btn { margin-top: 4px; padding: 11px; }
.whoami { font-size: 12px; color: var(--muted); }
.shared-pill {
  font-size: 9px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
  background: rgba(122,162,255,.16); color: var(--accent); padding: 1px 5px;
  border-radius: 20px; margin-left: 5px; vertical-align: middle;
}

.cal-time .tz { font-size: 12px; font-weight: 600; white-space: nowrap; }
.cal-time .tz span { color: var(--muted); font-weight: 500; font-size: 10px; margin-right: 3px; }
.cal-time { min-width: 86px; }
.cal-time .cal-away { font-variant-numeric: tabular-nums; color: var(--accent); font-size: 11px; }
.banner [data-countdown] { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }

.pw-box { margin-top: 10px; }
.pw-box > summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; }
.pw-box input {
  display: block; width: 100%; margin-top: 8px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 9px 11px; font-size: 14px;
}
.pw-box input:focus { outline: none; border-color: var(--accent); }
.pw-box .primary-btn { margin-top: 10px; }

/* ---------- board groups and dragging ---------- */
.board-group { margin-bottom: 16px; }
.group-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--muted); margin: 0 0 7px 2px;
}
.empty.small { padding: 16px; font-size: 12.5px; border: 1px dashed var(--line); border-radius: var(--radius); }
.editing .tile { touch-action: none; cursor: grab; }
.tile.dragging-tile { opacity: .65; transform: scale(1.04); z-index: 5; box-shadow: 0 10px 26px rgba(0,0,0,.5); }

/* ---------- movers strip ---------- */
.movers {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; align-items: stretch;
  scrollbar-width: none;
}
.movers::-webkit-scrollbar { display: none; }
.movers-label {
  flex: none; align-self: center; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; color: #f39c12; white-space: nowrap;
}
.mover {
  flex: none; max-width: 270px; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid #f39c12; border-radius: 0 10px 10px 0; padding: 8px 11px;
  font-size: 12.5px; line-height: 1.35; color: var(--text); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mover span { display: block; color: var(--muted); font-size: 10.5px; margin-top: 3px; }

/* ---------- daily brief ---------- */
.brief {
  background: linear-gradient(135deg, rgba(122,162,255,.10), rgba(122,162,255,.03));
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px;
}
.brief > summary {
  cursor: pointer; list-style: none; padding: 11px 14px; font-size: 14px; font-weight: 650;
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.brief > summary::-webkit-details-marker { display: none; }
.brief > summary .muted { font-size: 11px; font-weight: 500; }
.brief p { margin: 0; padding: 0 14px 13px; font-size: 13.5px; line-height: 1.55; color: #d7dcea; }

/* ---------- news importance ---------- */
.news-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.news-bar .ghost-btn.active { color: var(--text); border-color: var(--accent); }
.news-wrap-inner { display: grid; gap: 18px; }
@media (min-width: 900px) { .news-wrap-inner { grid-template-columns: repeat(3, 1fr); } }
.nbadge {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 1px 6px; border-radius: 20px; margin-right: 6px; vertical-align: 1px;
}
.nbadge.high { background: rgba(243,156,18,.18); color: #f39c12; }
.nbadge.medium { background: rgba(122,162,255,.15); color: var(--accent); }
.news-item.imp-high { border-left: 3px solid #f39c12; border-radius: 0 10px 10px 0; }

/* ---------- chart drawing tools ---------- */
.draw-bar { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; flex-wrap: wrap; }
.draw-bar button {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.draw-bar button.armed { color: #f39c12; border-color: #f39c12; }
.draw-hint { font-size: 11.5px; color: var(--muted); }
.chart-box { position: relative; }
#draw-overlay {
  position: absolute; inset: 6px; pointer-events: none; z-index: 3;
}

.draw-bar { gap: 5px; }
.draw-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
.rsi-badge {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 20px;
  font-size: 9.5px; font-weight: 800; vertical-align: 2px;
  background: rgba(0,0,0,.35); color: rgba(255,255,255,.85);
}
.rsi-badge.overbought { background: rgba(231,76,60,.75); color: #fff; }
.rsi-badge.oversold { background: rgba(46,204,113,.8); color: #06240f; }

.tile-grip {
  position: absolute; bottom: 5px; right: 7px; z-index: 2;
  font-size: 13px; line-height: 1; color: rgba(255,255,255,.55); pointer-events: none;
}
.editing .tile { box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }

/* ---------- highlights row ---------- */
.highlights {
  display: grid; gap: 10px; margin-bottom: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .highlights { grid-template-columns: repeat(3, 1fr); } }
.hl-col {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 11px;
}
.hl-col h4 {
  margin: 0 0 7px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .7px; color: var(--muted); cursor: help;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: flex; gap: 6px; align-items: baseline; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px;
  font-size: 12px; cursor: pointer; color: var(--text); font-variant-numeric: tabular-nums;
}
.chip:hover { border-color: var(--accent); }
.chip b { font-size: 12.5px; }

/* ---------- sectors tab ---------- */
.sector-picker { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.sector-picker::-webkit-scrollbar { display: none; }
.sector-picker .ghost-btn { white-space: nowrap; }
.sector-picker .ghost-btn.active { color: var(--text); border-color: var(--accent); }
.sector-blurb { font-size: 13px; color: var(--muted); margin: 0 0 12px; max-width: 70ch; }
.sector-grid { grid-auto-rows: 74px; }
.tile-add {
  position: absolute; bottom: 5px; right: 5px; z-index: 2;
  background: rgba(0,0,0,.45); color: #fff; border: none; border-radius: 6px;
  padding: 2px 7px; font-size: 10px; font-weight: 700; cursor: pointer;
}
.tile-add:hover { background: var(--accent); color: #0b0e14; }
