:root {
  color-scheme: light;
  --paper: #eef3ef;
  --surface: #fff;
  --ink: #172d27;
  --soft: #405952;
  --line: #c5d6cf;
  --accent: #125f4a;
  --masthead: #132f29;
  --masthead-subtle: #b8e1ce;
  --warning: #823522;
  --warning-bg: #fff0e6;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.billing {
  --paper: #f7f0e3;
  --ink: #2a2219;
  --soft: #665440;
  --line: #dfd1bd;
  --accent: #874010;
  --masthead: #30231b;
  --masthead-subtle: #f9c88c;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
[hidden] { display: none !important; }
.shell { width: min(100% - 2rem, 74rem); margin-inline: auto; }
.masthead {
  color: white;
  background: var(--masthead);
  border-bottom: .35rem solid var(--accent);
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.masthead p { margin: 0; max-width: 48rem; color: var(--masthead-subtle); }
.eyebrow { font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-block: 0 .6rem; }
h1, h2 { font-family: Georgia, serif; line-height: 1.08; }
h1 { margin-block: .35rem .8rem; font-size: clamp(2rem, 5vw, 4.25rem); }
h2 { font-size: 1.65rem; }
h3 { margin-top: 1.25rem; font-size: 1rem; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
  padding-block: 1.5rem;
}
form, .results {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(.9rem, 2.5vw, 1.65rem);
}
.results { border-top: .3rem solid var(--accent); }
.presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 1.2rem; padding: .75rem 0 0; min-width: 0; }
legend { padding: 0 .5rem 0 0; font-weight: 700; }
.help { color: var(--soft); font-size: .9rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
label { display: grid; align-content: start; gap: .2rem; font-size: .85rem; font-weight: 650; }
input, select, button {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .25rem;
}
input, select { width: 100%; min-height: 2.5rem; min-width: 0; padding: .35rem .45rem; font-size: 1rem; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: var(--accent); }
.check { margin-top: .65rem; display: flex; align-items: center; }
button { padding: .45rem .7rem; min-height: 2.5rem; cursor: pointer; font-size: .88rem; font-weight: 700; }
button:hover { background: var(--paper); }
button.primary { width: 100%; color: white; background: var(--accent); border-color: var(--accent); }
button.primary:hover { background: var(--masthead); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.row { margin-bottom: .6rem; padding: .65rem; border: 1px solid var(--line); background: var(--paper); }
.remove { margin-top: .55rem; }
#status { color: var(--soft); margin: .55rem 0 1.1rem; }
#status[data-state="review"] { color: var(--warning); }
.hero-value {
  color: var(--accent);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 750;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  margin-bottom: 1rem;
}
.totals { margin: 0; }
.totals > div { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border-top: 1px solid var(--line); gap: .6rem; padding: .42rem 0; font-size: .88rem; }
dt { color: var(--soft); }
dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; font-size: .82rem; }
th, td { border-bottom: 1px solid var(--line); padding: .35rem .5rem; text-align: right; }
th:first-child, td:first-child { text-align: left; }
tbody th { font-weight: 600; }
.issues { border-left: .2rem solid var(--warning); background: var(--warning-bg); color: var(--warning); overflow-wrap: anywhere; padding: .65rem .65rem .65rem 1.85rem; }
footer { padding-block: .4rem 2rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; }
footer p { margin: 0; font-weight: 700; }
a { color: var(--accent); text-underline-offset: .2em; }
@media (max-width: 56rem) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 22rem) {
  .fields { grid-template-columns: 1fr; }
}
