/* Fund Costs follows DESIGN.md and shares the app's light/dark tokens. */
.fund-costs { container: fund-costs / inline-size; color: var(--ink); font-size: 14px; }
.fund-costs h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -.2px; }
.fc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.fc-stat { padding: 18px 20px; background: var(--surface-card); border: 1px solid var(--hairline); border-radius: 10px; }
.fc-label { color: var(--body); font-size: 12px; }
.fc-value { margin: 6px 0 2px; font-size: 29px; font-weight: 400; line-height: 1.3; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.fc-context { color: var(--muted); font-size: 12px; }
.fc-panel { min-width: 0; background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.fc-panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px 20px 16px; }
/* The tables take the app's table look, as the Intraday holdings table does: uppercase headers, rows that open details. */
.fc-table-wrap { overflow: auto; padding: 0 20px 8px; }
.fc-table td { vertical-align: middle; }
.fc-table .num { white-space: nowrap; }
.fc-symbol { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fc-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; background: var(--surface-strong); color: var(--body); font-size: 11px; font-weight: 400; white-space: nowrap; }
.fc-fund-name { color: var(--muted); font-size: 13px; }
.fc-secondary-grid { --fc-card-height: 560px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; align-items: stretch; }
.fc-secondary-grid > .fc-panel { display: flex; flex-direction: column; height: var(--fc-card-height); overflow: hidden; }
.fc-secondary-grid > .fc-panel > * { flex-shrink: 0; }
.fc-secondary-grid > .fc-panel > .fc-fill { flex: 1 1 0; min-height: 0; overflow: auto; }
.fc-fee-table thead { position: sticky; top: 0; z-index: 1; }
.fc-fee-table th { background: var(--surface-card); }
.fc-compare-controls { padding: 0 20px 16px; }
.fc-compare-controls label { display: block; margin: 0 0 7px; color: var(--body); font-size: 12px; }
.fc-compare-controls select { min-height: 40px; height: auto; padding: 8px 30px 8px 11px; border-color: var(--hairline); border-radius: 7px; font-size: 13px; }
.fc-index-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 13px; color: var(--body); font-size: 12px; }
.fc-index-name { color: var(--ink); font-weight: 500; }
.fc-fee-table .fc-fund-name { max-width: 190px; font-size: 12px; }
tr.fc-held-row td { background: var(--canvas-soft); }
.fc-match { margin-top: 5px; font-size: 11px; color: var(--body); font-weight: 500; }
.fc-match[data-match="same_index"] { color: var(--ink); }
.fc-peer-detail { max-width: 240px; margin-top: 3px; font-size: 11px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.fc-discovery { padding: 0 20px 10px; color: var(--muted); font-size: 12px; }
.fc-discovery:empty { display: none; }
.fc-discovery button { height: auto; padding: 2px 6px; font-size: 12px; }
.fc-comparison-note { padding: 10px 20px; border-top: 1px solid var(--hairline-soft); color: var(--muted); font-size: 11px; line-height: 1.5; }
button.fc-relevance { height: auto; padding: 5px 8px; font-size: 11px; font-weight: 400; color: var(--body); background: transparent; border-color: var(--hairline); }
button.fc-relevance[aria-pressed="true"] { color: var(--ink); background: var(--canvas-soft); }
.fc-empty { padding: 20px; color: var(--muted); font-size: 13px; }
.fc-empty-title { margin-bottom: 5px; color: var(--ink); font-weight: 500; }
.fc-empty p { margin: 5px 0; font-size: 12px; }
.fc-matrix-head { padding-bottom: 13px; }
.fc-heading-help { display: flex; align-items: center; gap: 7px; }
.fc-help { position: relative; color: var(--body); }
.fc-help summary { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; list-style: none; cursor: pointer; font-size: 12px; color: var(--muted); border: 1px solid var(--hairline); border-radius: 50%; }
.fc-help summary::-webkit-details-marker { display: none; }
.fc-help > div { position: absolute; top: 30px; right: -150px; width: 285px; max-width: calc(100vw - 70px); padding: 12px; border: 1px solid var(--hairline-strong); border-radius: 8px; background: var(--surface-card); z-index: 3; font-size: 12px; }
.fc-matrix-wrap { padding: 0 16px; }
.fc-matrix { border-collapse: separate; border-spacing: 4px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.fc-matrix th { border: 0; padding: 2px 0 5px; text-align: center; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--body); }
.fc-matrix th:first-child { width: 40px; text-align: left; overflow-wrap: anywhere; white-space: normal; }
.fc-matrix td { border: 0; padding: 0; vertical-align: middle; }
button.fc-cell { display: block; width: 100%; height: auto; min-height: 51px; padding: 5px 1px; border: 0; border-radius: 5px; color: var(--ink); background: var(--fc-cell-fill); font-family: inherit; line-height: 1.5; }
button.fc-cell:hover { color: var(--ink); background: var(--fc-cell-fill); box-shadow: inset 0 0 0 1px var(--body); }
button.fc-cell[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.fc-cell-value { display: block; font-size: 13px; font-weight: 500; }
.fc-cell-sub { display: block; color: var(--body); font-size: 11px; font-weight: 400; }
.fc-matrix .fc-diagonal, .fc-matrix .fc-unavailable { height: 51px; text-align: center; border-radius: 5px; color: var(--muted); background: var(--canvas-soft); }
.fc-legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 9px 20px 14px; color: var(--muted); font-size: 11px; }
.fc-gradient { width: 88px; height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--canvas-soft), color-mix(in srgb, var(--slice-1) 55%, var(--surface-card))); }
.fc-pair-detail { min-height: 76px; padding: 13px 20px 16px; border-top: 1px solid var(--hairline-soft); }
.fc-pair-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; }
.fc-pair-symbols { font-weight: 500; }
.fc-pair-names { margin-top: 4px; color: var(--muted); font-size: 11px; }
/* The comparable fund's details pane (the app's security pane). */
.sec-section .sec-table + dl.kv { margin-top: var(--s-base); }
@container fund-costs (max-width: 850px) {
  .fc-secondary-grid { --fc-card-height: 640px; grid-template-columns: minmax(0, 1fr); }
  button.fc-cell { min-height: 64px; }
  .fc-fee-table .fc-fund-name { max-width: none; }
}
@container fund-costs (max-width: 600px) {
  .fc-metrics { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
  .fc-stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; padding: 13px 16px; border: 0; border-radius: 0; }
  .fc-stat + .fc-stat { border-top: 1px solid var(--hairline-soft); }
  .fc-value { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; font-size: 23px; }
  .fc-stat .fc-context { font-size: 11px; }
  .fc-panel-head { padding: 16px; }
  .fc-cost-table { min-width: 520px; }
  .fc-table-wrap { padding-inline: 16px; }
  .fc-fee-table { min-width: 340px; }
  .fc-matrix-wrap { padding-inline: 9px; }
  .fc-compare-controls { padding-inline: 16px; }
  .fc-help > div { right: -75px; }
}
@media (pointer: coarse) {
  .fc-compare-controls select { min-height: 44px; font-size: 16px; }
}
