:root {
  --fg: #1a1a1a;
  --bg: #ffffff;
  --accent: #587a52; /* sage green; dark enough for white button text */
  --orange: #e8772e;
  --caution: #b42318; /* dark red: 6.5:1 on white, readable at small sizes */
  --band: clamp(12px, 10vw, 160px);
}

/* Phones: thin bands, so the text keeps most of the screen. */
@media (max-width: 40rem) {
  :root { --band: 10px; }
  .send-buttons .button { flex: 1 1 100%; text-align: center; }
  h1 { font-size: clamp(1.6rem, 7.5vw, 2rem); }
  .kicker { font-size: 0.85rem; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  padding-inline: var(--band);
}

/* Orange bands down both edges of the screen. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  border-inline: var(--band) solid var(--orange);
  pointer-events: none;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
}

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

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.button:hover { filter: brightness(1.1); }

/* Second choice next to a main button: same shape, outlined. */
.button.secondary {
  background: #fff;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: calc(0.75rem - 2px) calc(1.5rem - 2px);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* A button styled as a link (share). */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

h1 { margin-top: 0.25rem; line-height: 1.2; }

header h1, header .kicker { text-align: center; }

.kicker {
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: 0.05em;
}

li { margin-bottom: 0.5rem; }

.small { font-size: 0.9rem; }

.nowrap { white-space: nowrap; }

/* The three steps: the things we want every visitor to do, each with its own button. */
.act { margin-block: 2rem 3rem; }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
}

.step {
  counter-increment: step;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  margin: 0;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #ddd;
  border-top: 4px solid var(--accent);
  border-radius: 6px;
}

.step h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  line-height: 1.25;
}

.step h3::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
}

.step p { margin: 0 0 0.5rem; }

.step-body > :last-child, .step-more > :last-child { margin-bottom: 0; }

.step .button { display: block; text-align: center; }

/* Warnings, such as "dates may change". The link inside takes the same red. */
.caution { color: var(--caution); }

.caution a { color: inherit; }

.share { font-weight: 600; }

/* The send section: buttons first, then the letter they'll be sending. */
.send-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.copy-row { margin-bottom: 1.5rem; }

.copy-row p:first-child { margin-bottom: 0.5rem; }

.letter {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.25rem 1.25rem;
}

.recipients summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

.council { list-style: none; padding: 0; }

.council li { margin-bottom: 0.25rem; overflow-wrap: anywhere; }

footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 6rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
}

.sticky-act {
  position: fixed;
  left: var(--band);
  right: var(--band);
  bottom: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(calc(100% + 16px));
  transition: transform 0.2s;
}

.sticky-act.visible { transform: none; }

.sticky-act .button { display: block; text-align: center; }

/* Steps side by side once there's room for three. */
@media (min-width: 56rem) {
  main { max-width: 72rem; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Each card's four parts share rows with its neighbors, so the buttons line up across the row. */
  .step {
    grid-template-rows: subgrid;
    grid-row: span 4;
    row-gap: 0.75rem;
  }
}

/* Two columns on wide screens: the letter on the left, the case against on the right. */
@media (min-width: 70rem) {
  .columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }

  .sticky-act { display: none; }
}
