/* The /fund page: the look of Sam's Fund I portal (the claude.ai artifact). Loaded after fund.css and
   fund-sections.css, only by fund.html. The artifact's tokens (--ch, --mint, --bg, --card, --line, ...)
   come first; the monitor's tokens that the Fund code uses (--ink, --surface, --border, --series-1, ...)
   are mapped onto them, so charts and section styles take the portal's colours. */
:root {
  color-scheme: light;
  --ch: #1F2529; --ch2: #171C1F; --mint: #447E81; --mint2: #2C5A5C; --mintl: #DCEBEB; --mintd: #2C5A5C;
  --bg: #F4F6F4; --card: #FFFFFF; --line: #E3E6EC; --line-2: #EEF0F3; --red: #C0492F; --blue: #1F5FBF;
  --gold: #C7A35E; --goldl: #F4ECDA; --goldd: #8C6E2E;
  --sans: 'Poppins', 'Public Sans', system-ui, sans-serif;
  /* monitor names */
  --page: var(--bg); --surface: var(--card); --surface-2: #F1F3F5;
  --ink: #2B3236; --ink-2: #4B5360; --muted: #6B7280;
  --grid: #EEF0F3; --axis: #C9CED8; --border: #E3E6EC; --hover: rgba(68, 126, 129, 0.07);
  --series-1: #447E81; --series-2: #C7A35E; --series-3: #2C5A5C; --series-1-wash: #DCEBEB;
  --good: #447E81; --good-text: #2C5A5C; --warning: #C7A35E; --warning-text: #8C6E2E;
  --serious: #D98B6F; --critical: #C0492F; --critical-text: #C0492F; --neutral-mark: #B7BDC2;
  --shadow: none; --radius: 12px; --chart-ink: #1F2529; --chart-down: #8C6E2E;
  --mkt-line: #1F5F61; --mkt-wash: rgba(68, 126, 129, .13); --mkt-qwash: rgba(68, 126, 129, .06); --mkt-vol: #8FBFC0; --mkt-q: #5B6270;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151A1C; --card: #1E2427; --line: #2E3639; --line-2: #283033; --mintl: #1E3436; --mint: #6FA5A8; --mint2: #9CC9CB;
    --goldl: #3A3324; --goldd: #E3C98F;
    --surface-2: #232A2D; --ink: #EEF0F4; --ink-2: #C3C8D0; --muted: #9AA1AE; --grid: #283033; --axis: #3A4448;
    --border: #2E3639; --hover: rgba(111, 165, 168, 0.10);
    --series-1: #6FA5A8; --series-3: #9CC9CB; --series-1-wash: #1E3436;
    --good: #6FA5A8; --good-text: #9CC9CB; --warning-text: #D4B373; --critical: #E8907B; --critical-text: #E8907B; --neutral-mark: #4A5357; --chart-ink: #9AA1AE; --chart-down: #D4B373; --mkt-line: #7FD3D4; --mkt-wash: rgba(127, 211, 212, .12); --mkt-qwash: rgba(127, 211, 212, .05); --mkt-vol: #2F5658; --mkt-q: #A3AFB6;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151A1C; --card: #1E2427; --line: #2E3639; --line-2: #283033; --mintl: #1E3436; --mint: #6FA5A8; --mint2: #9CC9CB;
  --goldl: #3A3324; --goldd: #E3C98F;
  --surface-2: #232A2D; --ink: #EEF0F4; --ink-2: #C3C8D0; --muted: #9AA1AE; --grid: #283033; --axis: #3A4448;
  --border: #2E3639; --hover: rgba(111, 165, 168, 0.10);
  --series-1: #6FA5A8; --series-3: #9CC9CB; --series-1-wash: #1E3436;
  --good: #6FA5A8; --good-text: #9CC9CB; --warning-text: #D4B373; --critical: #E8907B; --critical-text: #E8907B; --neutral-mark: #4A5357; --chart-ink: #9AA1AE; --chart-down: #D4B373; --mkt-line: #7FD3D4; --mkt-wash: rgba(127, 211, 212, .12); --mkt-qwash: rgba(127, 211, 212, .05); --mkt-vol: #2F5658; --mkt-q: #A3AFB6;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body.fund-page { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; min-height: 100vh; -webkit-font-smoothing: antialiased; }
.fund-page button, .fund-page select, .fund-page input, .fund-page textarea { font-family: inherit; }
.fund-page a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
h1 { font-size: 22px; font-weight: 600; margin: 0; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
code { font-family: var(--mono); font-size: 12px; }

/* loading placeholders */
.sk { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--surface-2) 30%, var(--grid) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: sk-move 1.4s ease-in-out infinite; }
@keyframes sk-move { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-big { height: 22px; width: 55%; border-radius: 6px; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.fund-boot { min-height: 100vh; }

/* page-level error */
.fund-error { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 10px;
  background: #FDECEA; color: var(--red); border: 1px solid #F2C4BA; border-radius: 10px; padding: 8px 12px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* ---------- buttons (the portal's .btn: dark fill; ghost: outline) ---------- */
.btn-primary { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; background: #447E81; color: #fff; font-family: var(--sans); font-size: 12.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.btn-primary:hover { background: #2C5A5C; }
.btn-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--ch); font-family: var(--sans); font-size: 12.5px; font-weight: 500; line-height: 1.3; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn-quiet:hover { background: var(--card); border-color: var(--mint); }
.btn-quiet.danger { color: var(--red); }
/* the portal's AI buttons (Draft from Notion, Update from public sources): mint outline */
.fund-page .btn-quiet.ai { background: #F7F8F9; color: var(--mint2); border-color: var(--mint2); font-weight: 600; }
.fund-page .btn-quiet.ai:hover { background: var(--mintl); }
:root[data-theme="dark"] .fund-page .btn-quiet.ai { background: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fund-page .btn-quiet.ai { background: var(--card); } }
.btn-quiet.danger:hover { border-color: var(--red); }
.btn-primary.sm, .btn-quiet.sm { padding: 5px 10px; font-size: 12px; }
.btn-quiet.sm { padding: 4px 9px; }
.btn-primary.danger-fill { background: var(--red); }
.btn-primary:disabled, .btn-quiet:disabled, .btn-primary[disabled], .btn-primary[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary:focus-visible, .btn-quiet:focus-visible, .fund-link:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--mint2); outline-offset: 2px; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; background: transparent; border: 1px solid transparent; cursor: pointer; color: var(--muted); font-size: 15px; }
.icon-btn:hover { background: var(--bg); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .btn-quiet { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-quiet { color: var(--ink); } }
:root[data-theme="dark"] .btn-primary:not(:hover) { background: #447E81; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary:not(:hover) { background: #447E81; color: #fff; } }

/* ---------- form controls (the portal's refined boxes) ---------- */
.fund-page select { -webkit-appearance: none; appearance: none; background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding: 0 32px 0 12px; min-height: 36px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; vertical-align: middle; transition: border-color .12s, box-shadow .12s; }
.fund-page select:hover { border-color: var(--mint); }
.fund-page select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(68, 126, 129, .22); }
.fund-page input[type="text"], .fund-page input[type="number"], .fund-page input[type="date"], .fund-page input[type="email"], .fund-page input:not([type]), .fund-page textarea {
  font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink); }
.fund-page input:focus, .fund-page textarea:focus { outline: 2px solid var(--mint2); border-color: transparent; }
.fund-form label { font-size: 11.5px; color: var(--muted); }
.fund-form .hint { background: var(--bg); }

/* ---------- shell: dark side panel + main ---------- */
.fund-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; gap: 0; align-items: stretch; }
.fund-main { min-width: 0; padding: 0 28px 40px; }
.fund-side { background: var(--ch); color: #fff; padding: 22px 16px; position: sticky; top: 0; height: 100vh; max-height: none; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px;
  --mint: #8FC1C3; --mint2: #9CC9CB; }
.fund-side > * { flex-shrink: 0; }
.fund-allfunds { display: block; color: var(--mint); font-size: 12px; font-weight: 600; margin: 0 0 10px; padding: 4px 2px; text-decoration: none; }
.fund-allfunds:hover { text-decoration: underline; }
.fund-brand { display: block; font-weight: 700; font-size: 15px; letter-spacing: .02em; margin-bottom: 2px; padding: 0; }
.fund-brand .brand-logo { display: block; width: 150px; height: auto; margin: 2px 0; }
.fund-brand small { display: block; font-weight: 400; color: #9CC9CB; font-size: 11px; margin-top: 4px; }
.fund-brand .fund-mode { display: inline-block; margin: 8px 0 0; background: rgba(199, 163, 94, .22); color: #F3C46A; }
.fund-savestat { font-size: 11px; color: #B9C0D0; margin: 8px 0 14px; }
.fund-refresh { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 8px; border-radius: 8px; font-size: 12px; color: #B9C0D0; }
.fund-refresh:hover { background: rgba(255, 255, 255, .06); }
.fund-nav { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.fund-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: #D5D9E3; text-decoration: none; font-weight: 400; border: 0; }
.fund-nav a:hover { background: rgba(255, 255, 255, .06); color: #D5D9E3; }
.fund-nav a.active { background: #447E81; color: #fff; font-weight: 600; box-shadow: none; border: 0; padding: 9px 12px; }
.fund-nav a:focus-visible, .fund-refresh:focus-visible, .fund-allfunds:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.fund-navsep { height: 1px; background: rgba(255, 255, 255, .14); margin: 12px 4px; }
.fund-nav a.navlp { border: 1px solid var(--mint); color: var(--mint); font-weight: 600; background: transparent; padding: 8px 11px; }
.fund-nav a.navlp.active { background: var(--mint); color: var(--ch); }
.fund-sidebody { display: flex; flex-direction: column; gap: 6px; }
.fund-sidebody > * { flex-shrink: 0; }
.fund-menubtn { display: none; }
.fund-cpanel { margin: 16px 2px 6px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #D5D9E3; background: transparent; display: block; }
.fund-cpanel .cp-h { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; font-size: 13px; }
.fund-cpanel .cp-l { margin-top: 5px; font-size: 12px; color: #D5D9E3; }
.fund-cpanel .cp-ok { color: var(--mint); } .fund-cpanel .cp-wait { color: #F3C46A; }
.fund-cpanel .cp-s { font-size: 11px; color: #B9C0D0; margin-top: 2px; }
.fund-cpanel .cp-b { all: unset; box-sizing: border-box; display: block; width: 100%; text-align: center; cursor: pointer; margin-top: 9px; padding: 6px 0;
  border: 1px solid var(--mint); border-radius: 8px; color: var(--mint); font-size: 12px; font-weight: 600; }
.fund-cpanel .cp-b:hover { background: rgba(117, 226, 170, .12); }
.fund-cpanel .cp-b[disabled] { opacity: .5; cursor: default; }
.fund-cpanel .cp-a { display: block; text-align: center; margin-top: 6px; font-size: 11px; color: #B9C0D0; text-decoration: none; }
.fund-cpanel .cp-a:hover { text-decoration: underline; }
.fund-foot { margin-top: auto; padding-top: 12px; font-size: 11px; color: #8E96A8; line-height: 1.5; }
.fund-mode { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--goldl); color: var(--goldd); cursor: help; white-space: nowrap; }

/* header of each page: sticky, title row + quarter rail (header.top) */
.fund-top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 18px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.fund-top .page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0; }
.fund-top .page-head h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: 0; display: flex; align-items: center; gap: 10px; }
.fund-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; font-weight: 600; margin: 0; }
.fund-rail { display: flex; gap: 10px; align-items: center; padding: 10px 0 2px; margin: 0; flex-wrap: wrap; font-size: 13px; }
.fund-rail .pctl { display: inline-flex; align-items: center; gap: 0; height: 36px; padding: 0 4px 0 14px; border-radius: 18px; background: rgba(68, 126, 129, .12); font-size: 13px; color: var(--ink); white-space: nowrap; }
.fund-rail .pctl:focus-within { box-shadow: 0 0 0 3px rgba(68, 126, 129, .22); }
.fund-rail .pctl-l { color: var(--muted); margin-right: 2px; font-size: 13px; }
.fund-rail .pctl select { border: 0; background-color: transparent; padding: 0 24px 0 6px; min-height: 30px; height: 30px; font-weight: 600; box-shadow: none; min-width: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232C5A5C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 6px center; }
.fund-rail .cur { font-size: 12px; color: var(--muted); }

/* pill control (the portal's .pctl): a label and a borderless select in a mint pill */
.fund-pctl { display: inline-flex; align-items: center; gap: 0; height: 36px; padding: 0 4px 0 14px; border-radius: 18px; background: rgba(68, 126, 129, .12);
  font-size: 13px; color: var(--ink); white-space: nowrap; vertical-align: middle; }
.fund-pctl:focus-within { box-shadow: 0 0 0 3px rgba(68, 126, 129, .22); }
.fund-pctl-l { color: var(--muted); font-size: 13px; margin-right: 2px; font-weight: 400; }
.fund-pctl select + .fund-pctl-l { margin: 0 2px 0 4px; }
.fund-page .fund-pctl select { border: 0; background-color: transparent; padding: 0 24px 0 6px; min-height: 30px; height: 30px; font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: none; min-width: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232C5A5C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 6px center; }
.fund-page .fund-pctl select:focus { box-shadow: none; }
:root[data-theme="dark"] .fund-pctl { background: rgba(111, 165, 168, .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fund-pctl { background: rgba(111, 165, 168, .16); } }

/* ---------- layout helpers ---------- */
.stack { display: grid; gap: 16px; }
.cols-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-3-1 { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-3, .cols-3-1 { grid-template-columns: minmax(0, 1fr); } }
/* two panels side by side down to 1000px, as the artifact's .db-g2 */
@media (max-width: 1000px) { .cols-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- panels (the portal's .panel / .db-card) ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px 0; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.card-head .sub { color: var(--muted); font-size: 11px; font-weight: 400; }
.card-body { padding: 10px 16px 14px; }
.card-body.flush { padding: 6px 0 4px; }
.chart { position: relative; height: 260px; }
.chart.sm { height: 200px; }
.chart.tall { height: 340px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.key.line { height: 2px; width: 14px; border-radius: 1px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.an-h2 { font-size: 16px; font-weight: 600; margin: 26px 0 12px; }

/* A section heading above its panel, as the portal's h2 + .panel ("Planned uses", "Summary financials", ...):
   the card itself is transparent, its body is the panel. */
.card.outhead { background: none; border: 0; border-radius: 0; }
.card.outhead > .card-head { padding: 10px 0 12px; align-items: baseline; }
.card.outhead > .card-head h2 { font-size: 16px; display: block; }
.card.outhead > .card-head h2 .fund-note, .card.outhead > .card-head .sub { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.card.outhead > .card-body { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.card.outhead > .card-body.flush:not(.table-wrap) { overflow: hidden; }

/* ---------- KPI cards ---------- */
/* .kpi as the portal's .kpi: a plain card, small label, 22px value */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.kpi .label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 4px; min-width: 0; }
.kpi .value { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.kpi .value small { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi .kpi-spark { margin: 6px 0 2px; height: 28px; }
.kpi .kpi-spark .spark { display: block; width: 100%; height: 28px; margin: 0; }
.kpi .foot { font-size: 11px; color: var(--muted); margin-top: 2px; min-width: 0; white-space: normal; overflow: visible; }
.kpi .foot .fund-note { font-size: 11px; }
.fund-kpis .kpi .value { white-space: normal; }
/* dashboard (db-kp4): four cards with a coloured top edge, mint then gold for the Carta figures */
.db-kp4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.db-kp4 .kpi { border-top: 3px solid var(--mint); border-radius: 0 0 12px 12px; }
.db-kp4 .kpi:nth-child(3), .db-kp4 .kpi:nth-child(4) { border-top-color: var(--gold); }
.db-kp4 .kpi .label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.db-kp4 .kpi .label .fund-tag { letter-spacing: .04em; }
.db-kp4 .kpi .value-row { margin-top: 0; }
.db-kp4 .kpi .value { font-size: 28px; line-height: 1.15; letter-spacing: 0; }
.db-kp4 .kpi .foot { margin-top: auto; padding-top: 2px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-kp4 .kpi .foot .fund-note { font-size: 11.5px; }
/* company page: the first card (NAV) is the dark hero */
.co-kpis .kpi:first-child, .act-kpis .kpi:first-child { background: var(--ch); border-color: var(--ch); color: #fff; }
.co-kpis .kpi:first-child :is(.label, .foot, .fund-note), .act-kpis .kpi:first-child :is(.label, .foot, .fund-note) { color: #B9C0D0; }
.co-kpis .kpi:first-child .value, .act-kpis .kpi:first-child .value { color: #447E81; }
:root[data-theme="dark"] :is(.co-kpis, .act-kpis, .an-sxkpis) .kpi:first-child .value { color: #6FA5A8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.co-kpis, .act-kpis, .an-sxkpis) .kpi:first-child .value { color: #6FA5A8; } }
@media (max-width: 1000px) { .db-kp4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* capital flow strip (db-strip) */
.fund-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; overflow: hidden; }
.fund-strip > div { padding: 12px 16px; border-right: 1px solid var(--line); margin-right: -1px; }
.fund-strip .l { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fund-strip .v { font-size: 18px; font-weight: 600; margin-top: 2px; color: var(--ink); }
.fund-strip .s { font-size: 11.5px; color: var(--muted); }
.db-strip { display: flex; align-items: center; flex-wrap: nowrap; padding: 14px 10px; }
.db-strip > .db-st { flex: 1; text-align: center; min-width: 0; padding: 0 4px; border: 0; margin: 0; }
.db-strip > .db-st .v { font-size: 18px; }
.db-strip > .db-ar { display: block; color: #B7BDC2; font-size: 18px; padding: 0 2px; border: 0; margin: 0; }
@media (max-width: 1000px) { .db-strip { flex-wrap: wrap; } .db-strip > .db-ar { display: none; } .db-strip > .db-st { flex: 1 1 30%; padding: 6px; } }
.fund-lk { color: var(--mint2); text-decoration: underline; font-weight: 600; cursor: pointer; }
.fund-lk:hover { text-decoration: underline; }
.fund-g3 { gap: 12px; }

/* label / value rows (db-row) */
.fund-facts { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; font-size: 13px; margin: 0; }
.fund-facts dt { color: var(--ink); padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.fund-facts dd { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line-2); text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.fund-facts dt:nth-last-of-type(1), .fund-facts dd:nth-last-of-type(1) { border-bottom: 0; }

/* tags: portal (mint) / Carta (gold) */
.fund-tag { display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: .04em; padding: 1px 6px; border-radius: 8px; background: var(--goldl); color: var(--goldd); margin-left: 4px; vertical-align: 1px; border: 0; text-transform: none; }
.card-head .fund-tag { font-size: 10px; padding: 2px 8px; border-radius: 10px; letter-spacing: 0; }
.fund-tag.muted { background: var(--mintl); color: var(--mint2); border: 0; }
.fund-note { font-size: 12px; color: var(--muted); }
.fund-amber { color: var(--goldd); font-weight: 600; }
.moic-hi { color: var(--mint2); } .moic-lo { color: var(--red); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; }
.fund-page table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fund-page th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fund-page td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fund-table th { font-weight: 600; color: var(--muted); font-size: 11.5px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.fund-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.fund-table th:first-child, .fund-table td:first-child { padding-left: 16px; }
.fund-table th:last-child, .fund-table td:last-child { padding-right: 16px; }
.fund-table tr.click:hover td, tbody tr.clickable:hover td { background: var(--mintl); }
.fund-table tr.total td { font-weight: 600; border-top: 2px solid var(--ch); border-bottom: 0; }
.fund-page tr:last-child td { border-bottom: 0; }
/* company names in the first column are bold, as the portal's <b> names */
.fund-table td:first-child > .fund-link, .an-rw-nm .fund-link { font-weight: 600; }

/* pills, status dots */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; background: var(--mintl); color: var(--mint2); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; }
.st-Active { background: var(--mint); } .st-NPA { background: var(--red); } .st-Exited { background: #8B939B; } .st-Co-GP { background: var(--blue); }
.pill:has(.st-NPA) { background: #FDE9E7; color: var(--red); }
.pill:has(.st-Co-GP) { background: #E8EEFB; color: var(--blue); }
.pill:has(.st-Exited) { background: #EEE; color: #555; }
.fund-chip { border: 0; border-radius: 12px; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--mint2); background: var(--mintl); }

/* banners */
.warn { background: var(--goldl); border: 1px solid #F3D7A8; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; margin: 0; color: var(--ink); }
.fund-ro { margin: 0 0 12px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 12px;
  background: var(--goldl); border: 1px solid #F3D7A8; color: var(--ink); }
.banner.work { width: 100%; border-radius: 8px; background: var(--goldl); border-color: #F3D7A8; }
.banner.work:hover { background: var(--goldl); }
.banner .what { flex: 1; min-width: 0; }
:root[data-theme="dark"] .warn, :root[data-theme="dark"] .banner { border-color: #5A4A2A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .warn, :root:not([data-theme="light"]) .banner { border-color: #5A4A2A; } }

/* toast (bottom right, dark) */
.fund-toast { position: fixed; bottom: 22px; right: 22px; left: auto; transform: none; background: var(--ch); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 12.5px; z-index: 80; box-shadow: none; }

/* dialogs (the portal's .modal) */
.fund-page dialog { border: 0; border-radius: 14px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); max-height: 92vh; }
.fund-page dialog::backdrop { background: rgba(20, 24, 34, .45); }
.fund-page dialog.drawer, .fund-page dialog[class*="help"] { border-radius: 0; }
.fd-head { padding: 18px 24px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.fd-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.fd-body { padding: 16px 24px; }
.fd-foot { padding: 14px 24px 18px; border-top: 1px solid var(--line); background: var(--card); }

/* inline form tables (new company exit case, financials): cells centred, route select wide enough */
.company-ff td { vertical-align: middle; }
.company-ff select[id^="company-nx-"] { min-width: 130px; }

/* event dialog: the same 10px between every row of fields */
#ev-form { row-gap: 10px; }
#ev-fields > .grid:first-child { margin-top: 0 !important; }

/* events (company page) */
.ev-list, .ev-after { padding: 0 16px; }
.ev-after .ev-list { padding: 0; }
/* View / documents buttons float right of the title, so the description starts right under it (as the portal) */
.fund-page .ev-ty { display: block; }
.fund-page .ev-ty .ev-btns { float: right; margin: 0 0 4px 8px; }
.fund-page .ev-after-h { padding: 12px 0 0; }
.card-head h2 .fund-note { font-size: 12px; font-weight: 600; }
.card-head h2.company-fxh, .card-head h2.an-h2in { display: block; flex: 1; min-width: 0; }
.ev { grid-template-columns: 86px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.ev .d { color: var(--muted); font-size: 12px; }
.ev .t { font-weight: 600; font-size: 13px; }
.ev .sum { color: var(--muted); font-size: 12px; }
.ev-callout { background: var(--mintl); border: 1px solid var(--mint); border-radius: 8px; }
.ev-calc { background: var(--card); border-color: var(--line); }
.docpick { border: 1px dashed var(--mint2); background: var(--card); }
.docbtn { color: var(--mint2) !important; border-color: var(--mint) !important; }
.docbadge { display: inline-block; min-width: 15px; height: 15px; line-height: 15px; border-radius: 8px; background: var(--mint2); color: #fff; font-size: 10px; font-weight: 600; text-align: center; margin-left: 4px; padding: 0 3px; }
.carta-pill { border-color: var(--line); }
/* in an event row the Carta status sits on its own line under the title, as the portal */
.fund-page .ev-ty .carta-pill { display: flex; width: fit-content; margin: 3px 0 2px; }
.carta-pill.sent i { background: var(--mint); } .carta-pill.failed i { background: var(--red); } .carta-pill.test i { background: var(--gold); }
.fund-crumb { font-size: 12.5px; color: var(--muted); }
.fund-crumb a { color: var(--muted); }
.navq .ql { color: var(--muted); }
.navq .qr.first { border-bottom: 2px solid var(--ch); }

/* MOIC buckets and flags (bk) */
.fund-bk { font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.fund-bk .bar { background: var(--line); }
.fund-flags { display: block; margin: 0; padding-left: 18px; }
.fund-flags li { font-size: 12.5px; color: var(--red); padding: 3px 0; line-height: 1.4; }

/* ---------- "Our funds" landing (full screen, as the portal) ---------- */
.fund-ld { width: 100%; min-height: 100vh; background: #F5F7FA; color: #333A3F; }
.ld { display: grid; grid-template-columns: minmax(280px, .95fr) minmax(0, 2fr); min-height: 100vh; width: 100%; }
.ld-intro { padding: 38px clamp(18px, 3.5vw, 56px) 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; background: #E6EFEF; }
.ld-intro > *, .ld-col > * { flex-shrink: 0; }
.ld-intro img { width: min(270px, 80%); height: auto; display: block; }
.ld-welb { margin: auto 0; }
.ld-wel { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #2C5A5C; }
.ld h1 { font-weight: 200; font-size: clamp(40px, 4.8vw, 74px); line-height: 1; margin: 8px 0 0; letter-spacing: -.02em; color: #333A3F; }
.ld h1 b { font-weight: 600; }
.ld-p { margin: 12px 0 0; font-size: 14px; color: #5B6270; }
.ld-k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #5B6270; }
.ld-kp, .ld-fig { border-top: 2px solid #447E81; min-height: 232px; margin-top: auto; }
.ld-kp { border-top-color: #2C5A5C; }
.ld-kp > div, .ld-fig > div { height: 46px; padding: 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #E3E7EC; }
.ld-kp > div { border-bottom-color: #CFE0E0; }
.ld-kp .v, .ld-fig .v { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ld-foot { flex: none; height: 64px; display: flex; align-items: center; }
.ld-at { font-size: 12px; color: #5B6270; }
.ld-cols { display: flex; }
.ld-col { flex: 1 1 0; min-width: 0; padding: 34px clamp(16px, 2.4vw, 34px) 28px; border-right: 1px solid #E3E7EC; display: flex; flex-direction: column; cursor: pointer;
  transition: flex .3s, background .2s; background: #fff; color: #333A3F; text-decoration: none; }
.ld-col:last-child { border-right: 0; }
.ld-col:hover { flex: 1.15; }
.ld-col.pre { background: transparent; color: #5B6270; }
.ld-col:focus-visible { outline: 2px solid #447E81; outline-offset: -4px; }
.ld-tagrow { display: flex; justify-content: flex-end; }
.ld-tag { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.ld-tag.live { background: #DCEBEB; color: #2C5A5C; }
.ld-tag.pre { background: #E3E7EC; color: #5B6270; }
.ld-num { font-size: clamp(84px, 9vw, 144px); font-weight: 200; line-height: .9; color: #2C5A5C; }
.ld-col.pre .ld-num { color: #D3D9E0; }
.ld-nm { font-size: 23px; font-weight: 600; margin-top: 8px; color: #333A3F; }
.ld-sub { font-size: 13px; color: #5B6270; }
.ld-th { margin: 16px 0 20px; }
.ld-th .ld-k { margin-bottom: 8px; }
.ld-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-pills span { font-size: 12px; padding: 4px 11px; border-radius: 20px; border: 1px solid #447E81; color: #2C5A5C; background: #DCEBEB; }
.ld-col.pre .ld-pills span { border-style: dashed; background: transparent; }
.ld-col.pre .ld-fig { border-top-color: #E3E7EC; }
.ld-hi { color: #2C5A5C; font-weight: 500; }
.ld-it { font-style: italic; text-transform: none; letter-spacing: 0; font-size: 11px; color: #8A93A8; font-weight: 400; }
.ld-open { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; background: #447E81; color: #fff; font-weight: 600; font-size: 13px; padding: 9px 18px; border-radius: 20px; border: 0; cursor: pointer; }
.ld-col.pre .ld-open { background: #E3E7EC; color: #5B6270; }
.ld-foot > .ld-open { align-self: center; }
@media (max-width: 900px) { .ld { grid-template-columns: 1fr; } .ld-cols { flex-direction: column; } .ld-col { border-right: 0; border-top: 1px solid #E3E7EC; } .ld-kp, .ld-fig { min-height: 0; } .ld h1 { font-size: 44px; } }

/* ---------- phones and narrow windows ---------- */
@media (max-width: 900px) {
  .fund-shell { display: block; }
  /* a collapsed menu: brand and a Menu button in one bar; the button opens the sections below it */
  .fund-side { position: sticky; top: 0; z-index: 20; height: auto; max-height: 100vh; padding: 10px 14px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .fund-allfunds { order: 3; width: 100%; margin: 0; display: none; }
  .fund-brand { flex: 1; min-width: 0; margin: 0; }
  .fund-brand .brand-logo { width: 96px; }
  .fund-brand small { display: none; }
  .fund-brand .fund-mode { margin: 4px 0 0; }
  .fund-menubtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: 13px; font-weight: 600; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fund-menubtn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
  .fund-menuicon { font-size: 15px; line-height: 1; }
  .fund-sidebody { display: none; order: 4; width: 100%; }
  .fund-side.open .fund-sidebody, .fund-side.open .fund-allfunds { display: flex; }
  .fund-side.open { overflow-y: auto; }
  .fund-side.open .fund-menubtn { background: rgba(255, 255, 255, .1); }
  .fund-savestat { margin: 0 0 4px; }
  .fund-foot { display: none; }
  .fund-cpanel { width: 100%; margin: 6px 0; box-sizing: border-box; }
  /* only the menu bar stays at the top on a phone; the page title and quarter rail scroll away */
  .fund-top { position: static; }
  .fund-main { padding: 0 14px 30px; }
  .db-kp4 { gap: 8px; }
  .db-kp4 .kpi { padding: 10px 12px; }
  .db-kp4 .kpi .value { font-size: 21px; }
}

/* ---------- dashboard details ---------- */
/* the dashboard's small cards (db-card) keep 13px titles; other panels use 14px */
.fund-g3 .card-head h2, .fund-bks .card-head h2 { font-size: 13px; }
/* a tag at the end of a panel title sits on the right (db-h) */
.card-head h2:has(> .fund-tag:last-child) { flex: 1; justify-content: space-between; }
.card-head h2 > .fund-tag:last-child { margin-left: auto; }
/* "By quarter": a section heading with a View pill, the two charts in their own panels */
#an-hist { background: none; border: 0; border-radius: 0; }
#an-hist > .card-head { padding: 10px 0 0; justify-content: flex-start; align-items: center; gap: 12px; }
#an-hist > .card-head h2 { font-size: 15px; }
#an-hist > .card-body { padding: 12px 0 0; }
#an-hist .cols-2 { gap: 12px; }
#an-attr > .card-head h2 { font-size: 14px; }
#an-attr > .card-head .sub { font-size: 12px; font-weight: 600; }
#an-hist .cols-2 > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.an-ch-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; }
.an-ch-h .fund-note { font-size: 11px; font-weight: 400; }
.an-range { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 12px; border-radius: 16px; background: rgba(68, 126, 129, .12); font-size: 12.5px; color: var(--ink); }
.an-range > .fund-note { color: var(--muted); font-size: 12.5px; margin-right: 2px; }
.fund-page .an-range select { border: 0; background-color: transparent; min-height: 28px; height: 28px; padding: 0 24px 0 6px; font-weight: 600; font-size: 12.5px; box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232C5A5C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 6px center; }
/* segmented buttons: the selected one filled dark (tabs) */
.an-seg { border: 0; border-radius: 0; gap: 6px; overflow: visible; }
.an-seg button, .an-seg button + button { border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ch); padding: 7px 12px; font-size: 12.5px; font-weight: 500; }
.an-seg button.on { background: var(--ch); color: #fff; border-color: var(--ch); font-weight: 600; }
:root[data-theme="dark"] .an-seg button { color: var(--ink); }
:root[data-theme="dark"] .an-seg button.on { background: var(--mint); color: #10171A; border-color: var(--mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .an-seg button { color: var(--ink); } :root:not([data-theme="light"]) .an-seg button.on { background: var(--mint); color: #10171A; border-color: var(--mint); } }
.an-wbar.tot, .an-legend i.tot { background: var(--chart-ink); }
.an-wbar.up, .an-legend i.up { background: var(--mint); }
.an-wbar.down, .an-legend i.down { background: var(--red); }
/* waterfall (rp-wfv2): a dark baseline, narrower bars, bold end labels, round legend keys */
.an-wf { height: 260px; gap: 0; }
.an-wcb { border-bottom: 1.2px solid #333A3F; }
:root[data-theme="dark"] .an-wcb { border-bottom-color: var(--axis); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .an-wcb { border-bottom-color: var(--axis); } }
.an-wbar { left: 18%; right: 18%; border-radius: 3px 3px 0 0; }
.an-wc.tot .an-wbar { left: 14%; right: 14%; }
.an-wcl { color: var(--ink-2); font-size: 11px; margin-top: 0; padding-top: 7px; min-height: 40px; }
.an-wc.tot .an-wcl { font-weight: 700; color: var(--ink); }
.an-legend { font-size: 11px; margin-top: 6px; gap: 14px; align-items: center; }
.an-legend i { width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* ---------- companies ---------- */
label:has(> #an-cos-sort) { display: inline-flex; align-items: center; height: 36px; padding: 0 4px 0 14px; border-radius: 18px; background: rgba(68, 126, 129, .12); font-size: 13px; color: var(--muted); }
.fund-page label:has(> #an-cos-sort) select { border: 0; background-color: transparent; min-height: 30px; height: 30px; padding: 0 24px 0 6px; font-weight: 600; box-shadow: none; color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232C5A5C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 6px center; }
.an-logo { border: 0; }
.an-coc-row .moic-hi { color: inherit; }
/* company cards (coc): 14px padding, 10px between rows, 12.5px rows */
.an-coc { gap: 10px; padding: 14px; border-radius: 10px; border-color: var(--line); }
.an-coc:hover { border-color: var(--mint2); }
.an-coc-hd { margin-bottom: 0; }
.an-coc-row { font-size: 12.5px; }
.an-coc-row > span:first-child { color: var(--ink); }
.pill .dot { display: none; }

/* schedule of investments (soi-t): compact rows, mint group headers */
.fund-page .soi-t { font-size: 12px; }
.fund-page .soi-t th, .fund-page .soi-t td { padding: 8px 5px; vertical-align: middle; }
.fund-page .soi-t th:first-child, .fund-page .soi-t td:first-child { padding-left: 12px; }
.fund-page .soi-t th:last-child, .fund-page .soi-t td:last-child { padding-right: 12px; }
.fund-page .soi-t thead tr:last-child th { white-space: normal; line-height: 1.2; vertical-align: bottom; min-width: 42px; }
.fund-page .soi-t thead tr.grp th { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mint2); font-weight: 700; border-bottom: 2px solid var(--mint); padding: 10px 6px 5px; text-align: left; }
.fund-page .soi-t thead tr.grp th.blank { border-bottom: 0; }
.soi-t td.wrap { white-space: normal; line-height: 1.3; min-width: 104px; }
.soi-t td.wrap.st { min-width: 64px; }
.soi-t td.co, .soi-t td.co .fund-link { font-weight: 600; color: var(--ink); text-decoration: none; }
.soi-t .mb { font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.soi-t .mb.m2 { background: var(--mintd); color: #fff; }
.soi-t .mb.m1 { background: var(--mintl); color: var(--mint2); }
.soi-t .mb.mc { background: var(--line); color: var(--ink); }
.soi-t .mb.m0 { background: #FDE9E7; color: var(--red); }
.fund-page .soi-t tr.total td { border-top: 2px solid var(--ink); font-weight: 700; }
.soi-t .lm small { font-size: 10.5px; }

/* ---------- cash & runway: band cards with a coloured top edge ---------- */
/* band cards: a 4px coloured left edge (rb-red / rb-amber / rb-green / grey), as the portal */
.kpi.an-bandcard { border-left: 4px solid #6B7280; border-radius: 10px; }
.kpi.an-bandcard.red { border-left-color: #C0492F; } .kpi.an-bandcard.amber { border-left-color: #8C6E2E; } .kpi.an-bandcard.green { border-left-color: #2C5A5C; }
:root[data-theme="dark"] .kpi.an-bandcard.amber { border-left-color: #D4B373; } :root[data-theme="dark"] .kpi.an-bandcard.green { border-left-color: #6FA5A8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kpi.an-bandcard.amber { border-left-color: #D4B373; } :root:not([data-theme="light"]) .kpi.an-bandcard.green { border-left-color: #6FA5A8; } }
/* the "Live view" note is a mint callout */
.banner.work.an-live { background: var(--mintl); border-color: var(--mint); }
.an-rw-axis .fund-note:last-child { color: var(--ink); font-weight: 600; }
.an-rw-track { background: var(--bg); }

/* ---------- capital management ---------- */
.capital-big { color: var(--mint2); }
.fund-table .capital-item td:first-child { padding-left: 28px; }
.capital-after { margin: 6px 0 0; line-height: 1.45; }
.capital-head .btn-quiet { margin-left: auto; align-self: center; }

/* ---------- company page ---------- */
.company-finbar { display: grid; gap: 10px; margin: 0 0 10px; }
.company-finview { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#company-finform:empty { display: none; }
#company-exit .fund-table td { vertical-align: middle; }
#company-xform:empty { display: none; }
/* narrative: mint bullets (lpb), the Notion notes as a mint callout, no empty gaps */
#company-narr > .card-body.stack { gap: 10px; }
#company-narr-msg:empty { display: none; }
.fund-page .company-lpb { display: block; margin: 4px 0 2px; padding-left: 20px; list-style: none; font-size: 13.5px; }
.fund-page .company-lpb li { position: relative; margin: 0 0 10px; line-height: 1.55; color: var(--ink); }
.fund-page .company-lpb li:last-child { margin-bottom: 0; }
.fund-page .company-lpb li::before { content: ""; position: absolute; left: -16px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--mint2); }
.company-ghost .company-lpb li { color: var(--muted); }
.company-ghost .company-lpb li::before { background: #C5CAD3; }
.fund-page .company-notes { background: var(--mintl); border: 1px solid var(--mint); border-radius: 8px; padding: 12px; font-size: 12.5px; }
/* events beside NAV by quarter: the portal's grid2 (wider events column) */
@media (min-width: 1101px) { .fund-co-grid { grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr); } }
.company-fin td.ytd, .company-fin th.ytd { background: var(--mintl); }
.company-sect td { background: var(--bg); }

/* ---------- segmentation (sg2-*) ---------- */
.an-tile { gap: 2px; border-radius: 12px; }
.an-tile span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.an-tile b { font-size: 22px; font-weight: 600; color: var(--ink); }
.an-sec { border-top: 3px solid var(--mint); border-radius: 0 0 12px 12px; padding: 14px 16px; transition: transform .15s, box-shadow .15s; }
.an-sec:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 30, 50, .10); }
.an-sec-t b { font-size: 20px; font-weight: 600; color: var(--mint2); }
.an-sec-t b.moic-lo { color: var(--red); }

/* section headings with a short mint rule under them (sg2-h) */
.card.outhead.sg > .card-head { padding-bottom: 12px; }
.card.outhead.sg > .card-head h2 { position: relative; padding-bottom: 8px; }
.card.outhead.sg > .card-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 20px; height: 2px; background: var(--mint); }
.card.outhead.sg > .card-head h2 .sub { font-weight: 400; margin-left: 6px; }
.card.outhead > .card-body.bare { background: none; border: 0; border-radius: 0; padding: 0; }
.an-tile b { font-size: 22px; }
/* sector cards: 3 across, label rows with a rule (sg2-sec) */
.an-secs { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.an-sec { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--mint); }
.an-sec-t { align-items: baseline; }
.an-sec-t > span { font-size: 14px; font-weight: 600; }
.an-sec .fund-facts { grid-template-columns: 1fr auto; font-size: 12px; }
.an-sec .fund-facts dt { color: var(--muted); padding: 3px 0; border-bottom: 1px solid var(--line); }
.an-sec .fund-facts dd { padding: 3px 0; border-bottom: 1px solid var(--line); }
.an-sec .fund-facts dt:nth-last-of-type(1), .an-sec .fund-facts dd:nth-last-of-type(1) { border-bottom: 1px solid var(--line); }
.an-sh { gap: 3px; font-size: 11px; }
.an-sh > .fund-note { font-size: 11px; }
.an-shb i { height: 6px; border-radius: 0 3px 3px 0; } .an-shb i.cost { background: #333A3F; } .an-shb i.val { background: var(--mint); }
.an-shb em { color: var(--muted); min-width: 30px; }
.an-sectot { gap: 26px; background: var(--mintl); border-top: 2px solid var(--mint); border-bottom: 2px solid var(--mint); padding: 10px 16px; margin-top: 12px; color: var(--ink); }
/* NAV by perspective: joined pill tabs, rows in a panel */
.an-pseg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 0 0 12px; align-self: flex-start; }
.an-pseg button { border: 0; background: transparent; font: inherit; font-size: 12px; padding: 6px 14px; color: var(--muted); cursor: pointer; }
.an-pseg button.on { background: var(--mint); color: #fff; font-weight: 600; }
.an-persp { display: flex; flex-direction: column; }
.an-persp-head { font-size: 18px; margin: 4px 0 6px; }
.an-prows { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px; gap: 0; }
.an-prow { grid-template-columns: minmax(220px, 1.3fr) minmax(0, 2fr) 90px 60px; gap: 14px; padding: 9px 6px; border-bottom: 1px solid var(--line); border-radius: 6px; }
.an-prow:last-child { border-bottom: 0; }
.an-prow:hover, .an-prow.sel { background: var(--bg); }
.an-plb em { flex: 0 0 11px; height: 11px; border-radius: 3px; }
.an-pcos { white-space: normal; font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.an-pbr { height: 12px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.an-pbr i { border-radius: 6px; }
.an-prow > .num:nth-of-type(3) { font-weight: 600; font-size: 14px; }
.an-prow.tot { border-top: 2px solid var(--mint); background: var(--mintl); margin-top: 4px; border-radius: 6px; }
.an-prow.tot:hover { background: var(--mintl); }
@media (max-width: 820px) { .an-prow { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; } .an-prow .an-pbr, .an-prow > div:empty { display: none; } .an-mktl { grid-column: 1 / -1; } }
/* largest holdings: dark and mint bars, concentration strip below the panel */
.an-hbar { height: 8px; border-radius: 0 3px 3px 0; background: #333A3F; }
.an-hbar.val { background: var(--mint); }
.an-conc { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.an-cb { flex: 1; height: 20px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.an-cb > div { justify-content: center; background: #333A3F; color: #fff; padding: 0 6px; }
.an-cb > div.other { background: #C6DCDD; color: #1F3B3D; }
/* portfolio snapshot (snap): first band shaded, dashed band separators, small labels */
.an-g > .b0 { background: #EEF4F4; } .an-g > .b1, .an-g > .b2, .an-g > .b3 { background: transparent; }
.an-g > .bs { border-left: 1.5px dashed #8A93A8; }
:root[data-theme="dark"] .an-g > .b0 { background: rgba(111, 165, 168, .12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .an-g > .b0 { background: rgba(111, 165, 168, .12); } }
.an-rowline { border-bottom: 1px solid var(--line); }
.an-glab { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.an-bh { text-align: left; font-size: 11px; padding: 6px 6px 4px; white-space: nowrap; color: #3A3F47; }
.an-bh.b0 { color: var(--mint2); }
.an-bh small { display: inline; margin-left: 4px; }
.an-nm { font-size: clamp(8px, .68vw, 10.5px); line-height: 1.2; font-weight: 500; padding: 6px 3px; overflow: visible; text-overflow: clip; letter-spacing: -.1px; min-height: 38px; display: flex; align-items: flex-end; justify-content: center; }
.an-nm.foot { align-items: flex-start; color: var(--muted); font-weight: 400; min-height: 34px; }
.an-bc { height: 110px; padding: 0 5px; }
.an-bc span { font-size: 10px; font-weight: 600; margin-bottom: 3px; }
.an-bar { width: 100%; max-width: 34px; background: #2C5A5C; min-height: 2px; }
:root[data-theme="dark"] .an-bar { background: #6FA5A8; } :root[data-theme="dark"] .an-bh { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .an-bar { background: #6FA5A8; } :root:not([data-theme="light"]) .an-bh { color: var(--ink); } }
.an-val { font-size: 10.5px; padding: 4px 2px; }
.an-val.blue { color: inherit; }
.an-band-s { font-size: 10.5px; font-weight: 400; color: var(--muted); padding: 6px 2px; border-top: 2px solid var(--ch); white-space: nowrap; }
.an-band-s b { color: var(--ink); }

/* sector drill-down: the first card is the dark hero; uppercase table headers */
.an-sxkpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.an-sxkpis .kpi:first-child { background: var(--ch); border-color: var(--ch); color: #fff; }
.an-sxkpis .kpi:first-child :is(.label, .foot, .fund-note) { color: #B9C0D0; }
.an-sxkpis .kpi:first-child .value { color: #447E81; }
@media (max-width: 1000px) { .an-sxkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fund-page .an-sxt th { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.an-sxt td.moic-hi { font-weight: 700; color: var(--mint2); }
.an-wnil { left: 18%; right: 18%; border-top: 2px solid #C9CED8; }

/* ---------- fund metrics ---------- */
.metrics-reckpis { margin-bottom: 12px; }
.metrics-synchead { text-align: right; font-size: 11.5px; line-height: 1.4; max-width: 320px; }
.metrics-legend i.dn { background: var(--chart-down); }
.metrics-group td { background: var(--mintl); color: var(--mint2); }
.metrics-legend i.t { background: var(--chart-ink); }

/* ---------- exit view (xv-*) ---------- */
.an-xsc { border-color: var(--line); border-radius: 12px; padding: 14px 16px; gap: 2px; }
.an-xsc.on { border-color: var(--mint); box-shadow: inset 0 3px 0 var(--mint); }
.an-xsc:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.an-xk { font-size: 12px; color: var(--muted); font-weight: 500; }
.an-xv { font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.an-xm { font-size: 12.5px; color: var(--muted); }
.an-xm b { color: var(--ink); }
.an-xlad { min-height: 44px; border-bottom-color: var(--line); }
.an-xlad.an-xlh { color: var(--muted); border-bottom: 2px solid var(--ink); min-height: 0; }
.an-xlad:not(.an-xlh) .an-xn { font-weight: 600; }
.an-xlad:not(.an-xlh) > .num:nth-child(3) { font-weight: 600; }
.an-xlad:not(.an-xlh) > .num:nth-last-child(2) { color: var(--muted); }
.an-xlad.an-xlh > .num { white-space: normal; line-height: 1.2; }
/* exit timeline by year (xv-yr): a 2px rule under each year, the same fixed columns in every year */
.an-xyr { margin: 6px 0 0; }
.an-xyrh { justify-content: space-between; padding: 12px 0 6px; border-bottom: 2px solid var(--ink); }
.an-xyrh b { font-size: 15px; }
.an-xyrh span { font-size: 12.5px; color: var(--muted); }
.fund-page .an-xyr table { table-layout: fixed; font-size: 13px; }
.fund-page .an-xyr td { padding: 8px 6px; overflow: hidden; text-overflow: ellipsis; }
.fund-page .an-xyr td:first-child { padding-left: 0; width: 23%; }
.an-xyr td:nth-child(2) { width: 17%; color: var(--muted); }
.an-xyr td:nth-child(3) { width: 7%; } .an-xyr td:nth-child(4) { width: 8%; } .an-xyr td:nth-child(5) { width: 20%; } .an-xyr td:nth-child(6) { width: 10%; }
.fund-page .an-xyr td:last-child { padding-right: 0; white-space: normal; font-size: 12px; }
.an-xyr td:nth-child(2) .fund-note, .an-xyr td:first-child .fund-note { font-size: 11.5px; }
@media (max-width: 760px) { .an-xyr { overflow-x: auto; } .fund-page .an-xyr table { min-width: 720px; } }
.an-xmk { font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 20px; background: var(--goldl); color: var(--goldd); white-space: nowrap; }
.an-xyr td:last-child a.fund-note { color: var(--mint2); text-decoration: none; font-weight: 500; }
.an-xyr td:last-child a.fund-note:hover { text-decoration: underline; }
.an-xrng { background: var(--mintl); height: 10px; top: 4px; border-radius: 5px; }
.an-xbase { background: var(--mint); border: 2px solid var(--card); width: 14px; height: 14px; margin-left: -7px; top: 2px; }
.an-xwt { background: var(--gold); }
.an-xrq { background: var(--mint2); }
.an-seg:has([data-an-xzoom]) { display: inline-flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.an-seg:has([data-an-xzoom]) button, .an-seg:has([data-an-xzoom]) button + button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.an-seg:has([data-an-xzoom]) button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); border: 0; }

/* ---------- simulation ---------- */
.sim .sim-input { background: color-mix(in srgb, var(--mintl) 60%, var(--card)); border-color: color-mix(in srgb, var(--mint) 40%, var(--line)); }
.sim .sim-ask { color: var(--ink); font-weight: 600; font-size: 12.5px; }
.sim .sim-ask .fund-note { font-weight: 400; }
.sim .sim-show { gap: 8px; }
.sim .sim-show .btn-primary { background: var(--ch); color: #fff; }
:root[data-theme="dark"] .sim .sim-show .btn-primary { background: var(--mint); color: #10171A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sim .sim-show .btn-primary { background: var(--mint); color: #10171A; } }
.sim .sim-saved td.sim-acts { white-space: nowrap; }
.sim .sim-saved td.sim-when { white-space: normal; min-width: 110px; }
.sim .sim-saved .sim-wrap { min-width: 220px; }
.card.outhead > .card-head h2 .sim-lp-sub { line-height: 1.6; }
.sim .sim-kpi .value { white-space: normal; overflow-wrap: anywhere; }
.sim .sim-kpi.changed { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }

/* downloads: compact pack buttons; "All packs" is the dark button, as the portal */
.fund-page .dl-sm { padding: 5px 10px; font-size: 12px; }
.fund-page .btn-primary.dl-all { background: var(--ch); color: #fff; }
:root[data-theme="dark"] .fund-page .btn-primary.dl-all { background: var(--mint); color: #10171A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fund-page .btn-primary.dl-all { background: var(--mint); color: #10171A; } }
.dl-row .fund-pctl select { margin-left: 0; }

/* activity log: filter tabs and the quarter pill above the table panel */
.act-filters { margin: 0 0 12px; align-items: center; }
.act-tabs { gap: 6px; }
.fund-page .act-tab { font-size: 12.5px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.fund-page .act-tab.on { background: var(--ch); color: #fff; border-color: var(--ch); font-weight: 600; }
:root[data-theme="dark"] .fund-page .act-tab.on { background: var(--mint); color: #10171A; border-color: var(--mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fund-page .act-tab.on { background: var(--mint); color: #10171A; border-color: var(--mint); } }
.act-pagerbox { margin-top: 10px; }

/* labelled selects in a page bar look like the portal's pill controls (pctl) */
label.fund-note:has(> #act-rq) { display: inline-flex; align-items: center; height: 36px; padding: 0 4px 0 14px; border-radius: 18px; background: rgba(68, 126, 129, .12); font-size: 13px; color: var(--muted); }
.fund-page label.fund-note:has(> #act-rq) select { border: 0; background-color: transparent; min-height: 30px; height: 30px; padding: 0 24px 0 6px; font-weight: 600; box-shadow: none; color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232C5A5C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 6px center; }

/* "?" help: dark round button with a mint mark, as the portal */
.company-help { background: var(--ch); border-color: var(--ch); color: var(--mint); font-size: 12px; font-weight: 700; }
.company-help:hover { color: #8FC1C3; }
.company-drawer { background: var(--card); border-left-color: var(--line); box-shadow: -8px 0 30px rgba(0, 0, 0, .12); padding: 20px 22px; }
.company-drawer p, .company-drawer li { font-size: 13px; line-height: 1.55; }

/* ---------- listed company: market data panel (pmA) ---------- */
.market { padding: 0; overflow: hidden; --pmt-bg: #F2F7F7; --pmt-ink: #173F41; --pmt-track: #CFE2E2; }
:root[data-theme="dark"] .market { --pmt-bg: #1E2A2C; --pmt-ink: #9CE0DE; --pmt-track: #2F4446; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .market { --pmt-bg: #1E2A2C; --pmt-ink: #9CE0DE; --pmt-track: #2F4446; } }
.market-head { background: #173F41; color: #fff; padding: 18px 20px; align-items: flex-end; border-bottom: 0; }
.market-tag { color: #B9D7D8; }
.market-tag .fund-note { color: #B9D7D8; }
.market-tk { font-weight: 700; color: #fff; background: rgba(255, 255, 255, .12); border: 0; padding: 3px 9px; border-radius: 6px; letter-spacing: .04em; }
.market-px { align-items: baseline; gap: 12px; }
.market-px b { font-size: 36px; line-height: 1; font-weight: 700; color: #fff; }
.market-px span { font-size: 13px; color: #B9D7D8; }
.market-chg { font-size: 12.5px; padding: 3px 10px; border-radius: 12px; }
.market-chg.dn { background: #4A2A24; color: #FFC4B6; }
.market-chg.up { background: #1E5254; color: #B8EDEC; }
.market-head > div:first-child .fund-note, .market-head .market-px ~ * { color: #B9D7D8; }
.market-stake { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 12px 16px; min-width: 200px; text-align: left; gap: 2px; }
.market-stake span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #B9D7D8; }
.market-stake b { font-size: 24px; color: #9CE0DE; }
.market-stake em { font-size: 11.5px; color: #B9D7D8; }
.market-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); padding: 16px 20px 4px; }
.market-tile { background: var(--pmt-bg); border: 0; border-radius: 10px; padding: 12px 14px; gap: 3px; }
.market-tile span { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.market-tile b { font-size: 19px; color: var(--pmt-ink); }
.market-tile em { font-size: 11.5px; }
.market-rng { height: 6px; border-radius: 3px; background: var(--pmt-track); }
.market-rng i { top: -4px; width: 4px; height: 14px; border-radius: 2px; background: var(--pmt-ink); margin-left: -2px; }
.market-bar { font-size: 14px; }
.market-finnote { margin-top: 6px; line-height: 1.45; }
.market-seg { display: flex; gap: 4px; padding: 3px; background: var(--pmt-bg); border: 0; border-radius: 9px; }
.market-seg button { font-size: 12px; padding: 7px 12px; border-radius: 7px; background: transparent; color: var(--ink); min-height: 32px; }
.market-seg button.on { background: #173F41; color: #fff; font-weight: 600; }
