:root {
  color-scheme: light;
  --ink: #162019;
  --muted: #526058;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --soft: #edf3ee;
  --line: #cbd5cd;
  --accent: #17613e;
  --accent-dark: #0d442a;
  --warning: #fff5d9;
  --warning-line: #d9ad3f;
  --focus: #0969da;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--accent-dark);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
pre:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--surface);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.96);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.local-badge {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(circle at 76% 8%, #dcecdf 0, transparent 31rem),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 4rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: -0.04em;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.98;
}

.lede {
  max-width: 730px;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.lede.secondary {
  margin-top: 0.75rem;
  color: var(--ink);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 0;
}

.steps span {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dcecdf;
  color: var(--accent-dark);
  font-weight: 800;
}

.steps strong {
  font-size: 1.05rem;
}

.steps p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.builder-section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.form-card,
.result-card {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.result-card {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.section-heading h2,
.result-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-heading > p:last-child,
.empty-result p:last-child {
  color: var(--muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #aab8ad;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 400;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

small {
  color: var(--muted);
  font-weight: 400;
}

.legal-note {
  margin: 1.25rem 0;
  padding: 1rem;
  border-left: 4px solid var(--warning-line);
  background: var(--warning);
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent-dark);
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.send-note {
  padding: 0.9rem;
  border-radius: 8px;
  background: var(--soft);
}

pre {
  max-height: 56vh;
  margin: 1rem 0;
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8f5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.synthesis {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.synthesis summary {
  cursor: pointer;
  font-weight: 800;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.footer-inner nav {
  display: flex;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 850px) {
  .hero {
    padding: 3rem 0;
  }

  .hero-grid,
  .builder-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .result-card {
    position: static;
    max-height: none;
  }

  .result-heading,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
