/* Number inputs — hide spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Design system tokens — insights panel is source of truth */
:root {
    --ds-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ds-text-xs: 0.75rem;
    --ds-text-sm: 0.875rem;
    --ds-text-base: 0.9375rem;
    --ds-text-md: 1rem;
    --ds-text-lg: 1.2rem;
    --ds-ink: #2d3436;
    --ds-muted: #636e72;
    --ds-page: #f3f5f7;
    --ds-page-dot: #dbe3ea;
    --ds-surface: #ffffff;
    --ds-line: #e8eef3;
    --ds-line-strong: #dfe6e9;
    --ds-primary: #3f4e5e;
    --ds-primary-hover: #354656;
    --ds-warn: #e74c3c;
    --ds-warn-text: #c0392b;
    --ds-warn-border: #ffd4d4;
    --ds-warn-bg: linear-gradient(135deg, #ffe9e9 0%, #fff 55%);
    --ds-ok: #27ae60;
    --ds-ok-text: #1e8449;
    --ds-ok-border: #c9edd6;
    --ds-ok-bg: linear-gradient(135deg, #e9f9ef 0%, #fff 55%);
    --ds-info: #3498db;
    --ds-info-text: #1f6690;
    --ds-info-border: #cfe6ff;
    --ds-info-bg: linear-gradient(135deg, #e9f4ff 0%, #fff 55%);
    --ds-work: #1e293b;
    --ds-pension: #2563eb;
    --ds-btl: #0d9488;
    --ds-srm: #d97706;
    --ds-tax: #7c3aed;
    --ds-lawyer: #4f46e5;
    --ds-incomeSupport: #be185d;
    --ds-radius-panel: 1.25rem;
    --ds-radius-card: 1.1rem;
    --ds-radius-pill: 999px;
    --ds-shadow-card: 0 10px 28px rgb(15 23 42 / 0.08);
    --ds-shadow-soft: 0 1px 2px rgb(15 23 42 / 0.04);
    --ds-shadow-chip: 0 4px 14px rgb(15 23 42 / 0.06);
    /* calc-* aliases (wizard controls) */
    --calc-navy: var(--ds-primary);
    --calc-navy-hover: var(--ds-primary-hover);
    --calc-ink: var(--ds-ink);
    --calc-muted: var(--ds-muted);
    --calc-line: var(--ds-line-strong);
    --calc-line-strong: #b2bec3;
    --calc-surface: var(--ds-surface);
    --calc-fill: #eef2f6;
}

/* ── Accessibility: visible keyboard focus fallback ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* ── Design system core ── */
.ds-page {
    font-family: var(--ds-font);
    color: var(--ds-ink);
    background:
        radial-gradient(circle at 1px 1px, var(--ds-page-dot) 1px, transparent 0) 0 0 / 18px 18px,
        var(--ds-page);
    min-height: 100vh;
}

.ds-panel,
.insights-panel {
    --insight-ink: var(--ds-ink);
    --insight-muted: var(--ds-muted);
    background:
        radial-gradient(circle at 1px 1px, var(--ds-page-dot) 1px, transparent 0) 0 0 / 18px 18px,
        var(--ds-page);
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-panel);
    padding: 1.25rem 1.1rem 1.35rem;
    box-shadow: var(--ds-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.ds-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ds-card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-card);
    padding: 1rem 1.1rem;
    box-shadow: var(--ds-shadow-card);
    color: var(--ds-ink);
}

.ds-card--lg {
    padding: 1.15rem 1.2rem 1.2rem;
}

.ds-card--flush {
    padding: 0.85rem 1rem;
}

.ds-card-title {
    margin: 0;
    font-size: var(--ds-text-md);
    font-weight: 800;
    color: var(--ds-ink);
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.ds-card-divider {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgb(15 23 42 / 0.08);
}

.ds-page-head {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ds-page-head-kicker {
    margin: 0;
    font-size: var(--ds-text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ds-muted);
}

.ds-page-head-title,
.insights-panel-title {
    margin: 0;
    font-size: var(--ds-text-lg);
    font-weight: 900;
    color: var(--ds-ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.ds-page-head-lead,
.insights-panel-lead {
    margin: 0;
    font-size: var(--ds-text-base);
    line-height: 1.55;
    color: var(--ds-muted);
    max-width: 40rem;
}

.ds-hint {
    margin: 0;
    font-size: var(--ds-text-sm);
    font-weight: 500;
    line-height: 1.55;
    color: var(--ds-muted);
}

.ds-label {
    display: block;
    font-size: var(--ds-text-sm);
    font-weight: 700;
    color: var(--ds-ink);
    margin-bottom: 0.35rem;
}

.ds-label-sm {
    display: block;
    font-size: var(--ds-text-xs);
    font-weight: 600;
    color: var(--ds-muted);
    margin-bottom: 0.25rem;
}

.ds-input,
.ds-select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: var(--ds-text-sm);
    font-weight: 700;
    color: var(--ds-ink);
    background: var(--ds-surface);
    border: 1px solid var(--ds-line-strong);
    border-radius: 0.65rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Tailwind's injected stylesheet can load after style.css, so its .w-44
   utility (fixed 11rem) sometimes wins over .ds-select's width:100% and
   won't shrink to fit a narrow row — pin it down with an ID rule instead. */
#btlDisabilityDegreeInput {
    width: 100%;
    max-width: 11rem;
}

.ds-input:focus,
.ds-select:focus {
    border-color: var(--ds-info);
    box-shadow: 0 0 0 3px rgb(52 152 219 / 0.15);
}

.ds-input-money-wrap,
.ds-input-pct-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ds-input-money-wrap .ds-input,
.ds-input-pct-wrap .ds-input,
.ds-input-pct-wrap .calc-input-compact {
    padding-left: 1.75rem;
}

.ds-input-pct-wrap .ds-input-compact-num,
.ds-input-pct-wrap .calc-input-compact {
    width: 4.5rem;
}

.ds-currency,
.ds-pct {
    position: absolute;
    left: 0.65rem;
    font-size: var(--ds-text-sm);
    font-weight: 700;
    color: var(--ds-muted);
    pointer-events: none;
}

.ds-field-panel {
    padding: 0.75rem 0.85rem;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-soft);
}

.ds-field-panel.ds-stat--warn {
    background: var(--ds-warn-bg);
    border-color: var(--ds-warn-border);
}

.ds-field-panel.ds-stat--info {
    background: var(--ds-info-bg);
    border-color: var(--ds-info-border);
}

.ds-field-panel.ds-stat--ok {
    background: var(--ds-ok-bg);
    border-color: var(--ds-ok-border);
}

.ds-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ds-field-row--boxed,
.wizard-dialog .wizard-cols .ds-field-row,
.wizard-dialog .wizard-pension-dates-grid .ds-field-row,
.wizard-dialog .lawyer-benefit-panel .ds-field-row,
.wizard-dialog .ds-field-panel .ds-field-row {
    border: 1px solid color-mix(in srgb, var(--ds-ink, #2d3436) 18%, var(--ds-line, #e8eef3));
    border-radius: 0.55rem;
    padding: 0.4rem 0.55rem;
    background: #fff;
    gap: 0.55rem;
}

.ds-field-row-label {
    font-size: var(--ds-text-sm);
    font-weight: 600;
    color: var(--ds-muted);
}

.ds-input-compact-num {
    width: 4rem;
    text-align: center;
    padding: 0.35rem 0.5rem;
}

.ds-input-compact-wide {
    width: 5rem;
    text-align: center;
}

.ds-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: var(--ds-text-sm);
    font-weight: 700;
    color: var(--ds-ink);
    cursor: pointer;
}

.ds-checkbox-row input[type="checkbox"] {
    margin-top: 0.15rem;
    width: 1rem;
    height: 1rem;
    accent-color: var(--ds-primary);
    flex-shrink: 0;
}

.ds-link {
    font-size: var(--ds-text-xs);
    font-weight: 700;
    color: var(--ds-info-text);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ds-link:hover {
    color: var(--ds-info);
}

.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-text-sm);
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.ds-btn:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.ds-btn-primary {
    background: var(--ds-primary);
    border-color: var(--ds-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgb(63 78 94 / 0.22);
}

.ds-btn-primary:hover {
    background: var(--ds-primary-hover);
    border-color: var(--ds-primary-hover);
}

.ds-btn-accent {
    background: #1f6690;
    border-color: #1f6690;
    color: #fff;
    box-shadow: 0 2px 8px rgb(52 152 219 / 0.25);
}

.ds-btn-accent:hover {
    background: #195777;
    border-color: #195777;
}

.ds-btn-secondary {
    background: var(--ds-surface);
    border-color: var(--ds-line-strong);
    color: var(--ds-primary);
}

.ds-btn-secondary:hover {
    background: #fafbfc;
    border-color: #b2bec3;
}

.ds-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ds-muted);
}

.ds-btn-ghost:hover {
    background: rgb(15 23 42 / 0.04);
    color: var(--ds-ink);
}

.ds-btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    min-width: 2.25rem;
    font-size: 1.125rem;
    line-height: 1;
}

.ds-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-text-xs);
    font-weight: 700;
    background: linear-gradient(135deg, #e8f4ff 0%, #fff 70%);
    border: 1px solid var(--ds-info-border);
    color: var(--ds-info-text);
    box-shadow: var(--ds-shadow-chip);
}

.ds-empty {
    text-align: center;
    padding: 1.4rem 1.1rem;
    border-radius: var(--ds-radius-card);
    border: 1px dashed #cfd8e3;
    background: var(--ds-surface);
    box-shadow: 0 8px 24px rgb(15 23 42 / 0.05);
}

.ds-empty-title {
    margin: 0;
    font-size: var(--ds-text-md);
    font-weight: 800;
    color: var(--ds-ink);
}

.ds-empty-lead {
    margin: 0;
    font-size: var(--ds-text-base);
    line-height: 1.55;
    color: var(--ds-muted);
}

.ds-banner {
    padding: 0.85rem 1rem;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-soft);
    font-size: var(--ds-text-sm);
    line-height: 1.55;
    color: var(--ds-muted);
}

.ds-banner--warn {
    background: var(--ds-warn-bg);
    border-color: var(--ds-warn-border);
    color: var(--ds-warn-text);
}

.ds-banner--ok {
    background: var(--ds-ok-bg);
    border-color: var(--ds-ok-border);
    color: var(--ds-ok-text);
}

.ds-banner--info {
    background: var(--ds-info-bg);
    border-color: var(--ds-info-border);
    color: var(--ds-info-text);
}

.ds-banner-eyebrow {
    font-size: var(--ds-text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.ds-banner-title {
    font-size: var(--ds-text-md);
    font-weight: 800;
    color: var(--ds-ink);
    line-height: 1.35;
}

.ds-banner-sub {
    font-size: var(--ds-text-sm);
    font-weight: 500;
}

.ds-stat {
    padding: 0.75rem 0.85rem;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-soft);
}

.ds-stat--work {
    background: linear-gradient(135deg, #f1f5f9 0%, #fff 70%);
    border-color: #e2e8f0;
}

.ds-stat--lawyer {
    background: linear-gradient(135deg, #eef2ff 0%, #fff 70%);
    border-color: #c7d2fe;
    color: var(--ds-lawyer);
}

.ds-stat--btl {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 70%);
    border-color: #a7f3d0;
    color: var(--ds-btl);
}

.ds-stat--success,
.ds-stat--ok {
    background: var(--ds-ok-bg);
    border-color: var(--ds-ok-border);
}

.ds-stat--warn {
    background: var(--ds-warn-bg);
    border-color: var(--ds-warn-border);
}

.ds-stat--info {
    background: var(--ds-info-bg);
    border-color: var(--ds-info-border);
}

.ds-stat-label {
    font-size: var(--ds-text-xs);
    font-weight: 600;
    color: var(--ds-muted);
    line-height: 1.35;
}

.ds-stat-value {
    margin-top: 0.2rem;
    font-size: var(--ds-text-md);
    font-weight: 800;
    color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.ds-stat--success .ds-stat-value,
.ds-stat--ok .ds-stat-value {
    color: var(--ds-ok-text);
}

.ds-stat--warn .ds-stat-value {
    color: var(--ds-warn-text);
}

.ds-stat--lawyer .ds-stat-value {
    color: var(--ds-lawyer);
}

.ds-stat--btl .ds-stat-value {
    color: var(--ds-btl);
}

.ds-stat-note {
    margin-top: 0.25rem;
    font-size: var(--ds-text-xs);
    font-weight: 500;
    color: var(--ds-muted);
    line-height: 1.4;
}

.ds-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.ds-stat-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ds-stat-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .ds-stat-grid--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ds-stat-grid--5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .ds-stat-grid--5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.larron-tax {
    padding: 0.7rem 0.9rem 0.8rem;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-soft);
}

.larron-tax-kicker {
    margin: 0 0 0.55rem;
    font-size: var(--ds-text-xs);
    font-weight: 700;
    color: var(--ds-muted);
}

.larron-tax-chart {
    position: relative;
    padding: 2.35rem 0 0.05rem;
}

.larron-tax-track {
    display: flex;
    height: 18px;
    border-radius: var(--ds-radius-pill);
    background: #e8eef3;
    overflow: hidden;
}

.larron-tax-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.larron-tax-seg-rate {
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.larron-tax-seg.is-rate-10 .larron-tax-seg-rate {
    color: #3f4e5e;
}

.larron-tax-seg.is-used {
    background: #6b7c8a;
}

.larron-tax-seg.is-remain {
    background: transparent;
}

.larron-tax-seg.is-rate-10 { background: #a8b4c0; }
.larron-tax-seg.is-rate-14 { background: #6e9bb5; }
.larron-tax-seg.is-rate-20 { background: #5a8f86; }
.larron-tax-seg.is-rate-31 { background: #6d6fa3; }
.larron-tax-seg.is-rate-35 { background: #8a6d8e; }
.larron-tax-seg.is-rate-47 { background: #9a7d5c; }
.larron-tax-seg.is-rate-50 { background: #6e564c; }

.larron-tax-marks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.larron-tax-mark {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ds-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.larron-tax-mark.is-end {
    transform: translateX(-100%);
    align-items: flex-end;
}

.larron-tax-mark.is-start {
    transform: none;
    align-items: flex-start;
}

.larron-tax-mark-kicker {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--ds-muted);
}

.larron-tax-mark.is-tax {
    color: var(--ds-muted);
}

.ds-table-wrap {
    overflow-x: auto;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-soft);
}

.ds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--ds-text-sm);
    text-align: right;
}

.ds-table th {
    padding: 0.55rem 0.65rem;
    font-size: var(--ds-text-xs);
    font-weight: 700;
    color: var(--ds-muted);
    border-bottom: 1px solid var(--ds-line);
    white-space: nowrap;
}

.ds-table td {
    padding: 0.55rem 0.65rem;
    color: var(--ds-ink);
    border-bottom: 1px solid rgb(15 23 42 / 0.06);
    font-variant-numeric: tabular-nums;
}

.ds-table tbody tr:last-child td {
    border-bottom: none;
}

.ds-table .ds-table-accent {
    color: var(--ds-lawyer);
    font-weight: 700;
}

.ds-table .ds-table-ok {
    color: var(--ds-ok-text);
    font-weight: 700;
}

.ds-table .ds-table-warn {
    color: var(--ds-warn-text);
    font-weight: 700;
}

.ds-table tr.ds-table-strong td {
    font-weight: 800;
    background: linear-gradient(135deg, #f3f5f7 0%, #fff 70%);
}

@media (max-width: 639px) {
    #periodsStreamTable [data-col="workNet"],
    #periodsStreamTable [data-col="pensionNet"] {
        display: none;
    }
}

.ds-table tr.ds-table-strong td:first-child {
    font-weight: 800;
}

.ds-legend-item {
    list-style: none;
}

.ds-legend-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: var(--ds-text-sm);
    font-weight: 600;
    color: var(--ds-ink);
}

.ds-legend-swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: var(--ds-radius-pill);
    flex-shrink: 0;
}

.ds-legend-label {
    flex: 1;
    min-width: 0;
}

.ds-legend-pct {
    font-size: var(--ds-text-xs);
    color: var(--ds-muted);
    font-variant-numeric: tabular-nums;
}

.ds-legend-val {
    font-size: var(--ds-text-xs);
    font-weight: 800;
    color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
    padding-right: 1rem;
}

.ds-pie-total {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--ds-ok-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.ds-gross-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: var(--ds-text-sm);
    color: var(--ds-muted);
}

.ds-gross-row strong {
    color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
}

.ds-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    font-size: var(--ds-text-xs);
    color: var(--ds-muted);
}

.ds-chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ds-chart-legend-line {
    width: 0.75rem;
    height: 2px;
    border-radius: 1px;
    background: var(--ds-work);
}

.ds-chart-legend-swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 0.15rem;
    border: 1px solid var(--ds-line);
}

.wizard-dates-card {
    padding: 0.75rem 0.85rem;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-soft);
}

.calc-field-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--calc-muted);
    margin-bottom: 0.35rem;
}

.calc-field-label-sm {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--calc-muted);
}

/* Pill toggle buttons */
.calc-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.calc-pill-group--stretch .calc-pill {
    flex: 1 1 0;
    min-width: 3.5rem;
}

.calc-pill,
.scenario-btn,
.wizard-pill,
.work-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid var(--calc-line);
    background: var(--calc-surface);
    color: var(--calc-navy);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.calc-pill:hover,
.scenario-btn:hover,
.wizard-pill:hover,
.work-btn:hover {
    border-color: var(--calc-line-strong);
    background: #fafbfc;
}

.calc-pill.is-active,
.calc-pill.active,
.scenario-btn.active,
.wizard-pill.active,
.work-btn.is-active {
    background: var(--calc-navy);
    border-color: var(--calc-navy);
    color: #fff;
    box-shadow: 0 2px 8px rgb(63 78 94 / 0.22);
}

.calc-pill.is-active:hover,
.scenario-btn.active:hover,
.wizard-pill.active:hover,
.work-btn.is-active:hover {
    background: var(--calc-navy-hover);
    border-color: var(--calc-navy-hover);
}

/* Multi-choice segment (2+ options, radio inside) */
.calc-segment {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
    max-width: 28rem;
}

.calc-segment-btn {
    position: relative;
    display: inline-flex;
    flex: 1 1 8rem;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: 0.55rem 1.15rem;
    border-radius: 9999px;
    border: 1px solid var(--calc-line);
    background: var(--calc-surface);
    color: var(--calc-navy);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.calc-segment-btn:hover {
    border-color: var(--calc-line-strong);
    background: #fafbfc;
}

.calc-segment-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.calc-segment-btn:has(input:checked) {
    background: var(--calc-navy);
    border-color: var(--calc-navy);
    color: #fff;
    box-shadow: 0 2px 8px rgb(63 78 94 / 0.22);
}

.calc-segment-btn:has(input:focus-visible) {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Slider field */
.calc-slider-field {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.calc-slider-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.calc-slider-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.calc-slider-value,
.calc-slider-side {
    flex-shrink: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--calc-ink);
    font-variant-numeric: tabular-nums;
    min-width: 2.5rem;
    text-align: left;
}

.calc-slider-side {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--calc-muted);
}

.calc-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(
        to left,
        var(--calc-navy) 0%,
        var(--calc-navy) var(--range-pct, 0%),
        var(--calc-fill) var(--range-pct, 0%),
        var(--calc-fill) 100%
    );
    outline: none;
    cursor: pointer;
}

.calc-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
}

.calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    border-radius: 999px;
    background: var(--calc-navy);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgb(63 78 94 / 0.35);
    cursor: grab;
}

.calc-range:active::-webkit-slider-thumb {
    cursor: grabbing;
    transform: scale(1.06);
}

.calc-range::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: var(--calc-fill);
}

.calc-range::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--calc-navy);
}

.calc-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--calc-navy);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgb(63 78 94 / 0.35);
    cursor: grab;
}

.calc-range:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 4px;
}

.calc-inline-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.15rem;
}

.calc-input-compact {
    width: 4rem;
    text-align: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--calc-ink);
    background: var(--calc-surface);
    border: none;
    border-bottom: 1px solid var(--calc-line-strong);
    border-radius: 0;
    outline: none;
}

.calc-input-compact:focus {
    border-bottom-color: var(--calc-navy);
}

body.wizard-open {
    overflow: hidden;
}

#pageShell.is-blurred > :not(#wizardOverlay) {
    filter: blur(7px);
    pointer-events: none;
    user-select: none;
}

.wizard-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.wizard-overlay.is-open {
    display: flex;
}

.wizard-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.wizard-dialog {
    position: relative;
    z-index: 1;
    width: min(96vw, 72rem);
    max-height: 96vh;
    overflow: hidden;
    background: var(--ds-surface);
    border-radius: var(--ds-radius-panel);
    border: 1px solid var(--ds-line);
    box-shadow: var(--ds-shadow-card);
}

.wizard-dialog--compact {
    width: min(94vw, 28rem);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wizard-dialog-inner {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.65rem 1rem 0.55rem;
    max-height: 96vh;
    min-height: 0;
    overflow: hidden;
}

.wizard-header {
    flex-shrink: 0;
}

.wizard-header .ds-card-title {
    font-size: 1rem;
    margin: 0;
}

.wizard-mobile-close {
    display: none;
}

.wizard-progress {
    display: none;
}

.wizard-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.wizard-nav {
    flex-shrink: 0;
    background: var(--ds-surface);
    padding-top: 0.45rem;
    margin-top: 0.1rem;
    border-top: 1px solid var(--ds-line);
}

.wizard-nav .ds-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
}

.wizard-step-title {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--ds-ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.wizard-col {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.wizard-panel-tight {
    padding: 0.45rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.wizard-study-fields {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.25rem;
}

.wizard-hint-panel {
    padding: 0.4rem 0.55rem;
    margin: 0;
}

.wizard-credit-row {
    padding-top: 0.15rem;
}

.wizard-credit-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.wizard-credit-hint {
    margin: 0;
}

.wizard-work-quick {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wizard-work-quick .calc-pill-group {
    flex: 1 1 auto;
    min-width: 0;
}

.wizard-work-quick .calc-inline-field {
    flex-shrink: 0;
    padding-top: 0;
}

.wizard-dialog .calc-slider-field--compact {
    gap: 0.3rem;
}

.wizard-dialog .calc-slider-field {
    gap: 0.4rem;
}

.wizard-dialog .calc-pill,
.wizard-dialog .wizard-pill {
    padding: 0.28rem 0.55rem;
    font-size: 0.75rem;
}

.wizard-dialog .calc-field-label,
.wizard-dialog .calc-field-label-sm {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}

.wizard-dialog .ds-label,
.wizard-dialog .ds-label-sm {
    font-size: 0.8125rem;
    margin-bottom: 0.15rem;
}

.wizard-dialog .ds-hint {
    font-size: 0.75rem;
    line-height: 1.35;
}

.wizard-dialog .ds-field-row-label {
    font-size: 0.8125rem;
}

.wizard-dialog .ds-input,
.wizard-dialog .ds-select {
    padding: 0.32rem 0.5rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

.wizard-dialog .ds-input-money-wrap .ds-input,
.wizard-dialog .ds-input-pct-wrap .ds-input,
.wizard-dialog .ds-input-pct-wrap .calc-input-compact {
    padding-left: 1.5rem;
}

.wizard-dialog .ds-currency,
.wizard-dialog .ds-pct {
    font-size: 0.75rem;
    left: 0.5rem;
}

.wizard-dialog .ds-checkbox-row {
    font-size: 0.8125rem;
    gap: 0.4rem;
}

.wizard-dialog .ds-checkbox-row input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
    margin-top: 0.05rem;
}

.wizard-dialog .pension-fund-card {
    padding: 0.55rem 0.7rem;
    gap: 0.4rem;
}

.wizard-dialog .wizard-fund-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wizard-fund-top {
    display: grid;
    grid-template-columns: minmax(8.5rem, 11rem) minmax(0, 1fr) auto;
    gap: 0.4rem;
    align-items: center;
}

.wizard-fund-control {
    width: min(100%, 12rem);
}

.wizard-dialog .wizard-fund-card .ds-field-row {
    gap: 0.75rem;
}

.wizard-dialog .wizard-fund-card .ds-field-row-label {
    flex: 1 1 auto;
    min-width: 7rem;
}

.wizard-pension-layout {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.wizard-pension-dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1rem;
}

.wizard-pension-funds {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.wizard-dialog .wizard-dates-card {
    display: flex;
    flex-direction: column;
    padding: 0.45rem 0.55rem;
    gap: 0.3rem;
}

#btlLetterDates {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#btlLetterDates.hidden,
#btlDatesCard.hidden,
#btlApprovedFields.hidden,
#btlChildrenWrap.hidden,
#pensionDatesCard.hidden,
#pensionRetroBlock.hidden {
    display: none;
}

.wizard-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    align-items: start;
}

#step1WorkDetails.is-retired {
    grid-template-columns: 1fr;
}

.wizard-step {
    min-height: 0;
    display: none;
}

.wizard-step.is-active {
    display: block;
}

.wizard-step > h3,
.wizard-step > .wizard-step-title {
    margin-bottom: 0.35rem;
}

#wizardStep2.is-active {
    display: block;
}

.wizard-step2-decision {
    margin-bottom: 0.5rem;
}

.wizard-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.wizard-panel-head .ds-label {
    margin-bottom: 0;
}

#pensionFields:not(.hidden) {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

#pensionEstimateHead:not(:empty) {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#pensionApprovedFields:not(.hidden) {
    display: flex;
}

#pensionDecisionCols.hidden {
    display: none;
}

.lawyer-proposal-cols {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.45rem 0.65rem;
}

.lawyer-proposal-cols .wizard-col {
    gap: 0.3rem;
}

.lawyer-benefit-panel {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    background: color-mix(in srgb, var(--ds-surface) 88%, #fff);
}

.lawyer-benefit-hint {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.3;
}

.lawyer-proposal-fixed {
    margin-top: 0.1rem;
}

.wizard-lawyer-extra {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wizard-lawyer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    align-items: start;
    margin-top: 0.35rem;
}

.wizard-lawyer-layout {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
    min-width: 0;
}

.wizard-lawyer-proposals-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wizard-lawyer-proposals {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.lawyer-proposal-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-panel, 0.75rem);
    background: #fff;
}

.lawyer-proposal-card.is-cheapest {
    border-color: var(--ds-success, #27ae60);
    box-shadow: inset 0 0 0 1px rgb(39 174 96 / 0.25);
}

.lawyer-proposal-card.is-active-calc {
    border-color: var(--ds-ink, #2d3436);
}

.lawyer-proposal-top {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.lawyer-proposal-name-row {
    flex: 1 1 auto;
    min-width: 0;
}

.lawyer-proposal-name-row .proposal-name {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 14rem;
}

.lawyer-proposal-use {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ds-muted);
    cursor: pointer;
}

.lawyer-proposal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    background: #e8f8ef;
    color: #1e7a45;
}

#lawyerCompareResultsWrap tr.is-cheapest {
    font-weight: 700;
}

#lawyerCompareResultsWrap tbody tr[data-proposal-id] {
    cursor: pointer;
    background: color-mix(in srgb, var(--lawyer-row, #94a3b8) 14%, #fff);
    box-shadow: inset -3px 0 0 var(--lawyer-row, transparent);
}

#lawyerCompareResultsWrap tbody tr[data-proposal-id]:hover {
    background: color-mix(in srgb, var(--lawyer-row, #94a3b8) 22%, #fff);
}

#lawyerCompareResultsWrap tbody tr.is-cashflow {
    background: color-mix(in srgb, var(--lawyer-row, #94a3b8) 28%, #fff);
    font-weight: 800;
    box-shadow: inset -4px 0 0 var(--lawyer-row);
}

#lawyerCompareResultsWrap tbody tr.is-cashflow:focus {
    outline: 2px solid var(--lawyer-row);
    outline-offset: -2px;
}

.lawyer-compare-swatch {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    margin-inline-end: 0.4rem;
    border-radius: 99px;
    background: var(--lawyer-row);
    vertical-align: -0.08rem;
}

.lawyer-compare-combo {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.lawyer-single-head {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.lawyer-single-head.hidden {
    display: none;
}

.lawyer-single-label {
    font-size: var(--ds-text-xs);
    font-weight: 600;
    color: var(--ds-muted);
    line-height: 1.35;
}

.lawyer-single-value {
    font-size: var(--ds-text-lg);
    font-weight: 900;
    color: var(--ds-lawyer);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.lawyer-single-note {
    font-size: var(--ds-text-xs);
    font-weight: 500;
    color: var(--ds-muted);
    line-height: 1.45;
}

.lawyer-compare-combo.is-single #lawyerCompareResultsVerdict,
.lawyer-compare-combo.is-single #periodsStreamTitle,
.lawyer-compare-combo.is-single .lawyer-lines-footer-hint {
    display: none;
}

.lawyer-periods-in-combo {
    min-width: 0;
}

.lawyer-lines-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lawyer-lines-block.hidden {
    display: none;
}

.lawyer-lines-wrap {
    position: relative;
    width: 100%;
    height: 16.5rem;
    margin-top: 0;
}

.lawyer-lines-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    direction: ltr;
    unicode-bidi: isolate;
}

.lawyer-line-path {
    transition: opacity 0.2s ease;
}

.lawyer-lines-svg:has(.lawyer-line-path.is-pulsing) .lawyer-line-path:not(.is-pulsing) {
    opacity: 0.28;
}

.lawyer-line-path.is-pulsing {
    animation: lawyer-line-pulse 2.4s ease-out 1 both;
}

@keyframes lawyer-line-pulse {
    0%, 38% { stroke-width: 6.8; }
    100% { stroke-width: 2.8; }
}

.lawyer-lines-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 1rem;
}

.lawyer-lines-footer-hint {
    margin: 0;
}

.lawyer-lines-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lawyer-lines-swatch {
    display: inline-block;
    width: 1.15rem;
    height: 0;
    border-top: 2.5px solid currentColor;
    border-radius: 99px;
}

.lawyer-lines-leg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.15rem 0.1rem;
    border: 0;
    background: none;
    color: var(--ds-muted);
    font: inherit;
    font-size: var(--ds-text-xs);
    font-weight: 600;
    cursor: pointer;
}

.lawyer-lines-leg-btn.is-active {
    color: var(--ds-ink);
    font-weight: 800;
}

.lawyer-lines-leg-btn.is-active .lawyer-lines-swatch {
    border-top-width: 2.5px;
}

.lawyer-lines-tip {
    position: absolute;
    z-index: 8;
    box-sizing: border-box;
    min-width: 9rem;
    max-width: calc(100% - 16px);
    padding: 0.4rem 0.6rem;
    border-radius: 0.65rem;
    background: var(--ds-ink);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
    pointer-events: none;
    box-shadow: var(--ds-shadow-chip);
}

.lawyer-lines-tip.hidden {
    display: none;
}

.lawyer-lines-tip-month {
    font-weight: 600;
    opacity: 0.78;
    margin-bottom: 0.2rem;
}

.lawyer-lines-tip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.lawyer-lines-tip-row.is-active {
    font-weight: 800;
}

.lawyer-lines-tip-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 99px;
    flex: 0 0 auto;
}

#wizardStep3 .wizard-pension-layout {
    margin-top: 0.35rem;
}

.wizard-dialog .wizard-segment {
    max-width: none;
    gap: 0.35rem;
}

.wizard-dialog .calc-segment-btn {
    min-height: 2rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    flex: 1 1 6rem;
}

.wizard-dialog .space-y-1 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.25rem;
}

.wizard-dialog .space-y-2 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.35rem;
}

.wizard-dialog .space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.45rem;
}

.wizard-dialog .fund-estimate {
    display: none;
}

.wizard-dialog .wizard-add-fund-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    margin-top: 0;
    flex-shrink: 0;
}

.wizard-dialog .wizard-funds-summary,
.wizard-dialog .wizard-retro-hint {
    margin: 0.25rem 0 0;
    font-size: 0.7rem;
    line-height: 1.3;
}

#wizardStep2 > h3 {
    margin-bottom: 0.35rem;
}

#btlCommonFields:not(.hidden) {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

#btlEstimateFields:not(.hidden) {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

#btlEstimateFields.hidden {
    display: none;
}

#btlApprovedFields:not(.hidden),
#pensionApprovedFields:not(.hidden) {
    display: flex;
}

#pensionFundsList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 0.5rem;
}

@media (max-width: 639px) {
    .wizard-overlay {
        padding: 0;
    }

    .wizard-dialog {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .wizard-dialog-inner {
        max-height: 100dvh;
        height: 100%;
        padding: max(0.75rem, env(safe-area-inset-top)) 1rem max(0.75rem, env(safe-area-inset-bottom));
        gap: 0.5rem;
    }

    .wizard-header {
        position: relative;
        padding-inline-start: 2.75rem;
    }

    .wizard-header .ds-card-title {
        font-size: 1.05rem;
    }

    .wizard-mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        inset-inline-start: 0;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 999px;
        border: none;
        background: var(--ds-surface-muted, rgba(15, 23, 42, 0.06));
        color: var(--ds-muted);
        font-size: 0.95rem;
        line-height: 1;
    }

    #wizardStepPills {
        display: none;
    }

    .wizard-progress {
        display: block;
        flex-shrink: 0;
        height: 0.3rem;
        border-radius: 999px;
        background: var(--ds-line);
        overflow: hidden;
    }

    .wizard-progress-bar {
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--ds-accent, #3f4e5e), var(--ds-accent-strong, #2f3b47));
        transition: width 0.35s ease;
    }

    .wizard-body {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .wizard-step.is-active {
        animation: wizardStepInNext 0.32s ease;
    }

    .wizard-dialog.wizard-dir-back .wizard-step.is-active {
        animation-name: wizardStepInPrev;
    }

    @keyframes wizardStepInNext {
        from { opacity: 0; transform: translateX(-16px); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes wizardStepInPrev {
        from { opacity: 0; transform: translateX(16px); }
        to { opacity: 1; transform: translateX(0); }
    }

    .wizard-step-title {
        font-size: 1.05rem;
    }

    .wizard-nav {
        position: sticky;
        bottom: 0;
        display: flex;
        gap: 0.5rem;
        padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
    }

    .wizard-nav .ds-btn {
        min-height: 2.75rem;
        font-size: 0.9rem;
    }

    #wizardPrevBtn {
        flex: 0 0 auto;
    }

    #wizardStepLabel {
        display: none;
    }

    .wizard-nav > .flex {
        flex: 1 1 auto;
        display: flex;
    }

    #wizardNextBtn,
    #wizardDoneBtn {
        flex: 1 1 auto;
    }

    .wizard-dialog .ds-input,
    .wizard-dialog .ds-select {
        font-size: 1rem;
        padding: 0.6rem 0.65rem;
    }

    .wizard-dialog .calc-pill,
    .wizard-dialog .wizard-pill,
    .wizard-dialog .calc-segment-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.7rem;
    }

    #wizardStep1 .wizard-cols,
    #wizardStep2 .wizard-cols,
    #wizardStep3 .wizard-cols,
    .lawyer-proposal-cols,
    .wizard-lawyer-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .wizard-lawyer-proposals {
        grid-template-columns: 1fr;
    }

    .wizard-pension-dates-grid {
        grid-template-columns: 1fr;
    }

    .wizard-fund-top {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .wizard-fund-top .fund-type {
        grid-column: 1 / -1;
    }

    .wizard-fund-control {
        width: min(100%, 10rem);
    }

    #pensionFundsList {
        grid-template-columns: 1fr;
    }

    .wizard-dialog .wizard-retro-hint:not(:empty) {
        display: none;
    }

    .wizard-dialog .wizard-funds-summary {
        display: none;
    }
}

/* Scenario pills — inherit calc-pill tokens above */
.scenario-btn {
    font-size: var(--ds-text-sm);
    padding: 0.45rem 0.75rem;
}

.scenario-btn .scenario-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-inline-start: 0.1rem;
    padding: 0 0.35rem;
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-text-xs);
    font-weight: 800;
    background: var(--ds-warn);
    color: #fff;
    line-height: 1;
}

.scenario-btn.active .scenario-badge {
    background: #fff;
    color: var(--ds-warn-text);
}

/* ── Connected pill chrome (blob nav) ── */
.app-chrome {
    --blob-ink: #111111;
    --blob-h: 3rem;
    display: flex;
    justify-content: center;
}

.blob-bar:not(.hidden) {
    position: relative;
    display: flex;
    justify-content: center;
    width: max-content;
    max-width: 100%;
}

.blob-ui {
    display: flex;
    align-items: stretch;
    min-height: var(--blob-h);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.blob-ui::-webkit-scrollbar {
    display: none;
}

.blob-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--blob-h);
    padding: 0 1.15rem;
    background: var(--blob-ink);
    color: #fff;
    position: relative;
    z-index: 1;
}

.blob-slot.hidden,
#scenarioNav.hidden {
    display: none;
}

.blob-slot--tabs {
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
    gap: 0.1rem;
    padding-inline: 0.4rem;
}

.blob-tabs {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.blob-bar .blob-link,
.blob-bar .scenario-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    appearance: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: rgb(255 255 255 / 0.86);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.blob-bar .blob-link:hover,
.blob-bar .scenario-btn:hover {
    background: rgb(255 255 255 / 0.08);
    border-color: transparent;
    color: #fff;
    box-shadow: none;
}

.blob-bar .blob-link--icon {
    padding: 0.32rem 0.55rem;
}

.blob-home-icon {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
}

.blob-bar .scenario-btn.active,
.blob-bar .scenario-btn.active:hover {
    background: rgb(255 255 255 / 0.14);
    border-color: transparent;
    color: #fff;
    box-shadow: none;
}

.blob-bar .blob-link--icon.active,
.blob-bar .blob-link--icon.active:hover {
    background: transparent;
}

.blob-bar .blob-link:focus-visible,
.blob-bar .scenario-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.blob-rule {
    width: 1px;
    height: 0.85rem;
    background: rgb(255 255 255 / 0.28);
    flex-shrink: 0;
    align-self: center;
}

.blob-bar .scenario-badge {
    background: var(--ds-warn);
    color: #fff;
}

.blob-bar .scenario-btn.active .scenario-badge {
    background: #fff;
    color: var(--ds-warn-text);
}

.scenario-btn.hidden,
.scenario-btn .scenario-badge.hidden,
.blob-tabs .blob-rule.hidden,
.blob-bar .scenario-badge.hidden,
.blob-bar .scenario-btn.hidden,
.blob-bar .blob-link.hidden,
.blob-bar .blob-rule.hidden {
    display: none !important;
}

@media (max-width: 639px) {
    .app-chrome {
        --blob-h: 2.9rem;
        justify-content: stretch;
    }

    .blob-bar:not(.hidden) {
        width: 100%;
    }

    .blob-ui {
        width: 100%;
    }

    .blob-slot--tabs {
        width: 100%;
        padding-inline: 0.3rem;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .blob-slot--tabs::-webkit-scrollbar {
        display: none;
    }

    .blob-tabs {
        width: max-content;
    }

    .blob-bar .blob-link,
    .blob-bar .scenario-btn {
        flex: 0 0 auto;
        min-height: 2.5rem;
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
    }

    .blob-bar .blob-link--icon {
        min-width: 2.5rem;
    }

    /* Swap long labels for short ones on narrow screens so each segment stays
       on one line at the wider mobile touch-target size. */
    .blob-bar .blob-link[data-short] {
        font-size: 0;
    }

    .blob-bar .blob-link[data-short]::after {
        content: attr(data-short);
        font-size: 0.8rem;
    }
}

/* Insights panel — extends ds-panel; insight cards below */
.insights-panel-head {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.insights-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.insights-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.3;
    background: #fff;
    box-shadow: 0 4px 14px rgb(15 23 42 / 0.06);
}

.insights-summary-chip strong {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.insights-summary-chip.is-warn {
    background: linear-gradient(135deg, #ffe8e8 0%, #fff 70%);
    border-color: #ffd0d0;
    color: #c0392b;
}

.insights-summary-chip.is-info {
    background: linear-gradient(135deg, #e8f4ff 0%, #fff 70%);
    border-color: #cfe6ff;
    color: #2980b9;
}

.insights-summary-chip.is-ok {
    background: linear-gradient(135deg, #e8f8ef 0%, #fff 70%);
    border-color: #c6ecd6;
    color: #1e8449;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
}

.insights-empty {
    margin: 0;
    padding: 1.4rem 1.1rem;
    border-radius: 1rem;
    border: 1px dashed #cfd8e3;
    background: #fff;
    color: var(--insight-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 8px 24px rgb(15 23 42 / 0.05);
}

.insight {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.05rem 1.1rem;
    border-radius: 1.1rem;
    border: 1px solid transparent;
    background: #fff;
    box-shadow: 0 10px 28px rgb(15 23 42 / 0.08);
    color: var(--insight-ink);
    line-height: 1.55;
}

.insight.warn {
    background: linear-gradient(135deg, #ffe9e9 0%, #fff 55%);
    border-color: #ffd4d4;
}

.insight.ok {
    background: linear-gradient(135deg, #e9f9ef 0%, #fff 55%);
    border-color: #c9edd6;
}

.insight.info {
    background: linear-gradient(135deg, #e9f4ff 0%, #fff 55%);
    border-color: #cfe6ff;
}

.insight-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
}

.insight-icon-halo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    box-shadow: inset 0 1px 2px rgb(255 255 255 / 0.65);
}

.insight.warn .insight-icon-halo {
    background: rgb(231 76 60 / 0.14);
}

.insight.ok .insight-icon-halo {
    background: rgb(39 174 96 / 0.14);
}

.insight.info .insight-icon-halo {
    background: rgb(52 152 219 / 0.14);
}

.insight-icon-glyph {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 4px 10px rgb(15 23 42 / 0.12);
}

.insight.warn .insight-icon-glyph {
    background: #e74c3c;
}

.insight.ok .insight-icon-glyph {
    background: #27ae60;
}

.insight.info .insight-icon-glyph {
    background: #3498db;
}

.insight-icon-glyph svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    direction: ltr;
}

.insight-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-top: 0.1rem;
}

.insight-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.insight-title {
    margin: 0;
    font-size: var(--ds-text-md);
    font-weight: 800;
    line-height: 1.35;
    color: var(--ds-ink);
}

.insight-badge {
    flex-shrink: 0;
    padding: 0.2rem 0.55rem;
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-text-xs);
    font-weight: 800;
    background: rgb(255 255 255 / 0.85);
    border: 1px solid rgb(15 23 42 / 0.08);
    color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
}

.insight-text {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--ds-muted);
}

.insight-disclaimer {
    margin: 0.35rem 0 0;
    font-size: var(--ds-text-xs);
    font-weight: 700;
    line-height: 1.45;
    color: var(--ds-ink);
}

.insight-more {
    margin-top: 0.45rem;
}

.insight-more summary {
    cursor: pointer;
    font-weight: 800;
    font-size: var(--ds-text-sm);
    line-height: 1.4;
    color: var(--ds-ink);
    list-style: none;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0;
    direction: rtl;
}

.insight-more summary::marker,
.insight-more summary::-webkit-details-marker {
    display: none;
    content: none;
}

.insight-more summary::before {
    content: "▼";
    font-size: 0.65rem;
    color: #95a5a6;
}

.insight-more[open] summary::before {
    content: "▲";
}

.insight-more-body {
    margin-top: 0.45rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgb(15 23 42 / 0.08);
    font-size: var(--ds-text-sm);
    font-weight: 500;
    line-height: 1.6;
    color: var(--ds-muted);
}

.insight-more-body h4 {
    margin: 0.65rem 0 0.15rem;
    font-size: var(--ds-text-sm);
    font-weight: 800;
    color: var(--ds-ink);
}

.insight-more-body h4:first-child {
    margin-top: 0;
}

.insight-more-body p,
.insight-more-body ul {
    margin: 0;
}

.insight-more-body ul {
    padding-right: 1.1rem;
    margin-top: 0.25rem;
}

.insight-more-body li + li {
    margin-top: 0.15rem;
}

.laron-plain-help {
    color: var(--ds-muted);
}

/* Wizard step pills */
.wizard-pill {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    min-width: 1.75rem;
}

/* Work-reduction comparison status pills */
.cmp-status {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: var(--ds-radius-pill);
    font-size: var(--ds-text-xs);
    font-weight: 800;
}

.cmp-status.status-same {
    background: linear-gradient(135deg, #f1f5f9 0%, #fff 70%);
    color: var(--ds-muted);
}

.cmp-status.status-down {
    background: var(--ds-warn-bg);
    color: var(--ds-warn-text);
}

.cmp-status.status-up {
    background: var(--ds-ok-bg);
    color: var(--ds-ok-text);
}

.cmp-status.status-mid {
    background: linear-gradient(135deg, #fef9c3 0%, #fff 70%);
    color: #a16207;
}

.cmp-row-head {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.cmp-row-head .cmp-row-tip {
    margin-top: 0.12rem;
    padding: 0.2rem;
    margin: -0.08rem -0.2rem 0;
}

#workCompareTable td:first-child {
    position: relative;
    overflow: visible;
    z-index: 1;
}

#workCompareTable tbody tr:has(.cmp-row-tip:hover),
#workCompareTable tbody tr:has(.cmp-row-tip[open]),
#workCompareTable tbody tr:has(.cmp-row-tip:focus-within) {
    position: relative;
    z-index: 30;
}

#workCompareTable tbody tr:has(.cmp-row-tip:hover) td:first-child,
#workCompareTable tbody tr:has(.cmp-row-tip[open]) td:first-child,
#workCompareTable tbody tr:has(.cmp-row-tip:focus-within) td:first-child {
    z-index: 31;
}

#workCompareTable .cmp-row-tip .field-tip-pop {
    z-index: 50;
    width: min(18rem, calc(100vw - 2.5rem));
    padding-top: 0.45rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

#workCompareTable .cmp-row-tip .field-tip-pop-inner {
    padding: 0.7rem 0.8rem;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    color: var(--ds-ink);
    box-shadow: var(--ds-shadow-card);
}

/* Answer cards enter softly */
.answer-card:not(.hidden) {
    animation: cardIn 0.2s ease;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Same-income widget */
.same-income {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-panel);
    padding: 1.25rem 1.35rem 1.15rem;
    box-shadow: var(--ds-shadow-card);
}

.same-income-embed {
    padding: 0.15rem 0 0.35rem;
}

.same-income-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.same-income-kicker {
    margin: 0;
    font-size: var(--ds-text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ds-muted);
}

.same-income-heading {
    margin: 0.15rem 0 0;
    font-size: var(--ds-text-md);
    font-weight: 800;
    color: var(--ds-ink);
}

.same-income-chip {
    flex-shrink: 0;
    font-size: var(--ds-text-sm);
    font-weight: 800;
    color: var(--ds-ink);
    background: linear-gradient(135deg, #f1f5f9 0%, #fff 70%);
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-pill);
    padding: 0.28rem 0.7rem;
    box-shadow: var(--ds-shadow-chip);
}

.same-income-hero {
    margin: 1.1rem 0 0.85rem;
}

.same-income-hero-num {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
}

.same-income-hero-num.has-prefix::before {
    content: attr(data-prefix);
    display: block;
    font-size: var(--ds-text-sm);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ds-muted);
    margin-bottom: 0.2rem;
}

.same-income.is-met .same-income-hero-num,
.same-income-embed.is-met .same-income-hero-num {
    color: var(--ds-ok-text);
}

.same-income-hero-sub {
    margin: 0.35rem 0 0;
    font-size: var(--ds-text-sm);
    font-weight: 600;
    color: var(--ds-muted);
}

.same-income-meter {
    display: block;
}

.same-income-chart {
    min-width: 0;
    position: relative;
}

.same-income-bar-tip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 14px));
    padding: 0.4rem 0.55rem 0.45rem;
    border-radius: 0.45rem;
    background: var(--ds-ink);
    color: #fff;
    font-size: var(--ds-text-xs);
    line-height: 1.35;
    max-width: 15rem;
    box-shadow: 0 6px 18px rgb(15 23 42 / 0.22);
    text-align: right;
}

.same-income-bar-tip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--ds-ink);
}

.same-income-bar-tip.hidden {
    display: none;
}

.same-income-bar-tip-title {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.same-income-bar-tip-body {
    margin-top: 0.15rem;
    font-weight: 500;
    opacity: 0.92;
}

.same-income-track-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.same-income-seg {
    height: 100%;
    min-width: 0;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.12s ease, filter 0.12s ease;
}

.same-income-seg.is-hover {
    z-index: 2;
    box-shadow: 0 0 0 2px var(--ds-ink);
    filter: brightness(1.08);
}

.same-income-seg::before {
    content: '';
    position: absolute;
    inset: -0.35rem 0;
}

.same-income-seg-labels {
    display: flex;
    align-items: flex-end;
    min-height: 2.35em;
    margin-bottom: 0.2rem;
}

.same-income-seg-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.15;
    text-align: center;
}

.same-income-seg-name {
    font-size: 9px;
    font-weight: 600;
}

.same-income-seg-val {
    font-size: 10px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.same-income-track {
    position: relative;
    flex: 1;
    display: flex;
    height: 8px;
    border-radius: 999px;
    background: var(--calc-fill, #eef2f6);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgb(63 78 94 / 0.06);
}

.same-income-seg.is-gap {
    background: transparent;
}

.same-income-tick {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--ds-ink);
    transform: translateX(-1px);
    pointer-events: none;
    border-radius: 1px;
    z-index: 1;
}

.same-income-pct {
    flex-shrink: 0;
    min-width: 2.6rem;
    text-align: right;
    font-size: var(--ds-text-md);
    font-weight: 800;
    color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
}

.same-income.is-met .same-income-pct,
.same-income-embed.is-met .same-income-pct {
    color: var(--ds-ok);
}

.same-income-seg-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.85rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--ds-text-sm);
    font-weight: 600;
    color: var(--ds-muted);
}

.same-income-seg-legend li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.same-income-swatch {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.same-income-ends {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.7rem;
}

.same-income-end-label {
    font-size: var(--ds-text-xs);
    font-weight: 700;
    color: var(--ds-muted);
}

.same-income-end-val {
    margin-top: 0.1rem;
    font-size: var(--ds-text-md);
    font-weight: 800;
    color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
}

.same-income-note {
    margin: 0.85rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ds-line);
    font-size: var(--ds-text-sm);
    font-weight: 500;
    color: var(--ds-muted);
    line-height: 1.45;
}

/* ── Full overview dashboard (one-page fit) ── */
body.is-full-tab {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
}

@media (min-width: 768px) {
    body.is-full-tab {
        padding: 0.75rem 1.25rem;
    }
}

#pageShell.is-full-tab {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: min(96rem, 100%);
    height: calc(100dvh - 1rem);
    max-height: calc(100dvh - 1rem);
    min-height: 0;
    gap: 0.5rem;
    overflow: hidden;
}

#pageShell.is-full-tab > :not([hidden]) ~ * {
    margin-top: 0;
}

@media (min-width: 768px) {
    #pageShell.is-full-tab {
        height: calc(100dvh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
    }
}

body.is-full-tab .app-chrome {
    flex-shrink: 0;
    --blob-h: 2.65rem;
}

body.is-full-tab #resultsMain {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0;
}

#fullOverviewSection.full-dash {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    gap: 0;
    padding: 0.65rem 0.75rem 0.75rem;
    font-size: var(--ds-text-sm);
}

#fullOverviewSection .full-dash-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(min-content, auto) minmax(0, 1fr) minmax(min-content, auto);
    gap: 0.5rem;
    overflow: hidden;
}

#fullOverviewSection .full-dash-body:has(#fullDashBottom.hidden) {
    grid-template-rows: minmax(min-content, auto) minmax(0, 1fr);
}

#fullOverviewSection .ds-card-title {
    margin: 0;
    font-size: var(--ds-text-sm);
    font-weight: 800;
    line-height: 1.25;
}

#fullOverviewSection .ds-hint {
    font-size: var(--ds-text-xs);
    line-height: 1.35;
}

/* Top row — work bar + pie */
.full-dash-top {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    min-width: 0;
    min-height: min-content;
    margin-bottom: 0.75rem;
}

.full-dash-top:has(#fullSameIncomeWidget.hidden):has(#fullPieCard.hidden) {
    display: none;
}

/* Work bar — compact top strip */
:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar.same-income {
    flex: 1 1 auto;
    min-width: 12rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem 0.75rem;
    border-radius: var(--ds-radius-card);
    overflow: visible;
    justify-content: center;
}

#cardWorkReduction .full-dash-work-bar.same-income {
    flex: none;
    width: 100%;
    margin-bottom: 1rem;
}

#workSameIncomeBlock.is-met .same-income-hero-num {
    color: var(--ds-ok-text);
}

#cardWorkReduction .work-income-head {
    margin: 0 0 0.75rem;
}

#cardWorkReduction .work-compare-title {
    margin: 0 0 0.65rem;
}

#cardWorkReduction .same-income-top {
    margin: 0;
}

#cardWorkReduction .same-income-hero-num.has-prefix {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.4rem;
}

#cardWorkReduction .same-income-hero-num.has-prefix::before {
    flex: 1 0 100%;
}

#cardWorkReduction .same-income-hero-sub {
    margin-top: 0.25rem;
}

#cardWorkReduction .same-income-pct-live {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-top: 0.25rem;
    padding: 0.05rem 0.15rem;
    border: 0;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.15;
    cursor: pointer;
    border-radius: 0.4rem;
    transition: transform 0.12s ease, filter 0.12s ease, background-color 0.12s ease;
}

#cardWorkReduction .same-income-pct-status {
    font-weight: 400;
    letter-spacing: 0;
}

#cardWorkReduction .same-income-pct-live.is-pct-low {
    color: #e74c3c;
}

#cardWorkReduction .same-income-pct-live.is-pct-mid {
    color: #e67e22;
}

#cardWorkReduction .same-income-pct-live.is-pct-high {
    color: #27ae60;
}

#cardWorkReduction .same-income-pct-live.is-pct-over {
    color: #7dcea0;
}

#cardWorkReduction .same-income-pct-live:hover,
#cardWorkReduction .same-income-pct-live:focus-visible,
#cardWorkReduction .same-income-pct-live.is-hover {
    transform: scale(1.08);
    filter: brightness(1.06);
    background: rgb(15 23 42 / 0.04);
    outline: none;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar.same-income.hidden {
    display: none;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-heading {
    margin: 0;
    font-size: var(--ds-text-sm);
    font-weight: 800;
    width: 100%;
}

#fullOverviewSection .full-dash-work-bar .same-income-seg-legend,
#cardWorkReduction .full-dash-work-bar .same-income-seg-legend {
    display: none;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg-labels {
    min-height: 2.7em;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg-name,
:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg-val {
    font-size: var(--ds-text-sm);
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-main {
    flex: 1 1 auto;
    min-width: 0;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-bar-wrap {
    width: 100%;
    min-width: 0;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-bar-wrap .same-income-meter {
    width: 100%;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-track-row {
    padding: 0.7rem 0;
    overflow: visible;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-track {
    height: 1.05rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, #dbe3ea 0%, #eef2f6 45%, #f8fafc 100%);
    box-shadow:
        inset 0 2px 5px rgb(15 23 42 / 0.14),
        inset 0 -1px 1px rgb(255 255 255 / 0.85),
        0 1px 0 rgb(255 255 255 / 0.6);
    overflow: visible;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg:not(.is-gap) {
    position: relative;
    background-image:
        linear-gradient(
            180deg,
            rgb(255 255 255 / 0.38) 0%,
            rgb(255 255 255 / 0.08) 38%,
            transparent 52%,
            rgb(15 23 42 / 0.16) 100%
        );
    background-blend-mode: soft-light;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg.is-fill-start:not(.is-gap) {
    border-radius: 999px 0 0 999px;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg.is-fill-end:not(.is-gap) {
    border-radius: 0 999px 999px 0;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg.is-fill-start.is-fill-end:not(.is-gap) {
    border-radius: 999px;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg.is-fill-end:not(.is-gap)::after {
    content: '';
    position: absolute;
    inset-inline-end: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.55);
    box-shadow:
        inset 0 1px 2px rgb(15 23 42 / 0.28),
        0 0 0 1px rgb(255 255 255 / 0.25);
    pointer-events: none;
    z-index: 2;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg.is-hover {
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 0.45),
        0 0 0 2px color-mix(in srgb, var(--seg-color, var(--ds-ink)) 55%, transparent);
    filter: brightness(1.06);
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg.is-gap {
    background: repeating-linear-gradient(
        -45deg,
        rgb(231 76 60 / 0.14),
        rgb(231 76 60 / 0.14) 3px,
        transparent 3px,
        transparent 6px
    ) !important;
    box-shadow: none;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg.is-over {
    opacity: 1;
    background-color: #27ae60 !important;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-tick {
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ds-ink);
    border-radius: 2px;
    transform: translateX(-2px);
    box-shadow: 0 0 0 1px #fff;
    z-index: 3;
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-bar-tip {
    border-radius: 0.65rem;
    padding: 0.4rem 0.65rem 0.45rem;
    background: var(--ds-ink);
    box-shadow: 0 8px 20px rgb(15 23 42 / 0.2);
}

:is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-bar-tip::after {
    border-top-color: var(--ds-ink);
}

#fullOverviewSection .full-dash-work-note:not(.hidden) {
    flex-basis: 100%;
    width: 100%;
    margin: 0;
    padding-top: 0.35rem;
    border-top: 1px solid var(--ds-line);
    font-size: var(--ds-text-xs);
    line-height: 1.35;
}

/* Timeline — full width chart */
#fullOverviewSection .full-dash-timeline {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.3rem 0.6rem 0.2rem;
    overflow: hidden;
    position: relative;
}

.full-dash-timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
}

.full-dash-timeline-head .ds-card-title {
    margin: 0;
}

.full-dash-chart-wrap {
    flex: 1 1 auto;
    min-height: 12rem;
    width: 100%;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}

.full-dash-chart-axis {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
    background: var(--ds-surface);
    pointer-events: none;
}

.full-dash-chart-axis::after {
    content: '';
    position: absolute;
    top: 0;
    right: -16px;
    width: 16px;
    height: 100%;
    background: linear-gradient(to right, var(--ds-surface), transparent);
    pointer-events: none;
}

.full-dash-timeline-axis {
    display: block;
    height: 100%;
    overflow: visible;
}

.full-dash-chart-scroll {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
}

.full-dash-timeline-svg {
    display: block;
    flex: 0 0 auto;
    min-width: 100%;
    height: 100%;
    min-height: 12rem;
    overflow: visible;
}

.full-timeline-hit.is-hover {
    fill: rgb(37 99 235 / 0.06);
}

.full-timeline-tip {
    position: absolute;
    z-index: 8;
    box-sizing: border-box;
    max-width: calc(100% - 16px);
    padding: 0.4rem 0.6rem;
    border-radius: 0.65rem;
    background: var(--ds-ink);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow: auto;
    pointer-events: none;
    box-shadow: var(--ds-shadow-chip);
}

.full-timeline-tip.hidden {
    display: none;
}

.full-timeline-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--tip-arrow-x, 50%);
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--ds-ink);
}

.full-timeline-tip.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--ds-ink);
}

/* Pie — same height as the work-reduction card beside it */
.full-dash-pie-slot {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
    align-self: stretch;
    aspect-ratio: 1;
    height: auto;
    width: auto;
    max-width: 100%;
    min-height: 0;
}

.full-dash-pie-slot:has(#fullPieCard.hidden) {
    display: none;
}

#fullOverviewSection .full-dash-pie {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0.4rem;
    overflow: visible;
    box-sizing: border-box;
}

#fullOverviewSection .full-dash-pie > .ds-card-title {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    left: 0.5rem;
    z-index: 1;
    white-space: nowrap;
    text-align: center;
    font-size: var(--ds-text-sm);
    font-weight: 800;
    line-height: 1.15;
    pointer-events: none;
}

.full-dash-pie-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1.45rem;
    padding-bottom: 0.3rem;
    box-sizing: border-box;
}

.full-dash-pie-ring {
    position: relative;
    flex: none;
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
    container-type: size;
    transform: translateY(-0.15rem) scale(1.05);
}

.full-pie-slice {
    cursor: pointer;
    outline: none;
}

.full-pie-slice.is-hover {
    filter: brightness(1.14);
}

.full-pie-tip,
.full-lawyer-tip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 12px));
    padding: 0.4rem 0.55rem 0.45rem;
    border-radius: 0.45rem;
    background: var(--ds-ink);
    color: #fff;
    font-size: var(--ds-text-xs);
    line-height: 1.35;
    max-width: 15rem;
    box-shadow: 0 6px 18px rgb(15 23 42 / 0.22);
    text-align: right;
}

.full-pie-tip::after,
.full-lawyer-tip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--ds-ink);
}

.full-pie-tip.hidden,
.full-lawyer-tip.hidden {
    display: none;
}

.full-pie-tip-title,
.full-lawyer-tip-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    font-weight: 800;
}

.full-pie-tip-swatch,
.full-lawyer-tip-swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35);
}

.full-pie-tip-body,
.full-lawyer-tip-body {
    margin-top: 0.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: 0.95;
}

.full-dash-pie-ring svg {
    display: block;
    width: 100%;
    height: 100%;
}

.full-dash-pie-center {
    position: absolute;
    inset: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.full-dash-pie-center-label {
    font-size: clamp(0.55rem, 9.5cqmin, 0.72rem);
    font-weight: 700;
    color: var(--ds-muted);
    line-height: 1.05;
}

#fullOverviewSection .full-dash-pie-center .ds-pie-total {
    font-size: clamp(0.72rem, 14cqmin, 0.95rem);
    font-weight: 800;
    line-height: 1.08;
}

/* Lawyer card — retro only */
#fullOverviewSection .full-dash-lawyer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    align-content: start;
}

.full-dash-lawyer-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.full-dash-lawyer-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.full-dash-lawyer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
}

.full-dash-retro-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
}

.full-dash-retro-note {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.62rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#fullOverviewSection .full-dash-lawyer .ds-stat {
    padding: 0.28rem 0.4rem;
}

#fullOverviewSection .full-dash-lawyer .ds-stat-label {
    font-size: 0.62rem;
    line-height: 1.2;
}

#fullOverviewSection .full-dash-lawyer .ds-stat-value {
    font-size: var(--ds-text-xs);
    font-weight: 800;
    line-height: 1.15;
}

#fullOverviewSection .full-dash-lawyer .ds-stat-note {
    min-height: 0 !important;
    font-size: 0.6rem;
    line-height: 1.2;
}

#fullOverviewSection .full-dash-lawyer-grid .ds-stat-value {
    font-size: 0.62rem;
}

#fullRetroSection.hidden {
    display: none;
}

#fullOverviewSection .full-dash-lawyer:has(#fullRetroSection.hidden) {
    grid-template-columns: 1fr;
}

body.is-full-tab #fullOverviewSection .full-dash-body {
    grid-template-rows: minmax(min-content, auto) minmax(8rem, 1fr) minmax(7rem, auto);
}

body.is-full-tab #fullOverviewSection .full-dash-body:has(#fullDashBottom.hidden) {
    grid-template-rows: minmax(min-content, auto) minmax(12rem, 1fr);
}

body.is-full-tab #fullOverviewSection .full-dash-timeline {
    min-height: 10rem;
}

body.is-full-tab .full-dash-chart-wrap {
    min-height: 8rem;
    flex: 1 1 auto;
}

body.is-full-tab .full-dash-chart-scroll,
body.is-full-tab .full-dash-timeline-svg,
body.is-full-tab .full-dash-timeline-axis {
    min-height: 8rem;
}

body.is-full-tab .full-dash-timeline-svg {
    width: auto;
    min-width: 100%;
    height: 100%;
}

/* Bottom row — lawyer compare + compact insights */
.full-dash-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(15.5rem, 0.8fr);
    gap: 0.5rem;
    min-width: 0;
    min-height: 0;
    align-items: stretch;
}

.full-dash-bottom.hidden {
    display: none;
}

.full-dash-bottom:has(#fullLawyerCompareCard.hidden) {
    grid-template-columns: minmax(0, 1fr);
}

.full-dash-bottom:has(#fullLawyerCompareCard.hidden) .full-insights-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.32rem;
}

.full-dash-bottom:has(#fullInsightsCard.hidden) {
    grid-template-columns: minmax(0, 1fr);
}

.full-dash-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    flex-shrink: 0;
}

.full-dash-card-link {
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: var(--ds-text-xs);
    font-weight: 700;
    color: var(--ds-info-text);
    cursor: pointer;
}

.full-dash-card-link:hover {
    text-decoration: underline;
}

#fullOverviewSection .full-dash-lawyer-compare,
#fullOverviewSection .full-dash-insights {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0.5rem 0.7rem 0.55rem;
    overflow: hidden;
}

#fullOverviewSection .full-dash-lawyer-compare.hidden,
#fullOverviewSection .full-dash-insights.hidden {
    display: none;
}

.full-lawyer-chart {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    flex: 1 1 auto;
    min-height: 0;
    justify-content: center;
}

.full-lawyer-row {
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr);
    gap: 0.45rem;
    align-items: center;
}

.full-lawyer-row.is-best .full-lawyer-name {
    color: var(--ds-ok-text);
}

.full-lawyer-name {
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.full-lawyer-name-sub {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--ds-muted);
}

.full-lawyer-track {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: 1.2rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, #dbe3ea 0%, #eef2f6 45%, #f8fafc 100%);
    box-shadow:
        inset 0 2px 5px rgb(15 23 42 / 0.14),
        inset 0 -1px 1px rgb(255 255 255 / 0.85);
    overflow: hidden;
}

.full-lawyer-fill {
    display: flex;
    height: 100%;
    min-width: 0;
    position: relative;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    max-width: 100%;
}

.full-lawyer-seg {
    height: 100%;
    min-width: 0;
    cursor: pointer;
    outline: none;
    background-image:
        linear-gradient(
            180deg,
            rgb(255 255 255 / 0.38) 0%,
            rgb(255 255 255 / 0.08) 38%,
            transparent 52%,
            rgb(15 23 42 / 0.16) 100%
        );
    background-blend-mode: soft-light;
}

.full-lawyer-seg.is-hover {
    filter: brightness(1.08);
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.45);
}

.full-lawyer-seg + .full-lawyer-seg {
    box-shadow: inset -1px 0 0 rgb(255 255 255 / 0.55);
}

.full-lawyer-seg.is-once {
    background-color: var(--ds-lawyer);
}

.full-lawyer-seg.is-btl {
    background-color: var(--ds-btl);
}

.full-lawyer-seg.is-pension {
    background-color: #0284c7;
}

.full-lawyer-total {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgb(15 23 42 / 0.38);
    white-space: nowrap;
}

.full-lawyer-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ds-muted);
}

.full-lawyer-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.full-lawyer-legend li[hidden] {
    display: none;
}

.full-lawyer-swatch {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

.full-lawyer-swatch.is-once {
    background: var(--ds-lawyer);
}

.full-lawyer-swatch.is-btl {
    background: var(--ds-btl);
}

.full-lawyer-swatch.is-pension {
    background: #0284c7;
}

.full-insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    min-height: 0;
    overflow: auto;
}

.full-insight-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    margin: 0;
    padding: 0.38rem 0.5rem;
    border-radius: 0.7rem;
    border: 1px solid transparent;
    text-align: right;
    cursor: pointer;
    font: inherit;
    color: var(--ds-ink);
    box-shadow: none;
}

.full-insight-row.insight {
    padding: 0.38rem 0.5rem;
    border-radius: 0.7rem;
    box-shadow: none;
    gap: 0.45rem;
    align-items: center;
}

.full-insight-row .insight-icon-halo {
    width: 1.55rem;
    height: 1.55rem;
    flex-shrink: 0;
}

.full-insight-row .insight-icon-glyph {
    width: 1.35rem;
    height: 1.35rem;
    box-shadow: none;
}

.full-insight-row .insight-icon-glyph svg {
    width: 0.86rem;
    height: 0.86rem;
}

.full-insight-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
}

.full-insight-title {
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.full-insight-row .insight-badge {
    flex-shrink: 0;
    font-size: 0.62rem;
    padding: 0.08rem 0.4rem;
}

.full-insights-empty {
    margin: 0;
    font-size: var(--ds-text-xs);
    color: var(--ds-muted);
    line-height: 1.4;
}

@media (max-width: 899px), (max-height: 679px) {
    body.is-full-tab {
        height: auto;
        max-height: none;
        overflow: auto;
    }

    #pageShell.is-full-tab {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    body.is-full-tab #resultsMain,
    #fullOverviewSection.full-dash,
    #fullOverviewSection .full-dash-body {
        overflow: visible;
        flex: none;
    }


    :is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar.same-income {
        flex-direction: column;
        align-items: stretch;
    }

    :is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-main {
        width: 100%;
    }

    .full-dash-pie-ring {
        width: 100%;
        height: 100%;
    }

    .full-dash-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    /* The per-segment labels floating above the bar collide on narrow phones
       — show the wrapping legend list below the bar instead. */
    :is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar .same-income-seg-labels {
        display: none;
    }

    #fullOverviewSection .full-dash-work-bar .same-income-seg-legend,
    #cardWorkReduction .full-dash-work-bar .same-income-seg-legend {
        display: flex;
        /* Scales smoothly with viewport width instead of jumping at a single
           breakpoint — ~0.68rem at 320px phones up to ~0.82rem at 639px. */
        font-size: clamp(0.68rem, 0.54rem + 0.7vw, 0.82rem);
    }

    /* The legend makes the work-bar card taller than the pie card, so stop
       stretching them to match heights side by side — stack instead. */
    .full-dash-top {
        flex-direction: column;
        align-items: stretch;
    }

    /* The income-distribution donut doesn't earn its space on a phone screen — hide it. */
    .full-dash-pie-slot {
        display: none;
    }

    :is(#fullOverviewSection, #cardWorkReduction) .full-dash-work-bar.same-income {
        justify-content: flex-start;
    }

    /* Bigger touch targets + full (non-truncated) titles for the insights list. */
    .full-dash-card-link {
        padding: 0.5rem;
        margin: -0.5rem;
    }

    .full-insight-row {
        padding: 0.6rem 0.55rem;
        gap: 0.55rem;
    }

    .full-insight-row .insight-icon-halo {
        width: 1.85rem;
        height: 1.85rem;
    }

    .full-insight-row .insight-icon-glyph {
        width: 1.6rem;
        height: 1.6rem;
    }

    .full-insight-row .insight-icon-glyph svg {
        width: 1rem;
        height: 1rem;
    }

    .full-insight-title {
        font-size: 0.82rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

.field-tip {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.field-tip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: var(--ds-radius-pill);
    border: 1px solid var(--ds-line-strong);
    background: var(--ds-surface);
    color: var(--ds-muted);
    font-size: var(--ds-text-xs);
    font-weight: 800;
    line-height: 1;
    cursor: help;
    list-style: none;
}

.field-tip-btn::-webkit-details-marker {
    display: none;
}

.field-tip-pop {
    display: none;
    /* position: fixed (not absolute) so it can never be clipped by an
       ancestor's overflow:hidden (the wizard dialog scrolls internally) —
       JS clamps top/left to the viewport on open so it never runs off
       either edge regardless of where the trigger button sits. */
    position: fixed;
    top: -9999px;
    left: -9999px;
    z-index: 90;
    width: min(20rem, calc(100vw - 1.5rem));
    padding: 0.7rem 0.8rem;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-line);
    background: var(--ds-surface);
    color: var(--ds-ink);
    font-weight: 500;
    font-size: var(--ds-text-sm);
    line-height: 1.5;
    box-shadow: var(--ds-shadow-card);
}

.field-tip:hover .field-tip-pop,
.field-tip:focus-within .field-tip-pop,
.field-tip[open] .field-tip-pop {
    display: block;
}

.field-tip-lead {
    margin: 0 0 0.45rem;
    color: var(--ds-muted);
}

.field-tip-pop ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.field-tip-pop li + li {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--ds-line);
}

.field-tip-pop strong {
    color: var(--ds-ink);
}

.feedback-overlay {
    z-index: 80;
    padding: max(0.6rem, env(safe-area-inset-top)) max(0.6rem, env(safe-area-inset-inline-end)) max(0.6rem, env(safe-area-inset-bottom)) max(0.6rem, env(safe-area-inset-inline-start));
    align-items: center;
}

.feedback-dialog {
    width: min(94vw, 28rem);
    max-width: 100%;
    max-height: min(92dvh, calc(100dvh - 1.2rem));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feedback-dialog-inner {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.85rem 1rem 0.75rem;
}

.feedback-dialog-inner .modal-head {
    flex: none;
}

.feedback-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0 0.15rem 0.15rem;
    -webkit-overflow-scrolling: touch;
}

.feedback-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ds-ink);
    margin-top: 0.35rem;
}

.feedback-form textarea,
.feedback-form input[type="email"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--ds-line-strong);
    border-radius: 0.7rem;
    padding: 0.65rem 0.75rem;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--ds-ink);
    background: var(--ds-surface);
    resize: vertical;
}

.feedback-form textarea {
    min-height: 5.5rem;
    max-height: min(28vh, 12rem);
    flex: 0 1 auto;
}

.feedback-form textarea:focus,
.feedback-form input[type="email"]:focus {
    outline: 2px solid var(--ds-primary);
    outline-offset: 1px;
}

.feedback-share {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.55rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ds-ink);
    cursor: pointer;
}

.feedback-share input {
    margin-top: 0.2rem;
    flex: none;
}

.feedback-preview {
    margin: 0.15rem 0 0.35rem;
    border: 1px solid var(--ds-line);
    border-radius: 0.7rem;
    padding: 0.45rem 0.7rem;
    background: var(--ds-page);
}

.feedback-preview summary {
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ds-muted);
}

.feedback-preview pre {
    margin: 0.5rem 0 0;
    max-height: 10rem;
    overflow: auto;
    font-size: 0.7rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--ds-ink);
}

.feedback-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.feedback-status {
    margin: 0.15rem 0;
    font-size: 0.8125rem;
    font-weight: 600;
}

.feedback-status.is-ok { color: #0f766e; }
.feedback-status.is-error { color: #b45309; }

.feedback-form .ds-btn-primary {
    position: sticky;
    bottom: 0;
    align-self: stretch;
    margin-top: 0.45rem;
    z-index: 1;
}

@media (max-width: 639px) {
    .feedback-overlay {
        align-items: flex-end;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    .feedback-dialog {
        width: 100%;
        max-height: min(90dvh, calc(100dvh - 0.75rem));
        border-radius: 1rem 1rem 0.65rem 0.65rem;
    }

    .feedback-dialog-inner {
        padding: 0.7rem 0.8rem 0.55rem;
    }

    .feedback-form textarea {
        min-height: 4.25rem;
        max-height: 18vh;
    }

    .feedback-form .ds-btn-primary {
        margin-bottom: 3.4rem;
    }
}

