* {box-sizing:border-box}
:root {font-family:Inter,"Segoe UI",sans-serif; color:#202e2e; background:#faf8f2; line-height:1.6}
body {margin:0}
header {padding:1rem max(5vw,calc((100vw - 64rem)/2)); border-bottom:1px solid #b6c7bd; display:flex; align-items:baseline; justify-content:space-between; gap:.8rem; flex-wrap:wrap}
header a {font:600 1.25rem Georgia,serif; text-decoration:none}
header span {font-size:.875rem}
main {max-width:50rem; padding:clamp(1rem,4vw,3rem);margin:0 auto}
.chapter {font:1.14rem/1.65 Georgia,serif}
h1,h2,h3 {font-family:Georgia,serif;line-height:1.15;text-wrap:balance}
h1 {font-size:clamp(2.5rem,6vw,4.1rem);margin:.6em 0}
h2 {margin:2em 0 .6em;font-size:clamp(1.65rem,4vw,2.35rem)}
a {color:#165e54;text-underline-offset:.16em}
a:focus-visible,summary:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible,[tabindex]:focus-visible {outline:3px solid #9a4c15;outline-offset:3px}
.lead {font:1.24rem/1.6 Georgia,serif}
.panel,.result {font:1rem/1.55 Inter,"Segoe UI",sans-serif;padding:clamp(1rem,4vw,2rem);margin:1.7rem 0;background:#eaf0e6;border:1px solid #afc2b0;border-radius:.6rem}
.panel h2,.result h2 {margin:.1em 0 .6em}
label {display:block;font-weight:650;margin:1rem 0 .35rem}
select,button {font:inherit; padding:.65rem;border-radius:.35rem; max-width:100%;min-width:0}
select {width:100%;background:white;border:1px solid #738b81;color:#213331}
button {margin-top:1.4rem;background:#155448;color:white;border:0;padding:.65rem 1.2rem;cursor:pointer}
input[type=range] {width:100%;accent-color:#155448}
output {font-variant-numeric:tabular-nums;font-weight:700}
.result {background:#fff;border-inline-start:4px solid #155448}
details {margin:1.5em 0} summary {cursor:pointer;color:#155448;font-weight:650}
img {display:block;max-width:100%;height:auto;max-height:20rem;margin:1rem auto}
.scroll {overflow:auto;max-width:100%;margin:1.5rem 0}
table {border-collapse:collapse;width:100%;font: .93rem/1.4 "Segoe UI",sans-serif;font-variant-numeric:tabular-nums}
th,td {padding:.55rem .5rem;border-bottom:1px solid #c8d4c6;text-align:right}
th {background:#e5ece1}td {white-space:nowrap}
footer {border-top:1px solid #afc2b0;padding:1.5rem 0}
.cost-fields {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.75rem 1rem}
.cost-fields div {display:flex;flex-direction:column;justify-content:space-between}
.cost-fields label {margin-top:0}
.cost-fields input {width:100%;min-width:0;padding:.65rem;font:inherit;border:1px solid #738b81;border-radius:.35rem}
#implementation-cost h3 {font-size:1.5rem;margin:0}
#implementation-cost output {overflow-wrap:anywhere}
#funnel .funnel-stages {padding-inline-start:1.6rem}
#funnel .funnel-stages li {padding:.35rem 0}
#funnel label {display:inline-block;min-width:min(100%,17rem);margin:0 .5rem .25rem 0}
#funnel input {width:8rem;max-width:100%;font:inherit;padding:.4rem .55rem;border:1px solid #738b81;border-radius:.35rem}
#funnel input[aria-invalid="true"] {border:2px solid #9a4c15}
#funnel-steps {padding-left:1.6rem}
#funnel-steps li {margin:.75rem 0}
#funnel-steps span,#funnel-steps meter {display:block}
#funnel-steps meter {width:100%;height:1rem}
#funnel-summary {font-weight:600}
#allocation-title {margin:0;font-size:1.5rem}
.allocation-path {padding:0;list-style:none}
.allocation-path li {display:grid;grid-template-columns:minmax(0,1.4fr) minmax(3rem,1fr) 5.5rem;align-items:center;gap:.65rem;padding:.45rem 0;border-bottom:1px solid #c8d4c6}
.allocation-path meter {width:100%;height:1.2rem}
.allocation-amount {text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:40rem){
  .allocation-path li {grid-template-columns:minmax(0,1fr) auto;row-gap:0}
  .allocation-path meter {grid-column:1/-1;grid-row:2}
  .allocation-amount {grid-column:2;grid-row:1}
}
#ropo-receipts td,#ropo-receipts th {white-space:normal;text-align:left;vertical-align:top}
#ropo-receipts data {white-space:nowrap}
#ropo-total {padding:.8rem 1rem;border-inline-start:4px solid #155448;background:#eaf0e6}
@media(max-width:40rem){
  #ropo-receipts thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  #ropo-receipts tbody {display:grid;gap:.8rem}
  #ropo-receipts tbody tr {display:grid;grid-template-columns:1fr auto;border:1px solid #c8d4c6;border-radius:.35rem}
  #ropo-receipts tbody th,#ropo-receipts tbody td {border:0}
  #ropo-receipts tbody td:nth-child(n+3) {grid-column:1/-1}
  #ropo-receipts .verdict {font-weight:650}
}
@media(max-width:40rem){main{padding:1rem}header{padding:.8rem 1rem}h1{margin-top:.45em}button{width:100%}}
