.result-layout{grid-template-columns:minmax(0,1fr);gap:24px}
.result-sidebar{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);grid-template-areas:"chart estate" "people people";gap:20px;align-items:start}
.result-sidebar .chart-card{grid-area:chart;padding:26px;border:1px solid #d5decd}
.result-sidebar .estate{grid-area:estate;margin:0;padding:26px}
.chart-card h3,.overview-people h3{margin:0 0 20px;font-size:21px;letter-spacing:-.5px}
.overview-chart{display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px;align-items:center}
.overview-chart .donut{width:160px;height:160px;margin:0}
.overview-chart .donut-center{width:112px;height:112px}
.overview-chart .donut-center strong{font-size:27px}
.overview-chart .donut-center small{font-size:10px}
.overview-chart .legend{font-size:13px;gap:12px;padding:10px 0;border-bottom:1px solid #d3dbcc}
.overview-chart .legend:last-child{border:0}
.overview-chart .legend span{display:flex;align-items:center;gap:8px;min-width:0}
.overview-chart .swatch{margin:0;flex:0 0 8px;width:8px;height:8px}
.overview-chart .legend strong{font-variant-numeric:tabular-nums;white-space:nowrap}
.chart-note{margin:18px 0 0;font-size:11px}
.overview-table-card{grid-area:people;background:var(--white);border:1px solid var(--line);border-radius:20px;padding:26px;min-width:0}
.overview-people{border:0;margin:0;padding:0}
.overview-people h3{margin-bottom:8px}
.table-hint{margin:0 0 20px}
.overview-people:has(.overview-money:not([hidden])) .table-hint{display:none}
.overview-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:15px}
.overview-table .name-col{width:43%}.overview-table .share-col{width:22%}.overview-table .money-col{width:35%}
.overview-table thead{background:#f0f3e9}
.overview-table th,.overview-table td{padding:16px 12px;vertical-align:middle}
.overview-table thead th{font-size:11px;letter-spacing:.4px;text-align:left;color:var(--muted)}
.overview-table th:nth-child(n+2),.overview-table td{text-align:right}
.overview-table tbody tr{display:table-row;border-bottom:1px solid #e4e9df}
.overview-table tbody tr:last-child{border:0}
.overview-table tbody th{text-align:left;font-weight:500;overflow-wrap:anywhere}
.overview-table td{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.person-label{display:flex;gap:9px;align-items:center}
.person-label .swatch{margin:0;flex:0 0 7px;width:7px;height:7px}
.overview-table .overview-money{font-size:inherit;margin:0;color:var(--ink)}
.overview-money:not([hidden])+.amount-placeholder{display:none}
.amount-placeholder{color:#a5afa8}
#charity-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-top:20px}
#charity-summary .charity-summary-row{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:13px;background:#f5f7ed;border-radius:12px;border:0;margin:0}
#charity-summary .charity-summary-row span{font-size:12px}
#charity-summary .charity-summary-row strong{font-size:14px;font-variant-numeric:tabular-nums}
#charity-summary>p{grid-column:1/-1;margin:2px 0}
.exact-share-details{background:var(--white);border:1px solid var(--line);border-radius:16px;padding:0 20px;margin-bottom:18px}
.exact-share-details>summary{padding:18px 0;min-height:54px;font-weight:600;cursor:pointer}
.exact-share-details #heirs{padding-bottom:8px}
.result-layout .actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.result-layout #share{grid-column:1/-1;grid-row:1;min-height:50px}
.result-layout .actions button{min-height:48px}
.result-layout input[type=text]{font-size:16px;min-width:0;max-width:100%}
.result-layout .estate-info>summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
.result-layout .check{min-height:48px;align-items:center}
@media(max-width:800px){.result-sidebar{grid-template-columns:minmax(0,1fr);grid-template-areas:"chart" "estate" "people";gap:16px}.overview-chart{grid-template-columns:140px minmax(0,1fr)}.overview-chart .donut{width:140px;height:140px}.overview-chart .donut-center{width:98px;height:98px}}
@media(max-width:620px){main{padding:30px 16px}.result-header{gap:14px;align-items:flex-start}.result-header h1{font-size:32px;line-height:1.15;letter-spacing:-1px}.result-header #edit{font-size:12px;min-height:44px;padding:10px 13px;flex-shrink:0}.result-sidebar .chart-card,.result-sidebar .estate,.overview-table-card{padding:20px;border-radius:20px}.chart-card h3,.overview-people h3{font-size:19px}.overview-chart{gap:16px;grid-template-columns:128px minmax(0,1fr)}.overview-chart .donut{width:128px;height:128px}.overview-chart .donut-center{width:90px;height:90px}.overview-chart .legend{font-size:12px;padding:8px 0;gap:6px}.overview-table{font-size:13px}.overview-table th,.overview-table td{padding:15px 6px}.overview-table th:first-child{padding-left:0}.overview-table th:last-child,.overview-table td:last-child{padding-right:0}.overview-table .name-col{width:42%}.overview-table .share-col{width:22%}.overview-table .money-col{width:36%}.person-label{gap:7px}.overview-table thead th{font-size:10px;letter-spacing:0}.result-layout .money-input{max-width:none}.exact-share-details{padding:0 16px}.result-layout .explanations summary{min-height:48px;padding:14px 0}.result-layout .actions{font-size:13px}.question-card{padding:24px 20px}.question-card input[type=text],.question-card input[type=number]{font-size:16px}}
@media(max-width:360px){.overview-chart{grid-template-columns:104px minmax(0,1fr);gap:12px}.overview-chart .donut{width:104px;height:104px}.overview-chart .donut-center{width:74px;height:74px}.overview-chart .donut-center strong{font-size:23px}.overview-chart .donut-center small{font-size:9px}.result-sidebar .chart-card,.result-sidebar .estate,.overview-table-card{padding:16px}.overview-table{font-size:12px}.result-header{flex-wrap:wrap}}
@media print{.result-sidebar{display:block}.result-sidebar>*{margin-bottom:18px!important}.exact-share-details{border:0;padding:0}.exact-share-details>summary{display:none}.overview-table tbody tr{break-inside:avoid}}
.wife-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:26px 0}
.wife-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:84px;padding:12px 4px;background:var(--white);border:1px solid var(--line);border-radius:14px;color:var(--ink);cursor:pointer}
.wife-choice strong{font-size:26px;font-weight:600}.wife-choice small{font-size:12px;color:var(--muted)}
.wife-choice:hover,.wife-choice[aria-pressed=true]{background:#e6edd9;border-color:var(--green)}
.wife-choice:focus-visible{outline:3px solid var(--green);outline-offset:3px}
@media(max-width:360px){.wife-choices{gap:6px}.wife-choice{min-height:76px}.wife-choice strong{font-size:23px}.wife-choice small{font-size:11px}}
.result-header-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}
.share-top{display:flex;gap:7px;align-items:center;min-height:44px}
.estate-currency select{width:100px;flex:0 0 100px;min-height:48px;border:0;border-right:1px solid var(--line);background:#f1f3ea;color:var(--ink);padding:8px;font:inherit;font-size:14px;cursor:pointer}
.estate-currency input{width:100%;min-width:0;flex:1}
.legend-label{display:block!important}.legend-label small{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.overview-money:not([hidden]),.person-money:not([hidden]){cursor:pointer}
.overview-money:focus-visible,.person-money:focus-visible{outline:2px solid var(--green);outline-offset:3px}
@media(max-width:620px){.result-header{flex-wrap:wrap}.result-header-actions{width:100%;justify-content:flex-end}.result-header-actions button{font-size:12px;padding:10px 13px}.overview-chart .legend span{flex-shrink:1}}
.overview-people:not(:has(.overview-money:not([hidden]))) .payout-note{display:none}
.currency-note{margin-top:10px;font-size:11px}
/* Compact result summary, with per-person payouts kept beside their shares. */
.result-header{margin-bottom:22px}
.result-sidebar{gap:14px}
.result-sidebar .chart-card,.result-sidebar .estate,.overview-table-card{padding:20px}
.chart-card{text-align:left}
.chart-card>.eyebrow{margin:0 0 8px}
.chart-card h3{margin:0 0 12px}
.overview-chart{grid-template-columns:100px minmax(0,1fr);gap:18px;align-items:center}
.overview-chart .donut{width:100px;height:100px}
.overview-chart .donut-center{width:70px;height:70px}
.overview-chart .donut-center strong{font-size:23px}
.overview-chart .donut-center small{font-size:8px}
.overview-chart .legend{padding:9px 0;font-size:13px;align-items:flex-start}
.overview-chart .legend>span{align-items:flex-start}
.overview-chart .legend .swatch{margin-top:5px}
.legend-label{font-weight:600;line-height:1.35}
.legend-label small{font-weight:400;margin-top:3px;font-size:11px;line-height:1.5}
.group-payout{font-weight:600;color:var(--ink)}
.chart-note{margin:8px 0 0!important;font-size:10px;text-align:left}
#charity-summary{margin-top:12px;padding-top:10px;gap:8px}
#charity-summary .charity-summary-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;padding:9px 10px}
#charity-summary .charity-summary-row strong{font-size:12px;line-height:1.3}
#charity-summary .charity-summary-row small{font-size:12px}
#charity-summary>p{font-size:10px;text-align:left;line-height:1.4}
.result-sidebar .estate>.eyebrow{margin-bottom:8px}
.result-sidebar .estate h3{margin:0 0 12px}
.overview-table th,.overview-table td{padding-top:12px;padding-bottom:12px}
@media(max-width:620px){.result-header-actions{margin-top:0}.result-header{margin-bottom:20px}.result-sidebar .chart-card,.result-sidebar .estate,.overview-table-card{padding:16px}.overview-chart{grid-template-columns:82px minmax(0,1fr);gap:14px}.overview-chart .donut{width:82px;height:82px}.overview-chart .donut-center{width:58px;height:58px}.overview-chart .donut-center strong{font-size:20px}.overview-chart .donut-center small{font-size:7px}.overview-chart .legend{font-size:12px;gap:8px;padding:8px 0}.chart-card h3{font-size:18px}.legend-label small{font-size:10.5px}#charity-summary .charity-summary-row{grid-template-columns:1fr;padding:8px 10px;gap:3px}#charity-summary .charity-summary-row strong{display:flex;justify-content:space-between;align-items:center;text-align:left}#charity-summary .charity-summary-row small{display:inline}.overview-table th,.overview-table td{padding-top:12px;padding-bottom:12px}}
@media(max-width:360px){.overview-chart{grid-template-columns:66px minmax(0,1fr);gap:10px}.overview-chart .donut{width:66px;height:66px}.overview-chart .donut-center{width:47px;height:47px}.overview-chart .donut-center strong{font-size:16px}.overview-chart .donut-center small{font-size:6px}}
.overview-chart .legend>span{flex:1;min-width:0}
.overview-chart .legend-label{flex:1;min-width:0}
.overview-chart .legend-label small .group-payout{display:inline!important;white-space:nowrap}
.result-layout .error:empty{display:none}
.result-layout .charity-controls{margin-top:12px;padding-top:12px}
.result-layout .estate-info{margin:0}
.result-layout .currency-note{margin-bottom:4px}
/* Use the same answer-button treatment as the Yes / No choices. */
.wife-choices{gap:8px;margin:22px 0}
.wife-choice{border:1px solid var(--line);border-radius:8px;background:white;min-height:70px;padding:10px 4px;gap:3px;box-shadow:0 1px 2px #183d3405}
.wife-choice strong{font-size:22px;line-height:1.2;font-weight:600;letter-spacing:0}
.wife-choice small{font-size:11px;line-height:1.3;color:var(--muted)}
.wife-choice:hover{background:#f0f4e8;border-color:#9eaf94}
.wife-choice[aria-pressed=true],.wife-choice[aria-pressed=true]:hover{background:var(--green);border-color:var(--green);color:white;box-shadow:0 3px 8px #183d3420}
.wife-choice[aria-pressed=true] small{color:#f0f4e8}
.wife-choice:focus-visible{outline:3px solid #769c27;outline-offset:4px}
.wife-choice:active{background:#e7eddd;border-color:var(--green)}
@media(max-width:360px){.wife-choices{gap:6px}.wife-choice{min-height:66px}.wife-choice strong{font-size:21px}.wife-choice small{font-size:10px}}
