:root {
  --ink: #1c2430;
  --muted: #5c6570;
  --paper: #f3eee4;
  --card: #fffaf3;
  --line: #e3d8c8;
  --pine: #0f5c4c;
  --pine-dark: #0c2f2a;
  --clay: #8d3d22;
  --gold: #8a5a10;
  --blue: #1d4e79;
  --plum: #5c3d72;
  --slate: #3e4c5e;
  --danger: #8f2d2d;
  --shadow: 0 1px 0 rgba(28, 36, 48, 0.04);
  color-scheme: light;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 1.02rem;
}
a { color: var(--pine); }
a:hover { color: var(--clay); }
img { max-width: 100%; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: white;
  padding: 0.5rem 0.8rem;
  z-index: 5;
}
.skip:focus { top: 0.5rem; }

.site-header {
  background: var(--pine-dark);
  color: #f6f1e7;
}
.site-header a { color: #f6f1e7; text-decoration: none; }
.site-header a:hover { color: #f0d7a4; }
.header-inner, .wrap, .site-footer .wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 0;
}
.brand { display: flex; flex-direction: column; gap: 0.1rem; }
.brand strong {
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand span { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: #d5c7ae; }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.95rem; }
.nav a { border-bottom: 1px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: #f0d7a4; }

main { padding: 1.75rem 0 3rem; }
.wrap > * + * { margin-top: 1.25rem; }
h1, h2, h3 {
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 0.6rem; letter-spacing: -0.03em; }
h2 { font-size: 1.55rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.lede { font-size: 1.15rem; max-width: 46rem; margin-top: 0; }
.muted { color: var(--muted); }
.kicker {
  display: inline-block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--clay);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.card, .disclaimer, .tool, .callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.card { padding: 1rem 1.1rem 1.15rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.state-card { display: flex; flex-direction: column; gap: 0.45rem; min-height: 100%; }
.state-card p { margin: 0; }
.state-card .more { margin-top: auto; font-weight: 700; }

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.badge-operating { background: #e5f4ef; color: var(--pine); }
.badge-plan-under-review { background: #f8efd8; color: var(--gold); }
.badge-registration-phase { background: #e6f0f8; color: var(--blue); }
.badge-membership-required { background: #f3eaf6; color: var(--plum); }
.badge-program-development { background: #eef1f4; color: var(--slate); }

.disclaimer, .tool, .callout { padding: 1rem 1.15rem 1.15rem; }
.disclaimer p, .prose p { margin: 0.7rem 0; }
.disclaimer p:first-of-type { margin-top: 0.35rem; }
.disclaimer { border-left: 4px solid var(--clay); }
.callout-warn { border-left: 4px solid var(--gold); }
.dates { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.dates li + li { margin-top: 0.25rem; }
.link-list { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.link-list li + li { margin-top: 0.3rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

label { display: block; font-weight: 650; margin-bottom: 0.75rem; }
label span.help, .help { display: block; font-weight: 450; color: var(--muted); font-size: 0.86rem; margin-top: 0.2rem; }
input, select, textarea, button {
  font: inherit;
  color: inherit;
}
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbbfae;
  border-radius: 8px;
  background: white;
}
input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin: 0 0.45rem 0 0;
  accent-color: var(--pine);
}
textarea { min-height: 9rem; resize: vertical; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--pine);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}
button.secondary, a.button.secondary { background: transparent; color: var(--pine); border: 1px solid var(--pine); }
button:hover, .button:hover { background: var(--pine-dark); color: white; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
.line-row { display: grid; grid-template-columns: 1.6fr 0.7fr auto; gap: 0.6rem; align-items: end; margin-bottom: 0.6rem; }
.estimate-sheet {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: #f7f3ea;
  border: 1px dashed #c9b89a;
  border-radius: 12px;
}
.estimate-sheet h3 { margin-top: 0; }
.stamp {
  white-space: pre-wrap;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 0.92rem;
  background: white;
  border-radius: 8px;
  padding: 0.8rem;
  border: 1px solid var(--line);
}
.error { color: var(--danger); }
.ok { color: var(--pine); }
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 0.9rem;
  padding: 0.8rem 1rem 0.4rem;
  background: #fffdf9;
}
legend { font-family: Palatino, Georgia, serif; font-weight: 700; padding: 0 0.3rem; }
.site-footer {
  border-top: 1px solid var(--line);
  background: #ebe4d8;
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer a { color: var(--ink); }
.footer-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }

@media (max-width: 800px) {
  .grid, .tool-grid, .field-grid, .line-row { grid-template-columns: 1fr; }
  .header-inner { align-items: flex-start; }
}

@media print {
  .site-header, .site-footer, .nav, .no-print, .actions, button { display: none !important; }
  body { background: white; }
  .card, .tool, .disclaimer, .estimate-sheet { box-shadow: none; break-inside: avoid; }
  a { color: black; text-decoration: none; }
  .estimate-sheet { border: 1px solid black; }
}
