/* A flyer, not an app: white paper, black ink, one flat red, square corners, thick rules.
   Mobile-first. No external fonts or assets: nothing on this page loads from another origin. */

:root {
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #595959;
  --hairline: #c9c9c9;
  --accent: #d7141a;
  --accent-ink: #ffffff;
  --done: #0a6b2d;
  --highlight: #ffe95c;
  --highlight-ink: #111111;
  --font-heavy: "Arial Black", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-typewriter: "Courier New", Courier, ui-monospace, monospace;
  --page-gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0e0e;
    --ink: #f3f3f3;
    --ink-soft: #a9a9a9;
    --hairline: #3d3d3d;
    --accent: #ff4b4b;
    --accent-ink: #0e0e0e;
    --done: #5fd486;
    --highlight: #ffe95c;
    --highlight-ink: #111111;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 12px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
}

main,
.site-header-inner,
.site-footer {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-heavy);
  font-weight: 900;
  margin: 0;
}

/* ---- Top band ---- */

.site-header {
  background: var(--ink);
  color: var(--paper);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.wordmark {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.campaign-switcher {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}

.campaign-switcher a {
  text-decoration: none;
  opacity: 0.7;
}

.campaign-switcher a[aria-current="page"] {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---- Headline ---- */

.hero {
  padding: 26px 0 6px;
}

.hero h1 {
  text-transform: uppercase;
  line-height: 0.9;
}

.headline-lead {
  display: block;
  font-size: clamp(1.15rem, 5vw, 1.7rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.headline-punch {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-size: clamp(3.6rem, 19vw, 8.2rem);
  letter-spacing: -0.045em;
  line-height: 0.86;
}

.lede {
  font-size: 1.12rem;
  margin: 22px 0 0;
  max-width: 36em;
}

.vote-date {
  margin: 16px 0 0;
  padding-left: 12px;
  border-left: 6px solid var(--accent);
  font-weight: 700;
  font-size: 0.98rem;
}

.zip-form {
  margin-top: 26px;
}

.zip-form > label {
  display: block;
  font-family: var(--font-heavy);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.zip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.zip-row input {
  flex: 1 1 130px;
  max-width: 180px;
  font-family: var(--font-typewriter);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.privacy-line {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---- Form controls ---- */

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

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
}

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

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
}

label input,
label select {
  margin-top: 4px;
  font-weight: 400;
  font-size: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button-secondary {
  background: var(--paper);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: inherit;
}

.form-message {
  margin: 10px 0 0;
  color: var(--accent);
  font-weight: 700;
}

.hint {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--highlight);
  color: var(--highlight-ink);
  font-size: 0.95rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.clipboard-scratch {
  position: fixed;
  top: 0;
  left: -9999px;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
}

/* ---- Sections ---- */

.step {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 5px solid var(--ink);
}

.step h2 {
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 16px;
}

.step-label {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

#location-section {
  margin-top: 22px;
  padding-top: 0;
  border-top: 0;
}

.location-line {
  margin: 0;
  font-size: 1.05rem;
}

.choice-fieldset {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.choice-fieldset legend {
  padding: 0;
  font-weight: 700;
  margin-bottom: 8px;
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin-top: -2px;
  border: 2px solid var(--ink);
  cursor: pointer;
  font-weight: 400;
  font-size: 1rem;
}

.choice-option input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}

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

.choice-option:has(input:checked) .choice-detail {
  color: inherit;
  opacity: 0.8;
}

.choice-text {
  display: flex;
  flex-direction: column;
}

.choice-detail {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.new-map-chooser label {
  margin-top: 12px;
  font-size: 1rem;
}

.manual-location {
  margin-top: 10px;
  font-size: 0.92rem;
}

.manual-location summary,
.optional-details summary,
.card-details summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.manual-location-fields {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

/* ---- Letter ---- */

.name-row,
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.details-grid {
  margin-top: 12px;
}

.span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 420px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}

.template-picker {
  display: flex;
  flex-wrap: wrap;
  margin: 18px 0 0 2px;
}

.template-chip {
  margin: 0 0 -2px -2px;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.template-chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.letter-paper {
  padding: 18px 16px;
  border: 2px solid var(--ink);
  font-family: var(--font-typewriter);
  font-size: 0.95rem;
  line-height: 1.5;
}

.letter-salutation,
.letter-signature {
  margin: 0;
  color: var(--ink-soft);
}

.letter-signature {
  font-family: inherit;
  white-space: pre-wrap;
}

.letter-paper textarea {
  display: block;
  margin: 12px -6px;
  width: calc(100% + 12px);
  padding: 8px 6px;
  border: 0;
  border-left: 3px solid var(--accent);
  background: transparent;
  font-family: inherit;
  line-height: inherit;
  resize: vertical;
  min-height: 14em;
  field-sizing: content;
}

.optional-details {
  margin-top: 16px;
}

.summary-note {
  margin-left: 6px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: inline-block;
}

/* ---- Members ---- */

.member-cards {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.member-card {
  padding: 16px;
  border: 2px solid var(--ink);
}

.member-card[data-state="sent"] {
  border-color: var(--done);
  border-width: 4px;
  padding: 14px;
}

.member-card[data-state="sent"] .member-header h3::after {
  content: " — sent";
  color: var(--done);
}

.member-card-muted {
  padding: 2px 0 2px 12px;
  border: 0;
  border-left: 4px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.member-card-muted p {
  margin: 0;
}

.member-header h3 {
  font-size: 1.3rem;
  line-height: 1.1;
}

.member-meta {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.member-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: var(--highlight);
  color: var(--highlight-ink);
  font-size: 0.9rem;
}

.member-card .button-primary {
  width: 100%;
  margin-top: 14px;
}

.destination-line {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.copy-status {
  margin: 10px 0 0;
  font-weight: 700;
  color: var(--done);
}

.copy-status-failure {
  color: var(--accent);
}

.copy-status:empty {
  display: none;
}

.after-open {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
}

.send-steps {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
  font-size: 0.96rem;
}

.chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.copy-chip {
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 38px;
  padding: 6px 10px;
}

.copy-chip:hover {
  background: var(--ink);
  color: var(--paper);
}

.sent-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 2px solid var(--ink);
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
}

.sent-toggle input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--done);
}

.card-details {
  margin-top: 12px;
  font-size: 0.92rem;
}

.card-details .button {
  margin-top: 10px;
}

.letter-preview-text {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--hairline);
  font-family: var(--font-typewriter);
  font-size: 0.88rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.call-script {
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 4px solid var(--ink);
}

.progress-line {
  margin: 14px 0 0;
  font-family: var(--font-heavy);
  font-weight: 900;
  text-transform: uppercase;
}

.progress-line:empty {
  display: none;
}

/* ---- After sending / footer ---- */

.next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.next-actions .button {
  flex: 1 1 220px;
}

.site-footer {
  margin-top: 48px;
  padding-top: 16px;
  padding-bottom: 40px;
  border-top: 5px solid var(--ink);
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0 0 10px;
  max-width: 44em;
}

.site-footer .plain-explanation {
  color: var(--ink);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
