.forecast-heading { margin-bottom: 24px; }
.forecast-save-box { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); margin-bottom: 20px; }
.forecast-save-box form { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.forecast-save-box .field { width: min(100%, 380px); min-width: 0; margin: 0; }
.forecast-save-box input { width: 100%; min-width: 0; }
.forecast-save-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.forecast-save-box .forecast-save-context { margin: 14px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.forecast-save-box .forecast-save-error, .forecast-save-box .forecast-save-message { margin: 10px 0 0; line-height: 1.6; }
.forecast-save-message { color: var(--green); }
.forecast-saved-details { margin: 0 0 26px; }
.forecast-saved-details > summary { min-height: 44px; padding: 12px 0; color: var(--green); font-size: 13px; }
.forecast-saved-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 12px; }
.forecast-saved-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.forecast-saved-card.active { border-color: var(--green); }
.forecast-saved-card > div { min-width: 0; }
.forecast-saved-card h3 { font-size: 14px; line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; text-wrap: balance; }
.forecast-saved-card p { font-size: 11px; margin: 4px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.forecast-saved-card .btn { flex-shrink: 0; }
.forecast-saved-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.forecast-saved-empty { padding: 12px 0; margin: 0; line-height: 1.6; }
.forecast-heading h2, .forecast-chart-section h3, .forecast-object-results h3 { margin: 0 0 10px; text-wrap: balance; }
.forecast-heading p, .forecast-assumptions, .forecast-field-note, .forecast-source, .forecast-result-note, .forecast-chart-section > p { margin: 0; line-height: 1.65; text-wrap: pretty; }
.forecast-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.forecast-toolbar .field { width: 210px; }
.forecast-toolbar p { margin: 0 0 12px; }
.forecast-properties { display: grid; gap: 14px; }
.forecast-property { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.forecast-property.excluded { background: #f8faf6; }
.forecast-property-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.forecast-property-choice { display: inline-flex; align-items: start; gap: 12px; min-width: 0; cursor: pointer; }
.forecast-property-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); flex: 0 0 auto; }
.forecast-property-choice strong { display: block; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.forecast-property-choice small { display: block; margin-top: 5px; color: var(--muted); overflow-wrap: anywhere; }
.forecast-property-details { margin-top: 18px; }
.forecast-property-details > summary { padding: 4px 0; color: var(--green); font-size: 12px; }
.forecast-source { margin: 14px 0 18px; }
.forecast-input-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.forecast-form .field { min-width: 0; }
.forecast-form input, .forecast-form select { min-width: 0; max-width: 100%; font-variant-numeric: tabular-nums; }
.forecast-form input[type="month"] { min-height: 44px; }
.forecast-mode-field { max-width: 350px; margin-bottom: 20px; }
.forecast-changes { display: grid; gap: 14px; margin-bottom: 16px; }
.forecast-change { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 14px; }
.forecast-change .btn { min-height: 44px; margin-bottom: 1px; }
.forecast-field-note { margin-top: 16px; }
.forecast-assumptions { padding: 20px 0 26px; }
.forecast-capital { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.forecast-capital strong { color: var(--ink); font-weight: 600; }
.forecast-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.forecast-summary .analytics-stat { padding: 20px; gap: 12px; }
.forecast-summary .analytics-stat > strong { font-size: clamp(22px, 2.1vw, 30px); }
.forecast-summary .analytics-stat > b { font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.forecast-delta { color: var(--green); }
.forecast-delta.negative { color: var(--red); }
.forecast-chart-section { min-width: 0; margin-top: 32px; }
.forecast-legend { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 18px 0; font-size: 12px; color: var(--muted); }
.forecast-legend > span { display: inline-flex; align-items: center; gap: 9px; }
.forecast-legend i { width: 22px; height: 0; border-top: 3px solid var(--green); }
.forecast-legend i.baseline { border-color: #83938c; border-top-style: dashed; }
.forecast-legend i.purchase { border-color: #b98c50; border-top-style: dashed; }
.forecast-chart { display: block; width: 100%; min-width: 600px; height: 300px; }
.forecast-chart-area { fill: #75a864; fill-opacity: .1; }
.forecast-chart-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.forecast-chart-line.planned { stroke: var(--green); }
.forecast-chart-line.baseline { stroke: #83938c; stroke-dasharray: 6 5; }
.forecast-purchase-line { stroke: #b98c50; stroke-width: 1.5; stroke-dasharray: 5 5; }
.forecast-object-results { margin-top: 32px; }
.forecast-result-list { display: grid; gap: 14px; }
.forecast-result-card { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr)); gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; }
.forecast-result-card h4 { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.forecast-result-card > div { display: grid; align-content: start; gap: 8px; min-width: 0; }
.forecast-result-card > div > span, .forecast-result-card small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.forecast-result-card strong { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.forecast-result-card p { grid-column: 1 / -1; margin: 0; }
.forecast-year-details { margin-top: 28px; }
.forecast-year-details > summary { margin-bottom: 16px; padding: 6px 0; color: var(--green); font-size: 13px; }
.forecast-year-table { min-width: 800px; }
.forecast-result-note { margin-top: 20px; }
.forecast-error { margin-top: 8px; line-height: 1.6; }
@media (max-width: 1150px) {
  .forecast-result-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .forecast-result-card h4 { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .forecast-save-box { padding: 16px; }
  .forecast-save-box .field { width: 100%; }
  .forecast-save-actions { width: 100%; }
  .forecast-save-actions .btn, .forecast-saved-card .btn { min-height: 44px; }
  .forecast-saved-card { padding: 16px; align-items: start; flex-wrap: wrap; }
  .forecast-summary { grid-template-columns: minmax(0, 1fr); }
  .forecast-property { padding: 16px; }
  .forecast-property-heading { flex-direction: column; gap: 10px; }
  .forecast-property-choice { min-height: 44px; align-items: center; }
  .forecast-property-details > summary, .forecast-year-details > summary { min-height: 44px; padding: 12px 0; }
  .forecast-input-grid, .forecast-change { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .forecast-change { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .forecast-change .btn { justify-self: start; }
  .forecast-result-card { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .forecast-result-card h4 { grid-column: auto; }
  .forecast-toolbar .field { width: 100%; }
  .forecast-toolbar p { margin: 0; }
  .analytics-table.forecast-year-table { display: block; width: 100%; min-width: 0; max-width: 100%; }
  .forecast-year-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .forecast-year-table tbody { display: block; }
  .forecast-year-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; gap: 14px; border-bottom: 1px solid var(--line); }
  .forecast-year-table tbody tr:last-child { border-bottom: 0; }
  .forecast-year-table tbody tr > * { display: block; min-width: 0; max-width: none; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .forecast-year-table tbody th { grid-column: 1 / -1; }
  .forecast-year-table [data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
  .forecast-year-table .analytics-money { white-space: normal; }
}
