/* firms page styles (redesign lane, 10/24). Uses tokens from ../style.css only. */
.tdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; flex: none; }
#firms .sec-head, #compare .sec-head { padding-block: 72px 28px; }

/* list: controls */
#firms .controls { gap: 12px; margin-block: 0 14px; }
#firms input.search { border-radius: 6px; border: 1px solid var(--rule); background: var(--bg); font-size: 16px; padding: 11px 14px; }
#firms input.search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
#firms .chips { margin-bottom: 28px; gap: 6px; }
#firms .chip { display: inline-flex; align-items: center; white-space: nowrap; }

/* list: table on the page, no box */
#firms .tablewrap, #compare .tablewrap { background: none; border-radius: 6px; overflow-x: auto; border-top: 1px solid var(--hair); }
#firms table, #compare table { font-size: 15px; font-variant-numeric: tabular-nums; }
#firms th, #compare th { background: var(--bg); font-size: 12px; font-weight: 500; color: var(--ink3); padding: 12px 14px; border-bottom: 1px solid var(--rule); letter-spacing: .01em; }
#firms td, #compare td { padding: 14px; border-bottom: 1px solid var(--hair); }
#firms th:first-child, #firms td:first-child, #compare th:first-child, #compare td:first-child { padding-left: 0; }
#firms th:last-child, #firms td:last-child { padding-right: 0; }
#firms tbody tr.click:hover td { background: color-mix(in srgb, var(--surface) 70%, transparent); }
#firms a.fname { color: var(--ink); font-weight: 600; }
#firms tr.click:hover a.fname { color: var(--accent-ink); text-decoration: underline; }
#firms td .sub { display: flex; align-items: center; margin-top: 2px; font-size: 13px; color: var(--ink3); }
#firms td .sub.rng { display: block; }
#firms .zero, #compare .zero, .chart .zero { color: var(--ink3); }
.chart text.val.zero { fill: var(--ink3); font-weight: 400; }
#firms .more { padding-block: 24px; }

/* firm page: header */
#firms .firm-head { padding-block: 40px 28px; align-items: flex-end; gap: 16px 32px; }
#firms .fh-main { display: grid; gap: 12px; min-width: 0; }   /* 10/31 review: a wide table scrolls inside its box, not the page */
#firms .back { color: var(--ink2); }
#firms .firm-head h2 { font-size: var(--t-display); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; }
#firms .facts { gap: 6px 22px; font-size: 14px; color: var(--ink2); }
#firms .facts span:first-child { display: inline-flex; align-items: center; color: var(--ink); }
#firms .firm-head { flex-wrap: wrap; }

/* firm page: stat row on the page */
#firms .statrow { grid-template-columns: 1.5fr 1fr 1fr; gap: 24px; border-top: 1px solid var(--hair); padding-block: 24px 12px; margin: 0; }
#firms .stat { background: none; border-radius: 0; padding: 0; gap: 4px; align-content: start; }
#firms .stat .v { font-size: var(--t-num2); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
#firms .stat .v small { font-size: .5em; font-weight: 600; color: var(--ink2); letter-spacing: 0; }
#firms .stat.lead .v { font-size: var(--t-num); }
#firms .stat .l { font-size: 15px; margin-top: 4px; }
#firms .fh-total { font-size: 14px; color: var(--ink3); margin: 0 0 40px; cursor: pointer; }
#firms .fh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 4px; }
#firms .stat .r { font-size: 13px; color: var(--ink3); }

/* firm page: exhibits and lists sit on the page, hairline above */
#firms .exhibit, #compare .exhibit { border-top: 1px solid var(--hair); padding-top: 24px; gap: 12px; }
#firms .grid2, #compare .grid2 { gap: 24px 56px; }
#firms .peerx, #compare .peerx { margin-top: 0; margin-bottom: 40px; }
#firms .firm-head + .statrow ~ .peerx { margin-top: 0; }
#firms .grid2 + .peerx { margin-top: 40px; }
#firms .lists { margin-top: 48px; gap: 32px 56px; }
#firms .lst { border-top: 1px solid var(--hair); padding-top: 24px; min-width: 0; }
#firms .lst h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 14px; }
#firms h4, #firms .fp-h { font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }
#firms .lst ul.plain { gap: 0; }
#firms .lst ul.plain li { padding-block: 12px; gap: 3px; }
#firms .lst ul.plain li:first-child { padding-top: 0; }
#firms .lst ul.plain li b { font-weight: 600; }
#firms .lst .small { color: var(--ink2); }
#firms .fnote { margin-top: 16px; }

/* compare */
#compare .cwf { margin-bottom: 0; }
#compare .ex-title a { color: var(--ink); }
#compare .ex-title a:hover { color: var(--accent-ink); }
#compare .cmptable { margin-top: 48px; }
#compare th { color: var(--ink); font-size: 14px; font-weight: 600; }
#compare th a { color: var(--ink); }
#compare th a:hover { color: var(--accent-ink); }
#compare td.rl { color: var(--ink3); font-size: 13px; white-space: nowrap; padding-right: 20px; }
#compare td .sub { display: block; font-size: 13px; color: var(--ink3); }
#compare .cmprm { margin-top: 24px; }

/* tray */
#tray { background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--rule); }

@media (max-width: 860px) {
  #firms .statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  #firms .stat.lead { grid-column: 1 / -1; }
  #firms .lists { margin-top: 40px; }
}
@media (max-width: 600px) {
  #firms .sec-head, #compare .sec-head { padding-block: 40px 20px; }
  #firms .firm-head { padding-block: 24px 20px; }
  #firms td .sub { white-space: normal; }
}

/* compare: empty state */
#compare.on { min-height: calc(100vh - 140px); }
#compare .cmp-empty { border-top: 1px solid var(--hair); padding-top: 8px; }
#compare .ce-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
#compare .ce-col { display: grid; gap: 4px; padding-block: 18px; border-bottom: 1px solid var(--hair); color: var(--ink3); }
#compare .ce-n { font-size: 12px; letter-spacing: .01em; }
#compare .ce-v { font-size: 15px; }
#compare .ce-col.has .ce-v, #compare .ce-col.has .ce-v a { color: var(--ink); font-weight: 600; }
#compare .ce-hint { margin-top: 20px; font-size: 14px; color: var(--ink2); }
#compare .ce-hint a { color: var(--accent-ink); }
@media (max-width: 600px) { #compare .ce-cols { grid-template-columns: 1fr; } #compare.on { min-height: calc(100vh - 120px); } }
#firms #fp .lbl { paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
@media (max-width: 600px) { #firms .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } #firms .chip { flex: none; } #firms .firm-head button.btn { justify-self: start; } }

/* owners filed with the SEC (owners pilot) */
#firms .filed-panel .grid2 { gap: 0 32px; }
#firms .filed-panel .fp-h { font-size: 13px; font-weight: 600; color: var(--ink2); margin: 16px 0 8px; }
#firms .filed-panel .tiny { margin-top: 12px; }

/* where-the-numbers-come-from card and the firm's own figures */
#firms .srcs, #firms .theysay { border-top: 1px solid var(--hair); padding-top: 16px; margin-top: 8px; }
#firms .srcs summary { cursor: pointer; font-weight: 600; font-size: 15px; }
#firms .srcs .tablewrap { margin-top: 10px; }
#firms .stat[data-src] { cursor: pointer; }
#firms .stat[data-src]:hover .l { text-decoration: underline; text-underline-offset: 3px; }
#firms .theysay h3 { margin-bottom: 6px; }
/* phones: each source row stacks, figure first, then the quote and link full width */
@media (max-width: 600px) {
  #firms .srcs tr, #firms .theysay tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding-block: 10px; border-bottom: 1px solid var(--hair); }
  #firms .srcs td, #firms .theysay td { padding: 0; border: 0; }
  #firms .srcs td.small, #firms .theysay td.small { grid-column: 1 / -1; overflow-wrap: anywhere; }
}

/* firm page stat tiles: zero or missing reads quiet */
#firms .stat .v .zero { font-size: inherit; font-weight: 700; }
#firms .fh-sum { font-size: var(--t-lede); line-height: 1.35; color: var(--ink); max-width: 760px; text-wrap: balance; }

/* shortcut row, show-all buttons */
#firms .jump { font-size: 14px; color: var(--ink3); }
#firms .jump a { display: inline-block; padding-block: 6px; color: var(--accent-ink); }
#firms .jump a:hover { text-decoration: underline; }
#firms [id^="s-"] { scroll-margin-top: 72px; }
#firms [hidden] { display: none !important; }
#firms .showall { margin-top: 12px; }
@media (max-width: 600px) { #firms .jump a { padding-block: 12px; } #firms .showall { min-height: 44px; } }

#firms .back { color: var(--ink2); font-size: 14px; padding-block: 6px; }
@media (max-width: 600px) { #firms .back { padding-block: 12px; } }
#firms .legend .band-sw { background: color-mix(in srgb, var(--ink) 10%, transparent); border: 1px solid var(--hair); }
#firms #fp .lbl { font-size: 13px; }

/* adjusted years sit behind a summary */
#firms details.adj summary { cursor: pointer; font-size: 12px; color: var(--accent-ink); }
#firms details.adj[open] summary { margin-bottom: 4px; }

/* sortable column headers */
#firms th button.sorth { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
#firms th button.sorth:hover { color: var(--ink); }
#firms th[aria-sort] button.sorth { color: var(--ink); font-weight: 600; }
#firms th .caret { display: inline-block; min-width: 1em; margin-left: 2px; }
#firms .sortlab { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); }
#firms .fcount { margin-top: 10px; font-size: 15px; color: var(--ink2); }

/* compare table: numbers line up on the right */
#compare td.n, #compare th.n { text-align: right; font-variant-numeric: tabular-nums; padding-left: 14px; padding-right: 14px; }
#compare td.n .sub { text-align: right; }

/* the compare tray's "holds 4 firms" note sits just above the bar */
#tray .cmpnote { position: absolute; left: var(--gut); bottom: calc(100% + 8px); background: var(--tip); color: var(--tip-ink); font-size: 14px; padding: 9px 12px; border-radius: 6px; max-width: calc(100vw - 32px); }

/* list rows on phones: name with its type dot, then one summary line. No sideways scrolling. */
#firms .tdot.m, #firms .mline { display: none; }
#firms .why::before { content: " \00b7 "; }
@media (max-width: 600px) {
  #firms #firm-list .tablewrap { overflow-x: visible; }
  #firms #firm-list table, #firms #firm-list tbody { display: block; }
  #firms #firm-list thead { display: none; }
  #firms #firm-list tr.click { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; border-bottom: 1px solid var(--hair); padding-block: 4px; }
  #firms #firm-list tr.click td { display: none; padding: 12px 0; border: 0; }
  #firms #firm-list tr.click td:first-child { display: block; }
  #firms #firm-list tr.click td:last-child { display: block; padding: 0; }
  #firms #firm-list tbody tr.click:hover td { background: none; }
  #firms .tdot.m { display: inline-block; }
  #firms td .sub { margin-top: 0; }
  #firms td .sub .tdot, #firms td .sub .st { display: none; }
  #firms td .sub .why { display: block; }
  #firms .why::before { content: none; }
  #firms .mline { display: block; margin-top: 3px; font-size: 14px; color: var(--ink2); font-variant-numeric: tabular-nums; }
  #firms td .act.cmp { min-height: 44px; min-width: 44px; }
  #firms #firm-list tr:not(.click) td { display: block; }
}

/* robo-advisors: wealth panel, the Vanguard slice line, "Not available" lines */
#firms .wealth { margin-top: 40px; }
#firms .wealth td, #firms .wealth th { vertical-align: top; }
#firms .na { margin: 0; padding-block: 8px; }
#firms .robo-slice, #firms #robonote { max-width: 760px; }

@media (max-width: 420px) {   /* the firm page "Wealth levels" table stacks on phones, like the Method tables (round 1 review) */
  #s-wealth .tablewrap thead { display: none; }
  #s-wealth table, #s-wealth tbody, #s-wealth tbody tr, #s-wealth tbody td { display: block; width: 100%; text-align: left; }
  #s-wealth tbody tr { padding: 10px 0; border-bottom: 1px solid var(--hair); }
  #s-wealth tbody td { border: 0; padding: 2px 0; }
  #s-wealth tbody td[data-l]:not(:first-child)::before { content: attr(data-l) ": "; color: var(--ink3); font-size: 12px; }
}

/* a number a bank cannot report: shown as words, with the reason on hover */
.nr { color: var(--ink2); font-style: italic; cursor: help; border-bottom: 1px dotted var(--ink3, currentColor); }

/* 10/30: newer-filing box, owned-by line, step key under the growth chart, not-ranked note */
#firms .newer { margin-top: 20px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; max-width: 760px; }
#firms .newer h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
#firms .newer p { font-size: 15px; line-height: 1.5; color: var(--ink); }
#firms .newer .tablewrap { margin-top: 12px; border-top: 0; }
#firms .newer table { width: 100%; }
#firms .newer th { white-space: normal; }
#firms .owned b { font-weight: 600; color: var(--ink); }
#firms .exhibit.wide { margin-top: 40px; }
#firms ul.stepkey { margin-top: 14px; gap: 0; }
#firms ul.stepkey li { display: grid; grid-template-columns: 12px minmax(0, 15em) auto 1fr; align-items: baseline; column-gap: 10px; padding-block: 7px; border-top: 1px solid var(--hair); }
#firms ul.stepkey li i { width: 10px; height: 10px; border-radius: 3px; align-self: center; }
#firms ul.stepkey li b { font-weight: 600; }
#firms ul.stepkey li .n { font-variant-numeric: tabular-nums; }
#firms ul.stepkey li .small { color: var(--ink2); }
#firms .notrank { margin-top: 12px; }
