
    :root {
      color-scheme: light dark;
      
      
      
      
      
      
      
      --accent: var(--site-primary);
      --accent-ink: var(--site-primary);
      --accent-soft: var(--site-primary-soft);
      --mean: var(--site-secondary);
      --mean-soft: var(--site-secondary-soft);
      --marker: var(--site-tertiary);
      
      --radius: 14px;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        
        
        
        
        
        
        
        --accent: var(--site-primary);
        --accent-ink: var(--site-primary);
        --accent-soft: var(--site-primary-soft);
        --mean: var(--site-secondary);
        --mean-soft: var(--site-secondary-soft);
        --marker: var(--site-tertiary);
        
      }
    }
    * {  }
    html { scroll-behavior: smooth; scrollbar-gutter: stable both-edges; }
    html, body { overflow-x: hidden; overflow-x: clip; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
      font-size: 16px;
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
    }
    button, input { font: inherit; }
    button { color: inherit; }
    a { color: var(--accent-ink); text-underline-offset: 3px; }
    @media (prefers-color-scheme: dark) { a { color: var(--accent); } }
    .mono, .money, output { font-family: "IBM Plex Sans", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
    .page {    }
    @media (max-width: 560px) { .page {  } }
    @media (max-width: 560px) { }
    @media (prefers-color-scheme: dark) { }
    .settings-head h2 {   }
    @media (prefers-color-scheme: dark) { }
    .hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 48px; align-items: end; padding: 8px 0 12px; }
    h1 { margin: 0; max-width: 760px;   letter-spacing: -.01em; font-weight: 700; }
    .hero-copy { margin: 0 0 5px; color: var(--ink-2);  max-width: 48ch; }
    .hero-copy strong { color: var(--ink); }
    .workspace { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; padding-top: 24px; align-items: start; }
    .controls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 18px; }
    .controls-head, .section-head, .table-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
    .controls-head h2 {  white-space: nowrap; }
    /* Wealth tables use the shared table-wrap scrolling and mobile rules. */
    .wealth-panel table { font-size: 13px; }
    .wealth-panel th {  letter-spacing: .03em; }
    .wealth-panel td.money {  }
    .wealth-panel .age-cell { font-size: 12.5px; }
    h2, h3 { margin: 0; }
    h2 {   }
    h3 {   }
    .reset { border: 0; background: none; color: var(--accent-ink); padding: 3px 0; cursor: pointer; font-weight: 600; font-size: 13.5px; }
    @media (prefers-color-scheme: dark) { .reset { color: var(--accent); } }
    .reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .group { margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
    .group-title { margin: 0 0 14px; font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
    .field { margin-top: 14px; }
    .field:first-child { margin-top: 0; }
    label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;  font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
    label .hint { color: var(--ink-3);  font-weight: 400; text-align: right; }
    .input-wrap { position: relative; }
    .prefix, .suffix { position: absolute; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; font-size: .95rem; }
    .prefix { left: 12px; }
    .suffix { right: 12px; }
    input[type="number"] { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); padding: 10px 12px; outline: none; font-size: 16px; }
    .has-prefix input { padding-left: 28px; }
    .has-suffix input { padding-right: 34px; }
    input:focus { border-color: var(--accent); }
    input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
    .segmented button { border: 0; background: transparent; color: var(--ink-2); padding: 8px 10px; cursor: pointer;  font-weight: 600; border-radius: 7px; }
    .segmented button:hover { color: var(--ink); }
    .segmented button.active { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
    @media (prefers-color-scheme: dark) { .segmented button.active { color: var(--accent); } }
    .segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .results { min-width: 0; }
    .summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
    .summary-kicker { margin: 0 0 14px; color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
    .summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
    .stat { padding: 2px 18px; border-left: 1px solid var(--line); min-width: 0; }
    .stat:first-child { padding-left: 0; border-left: 0; }
    .stat:last-child { padding-right: 0; }
    .stat-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
    .stat-value { display: block; font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: clamp(18px, 1.8vw, 23px); line-height: 1.15; font-weight: 600; overflow-wrap: anywhere; }
    .stat-sub { display: block; font-size: 13px; color: var(--ink-2); margin-top: 5px; }
    .notice { margin-top: 16px; padding: 13px 16px; background: var(--accent-soft); border-radius: 10px; display: flex; gap: 12px; align-items: flex-start;  }
    .notice strong { color: var(--accent-ink); white-space: nowrap; }
    @media (prefers-color-scheme: dark) { .notice strong { color: var(--accent); } }
    .notice p { margin: 0; color: var(--ink); }
    .chart-panel, .table-panel { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 18px; }
    .section-note, .table-note { margin: 0; color: var(--ink-2);  }
    #chart { width: 100%; height: auto; min-height: 260px; display: block; margin-top: 16px; overflow: visible; }
    .legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; color: var(--ink-2);  }
    .legend span { display: inline-flex; align-items: center; gap: 7px; }
    .legend i { width: 19px; height: 3px; border-radius: 2px; display: inline-block; background: var(--accent); }
    .legend .net i { background: var(--mean); }
    .table-panel { padding-bottom: 14px; }
    .table-wrap { margin-top: 14px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
    table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
    th, td { padding: 9px 5px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
    th { color: var(--ink-3);  font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid var(--line); }
    th:first-child, td:first-child { text-align: left; padding-left: 0; }
    th:last-child, td:last-child { padding-right: 0; }
    td.money {  }
    tbody tr:last-child td { border-bottom: 0; }
    .age-cell { font-weight: 600; color: var(--ink); }
    .year-cell { color: var(--ink-3); font-weight: 400; }
    .tax-cell { color: var(--marker); }
    .show-more { display: block; width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; margin: 14px 0 2px; padding: 10px; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--accent-ink); }
    @media (prefers-color-scheme: dark) { .show-more { color: var(--accent); } }
    .show-more:hover { border-color: var(--accent); }
    .show-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .method { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
    .method > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
    .method h3 { margin-bottom: 8px; }
    .method p { margin: 0; color: var(--ink-2);  }
    .sources { margin-top: 12px !important; }
    .disclaimer { font-style: italic; }
    .error { display: none; margin-top: 14px; color: var(--marker); font-size: 13.5px; font-weight: 600; }
    .error.show { display: block; }
    .derived-value { min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 10px 12px; color: var(--ink); font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 15px; display: flex; align-items: center; }
    .wealth-panel { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 14px; }
    .wealth-summary { margin-top: 16px; display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .wealth-stat { padding: 15px 12px; border-left: 1px solid var(--line); min-width: 0; }
    .wealth-stat:first-child { border-left: 0; padding-left: 0; }
    .wealth-stat:last-child { padding-right: 0; }
    .wealth-label { display: block; color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 5px; }
    .wealth-value { display: block; font-family: "IBM Plex Sans", system-ui, sans-serif; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
    .wealth-total { color: var(--accent-ink); }
    @media (prefers-color-scheme: dark) { .wealth-total { color: var(--accent); } }
    .wealth-real { display: block; margin-top: 5px; color: var(--ink-3); font-size: 12.5px; line-height: 1.35; }
    .wealth-real output { color: var(--ink); font-size: 13px; font-weight: 600; }
    .wealth-note { margin: 12px 0 2px; color: var(--ink-2); font-size: 13.5px; }
    .wealth-panel td.money {  }
    .wealth-panel th, .wealth-panel td { padding: 9px 3px; }
    @media (max-width: 900px) {
      .hero { grid-template-columns: 1fr; gap: 14px; }
      .hero-copy { max-width: 68ch; }
      .workspace { grid-template-columns: 1fr; }
      .controls { position: static; }
      .summary-grid { grid-template-columns: 1fr 1fr; gap: 18px 0; }
      .stat:nth-child(3) { padding-left: 0; border-left: 0; }
      .wealth-summary { grid-template-columns: 1fr 1fr; }
      .wealth-stat:nth-child(odd) { border-left: 0; padding-left: 0; }
    }
    @media (max-width: 620px) {
      .controls, .chart-panel, .table-panel, .wealth-panel { padding: 16px 14px 12px; }
      .summary { padding: 16px 14px; }
      .summary-grid { grid-template-columns: 1fr; gap: 0; }
      .stat, .stat:first-child, .stat:nth-child(3) { padding: 12px 0; border-left: 0; border-top: 1px solid var(--line); }
      .stat:first-child { border-top: 0; padding-top: 0; }
      .stat:last-child { padding-bottom: 0; }
      .stat-value { font-size: 22px; }
      .wealth-summary { grid-template-columns: 1fr; }
      .wealth-stat, .wealth-stat:first-child, .wealth-stat:nth-child(odd) { padding: 13px 0; border-left: 0; border-top: 1px solid var(--line); }
      .wealth-stat:first-child { border-top: 0; }
      .notice { flex-direction: column; gap: 4px; }
      .notice strong { white-space: normal; }
      .method { grid-template-columns: 1fr; gap: 16px; }
      #chart { min-height: 230px; }
      .table-head { align-items: flex-start; flex-direction: column; gap: 4px; }
      table, tbody, tr, td { display: block; width: 100%; }
      thead { display: none; }
      tbody { display: grid; gap: 10px; }
      tbody tr { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
      td, td:first-child, td:last-child { border: 0; padding: 0; text-align: right; display: flex; justify-content: space-between; gap: 12px;  }
      td::before { content: attr(data-label); color: var(--ink-3); font-family: "IBM Plex Sans", system-ui, sans-serif; font-weight: 400; }
      td:first-child { grid-column: 1 / -1; padding-bottom: 7px; border-bottom: 1px solid var(--line);  }
      .age-cell::before { content: "Projection"; }
      .table-wrap { overflow-x: visible; }
    }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  