/* ==========================================================================
   Stop Lying About Our Church — "Public Record"
   A dated, addressed, filed document: crisp grid, grotesque apparatus,
   serif correspondence, one signal colour (signature-ink blue).
   CSP-safe: no inline styles; JS only sets classes and custom properties.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL; licences in /fonts/) ---------- */
/* Vietnamese and Latin Extended faces share the family name; unicode-range keeps them
   from downloading until a name or city needs one of their letters. Where ranges overlap,
   the face declared last is tried first, so the latin face stays the default. */
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-vietnamese-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --ground: #eef1f3; /* cool filing-cabinet grey */
  --paper: #ffffff;
  --ink: #111821; /* 17.9:1 on paper, 15.7:1 on ground */
  --ink-2: #3b4552; /* 9.7:1 on paper, 8.6:1 on ground */
  --ink-3: #56606d; /* 6.4:1 on paper, 5.6:1 on ground: labels */
  --rule: #c5ccd4; /* decorative hairlines only */
  --line: #6f7a87; /* UI boundaries: 4.4:1 on paper, 3.9:1 on ground */
  --signal: #1f3fbf; /* signature-ink blue: 8.3:1 on paper */
  --signal-deep: #172f8f;
  --signal-wash: #e8ecfa;
  --error: #a11d1d; /* functional only: 7.0:1 on paper */
  --error-wash: #fbedec;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Charter, Georgia, serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 77rem;
  --rail: 12.5rem;
  --gap: clamp(2rem, 4.5vw, 4.5rem);
  --read: clamp(1.125rem, 1rem + 0.42vw, 1.3125rem); /* 18px to 21px */
  --hang: 4.25rem; /* distance from the text column to the apparatus line */
  --nav-h: 0px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: #cbd5f6;
  color: var(--ink);
}

a {
  color: var(--signal);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--signal-deep);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

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

.figure {
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 650;
}
.nowrap {
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus,
.skip-link:focus-visible {
  color: #fff;
  transform: none;
  outline-color: var(--signal);
}

/* ---------- Masthead ---------- */
.masthead {
  padding-block: clamp(1.75rem, 4.5vw, 3.5rem) clamp(2rem, 4vw, 3.25rem);
}
.masthead__grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--gap);
  align-items: start;
}
.masthead__kicker {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding-top: 0.6rem;
  border-top: 2px solid var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
}
.masthead__main {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.masthead__title {
  margin: -0.07em 0 0;
  font-size: clamp(2.5rem, 1.35rem + 4.6vw, 5.75rem);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: -0.032em;
}
.masthead__dek {
  margin: clamp(1.1rem, 2.2vw, 1.6rem) 0 0;
  max-width: 31em;
  font-size: clamp(1.1875rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.38;
  font-weight: 420;
  color: var(--ink-2);
  text-wrap: balance;
}

/* Docket: the filing fields, set in the margin column */
.docket {
  grid-column: 1;
  grid-row: 2;
  margin: 1.1rem 0 0;
}
.docket__cell {
  min-width: 0;
  padding: 0.6rem 0 0.7rem;
  border-top: 1px solid var(--rule);
}
.docket dt {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.docket dd {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink);
}
.docket__link {
  display: table;
  padding-block: 0.15rem;
  font-weight: 600;
}

/* ---------- Page layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: start;
}
.main {
  min-width: 0;
  container: main / inline-size;
}

/* ---------- Rail: section index + per-section progress ---------- */
.rail {
  position: sticky;
  top: 1.5rem;
  align-self: start;
}
.rail__label {
  margin: 0;
  padding: 0.6rem 0 0.7rem;
  border-top: 2px solid var(--ink);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--rule);
}
.rail__link {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: baseline;
  min-height: 2.75rem;
  padding: 0.7rem 0 0.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  text-decoration: none;
}
.rail__num {
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.rail__text {
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.3;
}
.rail__link:hover {
  color: var(--ink);
}
.rail__link:hover .rail__text {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.rail__link[aria-current] {
  color: var(--ink);
}
.rail__link[aria-current] .rail__num {
  color: var(--signal);
}
.rail__track {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 1;
  height: 2px;
  overflow: hidden;
}
.js .rail__track {
  display: block;
}
.rail__fill {
  display: block;
  height: 100%;
  background: var(--signal);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ---------- Sections ---------- */
.section,
.main [id] {
  scroll-margin-top: calc(var(--nav-h) + 1.25rem);
}
.section + .section {
  margin-top: clamp(4.5rem, 9vw, 7.5rem);
}
.section__title {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
  padding-top: 0.6rem;
  border-top: 2px solid var(--ink);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.section__num {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--signal);
  transform: translateY(-0.2em);
}

/* ---------- The sheet ---------- */
.sheet {
  background: var(--paper);
  border: 1px solid var(--rule);
}

/* ---------- The letter ---------- */
.letter__sheet {
  position: relative;
  font-size: var(--read);
  padding: clamp(1.75rem, 3.5vw, 3rem) clamp(1.25rem, 5vw, 4.5rem)
    clamp(2rem, 4.5vw, 3.75rem) calc(var(--hang) + clamp(1.25rem, 2.5vw, 2.25rem));
}
.letter__sheet > * {
  max-width: 32em;
}

/* Filing stamp: a decorative echo of the date, hidden from assistive tech */
.letter__stamp {
  position: absolute;
  top: clamp(1.75rem, 3.5vw, 3rem);
  right: clamp(1.25rem, 4vw, 3.5rem);
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0.5rem 0.75rem 0.45rem;
  border: 2px solid var(--signal);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.letter__stamp span + span {
  padding-top: 0.25rem;
  border-top: 1px solid currentColor;
  letter-spacing: 0.1em;
}

/* Heading and foot fields: grotesque labels hang on the apparatus line */
.letter__meta {
  margin: 0;
}
.letter__meta > div {
  position: relative;
}
.letter__meta > div + div {
  margin-top: 0.75rem;
}
.letter__meta dt {
  position: absolute;
  left: calc(-1 * var(--hang));
  top: 0.45em;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.letter__meta dd {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
}
/* Recipient and date are correspondence: set in the serif */
.letter__meta--head dd {
  font-family: var(--serif);
  font-size: 0.95em;
  line-height: 1.5;
}
.letter__meta--head dt {
  top: 0.5em;
}
.letter__line {
  display: block;
}
.letter__line:first-child {
  font-weight: 600;
}

.letter__head {
  position: relative;
  margin-bottom: 1.75em;
  padding-right: 8.5rem; /* keeps the address clear of the filing stamp */
  padding-bottom: 1.4rem;
}
.letter__head::after,
.letter__foot::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--hang));
  right: 0;
  height: 1px;
  background: var(--rule);
}
.letter__head::after {
  bottom: 0;
}

.letter__scripture {
  margin: 0 0 2em;
  padding: 0.1em 0 0.1em 1.1em;
  border-left: 3px solid var(--signal);
  font-family: var(--serif);
  font-size: 1.12em;
  line-height: 1.5;
  color: var(--ink);
}
.letter__scripture p {
  margin: 0;
  text-wrap: pretty;
}
.letter__scripture footer {
  margin-top: 0.6rem;
}
.letter__scripture cite {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.letter__salutation,
.letter__text > p,
.letter__closing {
  font-family: var(--serif);
  font-size: 1em;
  line-height: 1.68;
  font-weight: 400;
  color: var(--ink);
  text-wrap: pretty;
  hanging-punctuation: first;
}
.letter__salutation {
  margin: 0 0 1.05em;
}
.letter__text > p {
  margin: 0 0 1.05em;
}
.letter__text > p:last-child {
  margin-bottom: 0;
}
.letter__closing {
  margin: 1.6em 0 0;
}

.letter__foot {
  position: relative;
  margin-top: 2.4em;
  padding-top: 1.3rem;
}
.letter__foot::before {
  top: 0;
}
.letter__signed dd {
  color: var(--ink-2);
}
.letter__signed a {
  font-weight: 600;
}

/* ---------- Register: one list of signatures ---------- */
.register__summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  margin: 0 0 2rem;
}
.register__count {
  margin: 0;
}
.register__figure {
  display: block;
  font-size: clamp(4.25rem, 3rem + 5vw, 7rem);
  font-weight: 720;
  line-height: 0.82;
  letter-spacing: -0.045em;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}
.register__unit {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.register__note {
  margin: 0;
  max-width: 31em;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Entries read across, row by row; name and place share a line.
   Tracks are wide enough (two columns on desktop) that a typical name and place fit on it. */
.names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  column-gap: 1.125rem;
  border-bottom: 1px solid var(--rule);
}
.entry {
  min-width: 0;
  padding: 0.45rem 0 0.5rem;
  border-top: 1px solid var(--rule);
  line-height: 1.3;
}
.entry__name {
  margin-right: 0.45em;
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.entry__place {
  display: inline-block;
  max-width: 100%;
  font-size: 0.875rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
@container main (min-width: 56rem) {
  .entry__name {
    font-size: 1rem;
  }
  .entry__place {
    font-size: 0.8125rem;
  }
}

/* Collapsed (JS only): cut on a row boundary and fade the last rows */
.js .names.is-collapsed > .entry:nth-child(n + 49) {
  display: none;
}
.js .names.is-collapsed {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 6rem), rgb(0 0 0 / 0.12));
  mask-image: linear-gradient(to bottom, #000 calc(100% - 6rem), rgb(0 0 0 / 0.12));
  border-bottom-color: transparent;
}
/* One column (under 2 × 21rem + gap): the collapsed register shows 12 names, not 48 */
@container main (max-width: 43.1rem) {
  .js .names.is-collapsed > .entry:nth-child(n + 13) {
    display: none;
  }
}

.register__more {
  margin-top: 1.25rem;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.875rem;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 620;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}
.toggle::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
}
.toggle[aria-expanded="true"]::after {
  transform: translateY(0.15em) rotate(-135deg);
}
.toggle:hover {
  background: var(--ink);
  color: #fff;
}

/* ---------- Add your name ---------- */
.sign__grid {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 4vw, 3rem);
  align-items: start;
}
@container main (max-width: 44rem) {
  .sign__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.sign__lede {
  margin: 0 0 1.75rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.privacy {
  padding-top: 0.6rem;
  border-top: 1px solid var(--ink);
}
.privacy__title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.privacy__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.privacy__list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.privacy__list li + li {
  margin-top: 0.75rem;
}
.privacy__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.35rem;
  height: 2px;
  background: var(--ink-3);
}
.privacy__list strong {
  color: var(--ink);
  font-weight: 620;
}

.sign__sheet {
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.form {
  margin: 0;
}
.form__required {
  margin: 0 0 1.75rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.field {
  margin: 0 0 1.5rem;
}
.field__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.0625rem;
  font-weight: 620;
  line-height: 1.3;
}
.field__input {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field__input:hover {
  border-color: var(--ink-2);
}
.field__input:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 0;
  border-color: var(--ink);
}
.field__input:user-invalid {
  border-color: var(--error);
}
.field__hint {
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Honeypot: off-screen, not focusable, hidden from assistive tech */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  margin: 2rem 0 1.75rem;
  padding: 1.1rem 1.15rem;
  background: var(--ground);
  border-left: 3px solid var(--ink);
}
.consent__box {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.05rem 0 0;
  accent-color: var(--signal);
  cursor: pointer;
}
.consent__label {
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}

/* The security check is shown only while it loads or once it renders */
#turnstile-container {
  margin: 0 0 1.5rem;
}
#turnstile-container:empty {
  display: none;
}
#turnstile-container.is-loading:empty {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 300px;
  min-height: 65px;
  border: 1px dashed var(--line);
}
#turnstile-container.is-loading:empty::before {
  content: "Loading the security check…";
  font-size: 0.875rem;
  color: var(--ink-3);
}

.notice {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--signal-wash);
  border-left: 3px solid var(--signal);
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.8rem 1.6rem;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.2;
  color: #fff;
  background: var(--signal);
  border: 2px solid var(--signal);
  border-radius: 0;
  cursor: pointer;
}
.button:hover {
  background: var(--signal-deep);
  border-color: var(--signal-deep);
}
.button:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}
.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form__status {
  margin: 1.25rem 0 0;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  line-height: 1.45;
  background: var(--signal-wash);
  border-left: 3px solid var(--signal);
}
/* Empty, the live region keeps its place in the accessibility tree (so the first message is
   announced) and only collapses its box. */
.form__status:empty {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.form__status.error {
  color: var(--error);
  background: var(--error-wash);
  border-left-color: var(--error);
}
.form__status:focus {
  outline: none;
}
.form__status:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

/* Success: a filing receipt */
.receipt {
  outline: none;
}
.receipt:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 6px;
}
.receipt__stamp {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 0.45rem 0.7rem 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  border: 2px solid var(--signal);
}
.receipt__title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.receipt p:not(.receipt__stamp) {
  max-width: 34em;
  margin: 0 0 1rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
}
/* p.receipt__back ties the generic `.receipt p:not(...)` rule above and wins by order */
.receipt p.receipt__back {
  margin-top: 1.5rem;
  margin-bottom: 0;
}
.receipt__back a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 620;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(4.5rem, 9vw, 7.5rem);
  padding-block: 0 3rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) auto;
  column-gap: var(--gap);
  row-gap: 0.75rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}
.site-footer p {
  margin: 0;
}
.site-footer__title {
  font-weight: 680;
  line-height: 1.3;
}
.site-footer__text {
  max-width: 40em;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.site-footer__top a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: -0.65rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Not found ---------- */
.notfound {
  min-width: 0;
  padding-bottom: 4rem;
}
.notfound__site {
  margin: 0;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.notfound__site a {
  color: var(--ink);
  text-decoration: none;
}
.notfound__site a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.notfound__sheet {
  position: relative;
  max-width: 44rem;
  padding: clamp(1.75rem, 4vw, 3rem);
}
.notfound__stamp {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.45rem 0.7rem 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  border: 2px solid var(--signal);
}
.notfound h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.notfound p:not(.notfound__stamp) {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.55;
}
/* p.notfound__back ties the generic `.notfound p:not(...)` rule above and wins by order */
.notfound p.notfound__back {
  margin: 1.25rem 0 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
}
.notfound__back a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 620;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Narrower desktops */
@media (max-width: 75em) {
  :root {
    --rail: 11rem;
    --hang: 3.75rem;
  }
}

/* Tablet and below: the rail becomes a section bar that tucks away while reading */
@media (max-width: 60em) {
  :root {
    --nav-h: 2.75rem;
  }
  .masthead__grid,
  .layout,
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .masthead__grid {
    grid-template-rows: none;
  }
  .masthead__kicker {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-bottom: 1.25rem;
    padding-right: 2.5rem;
  }
  .masthead__main,
  .docket {
    grid-column: 1;
    grid-row: auto;
  }
  .docket {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .docket__cell {
    padding: 0.7rem 0.9rem 0.8rem;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
  .docket__cell:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 calc(-1 * var(--gutter)) clamp(1.5rem, 5vw, 3rem);
    padding: 0 var(--gutter);
    background: var(--paper);
    border-block: 1px solid var(--rule);
  }
  .js .rail.is-tucked {
    transform: translateY(calc(-100% - 2px));
  }
  .js .rail:focus-within {
    transform: none;
  }
  .rail__label {
    display: none;
  }
  .rail__list {
    border-bottom: 0;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .rail__list li {
    flex: 1 1 auto;
  }
  .rail__list li + li {
    border-left: 1px solid var(--rule);
  }
  .rail__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: var(--nav-h);
    padding: 0.4rem 0.75rem;
    border: 0;
    white-space: nowrap;
  }
  .rail__text {
    font-size: 0.9375rem;
  }
  .rail__track {
    bottom: 0;
    height: 3px;
  }
  .js .rail__link {
    color: var(--ink-3);
  }
  .js .rail__link[aria-current] {
    color: var(--ink);
  }
  /* The scrolling bar is exactly as tall as its links and clips anything outside them,
     so the focus ring is drawn inside the link. */
  .rail__link:focus-visible {
    outline-offset: -3px;
  }

  .site-footer__grid {
    row-gap: 0.6rem;
  }
  .site-footer__top a {
    margin-top: 0;
  }
}
@media (max-width: 60em) and (prefers-reduced-motion: no-preference) {
  .js .rail {
    transition: transform 0.22s ease;
  }
}

/* Phones: a compact masthead so the letter starts on the first screen */
@media (max-width: 40em) {
  :root {
    --hang: 0px;
  }
  .masthead {
    padding-block: 1rem 1.25rem;
  }
  .masthead__kicker {
    margin-bottom: 0.7rem;
    padding-top: 0.4rem;
    font-size: 0.75rem;
  }
  .masthead__title {
    font-size: clamp(2rem, 1.2rem + 4vw, 2.5rem);
    line-height: 1;
  }
  .masthead__dek {
    margin-top: 0.7rem;
    font-size: 1.0625rem;
    line-height: 1.4;
  }
  /* The dek names the recipient and the section bar offers "Add your name" */
  .docket {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 1rem;
  }
  .docket__cell--minor,
  .docket__link--add {
    display: none;
  }
  .docket__cell {
    padding: 0.45rem 0.75rem 0.55rem;
  }
  .docket dd {
    margin-top: 0.1rem;
  }
  /* A 44px touch target without adding height to the docket */
  .docket__link {
    padding-block: 0.75rem;
    margin-block: -0.65rem;
  }

  .rail__num {
    display: none;
  }
  .rail__link {
    padding-inline: 0.5rem;
  }

  .section + .section {
    margin-top: 3.5rem;
  }
  .section__title {
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    font-size: 1.375rem;
  }

  /* Full-bleed sheets */
  .sheet {
    margin-inline: calc(-1 * var(--gutter));
    border-inline: 0;
  }
  .letter__sheet {
    padding: 1.25rem var(--gutter) 2rem;
  }
  .sign__sheet {
    padding: 1.5rem var(--gutter) 1.75rem;
  }

  /* Labels sit in a slim column beside their values */
  .letter__meta > div {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    align-items: baseline;
  }
  .letter__meta > div + div {
    margin-top: 0.4rem;
  }
  .letter__meta dt {
    position: static;
    font-size: 0.6875rem;
  }
  .letter__meta dd {
    font-size: 1rem;
  }
  /* After the generic rule: same specificity, so order decides */
  .letter__meta--head dd {
    font-size: 1.0625rem;
    line-height: 1.45;
  }
  .letter__head {
    margin-bottom: 1.25em;
    padding-right: 0;
    padding-bottom: 1rem;
  }
  .letter__head::after,
  .letter__foot::before {
    left: 0;
  }
  .letter__stamp {
    display: none;
  }

  .register__summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  .register__figure {
    font-size: 4rem;
  }
  .register__unit {
    margin-top: 0.6rem;
  }
  .register__note {
    font-size: 1rem;
  }
  .button {
    width: 100%;
  }
  .site-footer {
    margin-top: 4rem;
  }
}

@media (max-width: 22.5em) {
  .rail__text {
    font-size: 0.875rem;
  }
  .rail__link {
    padding-inline: 0.35rem;
  }
}

/* Short viewports or very large text: do not pin the section bar */
@media (max-height: 30em) {
  .rail {
    position: static;
  }
  .js .rail.is-tucked {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Print: the letter, then the names from a new page in compact columns
   ========================================================================== */
@media print {
  @page {
    size: letter;
    margin: 12mm 15mm 12mm 15mm;
  }
  :root {
    --hang: 11mm;
    --read: 10.5pt;
  }
  html,
  body {
    background: #fff;
    color: #000;
  }
  body {
    font-size: 9.5pt;
  }
  .skip-link,
  .rail,
  .sign,
  .register__more,
  .docket,
  .masthead__kicker,
  .letter__stamp,
  .site-footer,
  .letter > .section__title {
    display: none !important;
  }
  .wrap {
    width: auto;
  }
  .masthead {
    padding: 0 0 3mm;
    border-bottom: 1pt solid #000;
    margin-bottom: 4mm;
  }
  .masthead__grid,
  .layout {
    display: block;
  }
  .masthead__title {
    margin: 0;
    font-size: 20pt;
  }
  .masthead__dek {
    max-width: none;
    margin-top: 1.5mm;
    font-size: 10.5pt;
    color: #000;
  }
  .section + .section {
    margin-top: 0;
  }
  .section__title {
    margin-bottom: 3mm;
    padding-top: 1.5mm;
    border-top-width: 1pt;
    font-size: 12pt;
  }
  .sheet {
    margin: 0;
    border: 0;
    background: none;
  }
  .letter__sheet {
    padding: 0 0 0 var(--hang);
  }
  .letter__sheet > * {
    max-width: none;
  }
  .letter__head {
    margin-bottom: 3.5mm;
    padding: 0 0 2.5mm;
  }
  .letter__meta > div + div {
    margin-top: 1mm;
  }
  .letter__meta dt {
    font-size: 6.5pt;
  }
  .letter__meta dd {
    font-size: 9.5pt;
  }
  .letter__meta--head dd {
    font-size: 10.5pt;
    line-height: 1.4;
  }
  .letter__salutation,
  .letter__text > p,
  .letter__closing {
    line-height: 1.38;
  }
  .letter__salutation {
    margin-bottom: 0.55em;
  }
  .letter__text > p {
    margin-bottom: 0.55em;
    orphans: 3;
    widows: 3;
  }
  .letter__closing {
    margin-top: 0.9em;
  }
  .letter__foot {
    margin-top: 4mm;
    padding-top: 2mm;
    break-inside: avoid;
  }
  .letter__scripture cite {
    font-size: 8.5pt;
  }
  .register {
    break-before: page;
  }
  .register__summary {
    display: block;
    margin: 0 0 3mm;
  }
  .register__count {
    margin-bottom: 1mm;
  }
  .register__figure,
  .register__unit {
    display: inline;
  }
  .register__figure {
    font-size: 16pt;
    letter-spacing: -0.02em;
  }
  .register__unit {
    margin-left: 1.5mm;
    font-size: 8pt;
  }
  .register__note {
    max-width: none;
    font-size: 8.5pt;
    color: #000;
  }
  .names {
    display: block;
    columns: 3;
    column-gap: 4mm;
    border: 0;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .entry,
  .js .names.is-collapsed > .entry {
    display: block !important;
    break-inside: avoid;
    padding: 0.55mm 0 0.6mm;
    border-top: 0.4pt solid #bbb;
    line-height: 1.25;
  }
  .entry__name {
    margin-right: 0.4em;
    font-size: 8.25pt;
  }
  .entry__place {
    font-size: 6.75pt;
    color: #333;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
}
