  /* Extend design-system base styles */
  .card { max-width: 100%; }
  #main-content { max-width: 1280px; }

  /* ---- Parameters grid: 4 columns x rows ---- */
  .params-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 20px;
  }

  .param-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .param-cell label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: 2px;
  }

  .param-cell label .param-val {
    font-weight: 700;
    color: var(--navy-500);
    font-size: 13px;
    min-width: 60px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  /* Sliders */
  .param-cell input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
    cursor: pointer;
  }

  .param-cell input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--navy-500);
    border: 3px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.15s;
  }

  .param-cell input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--navy-700);
  }

  .param-cell input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--navy-500);
    border: 3px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
  }

  .param-cell input[type="range"]::-moz-range-track {
    height: 5px;
    border-radius: 3px;
    background: var(--gray-200);
  }

  /* Select dropdown */
  .param-cell select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    background: var(--white);
    color: var(--navy-700);
    cursor: pointer;
  }

  .param-cell select:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 2px rgba(30,77,140,0.12);
  }

  /* Editable text inputs */
  .param-cell input[type="number"],
  .param-cell input[type="text"] {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--navy-700);
    background: var(--white);
  }

  .param-cell input[type="number"]:focus,
  .param-cell input[type="text"]:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 2px rgba(30,77,140,0.12);
  }

  /* Remove number spinner arrows */
  .param-cell input[type="number"]::-webkit-outer-spin-button,
  .param-cell input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .param-cell input[type="number"] { -moz-appearance: textfield; }

  /* ASESO toggle row */
  .aseso-toggle-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
  }

  .aseso-toggle-row label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .aseso-toggle-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--navy-500);
    cursor: pointer;
  }

  .aseso-hint {
    font-size: 11px;
    color: var(--gray-500);
    font-style: italic;
    margin-left: 8px;
  }

  /* Inline warning under a slider */
  .param-warning {
    font-size: 11px;
    color: var(--danger);
    margin-top: 2px;
    display: none;
  }

  .param-warning.visible {
    display: block;
  }

  /* ---- KPI cards (base from design-system.css) ---- */

  .kpi-card {
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  }

  .kpi-card .kpi-value {
    font-size: 26px;
    font-variant-numeric: tabular-nums;
  }

  .kpi-card.kpi-green .kpi-value { color: var(--success); }
  .kpi-card.kpi-orange .kpi-value { color: var(--warning); }
  .kpi-card.kpi-blue .kpi-value { color: var(--navy-500); }

  .kpi-loss-warning {
    font-size: 11px;
    color: var(--danger);
    text-align: center;
    margin-top: -8px;
    margin-bottom: 8px;
    display: none;
  }

  .kpi-loss-warning.visible { display: block; }

  /* ---- Quarterly table ---- */
  .quarterly-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }

  .quarterly-table th,
  .quarterly-table td {
    padding: 7px 12px;
    text-align: right;
    border-bottom: 1px solid var(--gray-100);
  }

  .quarterly-table th {
    font-weight: 600;
    color: var(--navy-700);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: transparent;
    border-bottom: 2px solid var(--gray-200);
  }

  .quarterly-table th:first-child,
  .quarterly-table td:first-child {
    text-align: left;
  }

  .quarterly-table tr:hover td {
    background: var(--navy-50, #F4F7FB);
  }

  .quarterly-table .total-row td {
    font-weight: 700;
    border-top: 2px solid var(--navy-500);
    background: var(--navy-50, #F4F7FB);
  }

  .quarterly-table .negative {
    color: var(--danger);
  }

  /* ---- Doorrekening (collapsible) ---- */
  .collapsible-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-700);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
  }

  .collapsible-header:hover {
    color: var(--navy-500);
  }

  .collapsible-header .chevron {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 12px;
  }

  .collapsible-header.open .chevron {
    transform: rotate(90deg);
  }

  .collapsible-body {
    display: none;
    padding-bottom: 8px;
  }

  .collapsible-body.open {
    display: block;
  }

  /* Flow table */
  .flow-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }

  .flow-table td {
    padding: 5px 12px;
    border-bottom: 1px solid var(--gray-50);
    vertical-align: top;
  }

  .flow-table tr:nth-child(even) td {
    background: var(--gray-50);
  }

  .flow-table .flow-label { color: var(--gray-700); }

  .flow-table .flow-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 100px;
  }

  .flow-table .section-header td {
    background: var(--navy-50, #F4F7FB) !important;
    font-weight: 700;
    color: var(--navy-700);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-200);
  }

  .flow-table .subtotal td {
    font-weight: 700;
    border-top: 1px solid var(--gray-300);
    background: var(--gray-50) !important;
  }

  .flow-table .grand-total td {
    font-weight: 700;
    font-size: 14px;
    background: var(--navy-900) !important;
    color: var(--white);
    border: none;
    padding: 8px 12px;
  }

  .flow-table .pencil-line td {
    font-style: italic;
    color: var(--gray-500);
  }

  .flow-table .negative { color: var(--danger); }
  .flow-table .positive { color: var(--success); }

  /* ---- Tooltips ---- */
  .tt-trigger {
    position: relative;
    cursor: help;
    font-size: 13px;
    opacity: 0.6;
    margin-left: 4px;
  }

  .tt-trigger:hover { opacity: 1; }

  .tt-content {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-900);
    color: var(--white);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.7;
    white-space: pre-line;
    min-width: 280px;
    max-width: 340px;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    pointer-events: none;
  }

  .tt-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--navy-900);
  }

  .tt-trigger:hover .tt-content {
    display: block;
  }

  /* ---- Tabs ---- */
  .scenario-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 16px;
    overflow-x: auto;
  }

  .scenario-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
  }

  .scenario-tab:hover { color: var(--navy-500); }

  .scenario-tab.active {
    color: var(--navy-700);
    font-weight: 700;
    border-bottom-color: var(--gold-500);
  }

  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* ---- Tax bars ---- */
  .tax-bars {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 220px;
    padding: 0.75rem 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 0.75rem;
  }

  .tax-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
  }

  .tax-bar-stack {
    width: 60%;
    min-width: 36px;
    max-width: 70px;
    display: flex;
    flex-direction: column-reverse;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
  }

  .tax-bar-segment { width: 100%; transition: height 0.3s ease; }
  .tax-bar-label { font-size: 11px; color: var(--gray-500); margin-top: 0.4rem; text-align: center; font-weight: 600; }
  .tax-bar-amount { font-size: 11px; color: var(--navy-700); font-weight: 600; margin-bottom: 0.2rem; }

  .tax-legend { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; font-size: 11px; }
  .tax-legend-item { display: flex; align-items: center; gap: 4px; }
  .tax-legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

  .color-loonheffing { background: var(--navy-500); }
  .color-werkgever { background: #42a5f5; }
  .color-vpb { background: var(--gold-500); }
  .color-dividend { background: var(--danger); }

  /* ---- Optim chart ---- */
  .optim-chart { position: relative; width: 100%; height: 240px; border-left: 2px solid var(--gray-200); border-bottom: 2px solid var(--gray-200); margin: 0.75rem 0; }
  .optim-point { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--navy-500); transform: translate(-50%, -50%); }
  .optim-point.optimal { width: 13px; height: 13px; background: var(--success); border: 3px solid var(--white); box-shadow: 0 1px 6px rgba(0,0,0,0.3); z-index: 2; }
  .optim-point.current { width: 13px; height: 13px; background: var(--danger); border: 3px solid var(--white); box-shadow: 0 1px 6px rgba(0,0,0,0.3); z-index: 2; }
  .optim-line { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; }
  .optim-line svg { width: 100%; height: 100%; }
  .optim-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-500); margin-top: 0.2rem; }
  .optim-legend { display: flex; gap: 1rem; justify-content: center; margin-top: 0.5rem; font-size: 11px; }
  .optim-legend-item { display: flex; align-items: center; gap: 4px; }
  .optim-legend-swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

  /* ---- Werkgeverslasten table ---- */
  .wg-table { width: 100%; max-width: 480px; border-collapse: collapse; font-size: 13px; }
  .wg-table th, .wg-table td { padding: 7px 12px; border-bottom: 1px solid var(--gray-100); }
  .wg-table th { font-weight: 600; color: var(--navy-700); text-align: left; font-size: 12px; }
  .wg-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
  .wg-table .total-row td { font-weight: 700; border-top: 2px solid var(--navy-500); background: var(--navy-50, #F4F7FB); }

  /* ---- Responsive ---- */
  @media (max-width: 900px) {
    .params-grid { grid-template-columns: repeat(2, 1fr); }
  }

  @media (max-width: 600px) {
    .params-grid { grid-template-columns: 1fr; }
  }
