:root {
  color-scheme: light;
  --ink: #203d38;
  --teal: #176d5c;
  --paper: #f5f4ef;
  --muted: #576960;
  --line: #dce2d9;
  --surface: #fffefa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.5 system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
header {
  background: radial-gradient(ellipse at top right, #2b4c43, #193832 70%);
  color: var(--surface);
  border-bottom: 3px solid #b8a47b;
}
.masthead {
  max-width: 1400px;
  margin: auto;
  padding: 36px 32px 32px;
}
header small {
  color: #b9d4c6;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 14px 0 12px;
}
.scope {
  color: #c6dbd0;
  font-size: 14px;
}
main {
  max-width: 1400px;
  padding: 28px 32px;
  margin: auto;
}
h2 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 16px;
  background: var(--surface);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 3px 12px #203d3805;
}
label {
  display: grid;
  min-width: 0;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
input,
button {
  min-width: 0;
  min-height: 44px;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid #9caea2;
  border-radius: 5px;
}
input {
  width: 100%;
  background: white;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}
input::placeholder {
  color: #68776e;
}
button {
  cursor: pointer;
  background: var(--teal);
  color: white;
  border-color: var(--teal);
  font-size: 14px;
  font-weight: 600;
}
button:hover:not(:disabled) {
  background: #115648;
  border-color: #115648;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: #aebcaf;
}
button.secondary:hover:not(:disabled) {
  background: #eef2eb;
  border-color: #788e7d;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
#summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 24px 0 18px;
  padding: 24px 0;
}
#summary > div {
  min-width: 0;
  padding: 0 24px;
}
#summary > div + div {
  border-left: 1px solid var(--line);
}
#summary strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
#summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
p.note {
  color: var(--muted);
  max-width: 1000px;
  font-size: 13px;
  line-height: 1.65;
  margin: 8px 0 16px;
}
#access-note {
  margin: 12px 2px;
}
#status {
  font-size: 14px;
  margin: 20px 2px;
}
#status[role="alert"] {
  color: #8f3a23;
}
.notice {
  border: 1px solid #e4d8bf;
  border-left: 3px solid #a77c44;
  border-radius: 5px;
  padding: 14px 18px;
  background: #faf6ec;
  color: #675235;
  font-size: 14px;
}
.report-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin: 18px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid #e7ebe2;
}
th {
  background: #edf1e9;
  color: #496052;
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
  line-height: 1.45;
}
td:first-child {
  font-weight: 600;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:nth-child(even) {
  background: #f8f9f4;
}
.budgets-table :is(th, td):nth-child(n + 2):nth-child(-n + 6),
.budgets-table :is(th, td):nth-child(8),
.imports-table :is(th, td):nth-child(n + 2),
.sources-table :is(th, td):nth-child(n + 4):nth-child(-n + 7),
.outcomes-table :is(th, td):nth-child(n + 3) {
  text-align: right;
}
#basis {
  margin-top: 24px;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding: 24px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
section[hidden] {
  display: none;
}
progress {
  max-width: 100px;
  accent-color: var(--teal);
}
a {
  color: var(--teal);
}
@media (max-width: 1000px) {
  form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .masthead {
    padding: 28px 20px;
  }
  main {
    padding: 24px 20px;
  }
  #summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }
  #summary > div {
    padding: 20px;
  }
  #summary > div:nth-child(3) {
    border-left: 0;
  }
  #summary > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 520px) {
  form {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }
  h2 {
    font-size: 21px;
  }
  #summary > div {
    padding: 16px;
  }
  th,
  td {
    padding: 14px;
  }
}
