:root {
  color-scheme: light;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --bg: #f4f3ec;
  --surface: #fdfdfa;
  --surface-raised: #ffffff;
  --line: #e2e1d5;
  --ink: #131b17;
  --muted: #67716b;
  --accent: #15654d;
  --accent-strong: #0b4636;
  --accent-soft: #e4efe8;
  --night: #0b241d;
  --night-2: #103127;
  --mint: #75d2af;
  --pos: #177a55;
  --neg: #b04a3c;
  --warn: #8a5a12;
  --bar-bg: #eae9df;
  --shadow: 0 1px 2px rgba(21, 36, 29, 0.05), 0 10px 30px rgba(21, 36, 29, 0.07);
  --shadow-lift: 0 2px 6px rgba(21, 36, 29, 0.06), 0 18px 44px rgba(21, 36, 29, 0.13);
  --radius: 12px;
  --st-priority: #0f7a53;
  --st-breakout: #1c6d9e;
  --st-pullback: #6a4b9c;
  --st-waiting: #8a5a12;
  --st-extended: #b0651c;
  --st-weakening: #b04a3c;
  --st-monitor: #5f6d78;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101413;
    --surface: #171c1a;
    --surface-raised: #1c2220;
    --line: #2a312d;
    --ink: #eceae2;
    --muted: #9aa39d;
    --accent: #67c3ac;
    --accent-strong: #8ad7c3;
    --accent-soft: #1e2b26;
    --pos: #62c295;
    --neg: #e08878;
    --warn: #d4a24a;
    --bar-bg: #262d29;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 20px 48px rgba(0, 0, 0, 0.42);
    --st-priority: #62c295;
    --st-breakout: #6bb6e4;
    --st-pullback: #b096e0;
    --st-waiting: #d4a24a;
    --st-extended: #e0a06a;
    --st-weakening: #e08878;
    --st-monitor: #9aa6ad;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101413; --surface: #171c1a; --surface-raised: #1c2220; --line: #2a312d; --ink: #eceae2;
  --muted: #9aa39d; --accent: #67c3ac; --accent-soft: #1e2b26;
  --accent-strong: #8ad7c3; --pos: #62c295; --neg: #e08878; --warn: #d4a24a; --bar-bg: #262d29;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 20px 48px rgba(0, 0, 0, 0.42);
  --st-priority: #62c295; --st-breakout: #6bb6e4; --st-pullback: #b096e0; --st-waiting: #d4a24a;
  --st-extended: #e0a06a; --st-weakening: #e08878; --st-monitor: #9aa6ad;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ec; --surface: #fdfdfa; --surface-raised: #ffffff; --line: #e2e1d5; --ink: #131b17;
  --muted: #67716b; --accent: #15654d; --accent-strong: #0b4636; --accent-soft: #e4efe8;
  --pos: #177a55; --neg: #b04a3c; --warn: #8a5a12; --bar-bg: #eae9df;
  --shadow: 0 1px 2px rgba(21, 36, 29, 0.05), 0 10px 30px rgba(21, 36, 29, 0.07);
  --shadow-lift: 0 2px 6px rgba(21, 36, 29, 0.06), 0 18px 44px rgba(21, 36, 29, 0.13);
  --st-priority: #0f7a53; --st-breakout: #1c6d9e; --st-pullback: #6a4b9c; --st-waiting: #8a5a12;
  --st-extended: #b0651c; --st-weakening: #b04a3c; --st-monitor: #5f6d78;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font-ui);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
}

button, input, select { font: inherit; }
select option, select optgroup { background-color: var(--surface-raised); color: var(--ink); }
a { color: inherit; }

.account-link {
  color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px;
  background: var(--surface);
}
.account-link:hover { border-color: var(--accent); }

/* ---------- header ----------
   The chrome is night-green in both themes — the same material as the marketing hero
   and the auth shell, so the product reads as one brand rather than a template. */

.topbar {
  padding: 16px 22px;
  background: linear-gradient(135deg, var(--night), var(--night-2));
  color: #eef6f1;
}
.topbar .brand-kicker { color: var(--mint); opacity: .9; }
.topbar h1 { color: #f4faf6; }
.topbar .tagline { color: #97ab9f; }
.topbar .mark { box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.topbar .market-mode { background: rgba(255, 255, 255, .07); color: #a5dcc2; }
.topbar .freshness { border-color: rgba(255, 255, 255, .14); color: #93a89d; }
.topbar .account-link { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #e7f2ec; }
.topbar .account-link:hover { border-color: var(--mint); }
.topbar .theme-toggle { border-color: rgba(255, 255, 255, .16); background: transparent; color: #93a89d; }
.topbar .theme-toggle:hover { border-color: var(--mint); color: var(--mint); }

.topbar-inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 13px; }

/* One brand mark everywhere: the same green and glyph as the installed app
   icon, so the logo never changes colour between themes or surfaces. */
.mark {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: #1f7a5d;
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 122, 93, .24);
  font-size: 20px; font-weight: 700;
}

.brand .brand-kicker { margin: 2px 0 0; }
.brand-kicker, .eyebrow {
  margin: 0 0 1px; color: var(--accent);
  font-size: 13.5px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
}
.topbar h1 { margin: 0; font-size: 21px; line-height: 1.15; font-weight: 720; letter-spacing: -0.02em; }
.tagline { margin: 1px 0 0; font-size: 14.5px; color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 9px; }
.market-mode {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 650;
}
.market-mode i { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 14%, transparent); }

.freshness {
  font-size: 14.5px; color: var(--muted);
  padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px;
}

.theme-toggle {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- tabs ---------- */

.tabs {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 2px;
  /* +9 offsets the tab's own 13px inset so the first label starts on the same
     line as the page heading below it. Measured in %, not vw: vw counts the
     scrollbar and main's `margin: 0 auto` does not, which left the bar a few
     pixels right of the content it labels. */
  padding: 0 max(9px, calc((100% - 1320px) / 2 + 9px));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none; border: 0; background: none;
  min-height: 40px; padding: 0 13px;
  font: inherit; font-size: 13.5px;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
a.tab { display: inline-flex; align-items: center; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 560; }

main { padding: 20px 22px 40px; max-width: 1240px; margin: 0 auto; }
main { max-width: 1320px; padding-top: 28px; }

.panel { display: none; }
.panel.is-active { display: block; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 18px;
}
.section-head.compact { align-items: center; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: 29px; font-weight: 480; line-height: 1.12; letter-spacing: -0.015em; }
.section-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.method-chip {
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: var(--surface); font-size: 14px; white-space: nowrap;
}

.site-broadcast {
  position: relative; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 18px;
  width: 100%; padding: 11px clamp(18px, 5vw, 72px); border-bottom: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  color: var(--accent-strong); background: var(--accent-soft); font-size: 13px; font-weight: 650; line-height: 1.45;
}
.site-broadcast[hidden] { display: none; }
.site-broadcast.is-warning { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, var(--surface)); }
.site-broadcast.is-critical { color: var(--neg); background: color-mix(in srgb, var(--neg) 13%, var(--surface)); }
.site-broadcast span { max-width: 980px; }
.site-broadcast button {
  flex: 0 0 auto; padding: 5px 9px; border: 1px solid currentColor; border-radius: 999px; color: inherit; background: transparent;
  font: inherit; font-size: 11px; cursor: pointer;
}

@media (max-width: 520px) {
  .site-broadcast { align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 12px; }
}

.promo-banner-shell {
  width: 100%; max-width: 1320px; margin: 18px auto 0; padding: 0 22px;
}
.promo-banner-shell[hidden] { display: none; }
.promo-banner-link {
  display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow); line-height: 0;
}
.promo-banner-link:not([href]) { cursor: default; }
.promo-banner-link picture, .promo-banner-link img { display: block; width: 100%; }
.promo-banner-link img { height: auto; aspect-ratio: 5 / 1; object-fit: cover; }
.promo-banner-link[href]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 3px; }

@media (max-width: 640px) {
  .promo-banner-shell { margin-top: 12px; padding: 0 12px; }
  .promo-banner-link { border-radius: 12px; }
  .promo-banner-link img { aspect-ratio: 25 / 12; }
}

/* ---------- watchlist workspace ---------- */

.watchlist-heading { align-items: center; }
.watchlist-heading > div { max-width: 760px; }
.watchlist-count { flex: none; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.watchlist-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .85fr); gap: 14px; align-items: start; }
.watchlist-surface { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.watchlist-surface-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.watchlist-surface-head h3 { margin: 3px 0 0; font-family: var(--font-display); font-size: 24px; font-weight: 520; line-height: 1.15; letter-spacing: -.015em; }
.watch-form { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(230px, 1.4fr) auto; gap: 9px; align-items: end; margin-top: 18px; }
.watch-form label, .watch-form label > span { display: block; min-width: 0; }
.watch-form label > span { margin-bottom: 5px; color: var(--muted); font-size: 11.5px; font-weight: 750; }
.watch-form label > span small { font-size: inherit; font-weight: 500; }
.watch-form input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--surface-raised); color: var(--ink); font-size: 13.5px; }
.watch-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent); }
.watch-symbol-field { position: relative; z-index: 3; }
.watch-symbol-combobox { position: relative; }
.watch-symbol-options { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 330px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 18px 42px rgba(10, 36, 29, .16); }
.watch-symbol-options[hidden] { display: none; }
.watch-symbol-option { display: grid; grid-template-columns: minmax(80px, auto) minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.watch-symbol-option:hover, .watch-symbol-option.is-active { background: var(--accent-soft); }
.watch-symbol-option strong { font-size: 13px; letter-spacing: .015em; }
.watch-symbol-option span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.watch-symbol-no-match { padding: 11px; color: var(--muted); font-size: 12.5px; }
.watch-add, .watch-alert-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.watch-add:disabled, .watch-alert-button:disabled { cursor: default; opacity: .65; }
.watch-status { min-height: 20px; margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.watch-items { border-top: 1px solid var(--line); }
.watch-item { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(200px, 1.25fr) minmax(115px, .55fr) auto; gap: 15px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.watch-item:last-child { border-bottom: 0; }
.watch-identity { min-width: 0; }
.watch-identity > a { color: var(--ink); font-size: 15px; font-weight: 800; text-decoration: none; }
.watch-identity > a:hover { color: var(--accent); }
.watch-stage { display: flex; align-items: center; width: fit-content; max-width: 100%; margin-top: 5px; padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.3; }
.watch-item > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.watch-score { min-width: 0; text-align: right; }
.watch-score > span, .watch-score small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.watch-score b { display: block; margin: 3px 0; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.watch-score .watch-positive { color: var(--pos); }
.watch-score .watch-negative { color: var(--neg); }
.watch-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.watch-actions a, .watch-actions button { border: 0; background: none; color: var(--accent); font: inherit; font-size: 11.5px; font-weight: 750; text-decoration: none; white-space: nowrap; cursor: pointer; }
.watch-actions button { color: var(--muted); }
.watch-actions button:hover { color: var(--neg); }
.watch-empty, .watch-empty-state { margin: 0; padding: 22px 0; color: var(--muted); font-size: 13px; }
.watch-empty-state strong { display: block; color: var(--ink); font-size: 15px; }
.watch-empty-state p { margin: 5px 0 0; }
.watchlist-alerts > p { margin: 12px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.watchlist-alerts > small { display: block; margin-top: 12px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.watch-alert-button { min-height: 36px; padding: 0 11px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; white-space: nowrap; }
.watch-alert-list { display: grid; gap: 7px; }
.watch-alert { display: block; padding: 11px; border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 10px; background: var(--bg); color: inherit; text-decoration: none; }
.watch-alert.positive { border-left-color: var(--pos); }
.watch-alert.negative { border-left-color: var(--neg); }
.watch-alert > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.watch-alert b { font-size: 13px; }
.watch-alert small { color: var(--muted); font-size: 11px; font-weight: 700; }
.watch-alert p { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }

@media (max-width: 900px) {
  .watchlist-layout { grid-template-columns: 1fr; }
  .watch-item { grid-template-columns: minmax(135px, .75fr) minmax(180px, 1.25fr) minmax(110px, .55fr) auto; }
}
@media (max-width: 640px) {
  .watchlist-heading { align-items: flex-start; }
  .watch-form { grid-template-columns: 1fr; }
  .watch-symbol-options { max-height: 270px; }
  .watch-add { width: 100%; }
  .watch-item { grid-template-columns: 1fr auto; gap: 9px 12px; }
  .watch-item > p { grid-column: 1 / -1; }
  .watch-score { grid-column: 2; grid-row: 1; }
  .watch-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .watchlist-surface-head { flex-direction: column; }
  .watch-alert-button { width: 100%; }
}

.overview-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-bottom: 18px;
}
.overview-card {
  position: relative; min-height: 118px; padding: 17px 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-raised); box-shadow: var(--shadow); overflow: hidden;
}
.overview-card > span { display: block; color: var(--muted); font-size: 14px; font-weight: 620; }
.overview-card strong { display: block; margin-top: 12px; font-size: 27px; line-height: 1; letter-spacing: -0.03em; }
.overview-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.overview-primary { color: #fff; border-color: transparent; background: linear-gradient(140deg, var(--accent-strong), var(--accent)); }
.overview-primary::after { content: ''; position: absolute; width: 110px; height: 110px; right: -35px; top: -42px; border: 24px solid rgba(255,255,255,.08); border-radius: 50%; }
.overview-primary > span, .overview-primary small { color: rgba(255,255,255,.72); }
.score-evidence-note { margin: -7px 0 18px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* ---------- controls ---------- */

.controls {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
}

.search-wrap {
  flex: 1 1 260px; max-width: 340px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.search-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.search-wrap > span { color: var(--muted); font-size: 19px; transform: rotate(-15deg); }
#search { width: 100%; padding: 9px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }

.check { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); cursor: pointer; }
.count { margin-left: auto; font-size: 14.5px; color: var(--muted); }

.compact-filter { display: grid; grid-template-columns: auto auto; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.compact-filter select { max-width: 180px; padding: 8px 28px 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 14px; }

.brief-preview {
  display: grid; grid-template-columns: minmax(240px, 1.2fr) minmax(360px, 1fr) auto; align-items: center; gap: 18px;
  margin-bottom: 18px; padding: 16px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow);
}
.brief-preview-copy h3 { margin: 2px 0 0; font-size: 16px; }
.brief-preview-copy > p:last-child { max-width: 66ch; margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.brief-preview-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.brief-preview-facts > span { min-width: 0; padding: 9px 10px; border-radius: 9px; background: var(--bg); }
/* Labels wrap rather than truncate — "BSE cross-checked" no longer fits on one line at this type size. */
.brief-preview-facts small, .brief-preview-facts strong { display: block; min-width: 0; overflow-wrap: anywhere; }
.brief-preview-facts small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 1.3; text-transform: uppercase; }
.brief-preview-facts strong { margin-top: 4px; color: var(--accent); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.brief-preview-facts .needs-caution strong { color: var(--warn); }
.brief-preview-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 13px;
  border: 0; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent);
  color: #fff; font: inherit; font-size: 13px; font-weight: 750; white-space: nowrap; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.brief-preview-action:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 22px color-mix(in srgb, var(--accent) 34%, transparent); }
.brief-preview-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.daily-brief { margin: 0 0 18px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.daily-brief-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.daily-brief h3 { margin: 2px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 480; letter-spacing: -.01em; }
.brief-intro { max-width: 72ch; margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.regime-summary { flex: 0 1 420px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.regime-kicker { margin: 0; color: var(--accent); font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.regime-state { margin: 6px 0 0; color: var(--accent-strong); font-size: 20px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.regime-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
/* Labels wrap at different lengths, so values are bottom-aligned to keep the row level. */
.regime-metrics span { display: flex; flex-direction: column; justify-content: space-between; gap: 5px; min-width: 0; }
.regime-metrics small { color: var(--accent); font-size: 11px; font-weight: 650; line-height: 1.25; opacity: .75; }
.regime-metrics b { color: var(--accent-strong); font-size: 17px; line-height: 1; font-variant-numeric: tabular-nums; }
/* Tabs sit flush on their panel: no gap, and the active tab's bottom border is
   painted over by the panel beneath so the two read as one surface. The panel's
   accent inherits the selected tab's colour (--card-c), so a violet tab can never
   open a green-edged panel. */
.brief-columns { display: grid; grid-template-columns: 1fr; gap: 0; }
.brief-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; position: relative; z-index: 1; margin-bottom: -1px; align-items: end; }
.brief-tab { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; padding: 11px 12px; border: 1px solid transparent; border-bottom-color: var(--line); border-radius: 12px 12px 0 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; text-align: center; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.brief-tab .brief-icon { width: 14px; height: 14px; color: var(--tab-c, var(--muted)); opacity: .55; }
.brief-tab:hover:not(.is-active) { background: color-mix(in srgb, var(--tab-c) 8%, transparent); color: var(--ink); }
.brief-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Longhands only. `border-color: var(--line)` followed by a `border-top:` shorthand
   leaves the remaining sides as pending-substitution values, which some engines
   serialise as empty and drop — the active tab then rendered with no accent at all. */
.brief-tab.is-active {
  border-top-width: 3px; border-top-style: solid; border-top-color: var(--tab-c);
  border-right-color: var(--line); border-left-color: var(--line);
  border-bottom-color: var(--surface);
  padding-top: 9px;
  background-color: var(--surface); color: var(--tab-c);
}
.brief-tab.is-active .brief-icon { opacity: 1; }
.brief-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-tab-count { flex: none; min-width: 20px; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--tab-c) 14%, transparent); color: var(--tab-c); font-size: 13px; font-variant-numeric: tabular-nums; }
.brief-tab.is-active .brief-tab-count { background: color-mix(in srgb, var(--tab-c) 20%, transparent); }
.brief-card[hidden] { display: none; }
.brief-card { min-width: 0; display: flex; flex-direction: column; padding: 18px 16px 16px; border: 1px solid var(--line); border-radius: 0 14px 14px 14px; background: var(--surface); }
.brief-card::before { content: ''; display: block; width: 34px; height: 3px; margin: -6px 0 12px; border-radius: 999px; background: var(--card-c, var(--accent)); }
.brief-card-head { min-height: 0; margin-bottom: 12px; }
.brief-card-label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 7px; color: var(--card-c, var(--accent)); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.brief-card-label .brief-icon { width: 14px; height: 14px; }

.brief-card h4 { margin: 0; color: var(--ink); font-size: 17px; letter-spacing: -.01em; }
.brief-card-head p { margin: 7px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.brief-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.brief-links a { display: block; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; overflow: hidden; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.brief-links a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.brief-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brief-icon { display: inline-block; width: 15px; height: 15px; flex: none; vertical-align: middle; }
.brief-stock-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brief-stock-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brief-stock-identity > span:last-child { min-width: 0; }
.brief-company-icon { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.brief-company-icon .brief-icon { width: 17px; height: 17px; }
.brief-stock-identity b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brief-stock-identity small { display: block; overflow: hidden; max-width: 190px; margin-top: 3px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.brief-score-move { display: flex; align-items: center; gap: 5px; min-width: 98px; flex: none; padding: 7px 8px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.brief-score-move.up { color: var(--pos); background: color-mix(in srgb, var(--pos) 10%, transparent); }
.brief-score-move.down { color: var(--neg); background: color-mix(in srgb, var(--neg) 10%, transparent); }
.brief-score-move .brief-icon { width: 17px; height: 17px; }
.brief-score-move > span { display: grid; }
.brief-score-move strong { font-size: 19px; line-height: 1; letter-spacing: -.025em; }
.brief-score-move small { margin-top: 3px; color: currentColor; font-size: 11px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.brief-state-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.brief-state-line .research-state { gap: 5px; margin-top: 0; }
.brief-state-line .research-state .brief-icon { width: 12px; height: 12px; }
.brief-open { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.brief-open .brief-icon { width: 12px; height: 12px; }
.brief-state-explanation { margin: 8px 0 0; padding-left: 9px; border-left: 2px solid var(--line); color: var(--ink); font-size: 13px; line-height: 1.5; }
.brief-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 9px; }
.brief-metric-chip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; padding: 6px 9px; border: 1px solid transparent; border-radius: 8px; }
.brief-metric-chip.positive { border-color: color-mix(in srgb, var(--pos) 18%, transparent); background: color-mix(in srgb, var(--pos) 9%, transparent); color: var(--pos); }
.brief-metric-chip.negative { border-color: color-mix(in srgb, var(--neg) 18%, transparent); background: color-mix(in srgb, var(--neg) 9%, transparent); color: var(--neg); }
.brief-metric-chip.neutral { border-color: var(--line); background: var(--bg); color: var(--muted); }
.brief-metric-chip .brief-icon { width: 14px; height: 14px; }
.brief-metric-copy { display: grid; min-width: 0; }
.brief-metric-copy small { overflow: hidden; color: currentColor; font-size: 11px; font-weight: 700; letter-spacing: .045em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.brief-metric-copy em { overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.brief-metric-value { justify-self: end; min-width: 0; overflow: hidden; color: var(--ink); font-size: 14.5px; line-height: 1; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.brief-empty { margin: 0; padding: 18px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.brief-card-foot { display: grid; gap: 3px; margin-top: auto; padding: 12px 3px 0; color: var(--muted); }
.brief-card-foot strong { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.brief-card-foot strong .brief-icon { width: 13px; height: 13px; color: var(--accent); }
.brief-card-foot span { font-size: 13px; line-height: 1.45; }
.brief-glossary { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.brief-glossary-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.brief-glossary h4 { margin: 2px 0 0; font-size: 15px; }
.brief-glossary-head > p { max-width: 48ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; text-align: right; }
.state-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.state-guide-grid article { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.state-guide-grid .research-state { margin-top: 0; }
.state-guide-grid p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.state-guide-note { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.state-guide-note strong { color: var(--ink); }

/* ---------- table ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

table.scores { width: 100%; border-collapse: collapse; font-size: 15px; }

table.scores th {
  position: sticky; top: 0;
  text-align: left; font-weight: 650; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted);
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
/* `table.scores th` outranks `.num`, so numeric headers need this to sit over
   the column they label rather than drifting to the left of it. */
table.scores th.num { text-align: right; }

table.scores td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.scores tbody tr:last-child td { border-bottom: 0; }
table.scores tbody tr:hover { background: var(--accent-soft); }

.num { text-align: right; font-variant-numeric: tabular-nums; }

.sym { font-weight: 580; letter-spacing: -0.005em; }
.sym small { display: block; max-width: 160px; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 400; text-overflow: ellipsis; }
.stock-link { color: var(--ink); text-decoration: none; }
.stock-link:hover { color: var(--accent); text-decoration: underline; }

.score-val { font-weight: 620; font-variant-numeric: tabular-nums; }
.mobile-score-list { display: none; }
.score-card-link { display: block; color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.score-card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.research-state { display: inline-flex; align-items: center; width: fit-content; margin-top: 9px; padding: 4px 8px; border-radius: 999px; background: var(--bar-bg); color: var(--muted); font-size: 13px; font-weight: 700; }
.research-state.positive { background: color-mix(in srgb, var(--pos) 12%, transparent); color: var(--pos); }
.research-state.negative { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
.research-state.caution { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }

/* per-state colour tags — one hue per research state, not one per tone */
[data-state="Research priority"] { --state-c: var(--st-priority); }
[data-state="Breakout attempt"] { --state-c: var(--st-breakout); }
[data-state="Pullback holding"] { --state-c: var(--st-pullback); }
[data-state="Waiting for confirmation"] { --state-c: var(--st-waiting); }
[data-state="Extended — avoid chasing"] { --state-c: var(--st-extended); }
[data-state="Participation weakening"] { --state-c: var(--st-weakening); }
[data-state="Monitor"] { --state-c: var(--st-monitor); }
[data-state="Accumulation"] { --state-c: var(--st-priority); }
[data-state="Strengthening"] { --state-c: var(--pos); }
[data-state="Weakening"], [data-state="Weak price trend"] { --state-c: var(--st-weakening); }
[data-state="Confirmation mixed"], [data-state="Developing evidence"] { --state-c: var(--st-waiting); }
[data-state="Low participation"], [data-state="Coverage unavailable"] { --state-c: var(--st-monitor); }

.research-state[data-state], .portfolio-state[data-state], .watch-state[data-state], .watch-stage[data-state] {
  gap: 5px;
  background: color-mix(in srgb, var(--state-c, var(--muted)) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--state-c, var(--muted)) 28%, transparent);
  color: var(--state-c, var(--muted));
}
.research-state[data-state]::before {
  content: ''; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor;
}
.brief-state-line .research-state[data-state]::before, .state-guide-grid .research-state[data-state]::before { display: none; }

.score-state-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.score-state-row .research-state { margin-top: 0; }
.exchange-badge { display: inline-flex; align-items: center; width: fit-content; margin-left: 6px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .02em; white-space: nowrap; }
.score-state-row .exchange-badge { margin-left: 0; }
.exchange-badge.positive { border-color: color-mix(in srgb, var(--pos) 22%, transparent); background: color-mix(in srgb, var(--pos) 9%, transparent); color: var(--pos); }
.exchange-badge.caution { border-color: color-mix(in srgb, var(--warn) 24%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--warn); }
.exchange-badge.negative { border-color: color-mix(in srgb, var(--neg) 22%, transparent); background: color-mix(in srgb, var(--neg) 9%, transparent); color: var(--neg); }

/* ---------- stock research cockpit ---------- */
.brand-link { color: inherit; text-decoration: none; }
.stock-shell { max-width: 1180px; }
.stock-breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.stock-breadcrumb a { color: var(--accent); font-weight: 700; text-decoration: none; }
.stock-hero { display: grid; grid-template-columns: minmax(240px, 1.1fr) minmax(420px, 1.6fr) auto; align-items: center; gap: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.stock-title h2 { margin: 2px 0 0; font-size: clamp(34px, 5vw, 52px); line-height: 1; letter-spacing: -.045em; }
.stock-title > p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.state-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.risk-flag { display: inline-flex; margin: 9px 4px 0 0; padding: 4px 7px; border-radius: 999px; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); font-size: 12px; font-weight: 650; }
.hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hero-metrics article { min-width: 0; padding: 14px; border-radius: 11px; background: var(--bg); }
.hero-metrics span, .hero-metrics small { display: block; color: var(--muted); font-size: 13px; }
.hero-metrics strong { display: block; margin: 8px 0 4px; font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.watch-button { min-height: 38px; border: 1px solid var(--accent); border-radius: 9px; padding: 0 13px; background: var(--accent); color: white; font-size: 13px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.watch-button.is-saved { background: var(--accent-soft); color: var(--accent); }
.investor-view { margin-top: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.investor-view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.investor-view-head h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 29px; font-weight: 480; letter-spacing: -.015em; }
.investor-view-head > div > p:last-child { max-width: 68ch; margin: 7px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.investor-start-chip { flex: none; padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.investor-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.investor-answer { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); }
.investor-answer.positive { border-left: 3px solid var(--pos); }
.investor-answer.negative { border-left: 3px solid var(--neg); }
.investor-answer.caution { border-left: 3px solid var(--warn); }
.investor-answer.neutral { border-left: 3px solid var(--accent); }
.investor-answer-icon { display: grid; width: 36px; height: 36px; flex: none; place-items: center; border-radius: 10px; background: var(--surface); color: var(--accent); }
.investor-answer.positive .investor-answer-icon { color: var(--pos); }
.investor-answer.caution .investor-answer-icon { color: var(--warn); }
.investor-answer.negative .investor-answer-icon { color: var(--neg); }
.investor-icon { width: 18px; height: 18px; }
.investor-answer > div { min-width: 0; }
.investor-answer p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; }
.investor-answer h3 { margin: 5px 0 0; font-size: 16px; line-height: 1.25; }
.investor-answer div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.investor-answer a { display: inline-block; margin-top: 7px; color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; }
.thesis-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.thesis-column { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.thesis-heading { display: flex; align-items: center; gap: 9px; }
.thesis-heading > span { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 800; }
.thesis-heading h3 { margin: 2px 0 0; font-size: 14.5px; }
.thesis-column ul { display: grid; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.thesis-column li { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.thesis-column li .investor-icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.thesis-column.supports li .investor-icon { color: var(--pos); }
.thesis-column.cautions li .investor-icon { color: var(--warn); }
.thesis-column.verify li .investor-icon { color: var(--accent); }
.investor-more, .evidence-disclosure { margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; overflow: clip; background: var(--bg); }
.investor-more > summary, .evidence-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; cursor: pointer; list-style: none; }
.investor-more > summary::-webkit-details-marker, .evidence-disclosure > summary::-webkit-details-marker { display: none; }
.investor-more > summary span, .evidence-disclosure > summary span { display: grid; gap: 3px; }
.investor-more > summary strong, .evidence-disclosure > summary strong { font-size: 13.5px; }
.investor-more > summary small, .evidence-disclosure > summary small { color: var(--muted); font-size: 12px; }
.investor-more > summary b, .evidence-disclosure > summary b { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.investor-more[open] > summary, .evidence-disclosure[open] > summary { border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.investor-more[open] > summary b, .evidence-disclosure[open] > summary b { font-size: 0; }
.investor-more[open] > summary b::after { content: 'Hide'; font-size: 12px; }
.evidence-disclosure[open] > summary b::after { content: 'Hide evidence'; font-size: 12px; }
.investor-more-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 10px; padding: 10px; }
.peer-card, .coverage-card { min-width: 0; padding: 15px; border-radius: 11px; background: var(--surface); }
.peer-table-wrap { margin-top: 10px; overflow-x: auto; }
.peer-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.peer-table th { padding: 7px; color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.peer-table td { padding: 8px 7px; border-top: 1px solid var(--line); white-space: nowrap; }
.peer-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.peer-table td a { display: grid; color: inherit; text-decoration: none; }
.peer-table td small { overflow: hidden; max-width: 160px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; }
.peer-table td > span { display: inline-flex; padding: 3px 6px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11px; }
.peer-table td > span[data-state] { background: color-mix(in srgb, var(--state-c, var(--muted)) 13%, transparent); color: var(--state-c, var(--muted)); }
.peer-table tr.is-subject { background: var(--accent-soft); }
.peer-table tr.is-subject td:first-child b::after { content: '  YOU ARE VIEWING'; margin-left: 5px; color: var(--accent); font-size: 11px; letter-spacing: .05em; }
.coverage-list { display: grid; gap: 8px; margin-top: 10px; }
.coverage-list > div { display: grid; grid-template-columns: auto 1fr; align-items: flex-start; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.coverage-list > div:last-child { border-bottom: 0; }
.coverage-status { display: inline-flex; min-width: 58px; justify-content: center; padding: 4px 6px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.coverage-status.positive { color: var(--pos); background: color-mix(in srgb, var(--pos) 10%, transparent); }
.coverage-status.caution { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.coverage-list p { display: grid; gap: 3px; margin: 0; }
.coverage-list b { font-size: 13px; }
.coverage-list small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.evidence-disclosure { background: transparent; }
.evidence-disclosure > .cockpit-grid { margin: 0; padding: 12px; }
.cockpit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.cockpit-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.wide-card { grid-column: 1 / -1; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.card-heading h3 { margin: 2px 0 0; font-size: 19px; }
.card-heading > span { color: var(--muted); font-size: 13px; }
.research-chart { width: 100%; height: 270px; overflow: hidden; }
.research-chart svg { display: block; width: 100%; height: 100%; }
.research-chart .line { fill: none; stroke: var(--accent); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.research-chart .area { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.research-chart .guide { stroke-width: 1; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.research-chart .support { stroke: var(--pos); }.research-chart .resistance { stroke: var(--neg); }.research-chart .threshold { stroke: var(--warn); }
.score-history-chart { height: 200px; }
.chart-legend { display: flex; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.chart-legend i { display: inline-block; width: 15px; height: 2px; margin-right: 5px; vertical-align: middle; background: var(--accent); }
.chart-legend .legend-support { background: var(--pos); }.chart-legend .legend-resistance { background: var(--neg); }
.checklist { display: grid; gap: 8px; }
.checklist > div { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 10px; background: var(--bg); }
.check-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 10%, transparent); }
.check-dot.positive { background: var(--pos); }.check-dot.negative { background: var(--neg); }.check-dot.caution { background: var(--warn); }
.checklist p, .checklist small, .checklist b { display: block; margin: 0; }
.checklist small { color: var(--muted); font-size: 12px; }.checklist b { font-size: 14px; }
.metric-list { margin: 0; }.metric-list > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.metric-list dt, .metric-list dd { margin: 0; }.metric-list dt { color: var(--muted); font-size: 13.5px; }.metric-list dd { text-align: right; font-size: 14px; font-weight: 650; }
.metric-list small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; text-align: right; }
.metric-list.compact { margin-top: 10px; }
.microcopy { margin: 13px 0 0; color: var(--muted); font-size: 13px; }
.component-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.component-grid > div > span, .breadth-bars > div > span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.component-grid i, .breadth-bars i { display: block; height: 7px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: var(--bar-bg); }
.component-grid i b, .breadth-bars i b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.sample-count { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.outcome-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.outcome-grid > div { padding: 11px; border-radius: 9px; background: var(--bg); }
.outcome-grid span, .outcome-grid b, .outcome-grid small { display: block; }.outcome-grid span, .outcome-grid small { color: var(--muted); font-size: 12px; }.outcome-grid b { margin: 5px 0 2px; font-size: 16px; }
.breadth-bars { display: grid; gap: 13px; }.breadth-bars p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.holding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.holding-grid > div { min-width: 0; padding: 13px; border-radius: 10px; background: var(--bg); }
.holding-grid span,.holding-grid b,.holding-grid small { display: block; }
.holding-grid span,.holding-grid small { color: var(--muted); font-size: 13px; }
.holding-grid span { min-height: 34px; }
.holding-grid b { margin: 6px 0 3px; font-size: 21px; }
.holding-note { margin: 10px 0; color: var(--muted); font-size: 13px; }
.ownership-card { grid-column: 1 / -1; }
.official-inline { display: inline-block; margin-top: 11px; color: var(--accent); font-size: 13px; font-weight: 700; }
.holding-source { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.holding-source p { margin: 0; }
.holding-source strong,.holding-source span { display: block; }
.holding-source strong { font-size: 12.5px; }
.holding-source span { margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.holding-source a { color: var(--accent); font-size: 12.5px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.holding-source a:hover { text-decoration: underline; }
.briefing-card { border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent-soft) 35%, var(--surface)); }
.briefing-card > p:not(.microcopy) { max-width: 92ch; margin: 0; font: 21px/1.55 Georgia, serif; }
.event-timeline { display: grid; gap: 0; }
.event-timeline article { display: grid; grid-template-columns: 105px 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.event-timeline time { color: var(--accent); font-size: 13.5px; font-weight: 700; }.event-timeline span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.event-timeline h4 { margin: 2px 0 3px; font-size: 14.5px; }.event-timeline p { max-width: 90ch; margin: 0; color: var(--muted); font-size: 13.5px; }.event-timeline a { display: inline-block; margin-top: 6px; color: var(--accent); font-size: 13px; font-weight: 700; }
.stock-deal-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.stock-deal-list article { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; padding: 12px; border-radius: 10px; background: var(--bg); }
.stock-deal-list b { overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; white-space: nowrap; }.stock-deal-list small { grid-column: 2 / -1; color: var(--muted); font-size: 13px; }.stock-deal-list em { color: var(--muted); font-size: 11px; font-style: normal; }
.source-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.source-card h3 { margin: 3px 0; }.source-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13.5px; }.source-card > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }.source-card a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }

.delta-pos { color: var(--pos); }
.delta-neg { color: var(--neg); }
.delta-flat { color: var(--muted); }

.ratio { font-variant-numeric: tabular-nums; }
.ratio.weak { color: var(--muted); }

/* composition bar */

.comp { display: flex; height: 9px; width: 132px; border-radius: 3px; overflow: hidden; background: var(--bar-bg); }
.comp i { display: block; height: 100%; }
.comp .c-del { background: var(--accent); }
.comp .c-vol { background: color-mix(in srgb, var(--accent) 62%, transparent); }
.comp .c-tic { background: color-mix(in srgb, var(--accent) 38%, transparent); }
.comp .c-oth { background: color-mix(in srgb, var(--accent) 20%, transparent); }

.deal-tag {
  display: inline-block; margin-left: 6px;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em;
  padding: 1px 5px; border-radius: 3px;
  background: var(--bar-bg); color: var(--muted);
  vertical-align: 1px;
}

.mobile-deal-list, .calendar-event-list { display: none; }
.deal-card, .calendar-event-card {
  min-width: 0; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.deal-card-head, .calendar-event-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.deal-card-head > div { min-width: 0; }
.deal-card-head span, .deal-card-head strong { display: block; }
.deal-card-head span, .calendar-event-head span { color: var(--muted); font-size: 13.5px; }
.deal-card-head strong { margin-top: 3px; font-size: 18px; letter-spacing: -.01em; }
.side-pill {
  flex: 0 0 auto; padding: 4px 8px; border-radius: 999px;
  background: var(--accent-soft); font-size: 13.5px; letter-spacing: .04em;
}
.side-pill.side-sell { background: color-mix(in srgb, var(--neg) 10%, transparent); }
.deal-card > p { margin: 15px 0; overflow-wrap: anywhere; color: var(--ink); font-size: 14.5px; line-height: 1.45; }
.mobile-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.mobile-facts > div { min-width: 0; padding: 9px 10px; border-radius: 8px; background: var(--bg); }
.mobile-facts dt, .mobile-facts dd { margin: 0; }
.mobile-facts dt { color: var(--muted); font-size: 13px; }
.mobile-facts dd { margin-top: 3px; overflow-wrap: anywhere; color: var(--ink); font-size: 14.5px; font-weight: 620; }
.calendar-event-card h4 { margin: 12px 0 14px; font-size: 16px; line-height: 1.35; }
.calendar-event-head time { color: var(--accent); font-size: 14px; font-weight: 700; }

.side-buy { color: var(--pos); font-weight: 560; }
.side-sell { color: var(--neg); font-weight: 560; }

/* ---------- large deal intelligence ---------- */

.deals-heading > div > p:last-child { margin: 7px 0 0; max-width: 68ch; color: var(--muted); }
.deal-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.deal-summary {
  min-width: 0; padding: 16px 17px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.deal-summary::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line); }
.deal-summary.buy-summary::before { background: var(--pos); }
.deal-summary.sell-summary::before { background: var(--neg); }
.deal-summary span, .deal-summary small { display: block; color: var(--muted); font-size: 13.5px; }
.deal-summary strong { display: block; margin: 8px 0 5px; font-size: 23px; line-height: 1; letter-spacing: -.025em; }
.buy-summary strong { color: var(--pos); }
.sell-summary strong { color: var(--neg); }

.deal-toolbar {
  display: grid; grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, .6fr)); gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.deal-search, .filter-field { min-width: 0; }
.deal-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.deal-search:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.deal-search > span { color: var(--muted); font-size: 19px; transform: rotate(-15deg); }
.deal-search input { width: 100%; padding: 11px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14.5px; }
.filter-field { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.filter-field > span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.filter-field select { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; cursor: pointer; }

.deal-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 10px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.deal-view { appearance: none; min-height: 34px; border: 0; border-radius: 7px; padding: 0 12px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; }
.deal-view:hover { color: var(--ink); }
.deal-view.is-active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 18%, transparent); }
/* ---------- findings ----------
   A named conclusion drawn from the data, as opposed to a raw aggregate. It outranks
   the filters and the result list, so it is sized and placed to be read first. */

.findings { margin: 0 0 16px; }
.findings-label {
  display: flex; align-items: center; gap: 9px; margin: 0 0 10px;
  color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
}
.findings-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.findings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.finding {
  --finding-c: var(--accent);
  min-width: 0; padding: 16px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--finding-c); border-radius: 12px;
  background: var(--surface-raised); box-shadow: var(--shadow);
}
.finding.positive { --finding-c: var(--pos); }
.finding.negative { --finding-c: var(--neg); }
.finding-kicker { margin: 0; color: var(--muted); font-size: 11.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.finding-subject { margin: 9px 0 0; color: var(--ink); font-size: 21px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.finding-value { margin: 5px 0 0; color: var(--finding-c); font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.finding-note { max-width: 46ch; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.findings-empty { grid-column: 1 / -1; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 14px; }

.deal-results { margin-top: 12px; }
.intelligence-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.intelligence-card {
  width: 100%; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); text-align: left; cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.intelligence-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 16px 36px color-mix(in srgb, var(--ink) 10%, transparent); }
.intelligence-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.intelligence-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-overline { display: block; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.intelligence-head h3 { margin: 2px 0 0; max-width: 29ch; overflow-wrap: anywhere; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.deal-badges { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.activity-badge, .type-badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.activity-badge { padding: 4px 7px; }
.activity-badge.buy-heavy { background: color-mix(in srgb, var(--pos) 12%, transparent); color: var(--pos); }
.activity-badge.sell-heavy { background: color-mix(in srgb, var(--neg) 11%, transparent); color: var(--neg); }
.activity-badge.two-way { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.type-badge { padding: 3px 6px; background: var(--bar-bg); color: var(--muted); }
.type-block { background: color-mix(in srgb, #7b61b4 15%, transparent); color: #7451a6; }
.participant-chips { display: flex; gap: 6px; margin: 14px 0; overflow: hidden; }
.participant-chips span { min-width: 0; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 7px; border-radius: 7px; background: var(--bg); color: var(--muted); font-size: 13px; }
.participant-chips.stock-chips { flex-wrap: wrap; overflow: visible; }
.participant-chips.stock-chips span { max-width: none; color: var(--accent); font-weight: 700; }
.side-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.side-metric { min-width: 0; padding: 10px 11px; border-radius: 10px; background: var(--bg); border: 1px solid transparent; }
.side-metric-buy { border-color: color-mix(in srgb, var(--pos) 16%, transparent); }
.side-metric-sell { border-color: color-mix(in srgb, var(--neg) 14%, transparent); }
.side-metric span, .side-metric strong, .side-metric small { display: block; }
.side-metric span { color: var(--muted); font-size: 13px; }
.side-metric-buy span i { color: var(--pos); }
.side-metric-sell span i { color: var(--neg); }
.side-metric strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 14.5px; }
.side-metric small { margin-top: 2px; color: var(--muted); font-size: 13px; }
.intelligence-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.intelligence-foot span { min-width: 0; }
.intelligence-foot strong { display: block; margin-top: 1px; color: var(--ink); font-size: 13.5px; }
.intelligence-foot b { margin-left: auto; color: var(--accent); white-space: nowrap; font-size: 13px; }
.participant-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.participant-values > div { min-width: 0; padding: 10px; border-radius: 10px; background: var(--bg); }
.participant-values span, .participant-values strong, .participant-values small { display: block; }
.participant-values span { font-size: 13px; }
.participant-values strong { margin: 4px 0 2px; overflow-wrap: anywhere; font-size: 14.5px; }
.participant-values small { color: var(--muted); font-size: 12px; }

.transaction-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.transaction-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.transaction-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.transaction-head span { color: var(--muted); font-size: 13px; }
.transaction-head h3 { margin: 2px 0 0; font-size: 17px; }
.transaction-card > p { min-height: 38px; margin: 12px 0; overflow-wrap: anywhere; font-size: 13.5px; }
.transaction-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.transaction-facts div { min-width: 0; }
.transaction-facts span, .transaction-facts strong { display: block; }
.transaction-facts span { color: var(--muted); font-size: 12px; }
.transaction-facts strong { margin-top: 2px; overflow-wrap: anywhere; font-size: 13.5px; }

.deal-explainer { margin-top: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.deal-explainer summary { padding: 12px 14px; color: var(--accent); font-size: 14px; font-weight: 650; cursor: pointer; }
.deal-explainer > div { padding: 0 14px 12px; max-width: 88ch; color: var(--muted); font-size: 14px; }
.deal-explainer p { margin: 5px 0; }

body.sheet-open { overflow: hidden; }
.deal-sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(8, 20, 16, .42); backdrop-filter: blur(2px); }
.deal-sheet {
  position: fixed; z-index: 61; top: 0; right: 0; width: min(680px, 92vw); height: 100dvh;
  display: flex; flex-direction: column; background: var(--bg); box-shadow: -20px 0 60px rgba(8, 20, 16, .2);
  transform: translateX(102%); visibility: hidden; transition: transform .22s ease, visibility .22s;
}
.deal-sheet.is-open { transform: translateX(0); visibility: visible; }
.deal-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 21px; border-bottom: 1px solid var(--line); background: var(--surface); }
.deal-sheet-head h2 { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 23px; line-height: 1.2; }
.deal-sheet-close { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 23px; cursor: pointer; }
.deal-sheet-body { flex: 1; overflow-y: auto; padding: 18px 20px 34px; }
.sheet-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.sheet-hero.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sheet-hero > div { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.sheet-hero span, .sheet-hero strong { display: block; }
.sheet-hero span { color: var(--muted); font-size: 13px; }
.sheet-hero strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 18px; }
.briefing { display: flex; gap: 11px; margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--accent-soft); }
.briefing-icon { color: var(--accent); font-size: 19px; }
.briefing h3 { margin: 0 0 4px; color: var(--accent); font-size: 14px; }
.briefing p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.sheet-section { margin-top: 22px; }
.sheet-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-section-head h3 { margin: 0; font-size: 15px; }
.sheet-section-head span { color: var(--muted); font-size: 13px; }
.breakdown-list { display: grid; gap: 8px; }
.breakdown-row { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.breakdown-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.breakdown-title strong { overflow-wrap: anywhere; font-size: 14px; }
.side-metrics.compact .side-metric { padding: 8px 9px; }
.row-result { margin-top: 8px; color: var(--muted); font-size: 13px; }
.sheet-transactions { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.sheet-transactions > div { display: grid; grid-template-columns: 55px minmax(70px, .7fr) minmax(145px, 1.4fr) minmax(70px, .7fr) auto; align-items: center; gap: 7px; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sheet-transactions > div:last-child { border-bottom: 0; }
.sheet-transactions > div > b { text-align: right; }

/* ---------- prose / method ---------- */

.note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--line);
  background: var(--surface); border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px; color: var(--muted);
  max-width: 78ch;
}

.prose { max-width: 78ch; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.prose h2 { font-size: 19px; margin: 4px 0 10px; }
.prose h3 { font-size: 16px; margin: 26px 0 8px; }
.prose h3.warn { color: var(--warn); }
.prose p, .prose li { color: var(--ink); font-size: 16px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 7px; }

.prose dl { margin: 0; }
.prose dt {
  font-weight: 600; margin-top: 16px;
  display: flex; align-items: baseline; gap: 8px;
}
.prose dd {
  margin: 4px 0 0; color: var(--muted); font-size: 15px;
}
.wt {
  font-size: 13.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 1px 6px; border-radius: 999px;
}

/* ---------- calendar ---------- */

.cal-day { margin-bottom: 22px; }
.cal-day h3 { font-size: 15px; margin: 0 0 8px; color: var(--muted); font-weight: 560; }
.calendar-desktop-table table { table-layout: fixed; }
.calendar-desktop-table .calendar-time-col { width: 16%; }
.calendar-desktop-table .calendar-event-col { width: 40%; }
.calendar-desktop-table .calendar-value-col { width: 14.666%; }
.calendar-desktop-table table.scores th,
.calendar-desktop-table table.scores td { padding-left: 16px; padding-right: 16px; }

.empty {
  padding: 34px 20px; text-align: center;
  color: var(--muted); font-size: 15px;
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- portfolio insight ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.portfolio-heading { align-items: center; }
.portfolio-action {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.portfolio-action:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.portfolio-action:focus-visible, .portfolio-text-action:focus-visible, .portfolio-remove:focus-visible, .portfolio-dialog-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.portfolio-action:disabled { opacity: .58; cursor: not-allowed; }
.portfolio-action-primary { border-color: transparent; background: linear-gradient(135deg, var(--accent-strong), var(--accent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); color: #fff; }
.portfolio-action-primary:hover:not(:disabled) { transform: translateY(-1px); color: #fff; }
.portfolio-private-chip, .portfolio-availability { padding: 6px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.portfolio-loading { padding: 34px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.portfolio-connect { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.portfolio-connect-intro { max-width: 720px; margin-bottom: 18px; }
.portfolio-connect-intro h3 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.02em; }
.portfolio-connect-intro > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.portfolio-connect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portfolio-connect-card { position: relative; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); }
.portfolio-connect-card.available { border-color: color-mix(in srgb, var(--accent) 36%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 25%, var(--surface)); }
.portfolio-connect-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--surface); color: var(--accent); font-size: 23px; box-shadow: 0 5px 16px color-mix(in srgb, var(--ink) 7%, transparent); }
.portfolio-connect-card .portfolio-availability { position: absolute; right: 16px; top: 16px; }
.portfolio-availability.neutral { background: var(--bar-bg); color: var(--muted); }
.portfolio-connect-card h4 { margin: 15px 0 4px; font-size: 18px; }
.portfolio-connect-card p { margin: 0; max-width: 54ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.portfolio-connect-card ul { display: grid; gap: 5px; margin: 14px 0 17px; padding: 0; list-style: none; color: var(--ink); font-size: 13.5px; }
.portfolio-connect-card li::before { content: '✓'; margin-right: 7px; color: var(--accent); font-weight: 800; }
.portfolio-api-options, #portfolio-api-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.portfolio-api-options small, #portfolio-api-options small { flex-basis: 100%; color: var(--muted); font-size: 13px; line-height: 1.45; }
.portfolio-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.portfolio-summary-card { min-width: 0; min-height: 112px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.portfolio-summary-card span, .portfolio-summary-card small { display: block; color: var(--muted); }
.portfolio-summary-card span { font-size: 13.5px; font-weight: 700; }
.portfolio-summary-card strong { display: block; margin-top: 11px; overflow: hidden; color: var(--ink); font-size: clamp(19px, 2vw, 26px); line-height: 1.05; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-summary-card small { margin-top: 8px; font-size: 13px; }
.portfolio-summary-card.primary { border-color: transparent; background: linear-gradient(140deg, var(--accent-strong), var(--accent)); }
.portfolio-summary-card.primary span, .portfolio-summary-card.primary small { color: rgba(255,255,255,.72); }
.portfolio-summary-card.primary strong { color: #fff; }
.portfolio-summary-card.positive strong, .portfolio-positive { color: var(--pos) !important; }
.portfolio-summary-card.negative strong, .portfolio-negative { color: var(--neg) !important; }
.portfolio-api-strip { margin-top: 14px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--accent-soft) 14%, var(--surface)); box-shadow: var(--shadow); }
.portfolio-api-strip-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.portfolio-api-strip .portfolio-connect-icon { width: 36px; height: 36px; font-size: 19px; box-shadow: none; }
.portfolio-api-strip-copy, .portfolio-api-strip-copy strong, .portfolio-api-strip-copy small { display: block; min-width: 0; }
.portfolio-api-strip-copy .eyebrow { color: var(--accent); font-size: 11px; }
.portfolio-api-strip-copy strong { margin-top: 1px; font-size: 15px; }
.portfolio-api-strip-copy small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-api-strip-body { display: grid; gap: 12px; padding: 14px 16px 16px; }
.portfolio-api-strip-body > p { margin: 0; max-width: 86ch; color: var(--muted); font-size: 13px; line-height: 1.5; }
.portfolio-insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.portfolio-surface { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.portfolio-surface-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.portfolio-surface-head h3 { margin: 2px 0 0; font-size: 17px; letter-spacing: -.015em; }
.portfolio-surface-head > span, .portfolio-table-actions { color: var(--muted); font-size: 13px; }
.allocation-list { display: grid; gap: 9px; }
.allocation-row { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(80px, 1fr) 48px; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.allocation-row > span:first-child, .allocation-row b, .allocation-row small { display: block; min-width: 0; }
.allocation-row b { font-size: 13.5px; }
.allocation-row small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.allocation-row > strong { color: var(--accent); font-size: 13.5px; text-align: right; }
.allocation-bar { height: 7px; overflow: hidden; border-radius: 999px; background: var(--bar-bg); }
.allocation-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8fcab9)); }
.portfolio-observations { display: grid; gap: 9px; }
.portfolio-stage-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: -2px 0 13px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.portfolio-stage-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; background: color-mix(in srgb, var(--state-c, var(--muted)) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--state-c, var(--muted)) 25%, transparent); color: var(--state-c, var(--muted)); font-size: 11.5px; font-weight: 720; }
.portfolio-stage-chip b { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 50%; background: color-mix(in srgb, currentColor 13%, transparent); font-size: 11px; }
.portfolio-observation { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 11px; border-radius: 11px; background: var(--bg); }
.portfolio-observation > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--surface); color: var(--accent); font-weight: 800; }
.portfolio-observation strong { font-size: 13.5px; }
.portfolio-observation p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.portfolio-observation.negative > span { color: var(--neg); }
.portfolio-observation.caution > span { color: var(--warn); }
.portfolio-holdings-card { padding: 0; overflow: hidden; }
.portfolio-holdings-card > .portfolio-surface-head { align-items: center; margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.portfolio-table-actions { display: flex; align-items: center; gap: 12px; }
.portfolio-text-action { padding: 0; border: 0; background: none; color: var(--neg); font: inherit; font-size: 13px; cursor: pointer; }
.portfolio-table-wrap { overflow-x: auto; }
.portfolio-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.portfolio-table th, .portfolio-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; text-align: left; vertical-align: middle; }
.portfolio-table th { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.portfolio-table td.num, .portfolio-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.portfolio-table td a { color: inherit; text-decoration: none; }
.portfolio-table td a b, .portfolio-table td a small, .portfolio-table td.num small, .portfolio-unmatched b, .portfolio-unmatched small { display: block; }
.portfolio-unmatched { display: block; }
.portfolio-table td a b, .portfolio-unmatched b { font-size: 14px; }
.portfolio-table td a small, .portfolio-table td.num small, .portfolio-unmatched small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.portfolio-state { display: inline-flex; max-width: 190px; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 999px; background: var(--bar-bg); color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.25; text-align: center; white-space: normal; }
.portfolio-state.positive { background: color-mix(in srgb, var(--pos) 12%, var(--surface)); color: var(--pos); }
.portfolio-state.negative { background: color-mix(in srgb, var(--neg) 12%, var(--surface)); color: var(--neg); }
.portfolio-remove { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 16px; cursor: pointer; }
.portfolio-remove:hover { border-color: var(--neg); color: var(--neg); }
.portfolio-mobile-holdings { display: none; }
.portfolio-holding-card em { display: block; margin-top: 3px; color: var(--warn); font-size: 11px; font-style: normal; font-weight: 700; }
.portfolio-verify-symbol { color: var(--warn); font-size: 11px; font-weight: 700; }
.portfolio-footnote { margin: 11px 3px 0; color: var(--muted); font-size: 13px; }
.portfolio-empty-copy { margin: 0; color: var(--muted); font-size: 13.5px; }

.portfolio-dialog { width: min(900px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.portfolio-dialog::backdrop { background: rgba(8, 20, 16, .58); backdrop-filter: blur(3px); }
.portfolio-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.portfolio-dialog-head h2 { margin: 2px 0 0; font-size: 22px; }
.portfolio-dialog-close { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 21px; cursor: pointer; }
.portfolio-dialog-body { max-height: calc(100vh - 190px); padding: 20px; overflow-y: auto; }
.portfolio-import-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portfolio-import-choice > section { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); }
.portfolio-import-choice h3 { margin: 0; font-size: 15px; }
.portfolio-import-choice section > p { min-height: 34px; margin: 5px 0 13px; color: var(--muted); font-size: 13px; }
.portfolio-dropzone { display: grid; min-height: 112px; place-items: center; align-content: center; padding: 13px; border: 1px dashed var(--accent); border-radius: 11px; background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface)); text-align: center; cursor: pointer; }
.portfolio-dropzone > span { color: var(--accent); font-size: 25px; }
.portfolio-dropzone strong, .portfolio-dropzone small { display: block; }
.portfolio-dropzone strong { margin-top: 3px; font-size: 13.5px; }
.portfolio-dropzone small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.portfolio-template { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 13px; font-weight: 700; }
.portfolio-manual-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.portfolio-manual-form label:first-child { grid-column: 1 / -1; }
.portfolio-manual-form label span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.portfolio-manual-form label em { font-weight: 400; }
.portfolio-manual-form input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--surface); color: var(--ink); font-size: 13.5px; }
.portfolio-manual-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent); }
.portfolio-manual-form button { grid-column: 1 / -1; }
.portfolio-import-options { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.portfolio-import-options label { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.portfolio-import-status { margin: 10px 0; color: var(--muted); font-size: 13px; }
.portfolio-preview-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; font-size: 13px; }
.portfolio-preview-head span { color: var(--muted); }
.portfolio-preview-table { max-height: 250px; overflow: auto; border: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.portfolio-preview-table table { width: 100%; border-collapse: collapse; }
.portfolio-preview-table th, .portfolio-preview-table td { padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; }
.portfolio-preview-table th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-size: 11px; text-transform: uppercase; }
.portfolio-preview-table .num { text-align: right; }
.portfolio-preview-table button { border: 0; background: none; color: var(--neg); cursor: pointer; }
.portfolio-import-issues { margin-top: 8px; color: var(--muted); font-size: 12px; }
.portfolio-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 20px 22px 34px;
  background: var(--surface);
}
.footer-inner { max-width: 1320px; margin: 0 auto; }
footer p {
  max-width: 84ch; margin: 0 0 8px;
  font-size: 14.5px; line-height: 1.6; color: var(--muted);
}
footer .src { font-size: 14px; }

@media (max-width: 820px) {
  .topbar { padding: 14px 16px; }
  .topbar-inner { align-items: flex-start; }
  .market-mode { display: none; }
  main { padding: 22px 14px 34px; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-score-table { display: none; }
  .desktop-deals-table, .calendar-desktop-table { display: none; }
  .mobile-score-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mobile-deal-list, .calendar-event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .score-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .score-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .score-card-head > div:first-child { display: flex; align-items: center; gap: 8px; }
  .score-card-head strong { font-size: 17px; letter-spacing: -0.01em; }
  .card-rank { color: var(--muted); font-size: 13.5px; }
  .score-badge { text-align: right; }
  .score-badge b { display: block; color: var(--accent); font-size: 22px; line-height: 1; }
  .score-badge span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
  .card-trend { margin-top: 4px; font-size: 13.5px; }
  .card-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 15px; }
  .card-metrics div { padding: 9px; border-radius: 8px; background: var(--bg); }
  .card-metrics span, .card-metrics b { display: block; }
  .card-metrics span { color: var(--muted); font-size: 13px; }
  .card-metrics b { margin-top: 3px; font-size: 14.5px; }
  .card-composition { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; color: var(--muted); font-size: 13px; }
  .score-card .comp { width: 100px; }
  .deal-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-search { grid-column: 1 / -1; }
  .intelligence-list { grid-template-columns: 1fr; }
  .transaction-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-preview { grid-template-columns: 1fr; gap: 12px; }
  .brief-preview-action { justify-self: start; }
  .brief-card { padding: 13px; }
  .brief-links { grid-template-columns: 1fr; }
  .brief-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .brief-tab { border-radius: 10px 10px 0 0; }
  .brief-card { border-radius: 0 0 14px 14px; }
  .stock-hero { grid-template-columns: 1fr; }
  .watch-button { width: 100%; }
  .thesis-map, .investor-more-grid { grid-template-columns: 1fr; }
  .portfolio-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-insight-grid { grid-template-columns: 1fr; }
  .portfolio-table-wrap { display: none; }
  .portfolio-mobile-holdings { display: grid; gap: 10px; padding: 13px; }
  .portfolio-holding-card { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
  .portfolio-holding-card header, .portfolio-holding-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .portfolio-holding-card header a { color: inherit; text-decoration: none; }
  .portfolio-holding-card header b, .portfolio-holding-card header small { display: block; }
  .portfolio-holding-card header small { color: var(--muted); font-size: 12px; }
  .portfolio-holding-card > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 12px 0; }
  .portfolio-holding-card > div span { min-width: 0; padding: 9px; border-radius: 9px; background: var(--surface); }
  .portfolio-holding-card > div small, .portfolio-holding-card > div b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portfolio-holding-card > div small { color: var(--muted); font-size: 11px; }
  .portfolio-holding-card > div b { margin-top: 3px; font-size: 13px; }
  .portfolio-holding-card footer a { color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; }
}

@media (max-width: 560px) {
  .topbar-inner { display: block; }
  .header-actions { margin-top: 12px; justify-content: space-between; }
  .freshness { flex: 1; text-align: center; }
  .tabs { padding: 0 7px; }
  .tab { flex: 0 0 auto; padding: 11px 12px; font-size: 14px; }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 23px; }
  .method-chip { display: none; }
  .overview-grid { gap: 9px; }
  .overview-card { min-height: 104px; padding: 14px; }
  .overview-card strong { margin-top: 9px; font-size: 24px; }
  .controls { gap: 10px; }
  .search-wrap { flex-basis: 100%; max-width: none; }
  .count { font-size: 14px; }
  .compact-filter { flex: 1 1 calc(50% - 6px); grid-template-columns: 1fr; gap: 2px; }
  .compact-filter select { width: 100%; max-width: none; }
  .brief-preview { padding: 14px; }
  .brief-preview-action { width: 100%; }
  .daily-brief { padding: 14px; }
  .daily-brief-head { align-items: flex-start; flex-direction: column; }
  .regime-summary { width: 100%; flex-basis: auto; }
  .brief-columns, .state-guide-grid { grid-template-columns: 1fr; }
  /* Narrow columns: let the label wrap to two lines rather than pushing the count onto its own row. */
  .brief-tab { gap: 6px; padding: 9px 10px; font-size: 12.5px; }
  .brief-tab-label { overflow: visible; white-space: normal; text-align: left; }
  .brief-glossary-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .brief-glossary-head > p { text-align: left; }
  .investor-view { padding: 15px; border-radius: 14px; }
  .investor-view-head { flex-direction: column; gap: 10px; }
  .investor-view-head h2 { font-size: 22px; }
  .investor-summary-grid { grid-template-columns: 1fr; }
  .portfolio-heading { gap: 12px; }
  .portfolio-heading .portfolio-action { flex: none; padding: 8px 10px; font-size: 13px; }
  .portfolio-connect { padding: 14px; }
  .portfolio-connect-grid { grid-template-columns: 1fr; }
  .portfolio-connect-card { padding: 16px; }
  .portfolio-api-strip-head { grid-template-columns: auto minmax(0, 1fr); gap: 9px; padding: 12px; }
  .portfolio-api-strip-head .portfolio-availability { grid-column: 2; grid-row: 2; justify-self: start; }
  .portfolio-api-strip-copy small { white-space: normal; }
  .portfolio-api-strip-body { padding: 12px; }
  .portfolio-summary-grid { gap: 8px; }
  .portfolio-summary-card { min-height: 100px; padding: 13px; }
  .portfolio-summary-card strong { font-size: 19px; }
  .portfolio-surface { padding: 14px; }
  .portfolio-holdings-card { padding: 0; }
  .portfolio-holdings-card > .portfolio-surface-head { align-items: flex-start; flex-direction: column; padding: 14px; }
  .portfolio-table-actions { width: 100%; justify-content: space-between; }
  .portfolio-import-choice { grid-template-columns: 1fr; }
  .portfolio-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 14px; }
  .portfolio-dialog-body { max-height: calc(100vh - 168px); padding: 13px; }
  .portfolio-dialog-head { padding: 14px; }
  .portfolio-dialog-actions { padding: 10px 13px; }
  .portfolio-dialog-actions .portfolio-action { flex: 1; }
  .investor-answer { padding: 13px; }
  .investor-more > summary, .evidence-disclosure > summary { align-items: flex-start; padding: 13px; }
  .investor-more > summary small, .evidence-disclosure > summary small { line-height: 1.4; }
  .peer-card, .coverage-card { padding: 12px; }
  .mobile-score-list { grid-template-columns: 1fr; }
  .mobile-deal-list, .calendar-event-list { grid-template-columns: 1fr; }
  .deals-heading .method-chip { display: inline-flex; margin-top: 7px; }
  .deal-summary-grid { gap: 8px; margin-bottom: 13px; }
  .deal-summary { padding: 13px; }
  .deal-summary strong { font-size: 19px; }
  .deal-summary span, .deal-summary small { font-size: 13px; }
  .deal-toolbar { grid-template-columns: 1fr; padding: 9px; }
  .deal-search { grid-column: auto; }
  .deal-viewbar { align-items: flex-end; }
  .segmented { width: 100%; overflow-x: auto; }
  .deal-view { flex: 1; padding: 7px 9px; font-size: 13.5px; }
  .deal-viewbar .count { display: none; }
  .finding { padding: 14px 15px; }
  .finding-subject { font-size: 19px; }
  .finding-value { font-size: 23px; }
  .intelligence-card { padding: 14px; }
  .intelligence-head { display: grid; }
  .deal-badges { justify-content: flex-start; }
  .participant-chips { margin: 10px 0; }
  .participant-chips span { max-width: 42%; }
  .side-metrics { gap: 6px; }
  .side-metric { padding: 9px; }
  .side-metric strong { font-size: 14px; }
  .intelligence-foot { align-items: flex-start; flex-wrap: wrap; }
  .intelligence-foot b { width: 100%; margin: 2px 0 0; }
  .participant-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .participant-values > div:last-child { grid-column: 1 / -1; }
  .transaction-list { grid-template-columns: 1fr; }
  .transaction-card > p { min-height: 0; }
  .deal-sheet { top: auto; bottom: 0; width: 100%; height: min(92dvh, 820px); border-radius: 18px 18px 0 0; transform: translateY(102%); }
  .deal-sheet.is-open { transform: translateY(0); }
  .deal-sheet-head { padding: 15px 16px; border-radius: 18px 18px 0 0; }
  .deal-sheet-body { padding: 14px 14px 28px; }
  .sheet-hero, .sheet-hero.three-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-hero.three-up > div:last-child { grid-column: 1 / -1; }
  .sheet-transactions > div { grid-template-columns: 48px 1fr auto; }
  .sheet-transactions > div > span:nth-of-type(2) { grid-column: 2 / -1; }
  .sheet-transactions .type-badge { display: none; }
  .prose { padding: 18px; }
  .stock-shell { padding-left: 12px; padding-right: 12px; }
  .stock-hero, .cockpit-card { padding: 15px; border-radius: 13px; }
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-metrics article:last-child { grid-column: 1 / -1; }
  .cockpit-grid { grid-template-columns: 1fr; gap: 10px; }
  .wide-card { grid-column: auto; }
  .research-chart { height: 210px; }
  .score-history-chart { height: 170px; }
  .component-grid { grid-template-columns: 1fr; }
  .holding-grid { grid-template-columns: 1fr; }
  .holding-grid span { min-height: 0; }
  .holding-source { align-items: flex-start; flex-direction: column; }
  .outcome-grid { gap: 5px; }
  .outcome-grid > div { padding: 8px; }
  .briefing-card > p:not(.microcopy) { font-size: 18px; }
  .event-timeline article { grid-template-columns: 1fr; gap: 3px; }
  .stock-deal-list { grid-template-columns: 1fr; }
  .source-card { align-items: flex-start; flex-direction: column; }
  .source-card > div:last-child { justify-content: flex-start; }
  footer { padding: 18px 16px 28px; }
}

/* ---------- broker connections ---------- */
.broker-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; width: 100%; }
.broker-tile {
  display: grid; justify-items: center; gap: 7px; padding: 16px 12px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--surface);
  font: inherit; color: inherit; text-align: center; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.broker-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.broker-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.broker-tile.is-connected { border-color: color-mix(in srgb, var(--pos) 45%, var(--line)); background: color-mix(in srgb, var(--pos) 7%, var(--surface)); }
.broker-tile.is-pending { opacity: .55; }
.broker-tile b { font-size: 14px; }
.broker-tile small { color: var(--muted); font-size: 12px; }
.broker-tile.is-connected small { color: var(--pos); font-weight: 700; }
.broker-logo { display: block; width: auto; max-width: 92px; height: 30px; object-fit: contain; }
.broker-logo-fallback { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 750; }

.broker-detail { display: grid; gap: 13px; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.broker-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.broker-detail-title { display: flex; align-items: center; gap: 11px; }
.broker-detail-title b { font-size: 17px; }
.broker-back { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.broker-back:hover { text-decoration: underline; }
.broker-steps { margin: 0; padding-left: 20px; color: var(--ink); font-size: 13.5px; line-height: 1.75; }
.broker-steps li::marker { color: var(--accent); font-weight: 750; }
.broker-connected-note { padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--pos) 9%, transparent); }
.broker-connected-note b { display: block; color: var(--pos); font-size: 14px; }
.broker-connected-note small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.broker-pending-note { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.broker-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.broker-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.broker-form-fields { display: grid; flex: 1 1 460px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 9px; }
.broker-form label, .broker-form label > span { display: block; min-width: 0; }
.broker-form label > span { margin-bottom: 5px; color: var(--muted); font-size: 11.5px; font-weight: 750; }
.broker-form input { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); color: var(--ink); font-size: 13.5px; }
.broker-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.broker-error { margin: 0; color: var(--neg); font-size: 12.5px; }
@media (max-width: 640px) {
  .broker-picker { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .broker-form, .broker-row-actions { width: 100%; }
  .broker-form-fields { flex-basis: 100%; grid-template-columns: 1fr; }
  .broker-form input, .broker-form .portfolio-action, .broker-row-actions .portfolio-action { width: 100%; }
}
/* The connect card gives every <li> a ✓; numbered connection steps must opt out. */
.broker-steps li::before { content: none; }

/* ---------- narrow-screen corrections ----------
   Below this width a two-up evidence grid leaves each chip ~150px, which is not
   enough for an uppercase label and a value on one row — they collided. One chip
   per row restores both. */
@media (max-width: 600px) {
  .brief-evidence { grid-template-columns: 1fr; }
  /* Two wrapped lines of a company name beat "PCBL C…" on a 320px screen. */
  .brief-stock-identity small { max-width: none; overflow: visible; white-space: normal; line-height: 1.35; }
  .brief-stock-top { align-items: flex-start; }
  /* The badge's caption on one line ate 123px of a 280px card and clipped the
     ticker. Wrapping it to two short lines gives the symbol its width back. */
  .brief-score-move { flex: 0 1 auto; min-width: 0; }
  .brief-score-move small { font-size: 11px; letter-spacing: .02em; white-space: normal; line-height: 1.15; }
  .brief-stock-identity { flex: 1 1 auto; min-width: 0; }
  .brief-stock-identity b { overflow: hidden; text-overflow: ellipsis; }
  /* A heading and its trailing chip/button cannot share one row at this width. */
  .section-head { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .section-head > div { flex: 1 1 100%; }
  .method-chip { white-space: normal; }
}
@media (max-width: 380px) {
  main { padding-left: 12px; padding-right: 12px; }
  /* The arrow duplicates the +/- already on the number; dropping it is the few px
     the badge needs to stop clipping on the longest company names. */
  .brief-score-move .brief-icon { display: none; }
  .brief-score-move { padding: 6px 7px; gap: 0; }
  .brief-links a { padding: 11px; }
  .brief-stock-identity { gap: 7px; }
  .brief-company-icon { width: 28px; height: 28px; }
  .brief-company-icon .brief-icon { width: 15px; height: 15px; }
  .brief-stock-identity b { font-size: 13.5px; }
  .brief-score-move strong { font-size: 17px; }
  .daily-brief, .brief-card { padding: 12px; }
  .section-head h2 { font-size: 26px; }
  .broker-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- official portfolio and watchlist updates ---------- */
.updates-tab { display: inline-flex; align-items: center; gap: 7px; }
/* Indices & Commodities: participation compared across fund groups. */
/* Fund flows in the briefing — the same reading as the Indices tab, sized to sit
   under the market-breadth line rather than compete with it. */
.brief-rotation { margin: 0 0 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.brief-rotation[hidden] { display: none; }
.rotation-head p:not(.eyebrow) { margin: 2px 0 12px; color: var(--muted); font-size: 13.5px; }
.rotation-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 700px) { .rotation-groups { grid-template-columns: 1fr; } }
.rotation-group {
  display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: var(--surface); color: inherit; text-decoration: none;
  transition: border-color .15s ease;
}
.rotation-group:hover { border-color: var(--accent); }
.rotation-group.lead { background: var(--accent-soft); border-color: var(--accent); }
.rotation-rank { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.rotation-group strong { display: block; margin-top: 3px; font-size: 14.5px; font-weight: 650; }
.rotation-group b { font-family: var(--font-display); font-size: 25px; font-weight: 520; letter-spacing: -.02em; }
.rotation-bar { height: 6px; border-radius: 99px; background: var(--bar-bg); overflow: hidden; margin: 6px 0 5px; }
.rotation-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.rotation-group small { display: block; color: var(--muted); font-size: 12px; }

.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 6px; }
@media (max-width: 760px) { .flow-grid { grid-template-columns: 1fr; } }
.flow-card {
  display: block; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; background: var(--surface);
  color: inherit; text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.flow-card:hover { border-color: var(--accent); }
.flow-card.is-current { background: var(--accent-soft); border-color: var(--accent); cursor: default; }
.flow-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.flow-rank { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.flow-card h3 { font-family: var(--font-display); font-weight: 520; font-size: 20px; margin: 6px 0 2px; }
.flow-card > strong { font-family: var(--font-display); font-size: 31px; font-weight: 520; letter-spacing: -.02em; }
.flow-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.flow-bar { height: 7px; border-radius: 99px; background: var(--bar-bg); overflow: hidden; margin-top: 10px; }
.flow-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

/* Sub-navigation for tabs that group several panels.
   The bar sits directly under the main tabs and sticks with them, so the two
   read as one navigation column: which section you are in, then which view of
   it. Its side padding matches main's content edge exactly — the bar itself
   spans the viewport so its background and rule run edge to edge, while the
   control inside lines up with the heading below it. */
.subtabs {
  position: sticky; top: 41px; z-index: 19;
  display: flex; margin: 0;
  padding: 9px max(22px, calc((100% - 1320px) / 2 + 22px));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}
.subtabs[hidden] { display: none; }

/* One track holding all the options reads as a control to switch between,
   rather than as loose chips that might be decoration. */
.subtab-track {
  display: inline-flex; gap: 3px;
  padding: 3px; border-radius: 999px;
  background: var(--bar-bg); border: 1px solid var(--line);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.subtab-track::-webkit-scrollbar { display: none; }

.subtab {
  appearance: none; border: 0; background: transparent;
  border-radius: 999px; padding: 8px 17px;
  font: inherit; font-size: 13.5px; font-weight: 620;
  color: var(--muted); cursor: pointer; white-space: nowrap; flex: 0 0 auto;
  transition: color .15s ease, background .15s ease;
}
.subtab:hover { color: var(--ink); }
.subtab.is-active {
  background: var(--surface-raised); color: var(--accent); font-weight: 700;
  box-shadow: 0 1px 2px rgba(21, 36, 29, .10), 0 1px 6px rgba(21, 36, 29, .07);
}
.subtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 560px) {
  .subtabs { padding: 8px 12px; }
  .subtab { padding: 8px 14px; font-size: 13px; }
}

.tab-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: white; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
}
.tab.is-active .tab-badge { background: var(--ink); color: var(--surface); }
.updates-heading { align-items: flex-end; }
.updates-heading > div:first-child { max-width: 820px; }
.updates-heading-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 9px; color: var(--muted); font-size: 12px; text-align: right; }
.updates-mark-read {
  min-height: 38px; padding: 0 13px; border: 1px solid var(--accent); border-radius: 9px;
  background: var(--surface); color: var(--accent); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer;
}
.updates-mark-read:hover:not(:disabled) { background: var(--accent-soft); }
.updates-mark-read:disabled { opacity: .45; cursor: default; }
.updates-source-note {
  display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 18px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--muted); font-size: 13px; line-height: 1.55;
}
.updates-source-note strong { flex: 0 0 auto; color: var(--ink); }
.updates-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.updates-scopes { display: flex; flex-wrap: wrap; gap: 7px; }
.updates-scopes button {
  min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.updates-scopes button:hover, .updates-scopes button.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.updates-type-filter { min-width: 235px; }
.updates-type-filter > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.updates-type-filter select {
  width: 100%; height: 42px; padding: 0 35px 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background-color: var(--surface); color: var(--ink); font: inherit; font-size: 13px;
}
.updates-result-bar { display: flex; justify-content: space-between; min-height: 30px; color: var(--muted); font-size: 12.5px; }
.updates-list { display: grid; gap: 10px; }
.update-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px;
  padding: 18px 18px 18px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft);
}
.update-card.is-unread { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.update-unread-dot { position: absolute; left: 10px; top: 24px; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.update-card.is-unread .update-unread-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.update-card-main { min-width: 0; }
.update-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 10px; margin-bottom: 8px; }
.update-meta strong { color: var(--accent); font-size: 14px; }
.update-meta span { color: var(--muted); font-size: 12.5px; }
.update-meta time { margin-left: auto; color: var(--muted); font-size: 12px; }
.update-card h3 { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.35; }
.update-card p { max-width: 900px; margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.update-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.update-tags span { padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.update-type { background: var(--accent-soft); color: var(--accent); }
.update-type.type-result { background: color-mix(in srgb, #805ad5 14%, var(--surface)); color: #805ad5; }
.update-type.type-board-meeting { background: color-mix(in srgb, #d69e2e 14%, var(--surface)); color: #9a6700; }
.update-type.type-corporate-action { background: color-mix(in srgb, #3182ce 14%, var(--surface)); color: #2770ad; }
.update-type.type-shareholding { background: color-mix(in srgb, #c05621 13%, var(--surface)); color: #a0461c; }
.update-exchange { background: var(--surface-muted); color: var(--ink); }
.update-scope { border: 1px solid var(--line); color: var(--muted); }
.update-source {
  align-self: center; white-space: nowrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--accent); font-size: 12.5px; font-weight: 750; text-decoration: none;
}
.update-source:hover { border-color: var(--accent); background: var(--accent-soft); }
.updates-empty { padding: 44px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.updates-empty strong { display: block; color: var(--ink); font-size: 17px; }
.updates-empty p { margin: 7px auto 0; max-width: 560px; line-height: 1.55; }

@media (max-width: 760px) {
  .updates-heading-actions { width: 100%; align-items: flex-start; text-align: left; }
  .updates-source-note, .updates-toolbar { align-items: stretch; flex-direction: column; }
  .updates-type-filter { min-width: 0; width: 100%; }
  .updates-scopes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .updates-scopes button { padding: 0 8px; }
  .update-card { grid-template-columns: 1fr; gap: 13px; }
  .update-meta time { width: 100%; margin-left: 0; }
  .update-source { justify-self: start; }
}

/* ---------- custom and saved research screens ---------- */
.radar-heading { margin-bottom: 4px; }
.radar-heading p:last-child { max-width: 820px; }
.saved-screen-workspace {
  margin: 22px 0 18px; padding: 20px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 64%, var(--surface)), var(--surface) 56%);
}
.saved-screen-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.saved-screen-heading h3 { margin: 4px 0 5px; font: 600 clamp(24px, 3vw, 34px)/1.08 Fraunces, serif; }
.saved-screen-heading p:last-child { margin: 0; max-width: 690px; color: var(--muted); line-height: 1.55; }
.saved-screen-heading-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.saved-screen-heading-actions button, .screen-form-footer button {
  min-height: 38px; padding: 0 13px; border: 1px solid var(--accent); border-radius: 9px;
  color: var(--accent); background: var(--surface); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer;
}
.saved-screen-heading-actions .primary-action, .screen-form-footer .primary-action { color: white; background: var(--accent); }
.screen-alert-button { display: inline-flex; align-items: center; gap: 7px; }
.screen-alert-button span {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: white; background: var(--negative);
  font-size: 11px; line-height: 20px; text-align: center;
}
.saved-screen-list {
  display: flex; gap: 8px; margin-top: 19px; padding: 3px 2px 9px; overflow-x: auto; overscroll-behavior-inline: contain;
  scrollbar-width: thin; scroll-snap-type: inline proximity;
}
.saved-screen-tab {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 38px; max-width: 280px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font: inherit; font-weight: 720;
  cursor: pointer; scroll-snap-align: start;
}
.saved-screen-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-screen-tab b { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; }
.saved-screen-tab:hover { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); color: var(--ink); }
.saved-screen-tab:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.saved-screen-tab.is-active { border-color: var(--accent); color: white; background: var(--accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 22%, transparent); }
.saved-screen-tab.is-active b { color: var(--accent); background: white; }
.saved-screen-empty { grid-column: 1 / -1; padding: 22px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.saved-screen-empty strong { display: block; margin-bottom: 5px; }
.saved-screen-empty p { margin: 0 auto; max-width: 620px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.saved-screen-results { margin-top: 9px; }
.saved-screen-result-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.saved-screen-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 18px 12px; }
.saved-screen-result-head h4 { margin: 3px 0 4px; font: 600 clamp(22px, 3vw, 30px)/1.1 Fraunces, serif; }
.saved-screen-result-head p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.saved-screen-result-actions { display: flex; gap: 7px; }
.saved-screen-result-actions button { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font: inherit; font-size: 12px; font-weight: 720; cursor: pointer; }
.saved-screen-result-actions button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.saved-screen-result-rules { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 16px; border-bottom: 1px solid var(--line); }
.saved-screen-result-rules span { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--bg); font-size: 11px; }
.saved-screen-results-table { font-size: 13px; }
.saved-screen-results-table th, .saved-screen-results-table td { padding: 12px 13px; }
.saved-screen-results-table .research-state { white-space: nowrap; }
.saved-screen-results-empty { display: grid; justify-items: center; gap: 5px; padding: 38px 18px; color: var(--muted); text-align: center; }
.saved-screen-results-empty strong { color: var(--ink); }
.saved-screen-mobile-results { display: none; padding: 10px; }
.saved-screen-stock-card { display: grid; gap: 11px; padding: 13px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.saved-screen-stock-card:last-child { border-bottom: 0; }
.saved-screen-stock-head, .saved-screen-stock-stage, .saved-screen-stock-metrics { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.saved-screen-stock-head > span { display: grid; gap: 2px; }
.saved-screen-stock-head small { color: var(--muted); font-size: 11px; }
.saved-screen-stock-head strong { font-size: 16px; }
.saved-screen-stock-head > b { display: grid; justify-items: end; color: var(--accent); font-size: 19px; }
.saved-screen-stock-head > b small { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.saved-screen-stock-stage { justify-content: flex-start; flex-wrap: wrap; }
.saved-screen-stock-metrics { padding-top: 10px; border-top: 1px solid var(--line); }
.saved-screen-stock-metrics > span { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.saved-screen-stock-metrics b { color: var(--ink); font-size: 12px; }
.saved-screen-status { min-height: 18px; margin: 7px 0 -6px; color: var(--negative); font-size: 12px; }

.screen-dialog {
  width: min(920px, calc(100vw - 32px)); max-height: min(88vh, 860px); padding: 0; border: 1px solid var(--line);
  border-radius: 18px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 90px rgba(5, 24, 18, .28); overflow: auto;
}
.screen-dialog::backdrop { background: rgba(4, 19, 15, .58); backdrop-filter: blur(3px); }
.screen-form, .screen-alert-dialog { padding: 24px; }
.screen-alert-dialog { width: min(760px, calc(100vw - 32px)); }
.screen-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.screen-dialog-head h2 { margin: 3px 0 0; font: 600 clamp(28px, 4vw, 42px)/1.05 Fraunces, serif; }
.dialog-close { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--bg); font-size: 24px; line-height: 1; cursor: pointer; }
.screen-dialog-intro { max-width: 720px; margin: 13px 0 20px; color: var(--muted); line-height: 1.55; }
.screen-name-field, .screen-rule-field { display: grid; gap: 6px; min-width: 0; }
.screen-name-field > span, .screen-field-heading > label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.screen-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.screen-help-wrap { position: relative; flex: 0 0 auto; }
.screen-help {
  display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  color: var(--accent); background: var(--surface); font: 800 12px/1 Inter, sans-serif; cursor: help;
}
.screen-help:hover, .screen-help:focus { border-color: var(--accent); background: var(--accent-soft); outline: 0; }
.screen-tooltip {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 50%; width: min(300px, calc(100vw - 52px)); padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 10px; color: var(--ink); background: var(--surface);
  box-shadow: 0 14px 36px rgba(5, 24, 18, .18); font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.5;
  text-transform: none; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .15s ease, transform .15s ease;
}
.screen-help:hover + .screen-tooltip, .screen-help:focus + .screen-tooltip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.screen-rule-field:nth-child(3n + 1) .screen-tooltip { left: 0; transform: translate(0, -4px); }
.screen-rule-field:nth-child(3n + 1) .screen-help:hover + .screen-tooltip,
.screen-rule-field:nth-child(3n + 1) .screen-help:focus + .screen-tooltip { transform: translate(0, 0); }
.screen-rule-field:nth-child(3n) .screen-tooltip { right: 0; left: auto; transform: translate(0, -4px); }
.screen-rule-field:nth-child(3n) .screen-help:hover + .screen-tooltip,
.screen-rule-field:nth-child(3n) .screen-help:focus + .screen-tooltip { transform: translate(0, 0); }
.screen-name-field input, .screen-rule-grid input, .screen-rule-grid select {
  width: 100%; height: 45px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); background: var(--bg); font: inherit; outline: 0;
}
.screen-name-field input:focus, .screen-rule-grid input:focus, .screen-rule-grid select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.screen-rule-grid input[aria-invalid="true"] { border-color: var(--negative); box-shadow: 0 0 0 3px color-mix(in srgb, var(--negative) 12%, transparent); }
.screen-field-error { display: block; min-height: 16px; color: var(--negative); font-size: 11px; font-weight: 650; line-height: 1.35; }
.screen-rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 36px; }
.input-suffix i { position: absolute; top: 50%; right: 13px; color: var(--muted); font-style: normal; transform: translateY(-50%); }
.screen-preview { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.screen-preview > strong { display: block; margin-bottom: 8px; }
.screen-preview > div { display: flex; flex-wrap: wrap; gap: 6px; }
.screen-preview span { padding: 5px 8px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; }
.screen-preview span.is-error { color: var(--negative); background: color-mix(in srgb, var(--negative) 10%, transparent); }
.screen-alert-toggle { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.screen-alert-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.screen-alert-toggle span { display: grid; gap: 3px; }
.screen-alert-toggle small { color: var(--muted); line-height: 1.45; }
.screen-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 19px; }
.screen-form-footer > span { color: var(--negative); font-size: 12px; }
.screen-form-footer button:disabled { opacity: .55; cursor: not-allowed; }

.screen-alert-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 15px 0; }
.screen-alert-toolbar p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.screen-alert-toolbar button { flex: 0 0 auto; border: 0; color: var(--accent); background: transparent; font: inherit; font-weight: 750; cursor: pointer; }
.screen-alert-toolbar button:disabled { opacity: .45; cursor: default; }
.screen-alert-list { display: grid; gap: 8px; }
.screen-alert-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.screen-alert-item.is-unread { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-soft); }
.screen-alert-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; font-weight: 800; }
.screen-alert-icon.entered { color: var(--positive); background: color-mix(in srgb, var(--positive) 15%, transparent); }
.screen-alert-icon.exited { color: var(--negative); background: color-mix(in srgb, var(--negative) 13%, transparent); }
.screen-alert-item > span:last-child { display: grid; gap: 4px; min-width: 0; }
.screen-alert-item b { font-size: 13px; }
.screen-alert-item small { color: var(--muted); line-height: 1.45; }
.screen-alert-item time { color: var(--muted); font-size: 11px; }
.screen-alert-empty { padding: 35px 18px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.screen-alert-empty p { margin: 6px auto 0; max-width: 520px; color: var(--muted); line-height: 1.5; }

@media (max-width: 760px) {
  .saved-screen-heading { align-items: stretch; flex-direction: column; }
  .saved-screen-heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .saved-screen-desktop-results { display: none; }
  .saved-screen-mobile-results { display: block; }
  .screen-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-rule-field .screen-tooltip { right: 0; left: auto; transform: translate(0, -4px); }
  .screen-rule-field .screen-help:hover + .screen-tooltip,
  .screen-rule-field .screen-help:focus + .screen-tooltip { transform: translate(0, 0); }
}

@media (max-width: 520px) {
  .saved-screen-workspace { padding: 15px; }
  .saved-screen-heading-actions, .screen-rule-grid { grid-template-columns: 1fr; }
  .saved-screen-result-head, .screen-alert-toolbar, .screen-form-footer { align-items: stretch; flex-direction: column; }
  .saved-screen-result-actions { display: grid; grid-template-columns: 1fr auto; }
  .screen-form, .screen-alert-dialog { padding: 18px; }
  .screen-form-footer button { width: 100%; }
}
/* Curated market-expansion workspaces */
.penny-heading>div{max-width:820px}
.penny-context{display:flex;align-items:center;gap:8px;margin:0 0 14px;padding:10px 12px;border-left:3px solid var(--warn);border-radius:0 9px 9px 0;background:color-mix(in srgb,var(--warn) 8%,var(--surface));color:var(--muted);font-size:12.5px}
.penny-context strong{color:var(--warn)}
.penny-radar-grid,.listing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.penny-radar-card,.listing-card{display:flex;flex-direction:column;gap:11px;min-width:0;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-raised);color:var(--ink);text-decoration:none;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.penny-radar-card:hover,.listing-card:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:0 14px 30px rgba(8,43,33,.09)}
.penny-radar-card strong,.listing-card h3{display:block;margin:7px 0 2px;font-size:1.02rem;font-weight:620;letter-spacing:-.01em}
.penny-radar-card small,.listing-card p{color:var(--muted)}
.penny-evidence,.listing-readiness-badge{align-self:flex-start;padding:4px 9px;border-radius:999px;background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--accent);font-size:.66rem;font-weight:640;text-transform:uppercase;letter-spacing:.06em}
.penny-score{display:flex;align-items:baseline;gap:7px}.penny-score b{font-size:1.5rem;font-weight:640;letter-spacing:-.02em}.penny-score span{color:var(--muted);font-size:.75rem}
.penny-facts{display:grid;gap:7px;padding-top:12px;border-top:1px solid var(--line)}.penny-facts span{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:.82rem}.penny-facts b{color:var(--ink);text-align:right;font-weight:560}
.penny-risks{display:flex;flex-wrap:wrap;gap:7px}.penny-risks span{padding:4px 9px;border-radius:7px;background:color-mix(in srgb,var(--warn) 10%,var(--surface));color:var(--warn);font-size:.71rem;font-weight:560}
.listing-readiness{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}.listing-readiness button{min-height:36px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface-raised);color:var(--muted);font:inherit;font-size:12.5px;font-weight:750;cursor:pointer}.listing-readiness button.is-active{border-color:var(--accent);background:var(--accent);color:white}
.listing-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.listing-summary span{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px;min-height:48px;padding:9px 12px;border-radius:11px;background:var(--accent-soft);color:var(--muted);font-size:12.5px;line-height:1.25}.listing-summary b{font-size:1.08rem;color:var(--ink)}
.listing-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.listing-card-head>b{color:var(--muted);font-size:.78rem}.listing-readiness-badge.building{background:#fff2d9;color:#8a5a00}.listing-readiness-badge.new{background:#e8efff;color:#2f59a5}.listing-readiness-badge.pending{background:#eeeaf9;color:#674c9b}
.listing-card-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px}.listing-card-facts span{padding:11px;border-radius:12px;background:var(--accent-soft)}.listing-card-facts small{display:block;margin-bottom:5px;font-size:.7rem}.listing-score{display:flex;justify-content:space-between;align-items:center;padding-top:12px;border-top:1px solid var(--line);color:var(--muted)}.listing-score b{font-size:1.35rem;color:var(--accent)}.listing-wait{padding:10px;border-radius:10px;background:var(--accent-soft);color:var(--muted);font-size:.8rem}
@media(max-width:900px){.penny-radar-grid,.listing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.listing-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.penny-radar-grid,.listing-grid{grid-template-columns:1fr}.penny-context{align-items:flex-start;flex-direction:column;gap:2px}.listing-readiness{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;scrollbar-width:none}.listing-readiness::-webkit-scrollbar{display:none}.listing-readiness button{white-space:nowrap}}
@media (max-width: 640px) {
  .watch-add, .watch-alert-button, .watch-button, .brief-preview-action, .portfolio-action,
  .updates-mark-read, .updates-scopes button, .saved-screen-heading-actions button,
  .screen-form-footer button, .listing-readiness button { min-height: 42px; }
}
