:root {
  color-scheme: dark;
  --bg: #07090b;
  --surface: #0d1115;
  --surface-2: #121820;
  --surface-3: #18212b;
  --surface-hover: #1b2631;
  --text: #f3f5f6;
  --text-2: #c1c9d0;
  --muted: #8d98a3;
  --line: #29333d;
  --line-strong: #42505d;
  --orange: #f47b20;
  --orange-soft: #321708;
  --blue: #2e9aff;
  --blue-soft: #0c263d;
  --green: #23b26d;
  --green-soft: #0d2c20;
  --gain: #ef6e65;
  --loss: #44c889;
  --risk: #ff766f;
  --warning: #f4a43f;
  --favorite: #f6c945;
  --manager-favorite-name: #ffd84d;
  --manager-reviewed-name: #74808a;
  --focus: #5bb8ff;
  --disabled: #59636d;
  --radius: 6px;
  --radius-lg: 10px;
  --header-h: 146px;
  --rail-w: 238px;
  --z-dropdown: 30;
  --z-sticky: 40;
  --z-backdrop: 60;
  --z-dialog: 70;
  --z-toast: 80;
  --z-tooltip: 90;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Segoe UI Variable", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #edf1f4;
  --surface: #fbfcfd;
  --surface-2: #f1f5f7;
  --surface-3: #e7edf2;
  --surface-hover: #e6eef5;
  --text: #14202a;
  --text-2: #3f4d58;
  --muted: #64727e;
  --line: #ccd6de;
  --line-strong: #9eabb5;
  --orange: #c9580b;
  --orange-soft: #fff0e4;
  --blue: #0a6fc2;
  --blue-soft: #e0f0fc;
  --green: #087b49;
  --green-soft: #def3e8;
  --gain: #b5352e;
  --loss: #087344;
  --risk: #ae2f2a;
  --warning: #9d5d06;
  --manager-favorite-name: #9a6800;
  --manager-reviewed-name: #52606b;
  --focus: #066db6;
  --disabled: #8d979f;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); font: 13px/1.45 var(--sans); }
.protocol-warning { margin: 24px auto; width: min(760px, calc(100% - 32px)); padding: 20px 22px; border: 1px solid var(--orange); border-left-width: 5px; border-radius: 8px; background: var(--orange-soft); color: var(--text); }
.protocol-warning strong, .protocol-warning span { display: block; }
.protocol-warning strong { margin-bottom: 8px; color: var(--orange); font-size: 18px; }
button, input, select { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: not-allowed; color: var(--disabled); }
button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }

.app-header {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(720px, 4fr) minmax(230px, .9fr);
  align-items: center;
  gap: 16px;
  padding: 11px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: flex; align-items: end; gap: 3px; padding: 5px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.brand-mark i { width: 5px; background: var(--orange); }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 16px; background: var(--blue); }
.brand-mark i:nth-child(3) { height: 12px; background: var(--green); }
.brand strong, .brand small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand strong { font-size: 16px; letter-spacing: .01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.dashboard-nav { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; }
.dashboard-tab { min-width: 0; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.dashboard-tab:nth-child(-n+4) { grid-column: span 3; }
.dashboard-tab:nth-child(n+5) { grid-column: span 4; }
.dashboard-tab svg { width: 19px; height: 19px; flex: 0 0 auto; }
.dashboard-tab span, .dashboard-tab small { display: block; }
.dashboard-tab span { min-width: 0; font-weight: 700; line-height: 1.25; }
.dashboard-tab small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.dashboard-tab:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.dashboard-tab.fund { color: var(--orange); }
.dashboard-tab.kpi { color: var(--blue); }
.dashboard-tab.score { color: var(--warning); }
.dashboard-tab.profile { color: var(--green); }
.dashboard-tab.personnel { position: relative; color: var(--orange); }
.dashboard-tab.holdings { color: var(--blue); }
.dashboard-tab.guide { color: var(--orange); }
.dashboard-tab[aria-current="page"] { color: var(--text); border-color: var(--orange); background: var(--orange-soft); box-shadow: inset 0 -3px var(--orange); }
.dashboard-tab[aria-current="page"] small { color: var(--text-2); }
.dashboard-alert-badge { position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--risk); color: #fff; font: 700 10px/1 var(--mono); }
.header-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-content: end; gap: 5px 8px; }
.freshness { max-width: 110px; color: var(--muted); font-size: 10px; text-align: right; }
.header-actions .freshness { grid-column: 1 / -1; grid-row: 2; justify-self: end; }
.site-auth-pill { min-width: 0; min-height: 38px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text); padding: 5px 8px; text-decoration: none; }
.site-auth-pill:hover { border-color: var(--orange); background: var(--surface-hover); }
.site-auth-pill > svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--orange); }
.site-auth-pill span, .site-auth-pill strong, .site-auth-pill small { display: block; min-width: 0; }
.site-auth-pill strong, .site-auth-pill small { max-width: 124px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-auth-pill strong { font-size: 10px; }
.site-auth-pill small { color: var(--muted); font-size: 8px; }
.site-auth-pill[data-status="signed-in"] { border-color: color-mix(in srgb, var(--green) 65%, var(--line)); }
.site-auth-pill[data-status="signed-in"] > svg { color: var(--green); }
.icon-text-button, .secondary-button, .primary-button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--radius); padding: 0 11px; white-space: nowrap; }
.icon-text-button, .secondary-button { border: 1px solid var(--line-strong); background: var(--surface); }
.icon-text-button:hover, .secondary-button:hover { border-color: var(--orange); color: var(--orange); }
.icon-text-button svg, .secondary-button svg { width: 15px; height: 15px; }
.primary-button svg { width: 15px; height: 15px; }
.primary-button { border: 1px solid var(--orange); background: var(--orange); color: #15100c; font-weight: 700; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .45; }

.view { min-height: calc(100vh - var(--header-h)); }
.view.active { display: block; }
.status-strip, .score-banner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border-bottom: 1px solid var(--line); }
.status-strip > div, .score-banner > div { min-width: 0; padding: 10px 20px; border-right: 1px solid var(--line); }
.status-strip > div:last-child, .score-banner > div:last-child { border-right: 0; }
.status-strip span, .status-strip small, .score-banner span, .score-banner small { display: block; color: var(--muted); font-size: 10px; }
.status-strip strong, .score-banner strong { display: block; margin-top: 2px; font: 650 20px/1.2 var(--mono); letter-spacing: -.02em; }
.status-strip small, .score-banner small { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-banner > div:first-child { background: var(--orange-soft); }
.model-badge { width: max-content; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 99px; }
.model-badge.formal { border-color: var(--orange); color: var(--orange); }
.model-badge.trial { border-color: var(--blue); color: var(--blue); }

.view-body { padding: 16px 20px 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.section-heading.compact { margin-bottom: 8px; }
.section-heading h1 { margin: 0; font-size: 18px; letter-spacing: -.01em; text-wrap: balance; }
.section-heading p { margin: 3px 0 0; max-width: 70ch; color: var(--muted); font-size: 11px; text-wrap: pretty; }
.type-tabs, .period-tabs { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.type-tabs button, .period-tabs button { min-height: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 11px; }
.type-tabs button:hover, .period-tabs button:hover { border-color: var(--orange); }
.type-tabs button.active, .period-tabs button.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); font-weight: 700; }
.type-tabs b { font: 700 10px var(--mono); }
.toolbar { display: flex; align-items: center; gap: 7px; min-height: 40px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1 1 300px; min-width: 220px; display: block; }
.search-box > svg { position: absolute; top: 50%; left: 10px; width: 15px; height: 15px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search-box input { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 0 34px; }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box > button { position: absolute; top: 3px; right: 3px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); }
.date-range { display: flex; align-items: center; gap: 5px; }
.date-range input { height: 34px; max-width: 132px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 0 7px; }
.inline-status { margin: 6px 0 10px; color: var(--muted); font-size: 10px; }
.inline-status.error { color: var(--risk); }
.inline-status.success { color: var(--green); }

.workspace, .score-layout { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: calc(100vh - 159px); }
.filter-rail { width: var(--rail-w); min-width: var(--rail-w); overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); scrollbar-color: var(--line-strong) var(--surface); }
.rail-heading { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 15px; border-bottom: 1px solid var(--line); }
.rail-close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; }
.rail-close:hover { border-color: var(--orange); color: var(--orange); }
.filter-rail-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 9px 9px 2px; }
.filter-rail-tools .secondary-button { min-height: 30px; padding-inline: 6px; font-size: 10px; }
.filter-groups { padding: 7px 9px; }
.filter-group { margin: 0; }
.filter-group + .filter-group { margin-top: 8px; }
.filter-group summary { display: flex; align-items: center; gap: 6px; list-style: none; padding: 6px 6px 5px; color: var(--text-2); font-weight: 700; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "+"; margin-left: auto; color: var(--muted); }
.filter-group[open] summary::after { content: "−"; }
.filter-group summary svg { width: 14px; height: 14px; }
.filter-group.base summary { color: var(--orange); }
.filter-group.offense summary { color: var(--blue); }
.filter-group.offense summary svg { color: var(--gain); }
.filter-group.defense summary { color: var(--green); }
.filter-options { padding: 0 4px 6px; }
.filter-option { min-height: 30px; display: flex; align-items: center; gap: 7px; padding: 3px 5px; color: var(--text-2); }
.filter-option:hover { background: var(--surface-2); }
.filter-option input { accent-color: var(--orange); }
.filter-option span { flex: 1; }
.filter-option small { color: var(--muted); font: 10px var(--mono); }
.filter-actions { padding: 10px 14px; border-top: 1px solid var(--line); }
.filter-actions button { width: 100%; }
.content-area { min-width: 0; padding: 12px 14px 24px; }
.filter-toggle { display: none; }
.active-filters { display: grid; gap: 5px; min-height: 28px; padding: 3px 0; }
.active-filter-row { --filter-tone: var(--text-2); min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; border: 1px solid color-mix(in srgb, var(--filter-tone) 38%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--filter-tone) 8%, var(--surface)); padding: 5px 7px; }
.active-filter-row.base { --filter-tone: var(--orange); }
.active-filter-row.offense { --filter-tone: var(--blue); }
.active-filter-row.defense { --filter-tone: var(--green); }
.active-filter-row.score { --filter-tone: var(--blue); }
.active-filter-group-label { flex: 0 0 58px; color: var(--filter-tone); font-size: 10px; font-weight: 750; }
.active-filter-values { min-width: 0; display: flex; align-items: center; gap: 5px; flex: 1; flex-wrap: wrap; }
.filter-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; border: 1px solid color-mix(in srgb, var(--filter-tone) 62%, var(--line)); border-radius: 99px; background: color-mix(in srgb, var(--filter-tone) 13%, var(--surface-2)); color: var(--filter-tone); padding: 0 8px; font-size: 10px; }
.filter-chip button { border: 0; background: transparent; color: inherit; padding: 0; }

.table-shell { min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.table-scroll { width: 100%; max-height: calc(100vh - 320px); overflow: auto; scrollbar-color: var(--line-strong) var(--surface-2); }
.fund-body .table-scroll { max-height: calc(100vh - 310px); }
table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; table-layout: auto; }
th, td { min-height: 38px; padding: 7px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: middle; }
th:last-child, td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); color: var(--text-2); font-size: 12px; text-align: center; white-space: nowrap; }
thead tr.group-row th { top: 0; height: 30px; color: var(--text); background: var(--surface-3); font-weight: 700; }
thead tr.group-row + tr th { top: 30px; }
th.sortable { padding: 0; }
th.sortable button { width: 100%; min-height: 38px; border: 0; background: transparent; color: inherit; padding: 6px 8px; font-weight: 700; }
th.sortable button:hover { color: var(--orange); background: var(--surface-hover); }
th.sortable button[data-direction] { color: var(--orange); }
tbody tr:hover td { background: var(--surface-hover); }
#kpi-table-head tr:last-child th:first-child { left: 0; z-index: 5; }
#kpi-table-body td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); }
#kpi-table-body tr:hover td:first-child { background: var(--surface-hover); }
td.numeric { text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.textual { max-width: 270px; white-space: normal; overflow-wrap: anywhere; }
td.gain { color: var(--gain); font-weight: 650; }
td.loss { color: var(--loss); font-weight: 650; }
td.risk { color: var(--risk); background: color-mix(in srgb, var(--risk) 12%, transparent); font-weight: 700; }
td.manager-cell { min-width: 164px; }
.manager-cell-content { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.manager-identity { min-width: 0; }
.manager-name { display: block; color: var(--text); font-weight: 700; white-space: nowrap; }
.manager-name.is-favorite { color: var(--manager-favorite-name); }
.manager-name.is-reviewed { color: var(--manager-reviewed-name); }
.manager-name.is-favorite:hover, .manager-name.is-reviewed:hover { color: inherit; text-decoration-color: currentColor; }
.manager-id { display: block; color: var(--muted); font: 9px var(--mono); }
.entity-link { max-width: 100%; border: 0; background: transparent; color: var(--text); padding: 0; font: inherit; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color 150ms ease-out, text-decoration-color 150ms ease-out; }
.entity-link:hover { color: var(--orange); text-decoration-color: currentColor; }
.entity-link:focus-visible { border-radius: 2px; }
.manager-link { font-weight: 700; }
.fund-link { overflow-wrap: anywhere; }
.entity-list { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
.manager-preferences { display: inline-flex; align-items: center; gap: 4px; }
.favorite-button, .ability-tags, .review-button { min-height: 26px; display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--muted); padding: 2px 5px; }
.favorite-button { min-width: 27px; justify-content: center; border-color: transparent; padding-inline: 3px; }
.favorite-button:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.favorite-button.active { color: var(--favorite); border-color: transparent; background: transparent; }
.favorite-glyph { display: inline-grid; place-items: center; color: var(--favorite); font-size: 15px; line-height: 1; font-family: "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; }
.favorite-button:not(.active) .favorite-glyph { color: var(--muted); }
.ability-tags { border-color: transparent; padding-inline: 2px; }
.ability-tags:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.review-button { min-width: 27px; justify-content: center; border-color: transparent; padding-inline: 3px; font: 700 21px/1 var(--sans); }
.review-button:hover { border-color: var(--line-strong); background: var(--surface-hover); color: var(--text-2); }
.review-button.active { color: var(--blue); }
.review-button:active { transform: scale(.94); }
.ability-chip { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-size: 9px; }
.ability-chip svg { width: 13px; height: 13px; }
.ability-chip.offense { color: var(--blue); }
.ability-chip.offense svg { color: var(--gain); }
.ability-chip.defense { color: var(--green); }
.ability-chip.composite { color: var(--orange); }
.manager-preferences.compact .ability-chip { width: 19px; height: 19px; justify-content: center; border: 1px solid currentColor; border-radius: 50%; background: var(--surface-3); }
.manager-preferences.compact .ability-chip.offense { color: var(--gain); background: color-mix(in srgb, var(--gain) 15%, var(--surface)); }
.manager-preferences.compact .ability-chip.defense { background: var(--green-soft); }
.manager-preferences.compact .ability-chip.composite { background: var(--orange-soft); }
.manager-preferences.compact .ability-chip svg { stroke-width: 2.2; }
.ability-empty { font-size: 9px; }
.watch-marker { width: 21px; height: 21px; display: inline-grid; flex: 0 0 auto; place-items: center; border: 1px solid color-mix(in srgb, var(--blue) 58%, var(--line)); border-radius: 50%; color: var(--blue); background: var(--blue-soft); }
.watch-marker svg { width: 13px; height: 13px; }
.industry-marker { display: inline-flex; min-width: 0; max-width: 120px; min-height: 21px; align-items: center; border: 1px solid color-mix(in srgb, var(--orange) 62%, var(--line)); border-radius: 3px; padding: 1px 6px; color: var(--orange); background: var(--orange-soft); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-tag { display: inline-flex; align-items: center; min-height: 21px; border: 1px solid var(--line-strong); border-radius: 99px; padding: 0 7px; color: var(--text-2); font-size: 9px; white-space: nowrap; }
.status-tag.current { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.status-tag.historical { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.status-tag.qualified { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.status-tag.unqualified { border-color: var(--risk); color: var(--risk); }
.missing { color: var(--muted); font-style: normal; }
.table-message td { height: 170px; padding: 28px; text-align: center; color: var(--muted); }
.table-message strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 14px; }
.table-footer { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 9px; border-top: 1px solid var(--line); color: var(--muted); }
.pagination { display: flex; align-items: center; gap: 5px; }
.pagination select, .pagination button { height: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 0 8px; }
.pagination button:disabled { opacity: .45; }

.score-content { padding-top: 12px; }
.weight-console { position: relative; margin: 4px 0 10px; padding: 11px 14px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.weight-console-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.weight-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.weight-console h2, .panel-heading h2 { margin: 0; font-size: 14px; }
.weight-console p, .panel-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.weight-mode-grid { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(540px, 1.7fr); gap: 10px; margin-top: 11px; }
.weight-mode-option { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 10px 11px; }
.weight-mode-option.selected { border-color: var(--orange); background: color-mix(in srgb, var(--orange-soft) 62%, var(--surface)); }
.weight-mode-heading-row { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.weight-mode-heading { display: inline-flex; align-items: start; gap: 8px; color: var(--text); }
.weight-mode-heading input { margin-top: 3px; accent-color: var(--orange); }
.weight-mode-heading strong, .weight-mode-heading small { display: block; }
.weight-mode-heading small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.compact-button { min-height: 28px; padding-inline: 8px; font-size: 9px; }
.locked-weights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 13px; }
.locked-weights span { display: grid; place-items: center; min-height: 52px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-2); font-size: 9px; }
.locked-weights b { display: block; color: var(--orange); font: 750 18px/1.1 var(--mono); }
.locked-weights .offense b { color: var(--gain); }
.locked-weights .defense b { color: var(--green); }
.weight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.weight-control { min-width: 0; display: grid; grid-template-columns: 1fr 60px; gap: 5px 8px; align-items: center; }
.weight-control label { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.weight-control label svg { width: 15px; height: 15px; }
.weight-control.offense label { color: var(--blue); }
.weight-control.offense label svg { color: var(--gain); }
.weight-control.defense label { color: var(--green); }
.weight-control.composite label { color: var(--orange); }
.weight-control > div { display: flex; align-items: center; height: 31px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.weight-control input[type="number"] { width: 42px; height: 28px; border: 0; background: transparent; color: var(--text); padding: 0 3px 0 7px; text-align: right; font-family: var(--mono); }
.weight-control > div span { color: var(--muted); }
.weight-control input[type="range"] { width: 100%; accent-color: var(--orange); }
.weight-control.offense input[type="range"] { accent-color: var(--blue); }
.weight-control.defense input[type="range"] { accent-color: var(--green); }
.weight-total { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 9px; border-top: 1px solid var(--line); padding-top: 8px; }
.weight-total span, .weight-total small { color: var(--muted); font-size: 9px; }
.weight-total strong { font: 700 17px var(--mono); }
.weight-total.valid strong, .weight-total.valid small { color: var(--green); }
.weight-total.invalid strong, .weight-total.invalid small { color: var(--risk); }
.model-notice { min-height: 34px; display: flex; align-items: center; gap: 7px; margin: 4px 0 8px; padding: 7px 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); }
.model-notice svg { width: 15px; height: 15px; color: var(--orange); }
.model-notice.warning { border-color: var(--warning); color: var(--warning); }

.profile-search-band { min-height: 116px; display: grid; grid-template-columns: minmax(260px, .8fr) minmax(340px, 1fr) auto; align-items: end; gap: 22px; padding: 18px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.profile-search-band h1 { margin: 0; font-size: 18px; }
.profile-search-band p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.manager-combobox { position: relative; }
.manager-combobox > label { display: block; margin-bottom: 5px; color: var(--text-2); font-weight: 700; }
.combobox-options { position: absolute; z-index: var(--z-dropdown); top: calc(100% + 5px); left: 0; right: 0; max-height: 310px; overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.combobox-option { width: 100%; display: grid; grid-template-columns: minmax(90px, .65fr) minmax(120px, 1fr); align-items: center; gap: 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 8px 10px; text-align: left; }
.combobox-option:last-child { border-bottom: 0; }
.combobox-option:hover, .combobox-option[aria-selected="true"] { background: var(--surface-hover); }
.combobox-option strong, .combobox-option small { display: block; }
.combobox-option small { color: var(--muted); }
.combobox-option .option-id { font-family: var(--mono); }
.compact-fund-link { color: var(--muted); font-size: 10px; }
.profile-empty { min-height: calc(100vh - 206px); display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.profile-empty svg { width: 44px; height: 44px; color: var(--green); }
.profile-empty h2 { margin: 13px 0 4px; color: var(--text); font-size: 16px; }
.profile-empty p { margin: 0; }
.profile-content { display: grid; grid-template-columns: minmax(310px, .74fr) minmax(560px, 1.26fr); gap: 14px; padding: 14px; }
.profile-content > * { min-width: 0; }
.profile-summary, .radar-section, .managed-funds-section { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.profile-summary { padding: 16px; }
.identity-block { display: flex; align-items: center; gap: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.manager-monogram { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 52px; border-radius: 50%; background: var(--orange-soft); color: var(--orange); font-size: 19px; font-weight: 800; }
.identity-block p { margin: 0; color: var(--muted); font-size: 9px; }
.identity-block h2 { margin: 2px 0; font-size: 19px; }
.identity-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.identity-meta { display: flex; flex-wrap: wrap; gap: 5px; color: var(--text-2); font-size: 10px; }
.profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.profile-stats > div { padding: 11px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-stats > div:nth-child(2n) { border-right: 0; }
.profile-stats dt { color: var(--muted); font-size: 9px; }
.profile-stats dd { margin: 3px 0 0; font: 650 14px var(--mono); }
.biography { padding-top: 13px; }
.biography h3 { margin: 0 0 6px; font-size: 12px; color: var(--orange); }
.biography p { margin: 0; color: var(--text-2); line-height: 1.65; text-wrap: pretty; }
.biography details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.biography summary { color: var(--blue); cursor: pointer; }
.biography details p { margin-top: 7px; }
.radar-section { min-width: 0; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.radar-layout { display: grid; grid-template-columns: minmax(400px, 1fr) 190px; min-height: 400px; }
.radar-wrap { position: relative; min-width: 0; display: grid; place-items: center; }
#manager-radar, #manager-preview-radar { width: 100%; max-height: 430px; color: var(--line-strong); overflow: visible; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line-strong); stroke-width: 1; }
.radar-label { fill: var(--text-2); stroke: none; font: 11px var(--sans); }
.radar-shape-primary { fill: color-mix(in srgb, var(--orange) 20%, transparent); stroke: var(--orange); stroke-width: 2.5; }
.radar-shape-compare { fill: color-mix(in srgb, var(--blue) 14%, transparent); stroke: var(--blue); stroke-width: 2.5; }
.radar-point-primary { fill: var(--orange); stroke: var(--surface); stroke-width: 2; }
.radar-point-compare { fill: var(--blue); stroke: var(--surface); stroke-width: 2; }
.chart-status { position: absolute; inset: auto 10px 8px; margin: 0; color: var(--muted); font-size: 10px; text-align: center; }
.chart-status.error { color: var(--risk); }
.radar-legend { border-left: 1px solid var(--line); padding: 13px; }
.legend-manager { display: flex; align-items: start; gap: 8px; margin-bottom: 12px; }
.legend-swatch { width: 12px; height: 3px; margin-top: 7px; background: var(--orange); }
.legend-manager.compare .legend-swatch { background: var(--blue); }
.legend-manager strong, .legend-manager small { display: block; }
.legend-manager small { color: var(--muted); }
.radar-metrics { margin: 13px 0 0; padding: 0; list-style: none; }
.radar-metrics li { display: flex; justify-content: space-between; gap: 7px; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 10px; }
.radar-metrics b { font-family: var(--mono); color: var(--text); }
.managed-funds-section { grid-column: 1 / -1; min-width: 0; }
.relation-legend { display: flex; gap: 8px; }
.relation-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.relation-legend span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.relation-legend .current::before { background: var(--orange); }
.managed-funds-section .table-scroll { max-height: 480px; }
#profile-fund-table-body tr.profile-fund-muted td,
#profile-fund-table-body tr.profile-fund-muted button,
#profile-fund-table-body tr.profile-fund-muted a { color: var(--muted) !important; }

dialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 42px); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); padding: 0; }
dialog::backdrop { background: rgba(0, 0, 0, .68); }
.dialog-shell { display: flex; flex-direction: column; max-height: calc(100vh - 44px); }
.dialog-shell.small { min-height: 260px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 0; font-size: 16px; }
.dialog-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.dialog-heading button { width: 30px; height: 30px; border: 1px solid var(--line); background: transparent; border-radius: var(--radius); }
.dialog-search { margin: 12px 15px 6px; width: auto; flex: 0 0 auto; }
.column-groups { flex: 1; overflow: auto; padding: 5px 15px 14px; }
.column-group { margin-top: 12px; }
.column-group h3 { margin: 0 0 5px; color: var(--orange); font-size: 11px; }
.column-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.column-option { min-height: 38px; display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.column-option input { accent-color: var(--orange); }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 15px; border-top: 1px solid var(--line); }
.compare-dialog .manager-combobox { margin: 16px; }
.compare-dialog .inline-status { margin: 0 16px 16px; }
.toast { position: fixed; z-index: var(--z-toast); right: 18px; bottom: 18px; max-width: min(390px, calc(100vw - 36px)); border: 1px solid var(--orange); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 10px 13px; }

.preference-dialog .preference-favorite { margin: 16px 16px 6px; min-height: 42px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 11px; font-weight: 700; }
.preference-dialog .preference-favorite .favorite-glyph { color: var(--muted); font-size: 18px; }
.preference-dialog .preference-favorite:has(input:checked) .favorite-glyph { color: var(--favorite); }
.preference-dialog .preference-favorite input, .preference-tags input { accent-color: var(--orange); }
.preference-tags { margin: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.preference-tags legend { padding: 0 6px; color: var(--muted); }
.preference-tags label { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
.preference-tags svg { width: 15px; height: 15px; }
.preference-tags label:nth-of-type(1) svg { color: var(--gain); }
.preference-tags label:nth-of-type(2) svg { color: var(--green); }
.preference-tags label:nth-of-type(3) svg { color: var(--orange); }
.preference-dialog .inline-status { margin-inline: 16px; }

.fund-holdings-drawer { position: fixed; inset: 0 0 0 auto; width: min(460px, calc(100vw - 40px)); max-width: none; height: 100dvh; max-height: none; margin: 0; border-width: 0 0 0 1px; border-radius: 0; }
.fund-holdings-drawer[open] { animation: drawer-enter 180ms cubic-bezier(.22, 1, .36, 1); }
.fund-preview-shell { height: 100dvh; max-height: none; }
.fund-preview-content { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 22px; }
.preview-loading, .preview-empty { min-height: 210px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); text-align: center; }
.preview-loading strong, .preview-empty strong { color: var(--text); font-size: 14px; }
.preview-empty svg { width: 28px; height: 28px; margin-bottom: 4px; color: var(--warning); }
.preview-empty span { max-width: 48ch; text-wrap: pretty; }
.fund-preview-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.fund-preview-summary > div { min-width: 0; padding: 9px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fund-preview-summary dt { color: var(--muted); font-size: 9px; }
.fund-preview-summary dd { margin: 3px 0 0; color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.fund-preview-managers { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px 0 13px; border-bottom: 1px solid var(--line); }
.fund-preview-managers > span:first-child { color: var(--muted); font-size: 10px; }
.fund-preview-holdings { margin-top: 13px; }
.preview-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.preview-section-heading h3 { margin: 0; font-size: 14px; }
.preview-section-heading span { color: var(--muted); font-size: 9px; }
.fund-preview-holdings .table-scroll { max-height: none; border: 1px solid var(--line); }
.fund-preview-holdings table { min-width: 0; }
.fund-preview-holdings th:first-child, .fund-preview-holdings td:first-child { width: 54px; }
.fund-preview-holdings th:last-child, .fund-preview-holdings td:last-child { width: 100px; }
.fund-preview-holdings td strong, .fund-preview-holdings td small { display: block; }
.fund-preview-holdings td small { color: var(--muted); font: 9px var(--mono); }
.fund-preview-trend { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.trend-loading, .trend-empty { min-height: 150px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); text-align: center; }
.trend-empty svg { width: 24px; height: 24px; color: var(--blue); }
.trend-empty strong { color: var(--text); }
.trend-empty span { max-width: 42ch; font-size: 10px; text-wrap: pretty; }
.fund-trend-legend { display: flex; align-items: center; gap: 14px; margin: 10px 0 2px; color: var(--text-2); font-size: 9px; }
.fund-trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fund-trend-legend span::before { content: ""; width: 18px; height: 3px; border-radius: 99px; background: var(--orange); }
.fund-trend-legend .benchmark::before { background: var(--blue); }
.fund-trend-chart { display: block; width: 100%; height: auto; min-height: 220px; overflow: visible; }
.trend-tenure-band { opacity: .08; }
.trend-grid-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-axis-tick { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-axis-label { fill: var(--muted); font: 10px var(--mono); }
.trend-line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-line.fund { stroke: var(--orange); }
.trend-line.benchmark { stroke: var(--blue); }
.trend-end-point { stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-end-point.fund { fill: var(--orange); }
.trend-end-point.benchmark { fill: var(--blue); }
.fund-tenure-legend { display: grid; gap: 5px; margin-top: 3px; }
.fund-tenure-legend > div { display: grid; grid-template-columns: 9px minmax(0, 1fr); align-items: start; gap: 7px; min-width: 0; }
.tenure-swatch { width: 8px; height: 8px; margin-top: 3px; border-radius: 2px; background: var(--tenure-color); }
.fund-tenure-legend strong, .fund-tenure-legend small { display: block; }
.fund-tenure-legend strong { color: var(--text-2); font-size: 9px; }
.fund-tenure-legend small { margin-top: 1px; color: var(--muted); font: 8px var(--mono); line-height: 1.45; }
.fund-trend-note { margin: 10px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; text-wrap: pretty; }

.manager-preview-dialog { width: min(1120px, calc(100vw - 28px)); }
.manager-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.manager-preview-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.manager-preview-actions .watch-button svg { width: 15px; height: 15px; }
.manager-preview-actions .watch-button.active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.industry-dialog { width: min(480px, calc(100vw - 24px)); }
.industry-dialog-body { display: grid; gap: 7px; padding: 18px 20px; }
.industry-dialog-body label { color: var(--text-2); font-weight: 700; }
.industry-dialog-body input { width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text); padding: 8px 10px; }
.industry-dialog-body p { margin: 0; color: var(--muted); font-size: 9px; }
.manager-preview-note-panel { min-height: 470px; padding: 22px 24px; }
.manager-preview-note-panel h3 { margin: 0; font-size: 17px; }
.manager-preview-note-panel > div:first-child p { margin: 3px 0 18px; color: var(--muted); font-size: 10px; }
.manager-preview-note-panel > label { display: block; margin-bottom: 6px; color: var(--text-2); font-weight: 700; }
.manager-preview-note-panel textarea { width: 100%; min-height: 260px; resize: none; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text); padding: 12px 13px; font: 13px/1.65 var(--sans); }
.manager-preview-note-panel textarea::placeholder { color: var(--text-2); }
.manager-preview-note-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.manager-preview-note-actions > span { margin-right: auto; color: var(--muted); font-size: 10px; }
#manager-preview-note.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.manager-preview-body { display: grid; grid-template-columns: minmax(520px, 1fr) 220px; min-height: 470px; overflow: auto; }
.manager-preview-body .radar-wrap { min-height: 430px; }
.manager-preview-body .radar-legend { min-width: 0; }
.manager-preview-funds { min-height: 470px; padding: 14px 16px 18px; }
.manager-preview-funds > header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.manager-preview-funds h3 { margin: 0; font-size: 17px; }
.manager-preview-funds header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.manager-preview-funds header > strong { color: var(--orange); font: 750 18px var(--mono); }
.manager-preview-fund-layout { display: grid; grid-template-columns: minmax(240px, .56fr) minmax(0, 1.44fr); align-items: start; gap: 12px; }
.manager-preview-fund-list { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; padding: 0; list-style: none; }
.manager-preview-fund-list li { min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 56px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 7px 9px; }
.manager-preview-fund-list li.selected { border-color: var(--orange); background: var(--surface-hover); }
.manager-preview-fund-index { color: var(--orange); font: 750 11px var(--mono); }
.manager-preview-fund-list strong, .manager-preview-fund-list small, .manager-preview-fund-link { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manager-preview-fund-link { width: 100%; font-weight: 700; cursor: pointer; }
.manager-preview-fund-link.active { color: var(--orange); text-decoration-color: currentColor; }
.manager-preview-fund-list small { margin-top: 2px; color: var(--muted); font: 9px var(--mono); }
.manager-inline-fund-detail { min-width: 0; min-height: 386px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); padding: 10px 11px; }
.manager-inline-fund-detail .preview-loading, .manager-inline-fund-detail .preview-empty { min-height: 300px; }
.manager-inline-fund-heading, .manager-inline-holdings-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.manager-inline-fund-heading { padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.manager-inline-fund-heading h4, .manager-inline-holdings-heading h4 { margin: 0; font-size: 12px; }
.manager-inline-fund-heading small, .manager-inline-fund-heading > span, .manager-inline-holdings-heading span { color: var(--muted); font: 9px var(--mono); }
.manager-inline-fund-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 7px 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.manager-inline-fund-summary > div { min-width: 0; padding: 5px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manager-inline-fund-summary dt { color: var(--muted); font-size: 8px; }
.manager-inline-fund-summary dd { margin: 1px 0 0; overflow: hidden; color: var(--text); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.manager-inline-fund-managers { display: flex; align-items: baseline; gap: 8px; min-height: 27px; padding: 6px 1px; border-bottom: 1px solid var(--line); font-size: 9px; }
.manager-inline-fund-managers span { color: var(--muted); }
.manager-inline-fund-managers strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manager-inline-holdings { margin-top: 7px; }
.manager-inline-holdings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 5px 0 0; padding: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); list-style: none; }
.manager-inline-holdings-grid li { min-width: 0; min-height: 40px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 5px; padding: 4px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manager-inline-holdings-grid b { color: var(--muted); font: 700 9px var(--mono); text-align: center; }
.manager-inline-holdings-grid strong, .manager-inline-holdings-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manager-inline-holdings-grid strong { font-size: 10px; }
.manager-inline-holdings-grid small { color: var(--muted); font: 8px var(--mono); }
.manager-inline-holdings-grid em { color: var(--text); font: 700 9px var(--mono); font-style: normal; }

.has-indicator-tooltip { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: color-mix(in srgb, currentColor 58%, transparent); text-underline-offset: 3px; cursor: help; }
.indicator-tooltip { position: fixed; z-index: var(--z-tooltip); width: min(330px, calc(100vw - 16px)); border: 1px solid var(--line-strong); border-left: 3px solid var(--orange); border-radius: var(--radius); background: #111922; color: var(--text); padding: 10px 12px; pointer-events: none; }
html[data-theme="light"] .indicator-tooltip { background: var(--surface); }
.indicator-tooltip strong, .indicator-tooltip p, .indicator-tooltip small { display: block; }
.indicator-tooltip strong { color: var(--orange); font-size: 12px; }
.indicator-tooltip p { margin: 5px 0; color: var(--text-2); font-size: 10px; line-height: 1.55; }
.indicator-tooltip small { color: var(--muted); font-size: 9px; }
.manager-note-tooltip { position: fixed; z-index: var(--z-tooltip); width: min(360px, calc(100vw - 16px)); max-height: min(360px, calc(100vh - 16px)); overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #111922; color: var(--text); padding: 11px 12px; pointer-events: none; }
html[data-theme="light"] .manager-note-tooltip { background: var(--surface); }
.manager-note-tooltip strong, .manager-note-tooltip p, .manager-note-tooltip small { display: block; }
.manager-note-tooltip strong { color: var(--favorite); font-size: 12px; }
.manager-note-tooltip p { margin: 6px 0; color: var(--text-2); font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.manager-note-tooltip small { color: var(--muted); font-size: 9px; }

@keyframes drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }

.holdings-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface); }
.holdings-hero h1 { margin: 1px 0 0; font-size: 21px; }
.holdings-hero p { margin: 4px 0 0; color: var(--muted); }
.eyebrow { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.sync-state { min-height: 28px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 0 10px; color: var(--muted); font-size: 10px; }
.sync-state[data-status="synced"] { color: var(--green); border-color: var(--green); }
.sync-state[data-status="pending"] { color: var(--warning); border-color: var(--warning); }
.holdings-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); min-height: calc(100vh - var(--header-h) - 96px); }
.holdings-selector { min-width: 0; border-right: 1px solid var(--line); background: var(--surface); padding: 0 12px 18px; }
.holdings-selector .panel-heading { margin-inline: -12px; }
.holdings-period-filter { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.holdings-period-filter select, .holdings-side-filters select, .holdings-side-filters input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text); padding: 0 9px; }
.holdings-side-filters { display: grid; gap: 13px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.holdings-side-filters > label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.holdings-weight-input { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 6px; }
.holdings-weight-input b { color: var(--text-2); font-size: 11px; font-weight: 500; }
.holdings-selection-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.favorite-shortcuts { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mini-label { width: 100%; color: var(--muted); font-size: 9px; font-weight: 700; }
.favorite-shortcut { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface-2); padding: 3px 4px 3px 7px; font-size: 10px; }
.favorite-shortcut .favorite-glyph { font-size: 11px; }
.favorite-shortcut .favorite-add { width: 21px; height: 21px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--orange); padding: 0; }
.holdings-manager-options { max-height: calc(100vh - 360px); overflow: auto; }
.holdings-manager-dialog { width: min(760px, calc(100vw - 28px)); }
.holdings-manager-dialog .dialog-search { flex: 0 0 auto; margin: 14px 16px 10px; }
.holdings-manager-dialog .favorite-shortcuts { margin: 0 16px; }
.holdings-manager-dialog .holdings-manager-options { max-height: min(440px, calc(100vh - 300px)); padding: 0 16px 12px; }
.holdings-manager-option { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 5px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.holdings-manager-option strong, .holdings-manager-option small { display: block; }
.holdings-manager-option small { color: var(--muted); font: 9px var(--mono); }
.holdings-manager-option .secondary-button { min-height: 28px; padding-inline: 8px; }
.holdings-main { min-width: 0; padding: 12px 14px 24px; }
.selected-managers { min-height: 42px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.selected-manager-chip { display: inline-grid; grid-template-columns: auto auto auto auto; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); padding: 4px 5px 4px 9px; }
.selected-manager-chip small { color: var(--muted); font: 9px var(--mono); }
.selected-manager-chip > .chip-remove { width: 24px; height: 24px; border: 0; background: transparent; color: var(--muted); }
.holdings-toolbar { display: flex; align-items: end; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; }
.holdings-toolbar .stock-search { min-width: 190px; flex: 1 1 230px; }
.holdings-alert { margin: 6px 0 9px; border: 1px solid var(--warning); border-left-width: 4px; background: color-mix(in srgb, var(--warning) 10%, transparent); color: var(--warning); padding: 8px 10px; }
.holdings-kpis { margin: 0 0 10px; border: 1px solid var(--line); }
.manager-fund-strip, .holdings-matrix-section, .holding-drilldown { margin-top: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.manager-fund-group { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-top: 1px solid var(--line); }
.manager-fund-group:first-child { border-top: 0; }
.manager-fund-group h3 { margin: 0; padding: 10px 12px; font-size: 12px; }
.manager-fund-group h3 span, .manager-fund-group h3 small { display: block; }
.manager-fund-group h3 small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.fund-pill-list { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 7px 10px; border-left: 1px solid var(--line); }
.fund-pill { display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--radius); padding: 4px 7px; }
.fund-pill.solo { border-left-color: var(--orange); }
.fund-pill small { color: var(--muted); font-size: 8px; }
.holdings-matrix-scroll { max-height: 540px; }
#holdings-matrix { min-width: 760px; }
#holdings-matrix th:first-child, #holdings-matrix td:first-child { position: sticky; left: 0; z-index: 4; min-width: 160px; background: var(--surface); }
#holdings-matrix thead th:first-child { background: var(--surface-2); z-index: 6; }
#holdings-matrix th { white-space: pre-line; }
.stock-link { width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; padding: 0; }
.stock-link strong, .stock-link small, .overlap-cell strong, .overlap-cell small, .holding-value strong, .holding-value small { display: block; }
.stock-link small, .overlap-cell small, .holding-value small { color: var(--muted); font-size: 9px; }
.overlap-cell, .holding-value { text-align: center; font-family: var(--mono); }
.overlap-cell strong { color: var(--blue); }
.holding-value strong { color: var(--orange); }
.holding-empty { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.holding-drilldown { scroll-margin-top: 12px; }

.guide-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); background: #071019; }
html[data-theme="light"] .guide-layout { background: var(--bg); }
.guide-sidebar { position: sticky; top: 0; align-self: start; min-height: calc(100vh - var(--header-h)); border-right: 1px solid var(--line); background: #09131d; }
html[data-theme="light"] .guide-sidebar { background: var(--surface); }
.guide-sidebar-heading { min-height: 86px; display: flex; align-items: center; gap: 11px; padding: 17px 16px; border-bottom: 1px solid var(--line); }
.guide-sidebar-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border: 1px solid color-mix(in srgb, var(--orange) 55%, var(--line)); border-radius: var(--radius); color: var(--orange); background: var(--orange-soft); }
.guide-sidebar-icon svg { width: 20px; height: 20px; }
.guide-sidebar-heading strong, .guide-sidebar-heading small { display: block; }
.guide-sidebar-heading strong { font-size: 16px; }
.guide-sidebar-heading small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.guide-tabs { display: grid; gap: 4px; padding: 10px; }
.guide-tabs button { width: 100%; min-height: 62px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted); padding: 8px 10px; text-align: left; transition: color 160ms ease, border-color 160ms ease, background 160ms ease; }
.guide-tabs button > svg { width: 18px; height: 18px; flex: 0 0 18px; }
.guide-tabs button span, .guide-tabs button small { display: block; }
.guide-tabs button span { color: var(--text-2); font-weight: 700; }
.guide-tabs button small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
.guide-tabs button:hover { border-color: var(--line-strong); background: var(--surface-hover); color: var(--orange); }
.guide-tabs button.active { border-color: color-mix(in srgb, var(--orange) 70%, var(--line)); background: var(--orange-soft); color: var(--orange); }
.guide-tabs button.active span { color: var(--orange); }
.guide-tabs button.active small { color: var(--text-2); }
.guide-main { min-width: 0; padding: 18px 20px 34px; }
.guide-notice { min-height: 48px; display: flex; align-items: center; gap: 11px; margin-bottom: 17px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 10px 14px; color: var(--text-2); }
.guide-notice svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--text-2); }
.guide-notice p { margin: 0; }
.guide-content { min-width: 0; }
.guide-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 14px; }
.guide-page-heading h1 { margin: 0; font-size: 19px; }
.guide-page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.guide-count { color: var(--muted); font: 11px var(--mono); white-space: nowrap; }
.indicator-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.indicator-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.indicator-filters button { min-height: 34px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); padding: 0 12px; font-weight: 650; transition: border-color 160ms ease, color 160ms ease, background 160ms ease; }
.indicator-filters button:hover, .indicator-filters button.active { border-color: currentColor; background: color-mix(in srgb, currentColor 10%, var(--surface)); }
.indicator-filters .all { color: var(--text-2); }
.indicator-filters .offense { color: var(--blue); }
.indicator-filters .defense { color: var(--green); }
.indicator-filters .composite { color: var(--orange); }
.indicator-filters .context { color: #b59aff; }
.indicator-filters .complexity { color: #36c6d3; }
.guide-search { max-width: 410px; min-width: 260px; margin: 0; }
.guide-content > .guide-search { margin-bottom: 12px; }
.indicator-controls .guide-search { margin-bottom: 0; }
.indicator-table-shell { background: #08131e; }
html[data-theme="light"] .indicator-table-shell { background: var(--surface); }
.indicator-table-shell .table-scroll { max-height: calc(100vh - 332px); }
.indicator-table { min-width: 1220px; table-layout: fixed; }
.indicator-table th:nth-child(1) { width: 130px; }
.indicator-table th:nth-child(2) { width: 180px; }
.indicator-table th:nth-child(3) { width: 280px; }
.indicator-table th:nth-child(4) { width: 170px; }
.indicator-table th:nth-child(5) { width: 460px; }
.indicator-table th { height: 43px; background: #0e1822; color: var(--text); font-size: 12px; text-align: left; }
html[data-theme="light"] .indicator-table th { background: var(--surface-2); }
.indicator-table td { padding: 11px 10px; color: var(--text-2); line-height: 1.55; text-align: left; }
.indicator-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-hover) 80%, transparent); }
.indicator-type { font-weight: 750; white-space: nowrap; }
.indicator-type.offense, .indicator-row.offense .indicator-name { color: var(--blue); }
.indicator-type.defense, .indicator-row.defense .indicator-name { color: var(--green); }
.indicator-type.composite, .indicator-row.composite .indicator-name { color: var(--orange); }
.indicator-type.context, .indicator-row.context .indicator-name { color: #b59aff; }
.indicator-type.complexity, .indicator-row.complexity .indicator-name { color: #36c6d3; }
.indicator-name { font-weight: 750; }
.indicator-direction { color: var(--text) !important; white-space: normal; }
.indicator-formula { font-family: var(--mono); font-size: 11px; }

.data-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: #0a1722; overflow: hidden; }
html[data-theme="light"] .data-overview { background: var(--surface); }
.data-overview-item { min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 112px; padding: 17px 22px; border-right: 1px solid var(--line); }
.data-overview-item:last-child { border-right: 0; }
.data-overview-icon { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 58px; border: 1px solid color-mix(in srgb, var(--orange) 62%, var(--line)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--orange-soft) 72%, var(--surface)); color: var(--orange); }
.data-overview-icon svg { width: 29px; height: 29px; }
.data-overview-item strong { font-size: 15px; }
.data-overview-item p { display: flex; align-items: baseline; gap: 7px; margin: 4px 0 0; }
.data-overview-item b { color: var(--orange); font: 750 31px/1 var(--mono); letter-spacing: -.04em; }
.data-overview-item p span { color: var(--text-2); font-size: 13px; }
.data-note-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.data-note { min-width: 0; min-height: 174px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: #0a1722; padding: 16px 17px; }
html[data-theme="light"] .data-note { background: var(--surface); }
.data-note header { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.data-note header span { color: var(--orange); font: 750 24px/1 var(--mono); letter-spacing: -.04em; }
.data-note h2 { margin: 0; color: var(--text); font-size: 14px; }
.data-note p { margin: 12px 0 0; color: var(--text-2); line-height: 1.7; text-wrap: pretty; }

.source-badge { display: inline-flex; border: 1px solid var(--green); border-radius: 99px; color: var(--green); padding: 2px 7px; white-space: nowrap; font-size: 9px; }
.source-badge.computed { border-color: var(--blue); color: var(--blue); }
.formula-table-shell .table-scroll { max-height: calc(100vh - 315px); }
.formula-table { width: max-content; min-width: 100%; table-layout: auto; }
.formula-table th, .formula-table td { min-height: 32px; padding: 6px 8px; white-space: nowrap; font-size: 9px; line-height: 1.35; }
.formula-table th { text-align: left; }
.formula-table td:nth-child(1), .formula-table td:nth-child(2) { color: var(--text); font-weight: 650; }
.formula-table .source-badge { padding: 1px 6px; font-size: 8px; }
.scoring-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.scoring-heading > div { display: flex; align-items: start; gap: 11px; }
.scoring-heading-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue); }
.scoring-heading-icon svg { width: 24px; height: 24px; }
.scoring-heading h1 { margin: 0; font-size: 20px; }
.scoring-heading p { max-width: 78ch; margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.score-scheme { min-height: 34px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); padding: 0 12px; white-space: nowrap; }
.scoring-workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
.score-flow-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #07121d; padding: 15px 14px; }
html[data-theme="light"] .score-flow-panel { background: var(--surface); }
.score-flow-panel h2 { margin: 0 0 14px; color: var(--blue); font-size: 12px; }
.score-flow-panel ol { margin: 0; padding: 0; list-style: none; }
.score-flow-panel li { position: relative; display: grid; grid-template-columns: 24px 34px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 78px; }
.score-flow-panel li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 51px; bottom: -26px; width: 1px; background: var(--blue); }
.score-flow-index { width: 24px; height: 24px; display: grid; place-items: center; z-index: 1; border-radius: 50%; background: var(--blue); color: #05101a; font: 750 10px var(--mono); }
.score-flow-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--blue) 62%, var(--line)); border-radius: 50%; color: var(--blue); }
.score-flow-panel li.offense .score-flow-icon { border-color: color-mix(in srgb, var(--gain) 62%, var(--line)); color: var(--gain); }
.score-flow-icon svg { width: 18px; height: 18px; }
.score-flow-panel li strong, .score-flow-panel li small { display: block; }
.score-flow-panel li strong { font-size: 11px; }
.score-flow-panel li small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.scoring-canvas { min-width: 0; }
.score-overview, .score-component, .score-gates, .score-example { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #07121d; }
html[data-theme="light"] .score-overview, html[data-theme="light"] .score-component, html[data-theme="light"] .score-gates, html[data-theme="light"] .score-example { background: var(--surface); }
.score-overview { padding: 13px 16px 11px; }
.score-overview > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.score-overview h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; }
.score-overview h2 svg { width: 17px; height: 17px; color: var(--blue); }
.score-overview header span { color: var(--muted); font-size: 10px; }
.score-weight-bar { height: 64px; display: flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 34px; background: var(--surface-2); }
.score-weight-segment { min-width: 0; display: grid; place-content: center; text-align: center; color: #fff; }
.score-weight-segment + .score-weight-segment { border-left: 1px solid color-mix(in srgb, white 42%, transparent); }
.score-weight-segment.offense { background: linear-gradient(180deg, #116ed2, #064ba5); }
.score-weight-segment.defense { background: linear-gradient(180deg, #0e874f, #075d37); }
.score-weight-segment.composite { background: linear-gradient(180deg, #b85d13, #7c3508); }
.score-weight-segment strong, .score-weight-segment span { display: block; }
.score-weight-segment strong { font: 750 21px/1 var(--mono); }
.score-weight-segment span { margin-top: 5px; font-size: 10px; }
.score-weight-scale { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font: 8px var(--mono); }
.score-component-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.score-component-grid { margin-top: 10px; }
.score-component { padding: 13px 14px; border-top-color: var(--blue); }
.score-component.defense { border-color: color-mix(in srgb, var(--green) 50%, var(--line)); }
.score-component.composite { border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); }
.score-component > header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.score-component-title { display: flex; align-items: center; gap: 9px; }
.score-component-title svg { width: 24px; height: 24px; color: var(--gain); }
.score-component.defense svg { color: var(--green); }
.score-component.composite svg { color: var(--orange); }
.score-component h2 { margin: 0; font-size: 15px; }
.score-component h2 span { color: var(--blue); font-size: 11px; }
.score-component.defense h2, .score-component.defense h2 span { color: var(--green); }
.score-component.composite h2, .score-component.composite h2 span { color: var(--orange); }
.score-component-title p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.score-current { text-align: right; }
.score-current small, .score-current strong { display: block; }
.score-current small { color: var(--muted); font-size: 8px; }
.score-current strong { color: var(--blue); font: 750 22px var(--mono); }
.score-component.defense .score-current strong { color: var(--green); }
.score-component.composite .score-current strong { color: var(--orange); }
.score-component ul { margin: 12px 0 0; padding: 0; list-style: none; }
.score-component li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.score-component li b { font-family: var(--mono); }
.score-component-meter { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font: 8px var(--mono); }
.score-component-meter i { position: relative; height: 4px; flex: 1; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.score-component-meter i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--score-position); border-radius: inherit; background: var(--blue); }
.score-component.defense .score-component-meter i::before { background: var(--green); }
.score-component.composite .score-component-meter i::before { background: var(--orange); }
.scoring-lower { display: grid; grid-template-columns: minmax(290px, .85fr) minmax(0, 2fr); gap: 10px; margin-top: 10px; }
.score-gates, .score-example { min-width: 0; padding: 13px 15px; }
.score-gates > h2, .score-example > h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; }
.score-gates > h2 svg, .score-example > h2 svg { width: 18px; height: 18px; color: var(--blue); }
.gate-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.gate-columns > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.gate-columns h3 { margin: 0 0 8px; color: var(--text-2); font-size: 10px; }
.gate-columns ul { margin: 0; padding: 0; list-style: none; }
.gate-columns li { display: flex; gap: 7px; padding: 4px 0; color: var(--text-2); font-size: 9px; }
.gate-columns li span { color: var(--green); }
.score-example > p { margin: 5px 0 9px; color: var(--muted); font-size: 9px; }
.score-example-scroll { overflow-x: auto; }
.score-example table { min-width: 0; table-layout: fixed; border: 1px solid var(--line); font-size: 8px; }
.score-example th, .score-example td { padding: 6px 5px; text-align: center; }
.score-example th { white-space: normal; }
.score-example thead th { position: static; background: #09151f; }
html[data-theme="light"] .score-example thead th { background: var(--surface-2); }
.score-example tbody th { color: var(--text-2); background: #09151f; }
html[data-theme="light"] .score-example tbody th { background: var(--surface-2); }
.score-example tbody tr:first-child td { color: var(--blue); font-weight: 750; }
.score-example-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; align-items: end; margin-top: 10px; }
.score-calculations p { margin: 3px 0; font: 9px var(--mono); }
.score-calculations .offense { color: var(--blue); }
.score-calculations .defense { color: var(--green); }
.score-calculations .composite { color: var(--orange); }
.score-interpretation { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 8px 24px; color: var(--muted); font-size: 8px; }
.score-interpretation li + li { margin-top: 4px; }
.score-disclaimer { margin: 12px 0 0; color: var(--muted); font-size: 8px; text-align: center; }

.note-list-button b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font: 700 10px var(--mono); }
.score-note-list { margin: 0 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-2); padding: 12px; }
.score-note-list .panel-heading { margin-bottom: 10px; }
.score-note-list-body { display: grid; gap: 7px; }
.score-note-row { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(180px, .7fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.score-note-row .manager-name-link { justify-self: start; }
.score-note-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.score-note-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; }
.score-note-tag svg { width: 12px; height: 12px; }
.score-note-tag.offense { color: var(--blue); }.score-note-tag.defense { color: var(--green); }.score-note-tag.composite { color: var(--orange); }
.score-note-text { margin: 0; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.score-note-time { color: var(--muted); font: 9px var(--mono); white-space: nowrap; }

.personnel-shell { min-height: calc(100vh - var(--header-h)); padding: 14px 16px 22px; background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--blue) 5%, transparent), transparent 34%), var(--bg); }
.personnel-heading { display: grid; grid-template-columns: auto minmax(320px, 1fr) auto; align-items: center; gap: 22px; margin-bottom: 12px; }
.personnel-title-row { display: flex; align-items: center; gap: 8px; }
.personnel-heading h1 { margin: 0; font-size: 20px; line-height: 1.1; }
.personnel-heading p { margin: 4px 0 0; color: var(--orange); font-weight: 700; }
.indicator-info { width: 18px; height: 18px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font: 700 10px var(--mono); }
.personnel-refresh-meta { display: flex; align-items: center; gap: 18px; color: var(--muted); }
.personnel-refresh-meta b { color: var(--text-2); font: 500 11px var(--mono); }
.personnel-source-button { justify-self: end; border-color: transparent; color: var(--muted); }
.personnel-controls { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; margin-bottom: 10px; }
.personnel-summary, .personnel-type-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.personnel-summary button, .personnel-type-filters button { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.personnel-summary button.active, .personnel-type-filters button.active { border-color: var(--line-strong); background: var(--surface-hover); color: var(--text); }
.personnel-summary button.critical { color: var(--risk); }.personnel-summary button.warning { color: var(--warning); }.personnel-summary button.stable { color: var(--green); }
.personnel-summary b { margin-left: 6px; font: 700 11px var(--mono); }
.personnel-filter-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.personnel-filter-bar .search-box { max-width: 330px; }
.personnel-type-filters button { display: inline-flex; align-items: center; gap: 5px; padding-inline: 11px; }
.personnel-type-filters svg { width: 13px; height: 13px; }
.personnel-table-shell { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.personnel-table-shell .table-scroll { max-height: none; }
.personnel-table { width: 100%; min-width: 1160px; table-layout: fixed; border-collapse: collapse; font-size: 11px; }
.personnel-table th { position: sticky; top: 0; z-index: 2; height: 44px; padding: 7px 10px; background: var(--surface-2); color: var(--text-2); text-align: left; }
.personnel-table th small { display: block; color: var(--muted); font-size: 8px; font-weight: 500; }
.personnel-table th:nth-child(1) { width: 100px; }.personnel-table th:nth-child(2) { width: 190px; }.personnel-table th:nth-child(3) { width: 210px; }.personnel-table th:nth-child(4) { width: 155px; }.personnel-table th:nth-child(5) { width: 220px; }.personnel-table th:nth-child(6) { width: 280px; }.personnel-table th:nth-child(7) { width: 135px; }.personnel-table th:nth-child(8) { width: 38px; }
.personnel-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.personnel-table tr { background: var(--surface); transition: background 150ms ease; }.personnel-table tr:hover { background: var(--surface-hover); }
.personnel-table tr.status-critical { background: color-mix(in srgb, var(--risk) 9%, var(--surface)); box-shadow: inset 2px 0 var(--risk); }
.personnel-table tr.status-warning { background: color-mix(in srgb, var(--warning) 7%, var(--surface)); }
.personnel-table tr.status-info { background: color-mix(in srgb, var(--blue) 6%, var(--surface)); }
.personnel-table tr.status-news { background: color-mix(in srgb, #9b6cff 6%, var(--surface)); }
.personnel-table tr.status-stable { background: color-mix(in srgb, var(--green) 3%, var(--surface)); }
.personnel-status { display: inline-flex; justify-content: center; min-width: 78px; padding: 6px 8px; border: 1px solid currentColor; border-radius: 4px; font-weight: 750; }
.personnel-status.critical { color: var(--risk); background: color-mix(in srgb, var(--risk) 12%, transparent); }.personnel-status.warning { color: var(--warning); }.personnel-status.info { color: var(--blue); }.personnel-status.news { color: #b58cff; }.personnel-status.stable { color: var(--green); }
.personnel-manager { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.personnel-avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-3); object-fit: cover; font-weight: 700; }
.personnel-manager strong, .personnel-cell-title { display: block; color: var(--text); font-weight: 750; }
.personnel-manager small, .personnel-cell-sub, .personnel-times { display: block; color: var(--muted); font-size: 9px; }
.personnel-times { white-space: pre-line; font-family: var(--mono); }
.personnel-cell-title.critical { color: var(--risk); }.personnel-cell-title.warning { color: var(--warning); }.personnel-cell-title.info { color: var(--blue); }.personnel-cell-title.news { color: #b58cff; }.personnel-cell-title.stable { color: var(--green); }
.personnel-count { color: var(--text); font: 700 17px var(--mono); }.personnel-delta { margin-left: 7px; color: var(--blue); font: 700 9px var(--mono); }
.personnel-row-toggle { width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); }.personnel-row-toggle svg { width: 16px; height: 16px; transition: transform 160ms ease; }.personnel-row-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.personnel-empty { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; }.personnel-empty svg { width: 36px; height: 36px; color: var(--favorite); }.personnel-empty h2, .personnel-empty p { margin: 0; }.personnel-empty h2 { color: var(--text); font-size: 17px; }
.personnel-detail { display: grid; grid-template-columns: 190px minmax(260px, 1fr) minmax(300px, 1.2fr) minmax(360px, 1.6fr); gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-2); }
.personnel-detail-tabs { display: grid; align-content: start; gap: 4px; }.personnel-detail-tabs button { min-height: 38px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 4px; padding: 0 10px; background: transparent; color: var(--muted); text-align: left; }.personnel-detail-tabs button.active { background: var(--surface-3); color: var(--text); font-weight: 700; }.personnel-detail-tabs svg { width: 16px; height: 16px; }
.personnel-detail-card { min-width: 0; min-height: 190px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.personnel-detail-card h2 { margin: 0 0 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 13px; }
.personnel-facts { margin: 0; }.personnel-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }.personnel-facts dt { color: var(--muted); }.personnel-facts dd { margin: 0; color: var(--text-2); }
.personnel-timeline, .personnel-evidence-list { margin: 0; padding: 0; list-style: none; }.personnel-timeline li { position: relative; margin-left: 5px; padding: 0 0 12px 18px; border-left: 1px solid var(--line-strong); }.personnel-timeline li::before { content: ""; position: absolute; left: -4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }.personnel-timeline li:first-child::before { background: var(--risk); }.personnel-timeline time { color: var(--muted); font: 9px var(--mono); }.personnel-timeline strong, .personnel-timeline small { display: block; }.personnel-timeline small { color: var(--muted); }
.personnel-evidence-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 9px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }.personnel-evidence-list a { color: var(--text-2); text-decoration: none; }.personnel-evidence-list a:hover { color: var(--orange); }.personnel-evidence-kind { padding: 2px 5px; border-radius: 3px; background: var(--blue-soft); color: var(--blue); font-size: 8px; }.personnel-evidence-list time { color: var(--muted); font: 8px var(--mono); white-space: nowrap; }
.personnel-rule-note { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface-2); }

@media (max-width: 1180px) {
  :root { --header-h: 146px; }
  .app-header { grid-template-columns: 180px minmax(600px, 1fr) 170px; padding-inline: 14px; }
  .freshness { display: none; }
  .site-auth-pill small { display: none; }
  .dashboard-tab { padding-inline: 6px; }
  .dashboard-tab svg { display: none; }
  .profile-content { grid-template-columns: 1fr; }
  .managed-funds-section { grid-column: auto; }
  .profile-summary { display: grid; grid-template-columns: minmax(290px, .75fr) 1.25fr; column-gap: 16px; }
  .biography { grid-column: 2; grid-row: 1 / span 2; padding-top: 0; }
  .weight-mode-grid { grid-template-columns: 1fr; }
  .scoring-workspace { grid-template-columns: 1fr; }
  .score-flow-panel ol { display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); overflow-x: auto; }
  .score-flow-panel li { grid-template-columns: 24px minmax(0, 1fr); min-height: 58px; }
  .score-flow-panel li:not(:last-child)::after { display: none; }
  .score-flow-icon { display: none; }
  .personnel-heading { grid-template-columns: auto 1fr; }
  .personnel-source-button { grid-column: 2; justify-self: start; }
  .personnel-controls { grid-template-columns: 1fr; }
  .personnel-filter-bar { justify-content: flex-start; flex-wrap: wrap; }
  .personnel-detail { grid-template-columns: 150px repeat(3, minmax(280px, 1fr)); overflow-x: auto; }
}

@media (max-width: 900px) {
  :root { --header-h: 178px; }
  .app-header { grid-template-columns: 1fr auto; align-items: start; }
  .brand { height: 42px; }
  .dashboard-nav { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-tab:nth-child(n) { grid-column: auto; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .dashboard-tab { min-height: 48px; }
  .dashboard-tab small { display: none; }
  .status-strip, .score-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-strip > div:nth-child(2), .score-banner > div:nth-child(2) { border-right: 0; }
  .status-strip > div:nth-child(-n+2), .score-banner > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .workspace, .score-layout { grid-template-columns: 1fr; }
  .filter-rail { position: fixed; z-index: var(--z-sticky); top: 0; bottom: 0; left: 0; width: min(340px, calc(100vw - 42px)); transform: translateX(-100%); transition: transform 180ms cubic-bezier(.22, 1, .36, 1); box-shadow: 8px 0 0 rgba(0,0,0,.18); }
  .filter-rail.is-open { transform: translateX(0); }
  .filter-toggle { display: inline-flex; }
  .section-heading { align-items: start; flex-direction: column; }
  .profile-search-band { grid-template-columns: 1fr; align-items: stretch; }
  .profile-summary { display: block; }
  .biography { padding-top: 13px; }
  .radar-layout { grid-template-columns: 1fr; }
  .radar-legend { border-top: 1px solid var(--line); border-left: 0; }
  .manager-preview-body { grid-template-columns: 1fr; }
  .manager-preview-body .radar-legend { border-top: 1px solid var(--line); border-left: 0; }
  .weight-grid { grid-template-columns: 1fr; }
  .holdings-layout { grid-template-columns: 1fr; }
  .holdings-selector { border-right: 0; border-bottom: 1px solid var(--line); }
  .holdings-manager-options { max-height: 260px; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .guide-sidebar-heading { min-height: 68px; }
  .guide-tabs { grid-template-columns: repeat(4, minmax(150px, 1fr)); overflow-x: auto; }
  .guide-tabs button { min-height: 54px; }
  .guide-tabs button small { display: none; }
  .indicator-controls { align-items: stretch; flex-direction: column; }
  .guide-search { max-width: none; }
  .data-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-overview-item:nth-child(2) { border-right: 0; }
  .data-overview-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .data-note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-note-row { grid-template-columns: 1fr; gap: 6px; }
  .personnel-heading { grid-template-columns: 1fr; gap: 9px; }
  .personnel-refresh-meta { flex-wrap: wrap; gap: 8px 14px; }
  .personnel-source-button { grid-column: auto; justify-self: start; }
  .personnel-filter-bar .search-box { max-width: none; flex-basis: 100%; }
  .personnel-detail { grid-template-columns: 1fr; overflow: visible; }
  .personnel-detail-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .personnel-detail-tabs button { justify-content: center; }
}

@media (max-width: 560px) {
  :root { --header-h: 238px; }
  body { font-size: 12px; }
  .app-header { gap: 7px; padding: 8px 10px; }
  .brand-mark { display: none; }
  .brand strong { font-size: 14px; }
  .icon-text-button span { display: none; }
  .icon-text-button { width: 36px; padding: 0; }
  .site-auth-pill { min-height: 34px; padding-inline: 7px; }
  .site-auth-pill strong { max-width: 72px; font-size: 9px; }
  .dashboard-tab { font-size: 11px; }
  .dashboard-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-strip > div, .score-banner > div { padding: 8px 10px; }
  .status-strip strong, .score-banner strong { font-size: 17px; }
  .view-body, .content-area { padding: 10px; }
  .type-tabs { width: 100%; }
  .type-tabs button { flex: 1; padding-inline: 5px; }
  .toolbar { align-items: stretch; }
  .search-box { flex-basis: 100%; }
  .date-range { width: 100%; flex-wrap: wrap; }
  .date-range input { flex: 1; min-width: 130px; max-width: none; }
  .date-range .secondary-button { flex: 1 1 100%; }
  .export-button { margin-left: auto; }
  .personnel-shell { padding: 10px; }
  .personnel-heading h1 { font-size: 18px; }
  .personnel-summary, .personnel-type-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .personnel-summary button, .personnel-type-filters button { justify-content: center; padding-inline: 6px; }
  .personnel-detail-tabs { overflow-x: auto; grid-template-columns: repeat(3, minmax(138px, 1fr)); }
  .table-scroll, .fund-body .table-scroll { max-height: 58vh; }
  .profile-search-band { padding: 13px 11px; gap: 13px; }
  .profile-content { padding: 9px; gap: 9px; }
  .profile-summary { padding: 11px; }
  .panel-heading { align-items: start; flex-direction: column; }
  .radar-wrap { min-height: 340px; overflow: hidden; }
  #manager-radar, #manager-preview-radar { min-width: 470px; transform: scale(.8); }
  .fund-holdings-drawer { width: 100vw; max-width: none; }
  .fund-trend-chart { min-height: 190px; }
  .fund-trend-legend { gap: 10px; }
  .manager-preview-dialog { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  .manager-preview-dialog .dialog-shell { max-height: calc(100dvh - 14px); }
  .manager-preview-toolbar { align-items: stretch; flex-direction: column; }
  .manager-preview-toolbar .period-tabs { width: 100%; }
  .manager-preview-toolbar .period-tabs button { flex: 1; }
  .manager-preview-actions { width: 100%; }
  .manager-preview-actions > button { flex: 1 1 calc(50% - 8px); }
  .manager-preview-body .radar-wrap { min-height: 340px; overflow: hidden; }
  .manager-preview-note-panel { min-height: 340px; padding: 14px 12px; }
  .manager-preview-note-panel textarea { min-height: 220px; }
  .manager-preview-note-actions { flex-wrap: wrap; }
  .manager-preview-note-actions > span { flex: 1 1 100%; }
  .manager-preview-funds { min-height: 340px; padding: 10px 9px 12px; }
  .manager-preview-funds > header { margin-bottom: 8px; padding-bottom: 7px; }
  .manager-preview-fund-layout { grid-template-columns: 1fr; gap: 8px; }
  .manager-preview-fund-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .manager-preview-fund-list li { grid-template-columns: 21px minmax(0, 1fr); min-height: 43px; gap: 5px; padding: 4px 6px; }
  .manager-preview-fund-link { font-size: 10px; }
  .manager-inline-fund-detail { min-height: 248px; padding: 7px; }
  .manager-inline-fund-detail .preview-loading, .manager-inline-fund-detail .preview-empty { min-height: 220px; }
  .manager-inline-fund-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manager-inline-holdings-grid li { min-height: 34px; padding: 3px 4px; }
  .manager-inline-holdings-grid strong { font-size: 9px; }
  .combobox-option { grid-template-columns: 1fr; }
  .combobox-option > span:nth-child(2) { grid-column: 1 / -1; }
  .column-options { grid-template-columns: 1fr; }
  .weight-console { padding: 10px; }
  .weight-console-head { align-items: stretch; flex-direction: column; }
  .weight-actions { justify-content: stretch; }
  .weight-actions > button { flex: 1 1 160px; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  td.manager-cell { min-width: 145px; }
  .manager-preferences.compact .ability-tags { max-width: 68px; flex-wrap: wrap; }
  .holdings-hero { align-items: start; flex-direction: column; padding: 14px 11px; }
  .holdings-main { padding: 9px; }
  .holdings-selection-actions > button { flex: 1 1 auto; }
  .selected-manager-chip { grid-template-columns: auto auto; }
  .selected-manager-chip .manager-preferences { grid-column: 1 / -1; }
  .holdings-toolbar { align-items: stretch; }
  .holdings-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manager-fund-group { grid-template-columns: 1fr; }
  .fund-pill-list { border-left: 0; border-top: 1px solid var(--line); }
  .guide-sidebar-heading { padding: 12px 10px; }
  .guide-tabs { grid-template-columns: repeat(2, minmax(148px, 1fr)); padding: 8px; }
  .guide-main { padding: 10px 9px 24px; }
  .guide-notice { align-items: start; margin-bottom: 14px; padding: 10px; }
  .guide-page-heading { align-items: start; flex-direction: column; gap: 7px; }
  .indicator-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .indicator-filters button { flex: 0 0 auto; }
  .guide-search { min-width: 0; }
  .indicator-table-shell .table-scroll { max-height: 62vh; }
  .data-overview { grid-template-columns: 1fr; }
  .data-overview-item { min-height: 88px; border-right: 0; border-bottom: 1px solid var(--line); padding: 13px 16px; }
  .data-overview-item:nth-child(3) { border-bottom: 1px solid var(--line); }
  .data-overview-item:last-child { border-bottom: 0; }
  .data-overview-icon { width: 48px; height: 48px; flex-basis: 48px; }
  .data-overview-icon svg { width: 24px; height: 24px; }
  .data-overview-item b { font-size: 26px; }
  .data-note-grid, .score-component-grid, .scoring-lower { grid-template-columns: 1fr; }
  .data-note { min-height: 0; }
  .scoring-heading { flex-direction: column; }
  .score-flow-panel ol { grid-template-columns: repeat(7, minmax(126px, 1fr)); }
  .score-weight-bar { height: 58px; }
  .score-weight-segment strong { font-size: 16px; }
  .score-weight-segment span { font-size: 8px; }
  .gate-columns { grid-template-columns: 1fr; }
  .gate-columns > div + div { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
  .score-example-bottom { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
