/* Geothermal calculator: light inputs, then a navy "instrument panel" result modeled on the school case studies. */
.calc-wrap { padding-top: clamp(40px, 5vw, 64px); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 3rem; align-items: start; }
@media (max-width: 1060px) { .calc-grid { grid-template-columns: 1fr; gap: 2rem; } }
.calc { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }

.howto { background: var(--mist); border-left: 3px solid var(--red); border-radius: 0 4px 4px 0; padding: 1.2rem 1.4rem; }
.howto h2 { font-size: 1.6rem; margin: 0 0 .6rem; }
.howto ol { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.howto li { margin-bottom: .45rem; }
.howto li b { color: var(--ink); }

.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { display: flex; align-items: center; gap: .7rem; font-family: var(--display); font-stretch: 80%; font-variation-settings: "wdth" 80; font-weight: 700; font-size: 1.5rem; line-height: 1.2; margin-bottom: .9rem; padding: 0; }
.step legend .n { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 600 1rem/1 var(--body); }
.group-label { font: 600 .72rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin: 1.1rem 0 .55rem; }
.step legend + .group-label { margin-top: 0; }
.owners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
@media (max-width: 600px) { .owners { grid-template-columns: 1fr; } }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; }
.pick span { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .8rem 1rem .8rem 2.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; position: relative; }
.pick span::before { content: ""; position: absolute; left: 1rem; top: .95rem; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--ink-2); }
.pick b { font-weight: 600; line-height: 1.3; }
.pick small { color: var(--ink-2); font-size: .88rem; line-height: 1.4; }
.pick input:checked + span { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--mist); }
.pick input:checked + span::before { border-color: var(--red); background: radial-gradient(circle, var(--red) 45%, transparent 50%); }
.pick input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.money { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; max-width: 24rem; }
.money span { padding: 0 0 0 1rem; font: 700 1.6rem/1 var(--display); color: var(--ink-2); }
.money input { border: 0; outline: 0; font: 700 2rem/1.2 var(--display); font-stretch: 80%; font-variation-settings: "wdth" 80; padding: .55rem .8rem .55rem .4rem; width: 100%; min-width: 0; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
.money input::placeholder { color: #a9b1c0; font-weight: 500; }
.money:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.help { color: var(--ink-2); font-size: .92rem; margin: .5rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1rem; font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; accent-color: var(--red); flex: none; }
.waiting { margin: 0; padding: 1.2rem; border: 1px dashed #c3cad6; border-radius: 4px; color: var(--ink-2); text-align: center; }
.waiting[hidden], #result[hidden] { display: none; }

/* ---------- Result panel (navy) ---------- */
#result { --p: #1f2b45; --p2: #27364f; --p3: #18223a; --pl: rgba(255,255,255,.13); --pt: #fff; --pm: #aeb8cc; --pd: #d6dcea; --conv: #8d99ae; --geo: #5aa2f0; --pos: #8fd6a8;
  background: var(--p); color: var(--pt); border-radius: 6px; padding: clamp(1rem, 3vw, 1.6rem); display: flex; flex-direction: column; gap: 1.3rem; scroll-margin-top: 6rem; }
#result h3.rt { font: 700 clamp(1.4rem, 3vw, 1.8rem)/1.1 var(--display); font-stretch: 80%; font-variation-settings: "wdth" 80; margin: 0; color: #fff; }
#result h3.rt + p { margin: .3rem 0 0; color: var(--pm); font-size: .95rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; scroll-margin-top: 6rem; }
@media (max-width: 620px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--p2); border: 1px solid var(--pl); border-radius: 5px; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.tile .lbl { font-size: .9rem; color: var(--pm); }
.tile .num { font: 700 clamp(1.8rem, 4vw, 2.3rem)/1.1 var(--display); font-stretch: 80%; font-variation-settings: "wdth" 80; font-variant-numeric: tabular-nums; color: #fff; }
.tile .num.good { color: var(--pos); }
.tile .num s { color: var(--pm); font-size: .55em; margin-left: .4rem; text-decoration-thickness: 1px; }
.tile .note { font-size: .86rem; color: var(--pm); line-height: 1.45; }
.tile.choice { justify-content: center; gap: .7rem; border-style: dashed; border-color: rgba(255,255,255,.35); }
.tile.choice .lbl { color: var(--pd); }
.tile.choice .lbl b { color: #fff; }
.choice-btns { display: flex; flex-direction: column; gap: .5rem; }
.btn-choice { width: 100%; text-align: left; padding: .8rem 1rem; border-radius: 3px; border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff; cursor: pointer; font: 600 .98rem/1.3 var(--body); }
.btn-choice small { display: block; color: var(--pm); font-weight: 400; font-size: .82rem; margin-top: .15rem; }
.btn-choice:hover { background: rgba(255,255,255,.08); }
.btn-choice[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.btn-choice[aria-pressed="true"] small { color: #ffd9dc; }

.invest { border: 1px solid var(--pl); border-radius: 5px; padding: 1.2rem; background: var(--p2); scroll-margin-top: 6rem; }
.invest[hidden] { display: none; }
.invest h4, .panel h4 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 600; }
.invest p.intro { margin: 0 0 1rem; color: var(--pm); font-size: .92rem; max-width: 46rem; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .8rem; }
.project { border: 1px solid var(--pl); border-radius: 5px; padding: 1rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; background: var(--p3); }
.project.is-picked { border-color: #fff; box-shadow: 0 0 0 1px #fff inset; }
.project svg { width: 4rem; height: 4rem; }
.project .pname { font-weight: 600; }
.project .pcost { font: 700 1.4rem/1.1 var(--display); font-stretch: 80%; font-variation-settings: "wdth" 80; font-variant-numeric: tabular-nums; }
.project .pdesc { font-size: .8rem; color: var(--pm); line-height: 1.35; }
.btn-invest { margin-top: .3rem; padding: .55rem 1.3rem; border-radius: 3px; border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff; cursor: pointer; font: 600 .82rem/1 var(--body); letter-spacing: .06em; }
.btn-invest:hover { background: rgba(255,255,255,.08); }
.btn-invest[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.ledger { margin-top: 1.1rem; border-top: 1px solid var(--pl); padding-top: 1rem; scroll-margin-top: 6rem; }
.ledger[hidden], .final[hidden] { display: none; }
.ledger table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .95rem; }
.ledger td { padding: .5rem 0; border-bottom: 1px solid var(--pl); vertical-align: top; }
.ledger td:last-child { text-align: right; white-space: nowrap; padding-left: 1rem; }
.ledger tr.total td { font-weight: 700; border-bottom: none; padding-top: .7rem; font-size: 1.05rem; }
.ledger tr.total td:last-child { color: var(--pos); }
.ledger .small { display: block; font-size: .8rem; color: var(--pm); }
.apply-wrap { margin-top: 1rem; display: flex; justify-content: flex-end; }
.btn-apply { padding: .85rem 1.4rem; border-radius: 3px; border: 1px solid var(--red); background: var(--red); color: #fff; font: 600 .95rem/1 var(--body); cursor: pointer; }
.btn-apply:hover { background: var(--red-deep); }
.btn-apply[aria-pressed="true"] { background: transparent; border-color: rgba(255,255,255,.55); }
.final { margin-top: 1.3rem; display: flex; flex-direction: column; gap: 1.2rem; scroll-margin-top: 6rem; }
.final .cmp { padding: 1.2rem 1.3rem; border: 1px solid var(--pl); border-radius: 5px; background: var(--p3); }
.final h4 { margin: 0 0 .8rem; }
.final table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.final th, .final td { padding: .55rem .5rem; border-bottom: 1px solid var(--pl); text-align: right; vertical-align: top; }
.final th { color: var(--pm); font-weight: 500; font-size: .85rem; }
.final td:first-child, .final th:first-child { text-align: left; }
.final td .small { display: block; font-size: .78rem; color: var(--pm); margin-top: .15rem; }
.final tr.total td { font-weight: 700; font-size: 1.05rem; border-bottom: none; }
.final tr.total td:last-child { color: var(--pos); }
.reveal { padding: 2.2rem 1.8rem 2rem; border-radius: 6px; text-align: center; background: #fff; color: var(--ink); border-top: 5px solid var(--red); animation: reveal-in .45s ease-out both; }
.reveal .eyebrow { justify-content: center; margin-bottom: .9rem; }
.reveal b { display: block; font: 700 clamp(1.5rem, 3.4vw, 2.3rem)/1.18 var(--display); font-stretch: 80%; font-variation-settings: "wdth" 80; text-wrap: balance; max-width: 34ch; margin: 0 auto; }
.reveal b em { font-style: normal; color: var(--red); }
.reveal p { margin: .9rem auto 0; max-width: 46ch; color: var(--ink-2); }
.reveal .btn { margin-top: 1.1rem; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .final .cmp { padding: .9rem .7rem; } .final th, .final td { padding: .5rem .25rem; font-size: .8rem; } .reveal { padding: 1.5rem 1rem; } }

.callout { border-left: 3px solid #c8323e; background: rgba(255,255,255,.06); padding: .9rem 1.1rem; border-radius: 0 5px 5px 0; font-size: .93rem; color: var(--pd); }
.callout b { color: #fff; }
.panel { background: var(--p2); border: 1px solid var(--pl); border-radius: 5px; padding: 1.2rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.panel p.note { margin: 0; font-size: .85rem; color: var(--pm); }
.panel p.note b { color: var(--pd); }
.legend { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .85rem; color: var(--pm); }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; }
.chart { position: relative; min-height: 260px; }
.chart svg { display: block; width: 100%; height: auto; }
.tip { position: absolute; pointer-events: none; background: #fff; color: var(--ink); border-radius: 4px; padding: .5rem .7rem; font-size: .8rem; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: 17rem; z-index: 3; }
.tip[hidden] { display: none; }
.tip .h { color: var(--ink-2); margin-bottom: 2px; }
.tip .r { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.tip .why { margin-top: 4px; color: var(--ink-2); }
.scroll { overflow: auto; max-height: 28rem; }
table.data { border-collapse: collapse; width: 100%; font-size: .82rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: .45rem .6rem; border-bottom: 1px solid var(--pl); text-align: right; white-space: nowrap; vertical-align: top; }
table.data th { position: sticky; top: 0; background: var(--p2); color: var(--pm); font-weight: 500; }
table.data .l { text-align: left; }
table.data .w { white-space: normal; min-width: 13rem; color: var(--pm); text-align: left; }
table.data tr.spike td { background: rgba(90,162,240,.08); }
table.data tr.sum td { font-weight: 700; border-top: 1px solid var(--pm); }
details.more > summary { cursor: pointer; color: #9cc6f5; font-size: .92rem; padding: .3rem 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: .8rem; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }
table.data.credits td.l { white-space: normal; min-width: 12rem; }
