@font-face {
  font-family: "Archive Serif";
  src: local("Baskerville"), local("Palatino Linotype"), local("Georgia");
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f5f3ed;
  --ink: #102b3b;
  --red: #be332d;
  --line: #cccfc8;
  --muted: #53626a;
  --serif: "Archive Serif", Georgia, serif;
  --sans: "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
p, h1, h2 { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input, textarea { font: inherit; border-radius: 0; max-width: 100%; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #bd6c00;
  outline-offset: 4px;
}
.login-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 36px 20px; }
.login-sheet { width: 100%; max-width: 450px; min-width: 0; border-block: 1px solid var(--line); padding: 34px 0 18px; }
.archive-mark {
  display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px;
  border: 1px solid var(--red); border-right-width: 6px; color: var(--red); font: 37px/1 var(--serif);
}
.login-sheet > .archive-mark { margin-bottom: 27px; }
.eyebrow { color: var(--red); font-size: 11px; font-weight: 650; letter-spacing: 1.8px; }
h1 { margin-top: 13px; font: 400 clamp(38px, 7vw, 52px)/1.08 var(--serif); letter-spacing: -1.5px; overflow-wrap: anywhere; }
.login-sheet h1 { font-size: clamp(38px, 9vw, 49px); }
.introduction { margin-top: 17px; color: var(--muted); font-size: 17px; }
.login-sheet .introduction { font-size: 16px; }
.gateway-form { margin-top: 30px; }
.field { min-width: 0; margin-bottom: 24px; }
label { display: block; font-size: 15px; font-weight: 600; }
input:not([type="checkbox"]):not([type="hidden"]), textarea {
  display: block; width: 100%; min-width: 0; min-height: 50px; padding: 12px; margin-top: 8px;
  border: 1px solid #a4afa9; background: #fffdfa; color: var(--ink); font-size: 16px;
}
textarea { min-height: 155px; resize: vertical; line-height: 1.55; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.form-errors, .field-errors { color: var(--red); font-size: 14px; overflow-wrap: anywhere; }
.form-errors { padding: 12px 16px; border-left: 3px solid var(--red); background: #ede9df; margin-bottom: 22px; }
.field-errors { margin-top: 8px; }
.errorlist { list-style: none; padding: 0; margin: 0; }
.errorlist li + li { margin-top: 7px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 20px; max-width: 100%;
  min-height: 50px; padding: 12px 18px; border: 1px solid var(--ink); background: transparent;
  color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button span { font-size: 20px; }
.button.red { border-color: var(--red); background: var(--red); color: #fff; }
.button.red:hover { background: #942922; border-color: #942922; }
.button.outline:hover { color: var(--paper); background: var(--ink); }
.login-sheet .button { width: 100%; justify-content: space-between; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.sheet-footer, .page-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: 1px;
}
.sheet-footer { margin-top: 33px; padding-top: 16px; font-size: 9px; }
.page-footer { margin-top: 36px; padding: 22px 5%; }
.masthead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 28px; padding: 24px 5%; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; font-size: 11px; font-weight: 700; line-height: 1.35; letter-spacing: 1.5px; }
.masthead nav { margin-left: auto; font-size: 14px; }
.logout-form { margin: 0; }
.text-button { min-height: 44px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 14px; cursor: pointer; }
.text-button:hover { color: var(--red); border-color: var(--red); }
.vault-sheet { width: min(100% - 40px, 690px); min-width: 0; margin: 54px auto 64px; }
.privacy-note { border-left: 3px solid var(--red); background: #ebece5; padding: 17px 20px; margin: 26px 0; font-size: 14px; }
.file-field { border: 1px dashed #859791; padding: 20px; background: #eeeee7; }
.file-field input[type="file"] { border: 0; background: transparent; padding: 0; margin-top: 14px; font-size: 14px; }
input[type="file"]::file-selector-button { min-height: 46px; margin-right: 12px; padding: 10px 14px; border: 0; background: var(--ink); color: var(--paper); font: inherit; cursor: pointer; }
.promise { min-width: 0; margin: 30px 0 0; padding: 20px; border: 1px solid var(--line); }
.promise legend { max-width: 100%; padding: 0 8px; font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.promise-copy { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.agreement { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.agreement input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; margin: 10px 0 0; accent-color: var(--red); }
.agreement label { display: flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.receipt-note { color: var(--muted); font-size: 13px; margin-top: 23px; }
.success-sheet { max-width: 650px; }
.receipt { border-block: 1px solid var(--line); margin: 30px 0; padding: 23px 0; }
.receipt h2 { font-size: 13px; font-weight: 600; }
.receipt-id { margin-top: 9px; color: var(--red); font: 28px/1.4 var(--serif); overflow-wrap: anywhere; }
.privacy-summary { color: var(--muted); font-size: 15px; }
.skip-link { position: absolute; left: 20px; top: -100px; padding: 12px; background: #fff; z-index: 5; }
.skip-link:focus { top: 12px; }
@media (max-width: 600px) {
  .masthead { padding: 20px; gap: 12px 20px; }
  .masthead nav { order: 3; width: 100%; margin-left: 0; }
  .logout-form { margin-left: auto; }
  .vault-sheet { margin-block: 35px 45px; }
  .file-field, .promise { padding: 16px; }
  .promise legend { font-size: 22px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions > * { width: 100%; }
  .page-footer { padding-inline: 20px; }
}
@media (max-width: 380px) {
  .login-page { padding: 24px 18px; }
  .login-sheet { padding-top: 26px; }
  h1 { letter-spacing: -1px; }
  .brand { font-size: 10px; letter-spacing: 1px; }
}
@media (max-height: 620px) { .login-page { align-items: start; } }

/* The destination stays identifiable throughout the contribution flow. */
.destination-switch {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  border-bottom: 1px solid var(--line); background: var(--line);
}
.destination-switch a {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 15px clamp(20px, 5vw, 80px); border-top: 3px solid transparent;
  background: var(--paper); text-decoration: none; color: var(--muted);
  line-height: 1.45; overflow-wrap: anywhere;
}
.destination-switch strong { font-size: 15px; font-weight: 650; }
.destination-switch span { font-size: 14px; color: var(--muted); }
.destination-switch .family-destination[aria-current] { border-color: var(--red); background: #f7ece6; color: #96372f; }
.destination-switch .vault-destination[aria-current] { border-color: #315b70; background: #e1ebef; color: #315b70; }
.destination-switch .family-destination:hover { background: #f7ece6; color: #96372f; }
.destination-switch .vault-destination:hover { background: #e1ebef; color: #315b70; }
.destination-switch a:focus-visible { outline: 3px solid #bd6c00; outline-offset: -5px; }
@media (max-width: 480px) {
  .destination-switch { grid-template-columns: minmax(0, 1fr); }
  .destination-switch a { padding: 11px 20px; border-top: 0; border-left: 3px solid transparent; }
}

/* Fjord blue distinguishes the Vault; validation errors retain their red. */
.vault-page { --paper: #edf2f3; --line: #c3cfd4; --vault-accent: #315b70; --vault-hover: #214556; }
.vault-page .archive-mark { color: var(--vault-accent); border-color: var(--vault-accent); }
.vault-page .eyebrow { color: var(--vault-accent); font-size: 12px; letter-spacing: 1.3px; }
.vault-page .vault-sheet { border-top: 2px solid var(--vault-accent); padding-top: 26px; margin-top: 38px; }
.vault-page .privacy-note { border-color: var(--vault-accent); background: #e1ebef; }
.vault-page .file-field { border-color: #8ba2ad; background: #e7eef1; }
.vault-page .field input:not([type="file"]):not([type="checkbox"]):not([type="hidden"]),
.vault-page textarea { background: #fbfcfc; }
.vault-page input[type="file"]::file-selector-button { background: var(--vault-accent); color: #fff; }
.vault-page .promise { background: #f7f9fa; }
.vault-page .agreement input[type="checkbox"] { accent-color: var(--vault-accent); }
.vault-page .button.vault-action { background: var(--vault-accent); border-color: var(--vault-accent); color: #fff; }
.vault-page .button.vault-action:hover { background: var(--vault-hover); border-color: var(--vault-hover); }
.vault-page .receipt { border-left: 3px solid var(--vault-accent); padding: 22px; background: #e1ebef; }
.vault-page .receipt-id { color: var(--vault-accent); }
