:root {
  --ink: #243034; --muted: #5f6e76; --canvas: #f2f5f5; --surface: #ffffff;
  --surface-2: #eaf0f1; --line: #d8e0e2; --blue: #2463bc; --accent-soft: #e4edf9;
  --red: #b52e42; --red-soft: #fbeaec; --green: #18775f; --green-soft: #e4f3ed;
  --warning: #885d14; --warning-soft: #fff3d9; --on-accent: #ffffff;
  --focus: #24282a; --focus-ink: #f0f3f2; --focus-muted: #b2bfc3; --focus-accent: #e5bc6b;
  --header-height: 112px; color-scheme: light; background: var(--canvas); color: var(--ink);
}
:root[data-theme="mist"] {
  --canvas: #e7ecec; --surface: #f0f3f2; --surface-2: #dde5e4; --ink: #273936;
  --muted: #536b65; --line: #c8d5d2; --blue: #236e65; --accent-soft: #d9ebe5;
  --red-soft: #f1e0e2; --green-soft: #d7e9e0; --warning-soft: #eee4c8;
}
:root[data-theme="dark"] {
  color-scheme: dark; --canvas: #1d2021; --surface: #25292b; --surface-2: #2e3436;
  --ink: #e4e9e8; --muted: #abb8bc; --line: #414b4e; --blue: #64cbbd; --accent-soft: #273f3c;
  --red: #f1848f; --red-soft: #442e33; --green: #6dc9a2; --green-soft: #263f35;
  --warning: #e0bd76; --warning-soft: #423c2d; --on-accent: #142724;
  --focus: #191d1e; --focus-ink: #f0f3f2; --focus-muted: #b2bfc3;
}
html { scroll-padding-top: calc(var(--header-height) + 16px); }
body { background: var(--canvas); color: var(--ink); }
button, input, select, textarea { background: var(--surface); border-color: var(--line); }
button:hover { background: var(--surface-2); }
.primary, .primary:hover { color: var(--on-accent); background: var(--blue); border-color: var(--blue); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: none; }
.topbar { height: 58px; border-color: var(--line); padding: 0 26px; gap: 14px; }
.brand { font-size: 21px; gap: 9px; }
.brand img { width: 28px; height: 28px; }
.navigation { padding: 0 26px; gap: 8px; border: 0; }
.navigation a { height: 46px; padding-inline: 14px; color: var(--muted); }
.navigation a.active { color: var(--blue); }
.navigation a:hover { background: var(--surface-2); }
main { max-width: 1760px; padding: 0 28px 48px; }
.feed-toolbar, .section-toolbar { min-height: 70px; padding: 16px 0; gap: 12px; }
.feed-toolbar h1, .section-toolbar h1 { font-size: 22px; line-height: 1.4; }
.feed-mode-switch { display: flex; border: 1px solid var(--line); border-radius: 4px; padding: 2px; gap: 2px; }
.feed-mode-switch button { border: 0; background: transparent; min-height: 30px; padding: 4px 10px; color: var(--muted); font-size: 12px; }
.feed-mode-switch button[aria-pressed=true] { color: var(--blue); background: var(--accent-soft); }
.news-layout { grid-template-columns: minmax(0,1fr) 210px; gap: 26px; }
.feed { border: 0; background: var(--surface); }
.feed-day { color: var(--muted); background: var(--surface-2); padding: 10px 20px; }
.news-row { grid-template-columns: 80px minmax(0,1fr); padding: 20px 22px 15px 0; }
.news-title { font-size: 18px; line-height: 1.65; font-weight: 550; color: var(--ink); }
.news-title a { overflow-wrap: anywhere; }
.news-row.is-priority .news-title, .news-row.is-priority .news-original, .news-row.is-priority .article-full { color: var(--red); }
.news-row.is-priority { box-shadow: inset 3px 0 var(--red); }
.news-row.is-priority .tag { color: var(--red); background: var(--surface-2); }
.news-meta { gap: 5px 10px; margin-bottom: 7px; font-size: 12px; line-height: 1.5; }
.news-time { color: var(--muted); padding-top: 1px; }
.news-original-details { margin-top: 8px; color: var(--muted); font-size: 12px; }
.news-original-details summary, .provider-assets summary { cursor: pointer; width: fit-content; padding: 4px 0; }
.news-original { font-size: 15px; line-height: 1.8; }
.article-footer { margin-top: 5px; }
.article-full { color: var(--ink); font-size: 16px; }
.ai-brief { color: var(--ink); }
.article-actions { opacity: .8; }
.provider-assets { margin-top: 5px; }
.source-sidebar { top: calc(var(--header-height) + 12px); padding-top: 18px; }
.new-items { top: calc(var(--header-height) + 8px); background: var(--accent-soft); border-color: var(--line); box-shadow: none; }
#news-view { overflow-anchor: none; }
.focus-latest { --ink: var(--focus-ink); --muted: var(--focus-muted); --surface: var(--focus); --surface-2: #343c3f; --line: #485257; --blue: #83c7e6; --red: #f1848f; --warning: var(--focus-accent); --warning-soft: #423c2d; background: var(--focus); color: var(--focus-ink); padding: 12px 22px 8px; margin: 0 0 14px; border-bottom: 3px solid var(--focus-accent); }
.focus-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; color: var(--focus-muted); font-size: 12px; line-height: 1.5; }
.focus-marker { width: 6px; height: 6px; background: var(--focus-accent); border-radius: 50%; }
#focus-label { color: var(--focus-accent); }
#focus-article .news-row { background: transparent; border: 0; padding: 10px 0 0; }
#focus-article .news-title { font-size: 25px; line-height: 1.6; font-weight: 600; margin: 7px 0; height: auto; max-height: 4.8em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.focus-latest.expanded #focus-article .news-title { max-height: none; display: block; }
#focus-article .news-title a { color: var(--focus-ink); }
#focus-article .news-row.is-priority .news-title a { color: var(--red); }
#focus-article .news-meta, #focus-article .news-time { color: var(--focus-muted); }
#focus-article .article-footer { margin-top: 0; }
#focus-expand { color: var(--focus-muted); background: transparent; margin-left: auto; height: 24px; width: 28px; min-width: 28px; }
#focus-expand:hover { color: var(--focus-ink); background: #ffffff12; }
#focus-expand[aria-expanded=true] svg { transform: rotate(180deg); }
[data-density=compact] .news-row { padding-top: 12px; padding-bottom: 9px; }
[data-density=compact] .news-title { font-size: 16px; line-height: 1.6; }
[data-density=compact] .news-meta { margin-bottom: 4px; }
.appearance-menu { position: absolute; right: 24px; top: 55px; width: min(380px,calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); padding: 22px; border-radius: 6px; box-shadow: 0 12px 38px #0002; z-index: 30; }
.appearance-menu h2, .appearance-settings h2 { font-size: 16px; margin: 0 0 18px; }
.appearance-menu fieldset, .appearance-settings fieldset { display: flex; flex-wrap: wrap; border: 0; padding: 0; margin: 16px 0 0; gap: 8px; }
.appearance-menu legend, .appearance-settings legend { padding: 0 0 9px; color: var(--muted); font-size: 12px; }
[data-appearance] { font-size: 13px; min-height: 36px; gap: 7px; }
[data-appearance][aria-pressed=true] { background: var(--accent-soft); color: var(--blue); border-color: var(--blue); }
.theme-swatch { width: 13px; height: 13px; border: 1px solid #819392; border-radius: 50%; }
.swatch-light { background: #fff; }.swatch-mist { background: #b5c9c3; }.swatch-dark { background: #25292b; }.swatch-system { background: #679bba; }
.appearance-settings { padding: 24px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 38px; }
.appearance-settings h2 { width: 100%; margin-bottom: 0; }
.settings-form { max-width: 900px; }
.source-controls { gap: 0 32px; }
.source-control { padding-block: 20px; }
.option-grid label { min-height: 52px; }
.report-layout { grid-template-columns: 214px minmax(0,1fr); gap: 30px; padding-top: 22px; }
.history-column { position: sticky; top: calc(var(--header-height) + 16px); align-self: start; max-height: calc(100vh - var(--header-height) - 32px); overflow: auto; }
.history-button { padding: 12px; min-height: 68px; line-height: 1.5; }
.report-body { max-width: none; font-size: 16px; line-height: 1.75; }
.report-title { font-size: 22px; line-height: 1.5; margin-bottom: 12px; }
.report-meta { margin-bottom: 18px; }
.report-overview { color: var(--ink); font-size: 18px; line-height: 1.8; }
.event-digest-index { background: var(--surface-2); padding: 16px 20px; margin-top: 12px; }
.event-digest-index a, .event-digest-index li { color: var(--ink); }
.event-digest-item { padding-block: 18px; }
.event-digest-item h3, .event-digest-lead .event-digest-item h3 { color: var(--ink); font-size: 19px; line-height: 1.6; }
.event-digest-lead .event-digest-item::marker { color: var(--blue); font-weight: 600; }
.event-digest-points, .report-body .report-section p, .report-body .report-section li { font-size: 16px; line-height: 1.8; }
.report-body .report-section { padding-block: 20px; }
.report-body .report-item h3 { font-size: 18px; }
.report-body .report-section h2 { font-size: 18px; }
.event-digest-group > h2, .event-digest-item h3 { scroll-margin-top: calc(var(--header-height) + 16px); }
.twitter-workspace { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(340px,.85fr); gap: 32px; align-items: start; margin-top: 18px; }
.twitter-stream, .twitter-brief { min-width: 0; }
.twitter-brief { border-left: 1px solid var(--line); padding-left: 28px; }
.twitter-brief-heading { font-size: 17px; padding-block: 20px 8px; }
.twitter-stream .lower-toolbar { margin-top: 0; border-top: 0; padding-top: 4px; min-height: 56px; }
.x-summary { padding-top: 12px; }
.x-summary .report-title { color: var(--ink); font-size: 18px; }
.tweet { max-width: none; padding: 20px 0; }
.tweet-preview { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 16px; line-height: 1.75; color: var(--ink); }
.tweet-preview-original { display: none; }
.tweet[open] .tweet-preview { display: none; }
.stock-navigation { gap: 5px; background: var(--surface); padding: 0 12px; }
.stock-navigation a { padding: 0 12px; min-height: 48px; font-size: 13px; }
.stock-subnavigation { top: var(--header-height); padding: 0 10px; background: var(--canvas); gap: 18px; border-top: 0; }
.stock-subnavigation button { background: transparent; min-height: 42px; }
.stock-status { padding: 14px 0 8px; gap: 8px 16px; }
.stock-note { padding-block: 7px; line-height: 1.65; }
.stock-metrics { padding: 20px 0; gap: 18px; }
.stock-metric { border-left-color: var(--line); padding-left: 16px; gap: 7px; }
.stock-metric > strong { font-size: 25px; line-height: 1.4; }
.stock-section { padding: 20px 0; }
.stock-section-heading { margin-bottom: 14px; }
.stock-chart-grid { gap: 24px; }
.stock-ext-indices { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 0 28px; }
.stock-ext-indices > * { grid-column: 1 / -1; }
.stock-ext-indices > .market-close-history { grid-column: 1; }
.stock-ext-indices > .market-index-table { grid-column: 2; }
.market-close-history .stock-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); padding-block: 12px; }
.market-close-history .stock-metric > strong { font-size: 20px; }
.market-history-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.market-history-details > summary { cursor: pointer; color: var(--blue); font-size: 13px; }
.stock-chart { height: 300px; }
.data-table { background: var(--surface); }
.data-table th { background: var(--surface-2); padding: 12px; }
.data-table td { padding: 12px; }
.nf-detail { background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding-top: 0; }
.nf-holding-metric { border: 0; border-left: 2px solid var(--line); background: transparent; border-radius: 0; }
.futures-product { background: var(--surface); border-radius: 4px; }
.treasury-card { border-radius: 4px; }
.treasury-card.selected { border-color: var(--blue); box-shadow: inset 0 2px var(--blue); }
.stock-heatmap-chart { background: var(--surface); height: 580px; }
.sr-analysis-hero p { font-size: 17px; }
.sr-query { padding-top: 16px; }
.stock-settings { padding-block: 14px; }
.settings-form input.switch::before { background: #fff; }
@media(min-width:1600px) { .topbar, .navigation { padding-inline: max(28px,calc((100vw - 1704px)/2)); } }
@media(max-width:1100px) { .twitter-workspace { grid-template-columns: minmax(0,1fr); gap: 24px; }.twitter-brief { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }
@media(max-width:1200px) { .stock-ext-indices { display: block; } }
@media(max-width:740px) {
  .topbar { height: 54px; padding: 0 12px; gap: 7px; }.brand { font-size: 18px; }.brand img { width: 25px; height: 25px; }
  .topbar .icon-button { width: 30px; min-width: 30px; }.connection { font-size: 10px; gap: 4px; }
  .navigation { padding: 0 4px; gap: 0; }.navigation a { padding: 0 10px; height: 42px; }
  main { padding: 0 12px 28px; }.feed-toolbar, .section-toolbar { min-height: 64px; gap: 8px; padding-block: 12px; }
  .feed-toolbar h1 { font-size: 18px; width: auto; }.feed-toolbar #feed-count { margin-right: auto; }
  .feed-mode-switch { order: 0; margin-left: auto; }.feed-toolbar select { order: 1; flex: 0 0 130px; }.feed-toolbar input { order: 1; flex: 1 1 120px; }
  .news-layout { display: block; }.source-sidebar { display: none; }
  .focus-latest { padding: 12px 18px 8px; margin-inline: -12px; margin-bottom: 12px; }
  #focus-article .news-title { font-size: 23px; }
  .focus-meta { gap: 5px 9px; font-size: 11px; }
  .news-row { grid-template-columns: minmax(0,1fr); gap: 5px; padding: 14px 15px 10px; }
  .news-time { display: block; font-size: 11px; padding: 0; }.news-meta { font-size: 11px; gap: 5px 8px; }
  .news-title { font-size: 17px; line-height: 1.7; }
  .article-full { font-size: 15px; }.article-actions button { width: 30px; height: 30px; }
  .report-layout { display: flex; flex-direction: column; gap: 18px; }.history-column { position: static; max-height: none; }
  .report-history { flex-direction: row; }.history-button { min-width: 190px; }.report-title { font-size: 20px; }
  .event-digest-index { padding: 12px 15px; }.event-digest-item h3 { font-size: 18px; }
  .stock-navigation { margin-inline: -12px; gap: 0; padding: 0 4px; }.stock-navigation a { padding: 0 10px; }
  .stock-subnavigation { margin-inline: -2px; padding: 0 5px; gap: 12px; }
  .stock-chart { height: 290px; }.stock-metric > strong { font-size: 21px; }.stock-metric { padding-left: 10px; }
  .appearance-menu { right: 12px; padding: 18px; }.appearance-settings { gap: 16px; }.appearance-settings fieldset { margin-top: 0; }
  .nf-detail { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .twitter-brief { padding-top: 6px; }.tweet { padding-block: 16px; }
}
@media(max-width:370px) { .brand img { display: none; }.topbar { gap: 5px; }.topbar .icon-button { width: 28px; min-width: 28px; }.feed-toolbar select { flex-basis: 112px; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
