/* One compact, progressively disclosed PF table; reuse dashboard theme tokens. */
.project-finance-panel {
  --pf-secondary: color-mix(in srgb, var(--muted) 66%, var(--ink));
  --pf-surface: color-mix(in srgb, var(--panel) 97%, var(--ink));
  --pf-credit: color-mix(in srgb, var(--teal) 86%, var(--ink));
  min-width: 0;
  max-width: 100%;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.project-finance-panel * { box-sizing: border-box; }
.project-finance-panel :is(a, button, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--pf-credit); outline-offset: 2px; }
.project-finance-panel :is(a, button, select, summary) { touch-action: manipulation; }
.project-finance-panel :is(button, select, summary) { cursor: pointer; }
.project-finance-panel :is(button, select, summary) { transition: background-color 160ms ease, border-color 160ms ease; }
.pf-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.project-finance-panel h2 { min-width: 0; margin: 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.pf-controls-wrap { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 16px; min-width: 0; }
.pf-controls { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.project-finance-panel .pf-control-select { width: auto; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 28px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-size: 13px; }
.pf-limit { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; max-width: 100%; color: var(--pf-secondary); font-size: 12px; }
.pf-limit select { width: 72px; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--panel); font-size: 13px; font-weight: 650; }
.pf-visible-count { white-space: nowrap; }
.pf-comparison-note { margin: 0 0 12px; color: var(--pf-secondary); font-size: 13px; line-height: 1.5; }
.pf-table-scroll { width: 100%; max-width: 100%; overflow: auto; overscroll-behavior-x: contain; border-radius: 8px; background: var(--panel); }
.project-finance-panel .pf-table { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: separate; border-spacing: 0 6px; background: var(--panel); color: var(--ink); font-size: 13px; }
.project-finance-panel .pf-table tbody tr { background: transparent; }
.pf-col-project { width: 26%; }
.pf-col-bank { width: 18%; }
.pf-col-money { width: 13%; }
.pf-col-maturity { width: 12%; }
.pf-col-progress { width: 9%; }
.project-finance-panel .pf-table { min-width: 960px; }
.project-finance-panel .pf-table thead th { text-align: center; }
.project-finance-panel .pf-table .pf-progress { text-align: center; }
.pf-progress-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 10%, var(--panel)); color: var(--ink); font-weight: 650; white-space: nowrap; }
.project-finance-panel .pf-table :is(td, th) { padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.project-finance-panel .pf-table thead th { position: static; border-bottom: 0; background: var(--panel); color: var(--pf-secondary); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.project-finance-panel .pf-table tbody tr > :is(td, th) { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.project-finance-panel .pf-table tbody tr > :first-child { border-left: 1px solid var(--line); border-radius: 8px 0 0 8px; }
.project-finance-panel .pf-table tbody tr > :last-child { border-right: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.project-finance-panel .pf-table tbody tr > :only-child { border-radius: 8px; }
.project-finance-panel .pf-table .pf-row--group > th { box-shadow: inset 3px 0 0 var(--pf-credit); }
.project-finance-panel .pf-table .pf-row-expanded > :is(td, th) { border-color: color-mix(in srgb, var(--pf-credit) 35%, var(--line)); background: color-mix(in srgb, var(--pf-credit) 3%, var(--panel)); }
.project-finance-panel .pf-table .pf-row-nested > th { padding-left: 24px; }
.project-finance-panel .pf-table .pf-data-row:hover > :is(td, th) { border-color: color-mix(in srgb, var(--pf-credit) 40%, var(--line)); }
.project-finance-panel .pf-table tbody th { color: var(--ink); font-weight: 600; text-transform: none; letter-spacing: normal; }
.project-finance-panel .pf-table .pf-money { text-align: right; font-weight: 650; }
.project-finance-panel .pf-table .pf-missing { color: var(--pf-secondary); font-weight: 500; }
.project-finance-panel .pf-table small { display: block; margin-top: 2px; color: var(--pf-secondary); font-size: 12px; font-weight: 400; line-height: 1.45; }
.pf-bank, .pf-maturity { font-weight: 400; }
.project-finance-panel .pf-table .pf-numeric-heading { padding-top: 0; padding-bottom: 0; text-align: right; }
.project-finance-panel .pf-numeric-heading button { width: 100%; min-height: 44px; padding: 6px 0; border: 0; border-radius: 5px; color: inherit; background: transparent; text-align: right; font: inherit; font-weight: 600; }
.project-finance-panel .pf-numeric-heading button small { margin-top: 0; }
.project-finance-panel .pf-row-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 5px 0; border: 0; border-radius: 5px; color: var(--ink); background: transparent; text-align: left; font: inherit; font-weight: 650; line-height: 1.5; }
.pf-row-toggle > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.pf-rank { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; color: var(--pf-credit); background: color-mix(in srgb, var(--pf-credit) 10%, var(--panel)); font-size: 11px; font-weight: 800; }
.pf-row-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.pf-count-badge { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 7px; border-radius: 999px; color: var(--pf-credit); background: color-mix(in srgb, var(--pf-credit) 9%, var(--panel)); font-size: 11px; font-weight: 750; white-space: nowrap; }
.project-finance-panel .pf-row-toggle:hover, .project-finance-panel .pf-numeric-heading button:hover { background: var(--pf-surface); }
.pf-chevron { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; color: var(--pf-credit); font-size: 16px; font-weight: 600; }
.project-finance-panel .pf-row--corpus > th { padding-left: 38px; }
.pf-group-alternate { background: var(--pf-surface); }
.project-finance-panel .pf-table .pf-group-start > :is(td, th) { border-top: 2px solid var(--line); }
.project-finance-panel .pf-table .pf-merged-cell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 2px solid var(--line); background: var(--pf-surface); vertical-align: middle; }
.pf-corpus-name { min-height: 44px; display: flex; align-items: center; }
.pf-corpus-name a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pf-credit); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.pf-credit-track { display: block; height: 7px; margin-top: 6px; overflow: hidden; border-radius: 5px; background: var(--pf-surface); }
.pf-credit-track > span { display: block; height: 100%; border-radius: 3px; background: var(--pf-credit); }
.pf-merged-cell .pf-credit-track, .pf-group-alternate .pf-credit-track { background: var(--panel); }
.pf-methodology { min-width: 0; margin-top: 4px; }
.pf-methodology > summary { min-height: 44px; padding: 11px 2px; color: var(--pf-secondary); font-size: 12px; line-height: 1.5; }
.pf-method-body { padding: 0 14px 4px; border-left: 2px solid var(--line); }
.pf-method-body p { max-width: 100ch; margin: 0 0 8px; color: var(--pf-secondary); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.pf-empty { margin-top: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; background: var(--pf-surface); }
.project-finance-panel .pf-empty h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
.pf-empty p { margin: 0; color: var(--pf-secondary); font-size: 13px; line-height: 1.6; }
.pf-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; }
@media (max-width: 600px) {
  .pf-section-heading { align-items: flex-start; }
  .pf-controls-wrap { justify-content: flex-start; width: 100%; }
  .pf-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .pf-control-select:first-child { grid-column: 1 / -1; }
  .pf-limit select, .project-finance-panel .pf-control-select { font-size: 16px; }
  .project-finance-panel .pf-table { min-width: 960px; }
  .project-finance-panel .pf-table :is(td, th) { padding-right: 10px; padding-left: 10px; }
  .project-finance-panel .pf-row--corpus > th { padding-left: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-finance-panel :is(a, button, select, summary) { transition: none !important; animation: none !important; }
}
@media print {
  body.pdf-exporting .project-finance-panel { display: none !important; }
  body.pdf-exporting.pdf-scope-all .project-finance-panel { display: block !important; }
  body.pdf-exporting .project-finance-panel { break-inside: auto !important; page-break-inside: auto !important; }
  .project-finance-panel { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .pf-section-heading, .pf-data-row { break-inside: avoid; page-break-inside: avoid; }
  .pf-limit select, .pf-limit > span:first-child, .pf-chevron, .pf-controls { display: none; }
  .pf-table-scroll { overflow: visible; }
  .project-finance-panel .pf-table { min-width: 0; font-size: 9px; }
  .project-finance-panel .pf-table :is(td, th) { padding: 5px; }
  .project-finance-panel .pf-table small { font-size: 8px; }
  .project-finance-panel .pf-row-toggle, .pf-corpus-name, .pf-corpus-name a, .project-finance-panel .pf-numeric-heading button { min-height: 0; }
  .project-finance-panel .pf-row--corpus > th { padding-left: 12px; }
}
