:root {
  /* Palette: OKLCH with warm paper-hue tint (hue 85) for cohesion */
  --bg: oklch(94% 0.012 85);
  --ink: oklch(16% 0.008 85);
  --ink-soft: oklch(44% 0.012 85);
  --rule: oklch(76% 0.020 85);
  --error: oklch(42% 0.15 28);

  --max: 34rem;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

body {
  margin: 0;
  padding: 0;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 25vh 1.5rem 8rem;
}

header h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
  letter-spacing: -0.022em;
  line-height: 1.02;
  margin: 0 0 5rem -0.04em;
}

.manifesto {
  font-size: 1.22rem;
  line-height: 1.65;
  font-variation-settings: "opsz" 14;
}

.manifesto p {
  margin: 0 0 1.2rem 0;
}

.manifesto .signature {
  margin-top: 2.5rem;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

section {
  margin-top: 6rem;
  border-top: 1px solid var(--rule);
  padding-top: 3rem;
}

section h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin: 0 0 2rem 0;
}

#signup-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label,
fieldset.checkboxes legend {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.field label .req,
fieldset.checkboxes legend .req {
  color: var(--error);
  margin-left: 0.1em;
}

.field input {
  font-family: var(--serif);
  font-size: 1.1rem;
  padding: 0.6rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease;
  border-radius: 0;
  min-height: 44px;
}

.field input:focus {
  border-bottom-color: var(--ink);
}

fieldset.checkboxes {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

fieldset.checkboxes legend {
  padding: 0 0 0.7rem 0;
}

fieldset.checkboxes label,
.signatory-check {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 44px;
  padding: 0.5rem 0;
}

.signatory-check {
  margin-top: 0.4rem;
}

input[type="checkbox"] {
  accent-color: var(--ink);
  flex-shrink: 0;
  margin-top: 0.15rem;
  width: 1.4rem;
  height: 1.4rem;
  cursor: pointer;
}

button[type="submit"] {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 1rem 2rem;
  cursor: pointer;
  margin-top: 0.75rem;
  align-self: flex-start;
  transition: opacity 180ms ease;
  border-radius: 0;
  min-height: 44px;
}

button[type="submit"]:hover {
  opacity: 0.85;
}

button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: wait;
}

.form-note {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 1.75rem;
  line-height: 1.55;
}

.form-message {
  margin-top: 1.5rem;
  padding: 0;
  font-size: 1.05rem;
  font-style: italic;
  min-height: 0;
  transition: min-height 180ms ease;
}

.form-message:empty {
  margin-top: 0;
}

.form-message.success {
  color: var(--ink);
}

.form-message.error {
  color: var(--error);
}

.signatories ol {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}

.signatories li {
  padding: 0.35rem 0;
  font-size: 1rem;
  break-inside: avoid;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Visually hidden but available to screen readers */
.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;
}

@media (max-width: 40rem) {
  html { font-size: 17px; }
  main {
    margin-inline: auto;
    padding: 12vh 1.25rem 5rem;
  }
  header h1 { margin-bottom: 3.5rem; }
  section {
    margin-top: 4rem;
    padding-top: 2.5rem;
  }
  .signatories ol { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
