:root {
  --bg: #f3efe6;
  --ink: #1a1714;
  --muted: #5c564c;
  --paper: #fffcf7;
  --line: #ddd4c4;
  --teal: #0b5f4e;
  --teal-dark: #08483b;
  --teal-ink: #f4fbf8;
  --gold: #8a5a10;
  --input: #fff8e8;
  --warn: #8b2e1f;
  --shadow: 0 1px 2px rgba(26, 23, 20, 0.06), 0 8px 24px rgba(26, 23, 20, 0.06);
  --sans: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --max: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { color: var(--teal-dark); }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--teal);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 20;
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }

header.site {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--teal); }
nav.links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
nav.links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--teal); text-decoration: underline; }

main { flex: 1; padding: 2rem 0 3.5rem; }

.hero { margin-bottom: 2.25rem; max-width: 42rem; }
.hero h1, .page h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.25rem; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.card, .panel, .result, .legal, .notify, .prose {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}
.card { padding: 1.25rem 1.3rem 1.4rem; text-decoration: none; color: inherit; display: block; }
.card:hover { border-color: var(--teal); }
.card h2 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 0.4rem; }
.card p { margin: 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
  .result { position: static; }
}

.panel, .result, .notify, .legal, .prose { padding: 1.25rem 1.3rem 1.5rem; }
.prose, .legal { max-width: 46rem; }
.prose h2, .panel h2, .result h2, .notify h2 {
  font-family: var(--serif);
  margin: 0 0 0.85rem;
  font-size: 1.45rem;
}
.prose h2 { margin-top: 1.75rem; }
.prose p, .legal p { margin: 0 0 1rem; }
.prose ul, .legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }

fieldset {
  border: 0;
  margin: 0 0 1.1rem;
  padding: 0;
}
legend {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
}
.fields { display: grid; gap: 0.75rem; }
.fields.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .fields.two { grid-template-columns: 1fr; } }

label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.92rem; }
label .hint { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.55rem 0.7rem;
  width: 100%;
}
textarea { min-height: 8rem; resize: vertical; }
input:disabled { opacity: 0.45; background: #efebe3; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
button, .btn {
  font: inherit;
  font-weight: 650;
  border-radius: 0.45rem;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--teal-dark);
}
button:hover, .btn:hover { background: var(--teal-dark); color: #fff; }
button.secondary:hover, .btn.secondary:hover { background: var(--teal); }

.result { position: sticky; top: 5rem; }
.result dl { margin: 0; display: grid; gap: 0.55rem; }
.result .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
}
.result .row:last-child { border-bottom: 0; }
.result dt { color: var(--muted); font-size: 0.92rem; }
.result dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; }
.result .hero-metric dd { font-family: var(--serif); font-size: 1.85rem; color: var(--teal-dark); }
.error { color: var(--warn); font-weight: 650; margin: 0; }

.note, .disclaimer {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.notify { margin: 2rem 0; }
.notify form, .contact-form { display: grid; gap: 0.75rem; max-width: 28rem; }

.formula {
  background: #efe8d8;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  font-variant-numeric: tabular-nums;
  margin: 0 0 1rem;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--paper);
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--teal); text-decoration: underline; }

.soon {
  display: inline-block;
  background: #efe8d8;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.35rem;
}


.legal-banner {
  background: #efe8d8;
  border: 1px solid #d9c9a8;
  border-radius: 0.65rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
}
.legal-banner p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.45;
}
.legal-banner a { font-weight: 700; }
