:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #17353b;
  background: #f4f8f7;
  --teal: #126b63;
  --line: #d6e3e0;
  --muted: #456069;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.container { width: min(1100px, calc(100% - 2.5rem)); margin-inline: auto; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .75rem; min-height: 4.5rem; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.2rem; line-height: 1.25; }
.brand small { color: var(--muted); }
.intro { margin-block: clamp(1.5rem, 4vw, 3rem) 1.5rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); letter-spacing: -.04em; }
h2 { font-size: 1.3rem; margin-bottom: 1rem; }
p { line-height: 1.5; }
.intro p { margin-top: .35rem; color: var(--muted); max-width: 64ch; }
.layout { display: grid; grid-template-columns: 1.5fr 1fr; align-items: start; gap: 1rem; }
.panel { min-width: 0; padding: clamp(1rem, 3vw, 1.65rem); border: 1px solid var(--line); border-radius: .95rem; background: #fff; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 650; align-content: start; }
small { font-weight: 400; }
label small { color: var(--muted); }
.rate-reference { padding: .8rem; border-radius: .55rem; background: #edf5f2; }
.rate-note { margin-top: .4rem; color: var(--muted); font-size: .83rem; }
.rate-note a { display: inline-block; margin-top: .25rem; color: var(--teal); font-weight: 650; }
input, select, button { font: inherit; }
input, select {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid #9eb7b4;
  border-radius: .5rem;
  padding: .5rem .65rem;
  background: #fff;
  color: inherit;
  font-weight: 400;
}
select:disabled { color: var(--muted); background: #edf3f1; }
input::placeholder { color: #5f767c; }
:focus-visible { outline: 3px solid #237cb8; outline-offset: 3px; }
.checkbox { display: flex; align-items: center; gap: .55rem; }
input[type="checkbox"] { width: 1.15rem; min-height: 1.15rem; margin: 0; accent-color: var(--teal); }
.advanced { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1rem; }
summary { font-weight: 700; cursor: pointer; }
.advanced[open] summary, .schedule[open] summary { margin-bottom: 1rem; }
.result { background: #eaf4f0; }
.result .payment { margin-block: .45rem; font-size: clamp(1.8rem, 4vw, 2.45rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.05; overflow-wrap: anywhere; }
.result .detail, .local-note, .disclaimer { color: var(--muted); font-size: .86rem; }
.result dl { margin: 1.15rem 0; font-size: .9rem; }
.result dl div { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid #c7ded8; }
.result dd { margin: 0; font-weight: 700; white-space: nowrap; }
.feedback { color: #7a2d27; }
.feedback ul, .warnings { padding-left: 1.25rem; line-height: 1.45; }
.warnings { font-size: .83rem; color: var(--muted); margin: 1rem 0; }
.warnings li + li { margin-top: .25rem; }
button { border: 0; border-radius: .55rem; padding: .72rem 1rem; min-height: 2.75rem; font-weight: 700; background: var(--teal); color: #fff; cursor: pointer; }
button:not(:disabled):hover { background: #0b504a; }
button:disabled { background: #d1e1dc; color: #435951; cursor: default; }
#download { margin-top: .85rem; }
.local-note, #download-status { margin-top: .65rem; }
.schedule { margin-top: 1rem; }
.schedule small { margin-left: .4rem; color: var(--muted); }
#schedule-view { width: auto; margin: .35rem 0 .65rem; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
caption { text-align: left; color: var(--muted); padding-bottom: .65rem; }
th, td { padding: .58rem .65rem; white-space: nowrap; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child { text-align: left; }
thead { background: #eaf4f0; }
tbody tr:nth-child(even) { background: #f4f8f7; }
.disclaimer { margin-block: 1rem 1.5rem; }
.footer { color: var(--muted); border-top: 1px solid var(--line); padding-block: .95rem; font-size: .82rem; }

@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .container { width: calc(100% - 1.5rem); }
  .fields { grid-template-columns: 1fr; }
}
