/* Plan Summary panel (CMP 3.0, stage 1 — 19.10.26). See static/plan-summary.js. */
#planSummaryPanel { width: 100%; padding: 0 1rem; box-sizing: border-box; }
.ps-panel {
  /* Four equal columns: age | target cover | income pie | funds pie (19.10.26) */
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 14px 0;
  background: #4f4f48; border: 2px solid #e1e5d2; border-radius: 14px;
  padding: 10px 8px; color: #ffffff; box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.ps-panel[hidden] { display: none; }
.ps-kicker { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #e6e8dc; font-weight: 600; }

/* Retirement age */
.ps-age, .ps-cover, .ps-pie-block { min-width: 0; padding: 0 16px; box-sizing: border-box; align-self: stretch; }
.ps-cover, .ps-pie-block { border-left: 1px solid rgba(255,255,255,0.18); }
/* Each section: its heading along the top (all four in line), the content centred in the space below (20.10.26) */
.ps-age, .ps-cover, .ps-pie-block { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; }
.ps-age > .ps-kicker, .ps-cover > .ps-kicker, .ps-pie-block > .ps-kicker { text-align: center; }
.ps-sec-body { flex: 1 1 auto; width: 100%; min-width: 0; display: flex; align-items: center; justify-content: center; }
.ps-age { text-align: center; }
.ps-age-body { flex-direction: column; gap: 10px; }
.ps-age-row { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; margin-bottom: 2px; }
.ps-age-row[hidden], .ps-retired[hidden], .ps-view-switch[hidden] { display: none; }
.ps-age-num { font-size: clamp(44px, 4.2vw, 72px); line-height: 0.9; font-weight: 300; }
.ps-age-unit { font-size: 14px; color: #e6e8dc; margin-right: 10px; }
.ps-retired { font-size: 13px; color: #e6e8dc; }
.ps-view-switch { display: inline-flex; background: rgba(0,0,0,0.25); border-radius: 999px; padding: 3px; width: fit-content; }
.ps-view-switch button { font-family: inherit; min-height: 36px; padding: 0 14px; border-radius: 999px; border: none;
  background: transparent; color: #ffffff; font-size: 13px; font-weight: 600; cursor: pointer; }
.ps-view-switch button.ps-on { background: #ffffff; color: #2b2d26; }
.ps-view-switch button:focus-visible { outline: 2px solid #adff2f; outline-offset: 2px; }

/* Gauge */
.ps-cover-row { gap: 12px; }
.ps-gauge { flex: 1 1 200px; min-width: 0; max-width: 236px; display: flex; justify-content: center; }
.ps-gauge svg { width: 100%; height: auto; }

/* Small tables: monthly figures and pie legends */
.ps-figs { flex: 0 1 175px; min-width: 140px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ps-row { display: flex; justify-content: space-between; gap: 10px; }
.ps-lab { display: flex; align-items: center; gap: 7px; color: #e6e8dc; white-space: nowrap; }
.ps-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.ps-sw { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.ps-sw-line { width: 3px; height: 11px; margin: 0 3px; background: #f3b65a; border-radius: 0; }
.ps-sw-none { background: transparent; }
.ps-total { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 3px; margin-top: 2px; }
.ps-grand { border-top: 1px solid rgba(255,255,255,0.35); border-bottom: 1px solid rgba(255,255,255,0.35); padding: 3px 0; margin-top: 2px; font-weight: 700; }
.ps-grand .ps-lab { color: #ffffff; padding-left: 16px; }
.ps-cap { font-size: 11px; color: #c9ccbf; margin-top: 4px; }

/* Pies */
.ps-pies { display: contents; }
.ps-pie-body { flex-wrap: wrap; gap: 8px 14px; }
.ps-pie-block[hidden] { display: none; }
.ps-pie-fig { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ps-legend { flex: 1 1 140px; min-width: 140px; max-width: 200px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }

/* Narrower page column (small window, or ERIC docked): two rows of two */
@container cmp3main (max-width: 1250px) {
  .ps-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-pie-block[data-ps="pie1"] { border-left: none; }
}

/* Pinned at the top of the results column while the page scrolls (19.10.26) */
#planSummaryPanel { position: sticky; top: var(--ps-sticky-top, 0px); z-index: 40; padding-top: 8px; padding-bottom: 8px;
  background: rgba(143, 143, 135, 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* Years and months numbers on their own tiles so they stand out (19.10.26) */
.ps-age-num { background: #43a646; color: #ffffff; border: 1px solid #43a646; border-radius: 12px;
  padding: 6px 14px 8px; min-width: 1.3em; text-align: center; }
.ps-age-unit { margin-right: 6px; }
.ps-age-unit:last-child { margin-right: 0; }

/* Age / Income view and Single / Couple side by side (20.10.26) */
.ps-switches { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }
/* A little tighter so both fit on one line in the age section */
.ps-switches .ps-view-switch button { padding: 0 10px; font-size: 12.5px; }
.ps-age { padding-left: 10px; padding-right: 10px; }

/* Selected Age: -/+ either side of the year (20.10.26) */
.ps-age-row [hidden] { display: none !important; }
.ps-age-row.ps-age-sel { align-items: center; gap: 14px; }
.ps-adj { font-family: inherit; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.10); color: #ffffff; font-size: 26px; font-weight: 400; line-height: 1; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 0 3px; cursor: pointer; }
.ps-adj:hover { background: rgba(255,255,255,0.22); border-color: #ffffff; }
.ps-adj:focus-visible { outline: 2px solid #adff2f; outline-offset: 2px; }
.ps-adj:disabled { opacity: 0.35; cursor: default; }
