.financial-plan {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.plan-panel {
  margin: 0;
  min-width: 0;
}
.plan-panel .panel-header {
  flex-wrap: wrap;
}
.plan-body, .plan-grid, .plan-facts { padding: 16px 18px; }
.plan-body p { margin: 0 0 12px; }
.plan-grid, .plan-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  gap: 14px;
}
.plan-inline, .plan-toolbar, .plan-form-actions, .plan-row-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-toolbar { justify-content: flex-end; }
.plan-row-actions { min-width: max-content; }
.plan-form-actions { grid-column: 1 / -1; }
.financial-plan label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.financial-plan input, .financial-plan select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}
.plan-facts { margin: 0; border-bottom: 1px solid var(--border); }
.plan-facts div { min-width: 0; }
.plan-facts dt { color: var(--muted); font-size: 12px; }
.plan-facts dd { margin: 5px 0 0; font-size: 13px; font-weight: 600; }
.plan-notice { align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.plan-notice ul { margin: 0; padding-inline-start: 18px; }
.plan-disclosure summary { padding: 14px 18px; font-weight: 600; cursor: pointer; }
.plan-scroll { isolation: isolate; }
.plan-scroll:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.plan-matrix { font-variant-numeric: tabular-nums; }
.plan-matrix tr > :first-child {
  position: sticky;
  left: 0;
  width: 170px;
  min-width: 170px;
  z-index: 1;
  text-align: left;
  background: var(--surface);
  box-shadow: inset -1px 0 var(--border);
}
.plan-matrix thead th:first-child { background: var(--surface-alt, #fafbfb); }
.plan-matrix tbody th { padding: 10px 12px; font-weight: 600; }
.plan-matrix td, .plan-matrix thead th { min-width: 96px; text-align: right; white-space: nowrap; }
.plan-matrix th[scope="col"] { padding-inline: 10px; }
.plan-matrix .button { min-height: 27px; background: transparent; white-space: nowrap; border-color: transparent; padding: 3px 6px; }
.plan-matrix .button[aria-pressed="true"], .plan-matrix .button:hover {
  background: var(--green-bg);
  color: var(--green);
}
.plan-matrix .plan-breakdown > th { padding-inline-start: 22px; color: var(--muted); font-weight: 400; }
.plan-matrix .plan-total > * { border-top: 1px solid var(--border); }
.plan-matrix .plan-closing > * { background: var(--green-bg); color: var(--text); font-weight: 600; }
.plan-periods { flex-wrap: wrap; }
.financial-plan .cfo-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 12px;
  margin: 0;
}
.financial-plan .cfo-metric-grid .stat-value { font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .plan-matrix tr > :first-child { min-width: 136px; width: 136px; }
  .plan-toolbar { justify-content: flex-start; }
}
