/* Independent performance cards; inherits the cloud-white / harbour palette. */
[data-strategy-curve], [data-participation-curve] { min-width: 0; max-width: 100%; }
.perf-card { min-width: 0; overflow: hidden; }
.perf-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.perf-heading h2 { margin: 3px 0 0; font-size: 17px; font-weight: 650; }
.perf-eyebrow { color: var(--muted, #637067); font-size: 11px; letter-spacing: .12em; }
.perf-period { flex-shrink: 0; padding: 5px 10px; border: 1px solid var(--border, #e1e6df); border-radius: 7px; color: var(--muted, #637067); background: var(--surface-alt, #fafaf7); font-size: 12px; }
.perf-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-top: 20px; font-variant-numeric: tabular-nums; }
.perf-stat strong { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(25px, 3.5vw, 34px); letter-spacing: -.05em; line-height: 1.3; font-weight: 600; }
.perf-stat span { color: var(--muted, #637067); font-size: 12px; }
.perf-card .is-positive { color: var(--positive, #176648); }
.perf-card .is-negative { color: var(--negative, #b83b48); }
.perf-chart { margin: 12px -10px 0; }
.perf-chart > svg { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }
.perf-grid line { stroke: var(--border, #e1e6df); stroke-width: 1; vector-effect: non-scaling-stroke; }
.perf-grid .perf-zero { stroke: var(--border-strong, #c9d2c8); stroke-dasharray: 4 5; }
.perf-grid text, .perf-axis text { fill: var(--muted, #637067); font-size: 11px; font-variant-numeric: tabular-nums; }
.perf-line { stroke: var(--accent, #1b674c); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; fill: none; vector-effect: non-scaling-stroke; }
.perf-dot { stroke: var(--surface, #fff); stroke-width: 2; fill: var(--accent, #1b674c); vector-effect: non-scaling-stroke; }
.perf-point-target { fill: transparent; }
.perf-point { outline: none; cursor: help; }
.perf-point:focus-visible .perf-dot { stroke: var(--accent, #1b674c); fill: var(--surface, #fff); stroke-width: 3; }
.perf-tooltip { opacity: 0; pointer-events: none; }
.perf-point:hover .perf-tooltip, .perf-point:focus .perf-tooltip { opacity: 1; }
.perf-tooltip rect { fill: var(--text, #202c27); }
.perf-tooltip text { fill: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.perf-tooltip .perf-tooltip-value { font-size: 14px; font-weight: 600; }
.perf-card .perf-caption { margin: 8px 0 0; color: var(--muted, #637067); font-size: 12px; line-height: 1.7; }
.perf-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 15px 16px; border: 1px solid var(--border, #e1e6df); border-radius: 10px; background: var(--surface-alt, #fafaf7); font-variant-numeric: tabular-nums; }
.perf-current > div { min-width: 0; }
.perf-current > div:last-child { text-align: right; }
.perf-current span, .perf-current small, .perf-current strong { display: block; overflow-wrap: anywhere; }
.perf-current span { font-size: 12px; }
.perf-current strong { margin-top: 3px; font-size: 20px; font-weight: 600; }
.perf-current small { margin-top: 3px; color: var(--muted, #637067); font-size: 11px; }
.perf-card .perf-method { margin: 12px 0 0; color: var(--muted, #637067); font-size: 12px; line-height: 1.8; }
.perf-data { min-width: 0; max-width: 100%; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border, #e1e6df); }
.perf-data summary { width: fit-content; color: var(--accent, #1b674c); cursor: pointer; font-size: 12px; }
.perf-table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow: auto; margin-top: 12px; }
.perf-data table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.perf-data caption { text-align: left; padding: 0 0 8px; color: var(--muted, #637067); font-size: 11px; }
.perf-data td, .perf-data th { padding: 10px 8px; border-bottom: 1px solid var(--border, #e1e6df); text-align: right; font-weight: 400; }
.perf-data th:first-child { text-align: left; }
.perf-data thead th { color: var(--muted, #637067); background: var(--surface-alt, #fafaf7); }
.perf-empty-chart { position: relative; margin-top: 22px; min-height: 226px; display: grid; place-items: center; border-radius: 12px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 52px, var(--border, #e1e6df) 53px, transparent 54px), linear-gradient(120deg, var(--surface-alt, #fafaf7), var(--surface, #fff)); }
.perf-empty-content { position: relative; z-index: 1; padding: 20px 16px 35px; text-align: center; }
.perf-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 47px; height: 47px; margin-bottom: 12px; border: 1px solid var(--border, #e1e6df); border-radius: 14px; background: var(--surface, #fff); box-shadow: 0 5px 18px rgb(35 57 43 / 4%); }
.perf-empty-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--muted, #637067); stroke-width: 1.4; stroke-linecap: round; }
.perf-empty-content h3, .perf-participation-empty h3 { font-size: 15px; font-weight: 600; }
.perf-empty-content p, .perf-participation-empty p { max-width: 310px; margin: 7px auto 0; color: var(--muted, #637067); font-size: 12px; }
.perf-empty-axis { position: absolute; bottom: 10px; left: 14px; right: 14px; display: flex; justify-content: space-between; color: var(--muted, #637067); font-size: 10px; }
.perf-participation-empty { min-height: 155px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 14px; border: 1px dashed var(--border-strong, #c9d2c8); border-radius: 12px; padding: 20px; text-align: center; background: var(--surface-alt, #fafaf7); }
.perf-empty-dot { display: block; width: 8px; height: 8px; margin-bottom: 14px; border: 1.5px solid var(--muted, #637067); border-radius: 50%; }
@media (max-width: 540px) {
  .perf-heading { gap: 8px; }
  .perf-heading h2 { font-size: 16px; }
  .perf-current { gap: 12px; padding: 13px 12px; align-items: flex-start; }
  .perf-current > div { flex: 1; }
  .perf-current strong { font-size: 18px; }
  .perf-chart { margin-left: -16px; margin-right: -12px; }
  .perf-grid text, .perf-axis text { font-size: 13px; }
  .perf-empty-chart { min-height: 210px; }
}

/* Public funding reference: independent from personal settlements and projections. */
.history-periods { display: flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-alt); }
.history-periods button { border: 0; border-radius: 6px; padding: 7px 12px; min-height: 34px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.history-periods button[aria-pressed="true"] { color: var(--accent); background: var(--surface); box-shadow: 0 1px 5px rgb(35 57 43 / 8%); font-weight: 600; }
.history-periods button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.history-source-summary { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.history-chart { display: grid; grid-template-columns: 70px minmax(0,1fr); grid-template-rows: 210px auto; gap: 10px 0; margin-top: 22px; }
.history-y-axis { position: relative; font-variant-numeric: tabular-nums; }
.history-y-axis > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.history-y-axis text { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.history-chart-plot { position: relative; min-width: 0; touch-action: pan-y; cursor: crosshair; }
.history-chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.history-grid-line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.history-zero { stroke: var(--border-strong); stroke-dasharray: 4 5; }
.history-cursor { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 5; opacity: .5; vector-effect: non-scaling-stroke; pointer-events: none; }
.history-point { outline: none; cursor: crosshair; }
.history-point-target { fill: transparent; }
.history-dot, .history-dot-center { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.history-dot { opacity: .75; }
.history-dot-center { stroke: var(--surface); stroke-width: 3; opacity: 0; }
.history-point.is-selected .history-dot, .history-point:focus .history-dot { stroke-width: 8; opacity: 1; }
.history-point.is-selected .history-dot-center, .history-point:focus .history-dot-center { opacity: 1; }
.history-x-axis { grid-column: 2; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.history-selected { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px 16px; margin-top: 18px; padding: 15px 16px; border: 1px solid var(--border); background: var(--surface-alt); border-radius: 10px; font-variant-numeric: tabular-nums; }
.history-selected > div { min-width: 0; }
.history-selected strong { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.history-selected span, .history-selected small { display: block; color: var(--muted); font-size: 11px; }
.history-selected span { margin-bottom: 4px; }
.history-selected small { margin-top: 3px; }
.history-selected > p { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.history-selected-date strong { font-size: 14px; }
.history-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.history-card-footer > span { font-size: 11px; color: var(--muted); }
.history-assumptions { padding-left: 19px; margin: 15px 0 0; color: var(--muted); font-size: 12px; }
.history-assumptions li + li { margin-top: 5px; }
.history-evidence { margin-top: 12px; }
.history-evidence pre { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.7 ui-monospace, monospace; color: var(--muted); }
@media (max-width: 540px) {
  .perf-public .perf-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .history-periods button { min-height: 38px; padding: 7px 13px; }
  .history-chart { grid-template-columns: 62px minmax(0,1fr); grid-template-rows: 190px auto; margin-top: 20px; }
  .history-y-axis text { font-size: 10px; }
  .history-selected { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 13px; gap: 12px; }
  .history-selected-date { grid-column: 1 / -1; }
  .history-selected strong { font-size: 15px; }
}
