:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #142920;
  background: #f2f5f1;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 76rem; padding: 3rem 2rem; margin: auto; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { margin: .25rem 0; font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.1; letter-spacing: -.055em; }
.page-header p { margin: .4rem 0; color: #4b6155; }
.page-header .location { color: #35624e; font-size: .875rem; font-weight: 650; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.card { border: 1px solid #d6e0d7; border-radius: 1rem; background: white; overflow: hidden; }
form.card, .breakdown { padding: 1.5rem; }
h2, h3 { margin: 0 0 1rem; line-height: 1.25; }
label, summary { font-size: .9375rem; font-weight: 650; }
input[type="number"], input[type="text"], select { display: block; width: 100%; padding: .625rem .75rem; margin: .35rem 0 .625rem; border: 1px solid #aebfb2; border-radius: .45rem; background: #fff; color: inherit; font: inherit; font-weight: 400; }
input[type="number"]:invalid:not(:placeholder-shown) { border-color: #a43c31; }
input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #387c57; outline-offset: 3px; }
input[type="checkbox"] { accent-color: #286348; width: 1rem; height: 1rem; flex: none; }
.check { display: flex; align-items: center; gap: .45rem; font-weight: 500; }
fieldset { margin: 1.25rem 0 0; padding: .65rem 0 0; border: 0; border-top: 1px solid #dee7df; min-width: 0; }
legend { padding: 0 .5rem 0 0; font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.hint, footer, small { color: #4b6155; font-size: .875rem; }
.hint { margin: 0; }
a { color: #245e43; text-underline-offset: .13em; }
details { border-top: 1px solid #dee7df; margin-top: 1.25rem; padding-top: 1rem; }
summary { cursor: pointer; }
details fieldset { margin-bottom: 1rem; }
details .check { margin-bottom: .75rem; }
.balance { background: #163d2d; color: #fff; padding: 1.5rem; }
.balance h2 { font-size: 1rem; color: #e0eee4; margin-bottom: .45rem; }
.balance p { margin: 0; }
.balance #status { color: #e0eee4; margin-top: .4rem; }
.amount { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 750; letter-spacing: -.04em; overflow-wrap: anywhere; }
dl { margin: 0; }
dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid #edf1ed; }
dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
small { display: block; }
dl .total { border-bottom: 0; padding-bottom: 0; font-weight: 700; }
footer { border-top: 1px solid #edf1ed; padding: 1rem 1.5rem; background: #f8faf8; }
@media (max-width: 55rem) {
  main { max-width: 42rem; padding: 2rem 1rem; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 26rem) {
  .fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  form.card, .breakdown, .balance, footer { padding: 1rem; }
}

[hidden] { display: none !important; }
#scenarioHint { margin-bottom: 1rem; }

.project-fields { margin-top: .75rem; }

#amount { font-size: 1.125rem; }
#amountHint { margin: .4rem 0 1rem; }
