:root {
  --paper: #f5f2eb;
  --deep: #ebe6dc;
  --ink: #25251f;
  --muted: #716e64;
  --rule: #d7d0c4;
  --accent: #8b4f3b;
  --forest: #303b34;
  /* Match the gallery's brief feedback without delaying focus or actions. */
  --motion-feedback: 160ms;
  --motion-ease: cubic-bezier(0.2, 0.6, 0.3, 1);
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow-wrap: anywhere;
}
a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.25em;
}
button,
a,
input,
textarea,
summary {
  touch-action: manipulation;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--forest);
  background: var(--forest);
  color: var(--paper);
  padding: 0.8rem 1rem;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
}
button:disabled,
button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.6;
}
.button-secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--rule);
}
button:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--deep);
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid #66533b;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.site-header,
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.8rem clamp(1rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-size: 1.8rem;
  line-height: 1.15;
  text-decoration: none;
}
.wordmark > span {
  display: block;
  font: 600 0.65rem/1.5 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.wordmark .wordmark-sub {
  margin-top: 0.5rem;
  font-weight: 400;
}
.back-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font: 600 0.82rem/1.5 var(--sans);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.public-main,
.bureau-main {
  max-width: 92rem;
  margin: auto;
  padding: 3.5rem clamp(1rem, 5vw, 4.5rem) 5rem;
}
.intro {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
h1 {
  font-size: clamp(3rem, 6vw, 6rem);
  letter-spacing: -0.05em;
  font-weight: 400;
  line-height: 1.02;
  margin: 0.6rem 0 1.2rem;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-weight: 400;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h3 {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere;
}
.eyebrow,
.section-number {
  font: 600 0.67rem/1.5 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.standfirst {
  font-size: 1.3rem;
  line-height: 1.6;
  max-width: 39rem;
  color: var(--muted);
}
.membership-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 8vw, 7rem);
  padding-top: 3rem;
}
.membership-notes {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}
.membership-form-section {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}
.membership-facts {
  margin: 2rem 0;
}
.membership-facts > div {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
}
.membership-facts dt {
  font-size: 1.1rem;
}
.membership-facts dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.quiet,
.field-help,
.panel-state,
.section-intro {
  color: var(--muted);
  line-height: 1.6;
}
.quiet,
.section-intro {
  max-width: 44rem;
}
.field-help,
.field-error {
  font: 400 0.78rem/1.6 var(--sans);
  margin: 0.4rem 0;
}
.field-error,
.notice-error {
  color: #812e25;
}
.field {
  margin: 1.3rem 0;
}
label,
legend {
  font: 600 0.83rem/1.6 var(--sans);
}
label {
  display: block;
  margin-bottom: 0.4rem;
}
label span {
  font-weight: 400;
  color: var(--muted);
}
input:not([type="checkbox"]):not([type="radio"]),
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--muted);
  background: var(--paper);
  color: var(--ink);
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 0;
}
textarea {
  resize: vertical;
  min-height: 7rem;
}
input[type="radio"],
input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--forest);
  flex-shrink: 0;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 1rem 0;
}
.choice-group legend {
  margin-bottom: 0.6rem;
}
.choice,
.check-label {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 44px;
}
.privacy-note {
  margin: 1.5rem 0;
  padding: 1.2rem;
  background: var(--deep);
  font-size: 0.9rem;
  line-height: 1.65;
}
.privacy-note h3 {
  font-size: 1.15rem;
}
.privacy-note p {
  margin: 0.5rem 0;
}
.notice {
  padding: 1rem;
  border-left: 3px solid var(--rule);
  background: var(--deep);
  line-height: 1.6;
}
.notice-error {
  border-color: #812e25;
}
.demo-banner {
  padding: 0.9rem clamp(1rem, 5vw, 4.5rem);
  background: #e4ddc6;
  font: 400 0.8rem/1.6 var(--sans);
}
.submission-success {
  padding: 2rem 0;
}
.site-footer {
  border-top: 1px solid var(--rule);
  border-bottom: 0;
  font: 400 0.75rem/1.6 var(--sans);
  color: var(--muted);
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.8rem;
  background: var(--paper);
  z-index: 20;
}
.skip-link:focus {
  top: 1rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.bureau-intro,
.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.session-state {
  font: 400 0.8rem/1.5 var(--sans);
  overflow-wrap: anywhere;
}
.bureau-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 2rem;
  padding: 1rem 0;
  border-block: 1px solid var(--rule);
  font: 600 0.85rem/1.5 var(--sans);
}
.bureau-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.5rem;
}
.bureau-section {
  padding-top: 3rem;
  scroll-margin-top: 1rem;
}
.record {
  border-top: 1px solid var(--rule);
  padding: 1.35rem 0;
  min-width: 0;
}
.record p {
  margin: 0.4rem 0;
  line-height: 1.6;
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record strong {
  font: 600 0.76rem/1.5 var(--sans);
}
.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}
.record-actions > button,
.dialog-actions > button {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.record-voided {
  border-color: var(--accent);
}
.record.record-voided {
  border-top-style: dashed;
}
.history-entry.record-voided {
  border-left-style: dashed;
}
.record > button {
  margin-top: 0.9rem;
}
.record-list {
  margin: 1rem 0;
}
.member-scope {
  margin-bottom: 0;
}
.record-history {
  margin-top: 1rem;
}
.history-entry {
  border-left: 2px solid var(--rule);
  padding: 0.3rem 0 0.3rem 1rem;
  margin: 1rem 0;
}
.history-entry h4,
.history-entry h5 {
  font-size: 1.05rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}
#transfer-editor-title {
  margin-top: 1.5rem;
}
.archive-disclosure,
.new-transfer {
  border-block: 1px solid var(--rule);
  padding: 1rem 0;
  margin-top: 1.5rem;
}
summary {
  cursor: pointer;
  font: 600 0.85rem/1.6 var(--sans);
  min-height: 44px;
  padding: 0.5rem 0;
  overflow-wrap: anywhere;
}
.transfer-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin: 1.5rem 0;
}
.transfer-totals > div {
  min-width: 0;
  max-width: 100%;
}
.transfer-totals dt {
  font: 400 0.78rem/1.6 var(--sans);
  color: var(--muted);
}
.transfer-totals dd {
  margin: 0.25rem 0;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
}
.search-row {
  max-width: 35rem;
  margin: 1.5rem 0;
}
.email-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 400 0.85rem/1.7 var(--sans);
  padding: 1rem;
  background: var(--deep);
}
dialog {
  width: min(35rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid var(--rule);
  padding: min(2rem, 5vw);
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #25251f88;
}
dialog h2 {
  font-size: 1.25rem;
  line-height: 1.25;
}
dialog p {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.dialog-detail {
  background: var(--deep);
  padding: 0.8rem;
  white-space: pre-wrap;
}
dialog :is(input, textarea)[readonly] {
  background: var(--deep);
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (max-width: 48rem) {
  .membership-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding-top: 2rem;
  }
  .membership-form-section {
    grid-column: 1;
    grid-row: 1;
  }
  .membership-notes {
    grid-column: 1;
    grid-row: 2;
  }
  .site-header {
    padding-block: 1rem;
  }
  .intro {
    padding-bottom: 1.5rem;
  }
  h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }
  .standfirst {
    font-size: 1.15rem;
  }
  .membership-notes h2 br {
    display: none;
  }
  .public-main,
  .bureau-main {
    padding-top: 2rem;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 26rem) {
  .record-actions button {
    width: 100%;
  }
}
@media (max-width: 22rem) {
  .site-header,
  .site-footer {
    align-items: start;
    flex-direction: column;
  }
}
/* Native dialogs open immediately; only their backdrop fades. */
@keyframes dialog-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: no-preference) {
  :where(a, button) {
    transition:
      color var(--motion-feedback) var(--motion-ease),
      background-color var(--motion-feedback) var(--motion-ease),
      border-color var(--motion-feedback) var(--motion-ease),
      text-decoration-color var(--motion-feedback) var(--motion-ease);
  }
  dialog[open]::backdrop {
    animation: dialog-backdrop-in var(--motion-feedback) var(--motion-ease);
  }
  html {
    scroll-behavior: smooth;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* A quiet reading column for the bureau's operational guide. */
.guide-main {
  max-width: 68rem;
}
.guide-section {
  max-width: 43rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.guide-section :is(p, li, dd) {
  font-size: 1.08rem;
  line-height: 1.75;
}
.guide-section li + li {
  margin-top: 0.75rem;
}
.guide-section ol {
  padding-left: 1.5rem;
}
.guide-definitions dt {
  margin-top: 1.25rem;
  font: 600 0.85rem/1.5 var(--sans);
}
.guide-definitions dd {
  margin: 0.35rem 0 0;
}
.guide-note {
  max-width: 43rem;
  margin-block: 2.5rem 1.5rem;
}

.human-check-frame {
  display: block;
  width: 100%;
  height: 170px;
  border: 0;
  margin-top: 1rem;
}
.verification-frame {
  background: transparent;
}
