:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #626262;
  --quiet: #8a8a8a;
  --line: #dddddd;
  --soft: #f5f5f3;
  --paper: #ffffff;
  --max: 1040px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.site-header {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.project-state {
  color: var(--muted);
  font-size: 13px;
}

.hero {
  padding: 104px 0 88px;
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

h1,
h2,
p {
  margin-top: 0;
}

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

h1 {
  max-width: 13ch;
  margin-bottom: 32px;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.04;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
}

.lede {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.proposed-output {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  padding: 64px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.proposed-output p:last-child {
  max-width: 58ch;
  margin: 4px 0 0;
  color: var(--muted);
}

#validation-form {
  padding: 96px 0 80px;
}

.form-heading {
  max-width: 680px;
  margin-bottom: 72px;
}

.form-heading > p:last-child,
.boundary p:last-child {
  color: var(--muted);
}

fieldset {
  margin: 0;
  padding: 40px 0 48px;
  border: 0;
  border-top: 1px solid var(--line);
}

legend {
  width: min(100%, 760px);
  margin-bottom: 28px;
  padding: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.45;
}

legend span {
  display: inline-block;
  width: 40px;
  color: var(--quiet);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0;
}

.choice-grid {
  display: grid;
  gap: 12px;
}

.choice-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 680px;
}

.choice {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.choice:hover {
  border-color: var(--ink);
}

.choice:has(input:checked) {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.choice span {
  position: relative;
  pointer-events: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.submit-zone {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--ink);
}

.submit-copy p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

button {
  min-width: 190px;
  min-height: 52px;
  padding: 14px 24px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  color: var(--ink);
  background: var(--paper);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

button:disabled {
  color: var(--quiet);
  background: var(--soft);
  border-color: var(--line);
  cursor: not-allowed;
}

.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.completion {
  margin: 64px 0 96px;
  padding: 64px;
  color: var(--paper);
  background: var(--ink);
}

.completion .eyebrow,
.completion-boundary {
  color: #bcbcbc;
}

.completion p {
  max-width: 58ch;
}

.completion-boundary {
  margin-bottom: 0;
  font-size: 13px;
}

.boundary {
  max-width: 760px;
  padding: 80px 0 96px;
  border-top: 1px solid var(--line);
}

footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.data-note {
  max-width: 760px;
  padding: 88px 0 120px;
}

.data-note h1 {
  max-width: 15ch;
}

.data-note h2 {
  margin-top: 56px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.data-note p,
.data-note li {
  color: var(--muted);
}

.notice {
  margin: 40px 0;
  padding: 20px 24px;
  background: var(--soft);
  border-left: 2px solid var(--ink);
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 32px), var(--max));
  }

  .site-header {
    min-height: 68px;
  }

  .project-state {
    display: none;
  }

  .hero {
    padding: 72px 0 64px;
  }

  h1 {
    margin-bottom: 24px;
  }

  .lede {
    font-size: 16px;
  }

  .proposed-output {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 48px 0;
  }

  #validation-form {
    padding: 72px 0 56px;
  }

  .form-heading {
    margin-bottom: 48px;
  }

  fieldset {
    padding: 32px 0 40px;
  }

  legend {
    font-size: 18px;
  }

  legend span {
    display: block;
    margin-bottom: 8px;
  }

  .choice-grid-three,
  .choice-grid-two {
    grid-template-columns: 1fr;
  }

  .choice {
    min-height: 60px;
  }

  .submit-zone {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .form-status {
    text-align: left;
  }

  .completion {
    margin: 40px 0 72px;
    padding: 40px 24px;
  }

  .boundary {
    padding: 64px 0 72px;
  }

  footer {
    min-height: 104px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
