.fof-ledger .fof-ledger-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 0 0 16px;
}
.fof-ledger .fof-ledger-heading :is(h2, h3) { margin: 3px 0 0; color: var(--fof-ink); line-height: 1.2; }
.fof-ledger .fof-ledger-heading h2 { font-size: 27px; font-weight: 640; }
.fof-ledger .fof-ledger-context, .fof-ledger .fof-ledger-footnote {
  margin: 6px 0 0;
  color: var(--fof-muted);
  font-size: 12px;
  line-height: 1.5;
}
.fof-ledger .fof-ledger-footnote { margin-top: 14px; }
.fof-ledger .fof-ledger-empty { height: 80px; text-align: center; color: var(--fof-muted); }
.fof-pnl-detail-title, .fof-pnl-heading-actions, .fof-ledger .fof-pnl-detail-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px 16px;
}
.fof-pnl-detail-title { align-items: baseline; }
.fof-ledger .fof-pnl-detail-title .fof-ledger-context { margin: 0; font-size: 11px; }
.fof-ledger .fof-pnl-detail-controls {
  flex: none; margin: 0 0 12px; padding: 9px 0 0; border-top: 1px solid var(--fof-line);
}
.fof-ledger .fof-pnl-detail-controls > label {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0;
  background: transparent; color: var(--fof-muted); font-size: 11px; font-weight: 500;
}
.fof-pnl-detail-controls select {
  width: auto; max-width: 19em; height: 30px; min-height: 30px; margin: 0;
  padding: 3px 24px 3px 9px; border: 1px solid var(--fof-line); border-radius: 6px;
  background-color: transparent; color: var(--fof-ink); font: 500 12px/1.4 var(--font-ui);
}
.fof-pnl-detail-controls [data-fof-pnl-reset] {
  border: 0; padding: 3px; min-height: 26px; color: var(--fof-accent); font-size: 11px;
  background: transparent; box-shadow: none; cursor: pointer;
}
.fof-pnl-detail-controls [hidden] { display: none; }
.fof-ledger .fof-pnl-search {
  position: relative; display: flex; align-items: center; width: 177px; max-width: 100%; height: 30px; margin: 0 0 0 auto;
  border: 0; border-bottom: 1px solid var(--fof-line); border-radius: 0; background: transparent; color: var(--fof-muted);
}
.fof-pnl-search::before, .fof-pnl-search::after { position: absolute; pointer-events: none; content: ""; }
.fof-pnl-search::before { left: 2px; top: 8px; width: 7px; height: 7px; border: 1.4px solid currentColor; border-radius: 50%; }
.fof-pnl-search::after { left: 9px; top: 17px; width: 5px; height: 1.4px; background: currentColor; transform: rotate(45deg); }
.fof-ledger .fof-pnl-search:focus-within { color: var(--fof-accent); border-color: var(--fof-accent); }
.fof-ledger .fof-pnl-search input {
  flex: 1; min-width: 0; width: 100%; height: 100%; min-height: 0; padding: 0 3px 0 21px;
  border: 0; border-radius: 0; outline: 0; box-shadow: none; background: transparent;
  color: var(--fof-ink); font: 450 12px/1.5 var(--font-ui);
}
.fof-pnl-search input::placeholder { color: var(--fof-muted); }
.fof-pnl-detail-controls :is(select, button):focus-visible { outline: 2px solid var(--fof-accent); outline-offset: 1px; }

.fof-ledger .fof-pnl-segment {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px;
  border: 1px solid var(--fof-line); border-radius: 8px; background: #f8faf8;
}
.fof-ledger .fof-pnl-segment button {
  min-height: 26px; margin: 0; padding: 4px 10px; border: 0; border-radius: 5px;
  color: var(--fof-muted); font-size: 12px; font-weight: 500; background: transparent; box-shadow: none;
}
.fof-ledger .fof-pnl-segment button[aria-pressed="true"] {
  color: white; background: var(--fof-accent); box-shadow: none;
}
.fof-library-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.fof-library-heading { flex: none; }
.fof-library-edit-note { margin-inline-start: 10px; padding-inline-start: 10px; border-inline-start: 1px solid var(--fof-line); }
.fof-library-section > .table-wrap {
  border: 1px solid var(--fof-line);
  border-radius: 14px;
  background: var(--surface-strong);
}
html.is-fof-contained-scroll .fof-library-section > .table-wrap .fof-library-table thead th {
  color: var(--fof-muted);
  background: var(--fof-wash);
  box-shadow: inset 0 -1px var(--fof-line);
}
.fof-library-table th[aria-sort] .fof-adviser-sort,
.fof-library-table th[aria-sort] .fof-adviser-sort span { color: var(--fof-accent); opacity: 1; }
.fof-ledger .fof-library-section.is-editing .fof-library-table { min-width: 1370px; }
.fof-library-book {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  border: 1px solid var(--fof-line); border-radius: 14px; background: var(--surface-strong);
}
.fof-library-viewbar {
  flex: none; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 4px 14px; padding: 8px 14px; border-bottom: 1px solid var(--fof-line);
}
.fof-library-nav-key { color: var(--fof-muted); font-size: 11px; }
.fof-library-viewbar button:focus-visible { outline: 2px solid var(--fof-accent); outline-offset: 1px; }
.fof-library-book[data-view="terms"] .fof-library-nav-key { display: none; }
.fof-library-book .fof-book-wrap { min-height: 0; max-height: none; border: 0; border-radius: 0; overscroll-behavior: contain; }
.fof-library-book .fof-book-table { min-width: 630px; table-layout: fixed; }
.fof-library-book th.fof-book-rank { width: 3.8%; }
.fof-library-book th.fof-book-fund { width: 22%; }
.fof-library-book th.fof-book-strategy { width: 13%; }
.fof-library-book .fof-library-nav { width: 16%; text-align: center; }
.fof-library-book th.fof-library-open { width: 15%; }
.fof-library-book th.fof-library-lock { width: 7%; }
.fof-library-book th.fof-library-fees { width: 23%; }
.fof-library-book td.fof-book-terms { white-space: pre-line; }
.fof-library-book .fof-book-table :is(th, td):last-child { padding-inline-end: 15px; }
.fof-library-book .fof-book-table tr { cursor: default; }
.fof-library-book .fof-library-risk-toggle {
  display: grid; gap: 1px; width: 100%; padding: 0; border: 0; border-radius: 3px;
  box-shadow: none; background: transparent; text-align: left; white-space: normal; overflow-wrap: anywhere;
  font: 500 13px/1.4 var(--font-ui); cursor: pointer;
}
.fof-library-book .fof-library-risk-toggle small { color: var(--fof-muted); font-size: 10px; font-weight: 400; }
.fof-library-book :is(.is-risk-watch .fof-library-risk-toggle,.fof-library-risk-toggle:hover) { color: #a53659; }
.fof-library-nav-preview { display: inline-flex; vertical-align: middle; width: min(100%, 116px); cursor: help; }
.fof-library-nav-preview svg { display: block; width: 100%; height: 26px; fill: none; }
.fof-library-nav-preview line { stroke: var(--fof-line); stroke-width: .7; }
.fof-library-nav-preview polyline { stroke: #58806e; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.fof-library-book .fof-vol-display.has-basis small { display: block; color: #836746; font-size: 10px; font-weight: 400; }
.fof-library-missing, .fof-library-book .is-insufficient { color: var(--fof-muted); }
.fof-library-empty { margin: 0; padding: 25px; color: var(--fof-muted); text-align: center; }
.fof-library-table:has(tbody tr) + .fof-library-empty { display: none; }

.fof-ledger .fof-holdings-body { gap: 20px; }
.fof-pnl-overview-section { grid-template-columns: minmax(210px, .8fr) minmax(530px, 2fr); padding-block: 18px; }
.fof-ledger .fof-pnl-overview { display: grid; grid-template-columns: 1.12fr 1fr 1fr; gap: 0; }
.fof-ledger .fof-pnl-metric, .fof-ledger .fof-pnl-metric + .fof-pnl-metric {
  gap: 4px; padding: 3px 16px; border-left: 1px solid var(--fof-line); border-radius: 0; background: transparent;
}
.fof-ledger .fof-pnl-metric > span { color: var(--fof-muted); font-size: 12px; }
.fof-ledger .fof-pnl-metric > strong { font-size: clamp(24px, 1.75vw, 30px); font-weight: 560; line-height: 1.3; white-space: nowrap; }
.fof-ledger .fof-pnl-metric:first-child > strong { font-size: clamp(28px, 2.05vw, 35px); }
.fof-ledger .fof-pnl-metric > small { color: var(--fof-muted); font-size: 11px; }
.fof-ledger .fof-pnl-scope {
  grid-column: 1/-1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px;
  margin: 0; padding: 9px 0 0; border-top: 1px solid var(--fof-line); color: var(--fof-muted); font-size: 11px;
}
.fof-ledger .fof-pnl-scope details { max-width: 880px; }
.fof-ledger .fof-pnl-scope summary { color: var(--fof-accent); }
.fof-ledger .fof-pnl-scope p { margin: 6px 0 0; line-height: 1.6; }
.fof-ledger .fof-ledger-attribution-scroll { overflow-x: auto; }
.fof-ledger .fof-ledger-attribution { width: 100%; min-width: 620px; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.fof-ledger .fof-ledger-attribution :is(th, td) { padding: 7px 12px; text-align: right; border-bottom: 1px solid var(--fof-line); font-variant-numeric: tabular-nums; }
.fof-ledger .fof-ledger-attribution thead th { font-size: 11px; font-weight: 550; color: var(--fof-muted); background: var(--fof-wash); }
.fof-ledger .fof-ledger-attribution tr > :first-child { width: 19%; text-align: left; font-weight: 500; }
.fof-ledger .fof-ledger-attribution tr > :nth-child(2) { width: 30%; }
.fof-ledger .fof-ledger-attribution .fof-pnl-total { font-weight: 650; }
.fof-ledger .fof-ledger-attribution tbody tr:last-child > * { border-bottom: 0; }
.fof-ledger .fof-pnl-range-heading { text-align: left; }
.fof-ledger .fof-pnl-range-heading span { display: inline-block; width: 33.333%; text-align: center; font-weight: 400; }
.fof-ledger .fof-pnl-range-heading span:first-child { text-align: left; }
.fof-ledger .fof-pnl-range-heading span:last-child { text-align: right; }
.fof-ledger .fof-ledger-attribution .fof-pnl-track { display: block; height: 17px; }
.fof-ledger .fof-ledger-attribution .fof-pnl-track i { height: 7px; top: 5px; }
.fof-ledger .fof-redemption-section > .table-wrap { border-radius: 10px; border: 1px solid var(--fof-line); }
.fof-ledger table.fof-redemption-table.is-readonly { min-width: 1100px; }

.fof-ledger .fof-ledger-owner::before {
  display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--product-color); content: "";
}
.fof-ledger .fof-ledger-owner { display: inline-flex; align-items: center; gap: 5px; }
.fof-ledger .fof-transaction-scroll { overflow: auto; max-height: min(72vh, 760px); border-radius: 10px; border: 1px solid var(--fof-line); }
.fof-ledger .fof-ledger-transactions { width: 100%; min-width: 1190px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font: inherit; font-size: 12px; }
.fof-ledger-transactions .tx-rank { width: 3.5%; } .fof-ledger-transactions .tx-owner { width: 6%; }
.fof-ledger-transactions .tx-fund { width: 12%; } .fof-ledger-transactions .tx-type { width: 8%; }
.fof-ledger-transactions .tx-date { width: 7%; } .fof-ledger-transactions .tx-money { width: 9.5%; }
.fof-ledger-transactions .tx-shares { width: 8.5%; } .fof-ledger-transactions .tx-status { width: 7%; }
.fof-ledger-transactions .tx-note { width: 15%; }
.fof-ledger .fof-ledger-transactions :is(th, td) {
  box-sizing: border-box; width: auto; min-width: 0; max-width: none; white-space: nowrap; overflow: hidden;
  padding: 6px 8px; border: 0; border-bottom: 1px solid var(--fof-line); text-overflow: ellipsis; text-align: left;
}
.fof-ledger .fof-ledger-transactions thead { position: sticky; top: 0; z-index: 1; }
.fof-ledger .fof-ledger-transactions th {
  position: static; height: 27px; padding-block: 4px; background: var(--fof-wash); color: var(--fof-muted); font-weight: 550; font-size: 11px;
}
.fof-ledger .fof-ledger-transactions th[colspan] { text-align: center; border-left: 1px solid var(--fof-line); }
.fof-ledger .fof-ledger-transactions tbody td { height: 36px; font-variant-numeric: tabular-nums; }
.fof-ledger .fof-ledger-transactions tbody tr:hover { background: #f7faf7; }
.fof-ledger .fof-ledger-transactions tbody td:first-child { text-align: center; color: var(--fof-muted); }
.fof-ledger .fof-ledger-transactions tbody td:nth-child(n+5):nth-child(-n+7),
.fof-ledger .fof-ledger-transactions thead tr:nth-child(2) th:nth-child(-n+3) { text-align: center; }
.fof-ledger .fof-ledger-transactions tbody td:nth-child(n+8):nth-child(-n+10),
.fof-ledger .fof-ledger-transactions thead tr:nth-child(2) th:nth-child(n+4) { text-align: right; }
.fof-ledger .fof-ledger-transactions td:nth-child(5), .fof-ledger .fof-ledger-transactions td:nth-child(8) { border-left: 1px solid var(--fof-line); }
.fof-ledger .fof-ledger-transactions .transaction-fund { color: var(--fof-ink); font-weight: 530; }
.fof-ledger .fof-ledger-transactions td:last-child { color: var(--fof-muted); }
@media (max-width: 1000px) {
  .fof-pnl-overview-section { grid-template-columns: 1fr; }
  .fof-ledger .fof-pnl-metric:first-child { grid-column: auto; padding-left: 0; border-left: 0; }
}
