/* Shared visual language with dividend.tank.pub. Portfolio geometry stays compact. */
:root {
  --bg: #f7f9fa;
  --ink: #172b38;
  --muted: #697d89;
  --accent: #08785c;
  --line: #dfe6e8;
  --blue: #4d8192;
  --gold: #bd9b68;
  --red: #b5453c;
  --surface: #fff;
  --soft: #f2f5f6;
  --badge: #edf4f1;
  --title-muted: #697985;
  --brand-muted: #b9cbd0;
  --notice-bg: #eff5f7;
  --notice-border: #b8d1da;
  --notice-text: #426675;
  --reason-number: #7f91a8;
  --segment-bg: #e7edef;
  --table-head: #f5f8f9;
  --button-border: #cbd8dd;
  --on-accent: #fff;
  --primary-hover: #13372f;
  --positive: #008566;
  --input-bg: #f7f9fa;
  --error-bg: #fbefed;
  --risk-high: #9c625c;
  --risk-low: #5b7683;
  --risk-mid: #927749;
  --card-hover: #b8cec5;
  --card-link: #edf4f1;
  --card-link-hover: #e0eee7;
  --risk-bg: #faf8f3;
  --risk-border: #e8e0d1;
  --risk-text: #786953;
  --central-bg: #eff6f3;
  --formula-bg: #f2f5f6;
  --heat-negative: #99bccb;
  --heat-neutral: #f2f5f6;
  --heat-positive: #d9bc8e;
  --heat-outline: #098463;
  --chart-grid: #e5ecef;
  --chart-baseline: #afbdc5;
  --chart-main: #098463;
  --chart-adverse: #b2837e;
  --chart-favorable: #bd9b68;
  --chart-benchmark: #7f91a8;
  --allocation-stability: #7f91a8;
  --nav-active: #15362f;
  --nav-active-text: #fff;
}
@media screen {
  :root[data-theme="dark"] {
    --bg: #101b23;
    --ink: #e7eef2;
    --muted: #9aacb8;
    --accent: #76cdb2;
    --line: #2b3c47;
    --blue: #669aad;
    --gold: #c4a778;
    --red: #e59d95;
    --surface: #182630;
    --soft: #1e303b;
    --badge: #243942;
    --title-muted: #a8b9c4;
    --notice-bg: #1d313d;
    --notice-border: #527686;
    --notice-text: #b4ccd7;
    --reason-number: #90a5b7;
    --segment-bg: #1c2b35;
    --table-head: #1e303b;
    --button-border: #405863;
    --on-accent: #12382e;
    --primary-hover: #9bdcc7;
    --positive: #76cdb2;
    --input-bg: #14232d;
    --error-bg: #3a2a2b;
    --risk-high: #d9aaa2;
    --risk-low: #abc0ce;
    --risk-mid: #cfb78d;
    --card-hover: #527868;
    --card-link: #223c38;
    --card-link-hover: #2b4c43;
    --risk-bg: #2d2c28;
    --risk-border: #4b463a;
    --risk-text: #cfc3aa;
    --central-bg: #213b35;
    --formula-bg: #1e303b;
    --heat-negative: #375e75;
    --heat-neutral: #1e303b;
    --heat-positive: #795e38;
    --heat-outline: #76cdb2;
    --chart-grid: #30434f;
    --chart-baseline: #698291;
    --chart-main: #76cdb2;
    --chart-adverse: #c98e87;
    --chart-favorable: #c4a778;
    --chart-benchmark: #91a7be;
    --allocation-stability: #7f91a8;
    --nav-active: #345b50;
    --nav-active-text: #f5fbf9;
  }
}
body { font-family: Inter, 'Helvetica Neue', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: var(--accent); }
header.site-header { display: block; height: auto; min-height: 0; padding: 0; border: 0; background: transparent; }
.site-topbar { height: 54px; padding: 0 4.3%; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #142c35; color: #fff; }
.site-topbar .brand { display: flex; gap: 9px; font-size: 21px; font-weight: 700; letter-spacing: -.7px; white-space: nowrap; }
.site-topbar .brand-title { color: #fff; }
.site-topbar .brand-mark { display: flex; align-items: center; justify-content: center; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 7px; background: #fff; overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.site-topbar .header-tools { gap: 12px; }
.site-topbar .random-fund { color: #d5e0e3; border-color: #45606a; border-radius: 6px; gap: 7px; font-size: 13px; padding: 6px 10px; min-height: 32px; }
.random-fund svg { width: 16px; height: 16px; flex-shrink: 0; }
.site-topbar .random-fund:hover { background: #24434d; color: #fff; }
.site-topbar .theme-switch { border-color: #45606a; border-radius: 6px; background: #10252d; padding: 2px; gap: 2px; }
.site-topbar .theme-switch button { color: #b9cbd0; min-height: 26px; padding: 5px 7px; font-size: 12px; gap: 5px; }
.site-topbar .theme-switch button[aria-pressed="true"] { background: #34535d; color: #fff; box-shadow: none; }
.site-topbar :focus-visible { outline-color: #a0dbc9; }
header .site-nav { width: calc(100% - 8.6%); max-width: 980px; height: 48px; margin: 16px auto 0; padding: 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--segment-bg); overflow: visible; }
.site-nav a, .site-nav a:last-child { height: 100%; padding: 0 8px; justify-content: center; border: 0; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; }
.site-nav a:last-child::after { content: none; }
.site-nav a.active { background: var(--nav-active); color: var(--nav-active-text); box-shadow: 0 2px 7px #142c3520; }
.site-nav a:not(.active):hover { background: var(--surface); color: var(--ink); }
main { max-width: 1600px; padding: 24px 4.3% 48px; }
main.dashboard { padding-top: 18px; }
h1 { font-weight: 650; letter-spacing: -1px; }
h2, h3 { font-weight: 650; }
.dashboard-heading h1 { font-size: 23px; }
.dashboard > .metrics strong { font-size: 28px; }
.dashboard > .metrics > div { padding-bottom: 16px; }
.dashboard > .metrics { margin-bottom: 20px; }
.panel, .fund-card, .stress-card, .metrics, .security-bar { border-radius: 11px; }
.dashboard .table-scroll, .table-scroll { border-radius: 9px; }
.dashboard-grid { gap: 22px; }
.dashboard-charts { gap: 16px; }
.dashboard .allocation-table th, .dashboard .allocation-table td { padding-left: 11px; padding-right: 11px; }
.button, .filter-bar input, .filter-bar select, .correlation-controls select, .pair-selects select { border-radius: 6px; }
.button { font-weight: 500; }
.filter-bar { margin-top: 22px; }
.filter-bar input { font-size: 14px; padding: 10px 14px; }
.filter-chips { gap: 7px; margin: 16px 0; }
.filter-chips button { padding: 7px 12px; border-radius: 6px; }
.filter-chips button.selected { background: var(--nav-active); color: var(--nav-active-text); border-color: var(--nav-active); }
.cards { gap: 20px; }
.fund-card { padding: 21px; box-shadow: 0 2px 3px #20394702; transition: border-color .15s, box-shadow .15s; }
.fund-card:hover { border-color: var(--card-hover); box-shadow: 0 3px 14px #2039470a; transform: none; }
.fund-card .card-top { justify-content: flex-start; gap: 11px; align-items: center; }
.fund-card .card-top .brand-tile { width: 44px; height: 44px; flex-basis: 44px; padding: 5px; border-radius: 10px; }
.card-security { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; min-width: 0; }
.card-security .ticker { color: var(--ink); font-size: 18px; font-weight: 650; letter-spacing: -.5px; }
.card-security .ticker a { color: inherit; text-decoration: none; }
.card-security .ticker a:hover { color: var(--accent); text-decoration: underline; }
.card-security .tag { font-size: 10px; letter-spacing: .1px; line-height: 1.3; padding: 2px 4px; border-radius: 2px; background: transparent; }
.card-security > small { width: 100%; font-size: 12px; }
.card-title h3 { font-size: 15px; font-weight: 500; color: var(--ink); margin: 17px 0 8px; letter-spacing: -.2px; }
.card-title:hover h3 { color: var(--accent); }
.fund-card > p { font-size: 13px; line-height: 1.65; min-height: 64px; margin: 8px 0 0; }
.fund-card-numbers { padding: 18px 0; margin: 16px 0; gap: 0; }
.fund-card-numbers > div { padding-right: 14px; }
.fund-card-numbers > div + div { padding-left: 18px; padding-right: 0; border-left: 1px solid var(--line); }
.fund-card-numbers small { font-size: 11px; text-transform: uppercase; letter-spacing: .25px; }
.fund-card-numbers b { font-size: 28px; font-weight: 600; color: var(--positive); letter-spacing: -.8px; }
.card-correlation { padding: 12px 0; }
.card-open { text-align: left; padding: 11px 12px; border-radius: 6px; }
.card-open > span { float: right; }
.card-chart-link { text-align: left; margin-top: 12px; }
.card-chart-link .sa-link { font-size: 12px; font-weight: 500; }
.fund-ticker > strong { color: var(--ink); }
.segmented { background: var(--segment-bg); }
.ticker-link { text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
footer { padding: 22px 4.3%; }
footer > a { font-weight: 600; color: var(--ink); }
@media (max-width: 1100px) {
  .site-topbar .brand { font-size: 20px; }
  .site-topbar .theme-switch button { font-size: 0; gap: 0; }
  .site-topbar .random-fund { font-size: 12px; }
}
@media (max-width: 759px) {
  .site-topbar { height: 54px; padding: 0 16px; gap: 8px; }
  .site-topbar .brand { font-size: 17px; gap: 7px; letter-spacing: -.6px; }
  .site-topbar .brand-mark { flex-basis: 25px; width: 25px; height: 25px; border-radius: 6px; }
  .site-topbar .header-tools { gap: 6px; }
  .site-topbar .random-fund { padding: 6px; min-height: 30px; }
  .random-fund > span { display: none; }
  .site-topbar .theme-switch button { padding: 5px; min-height: 24px; }
  .site-topbar .theme-switch svg { width: 14px; height: 14px; }
  header .site-nav { width: calc(100% - 32px); height: 42px; margin-top: 12px; gap: 2px; padding: 3px; border-radius: 9px; }
  .site-nav a, .site-nav a:last-child { padding: 0 3px; font-size: 12px; letter-spacing: -.3px; border-radius: 6px; }
  main { padding: 22px 16px 36px; }
  main.dashboard { padding-top: 16px; }
  .dashboard-heading h1 { font-size: 21px; }
  .dashboard > .metrics { margin-bottom: 12px; }
  .dashboard > .metrics strong { font-size: 23px; }
  .dashboard-grid { gap: 14px; }
  .dashboard .allocation-table td, .dashboard .allocation-table th { padding-left: 10px; padding-right: 10px; }
  .fund-card { padding: 20px; }
  .fund-card > p { min-height: 0; }
  footer { padding: 20px 16px; }
}
@media (max-width: 360px) {
  .site-topbar { padding: 0 12px; }
  .site-topbar .brand { font-size: 16px; gap: 5px; letter-spacing: -.7px; }
  .site-topbar .brand-mark { display: none; }
  .site-topbar .header-tools { gap: 4px; }
}
@media print {
  header.site-header { display: none; }
  main { max-width: 100%; padding: 0; }
}
