/* Online Applications, styled like the Webflow site: purple and gold,
   Playfair Display headings and Lato body. Fonts are self-hosted when the
   files are added under /fonts (see README); until then, system fonts. */

:root {
  --purple: #3b145a;
  --purple-deep: #2a0e45;
  --purple-tint: #f4eef8;
  --gold: #e2b84f;
  --gold-deep: #9a7414;
  --ink: #1f1a24;
  --muted: #5a5262;
  --line: #ddd3e6;
  --error: #a4161a;
  --error-tint: #fdecec;
  --success: #1b6b3a;
  --success-tint: #e8f5ec;
  --paper: #ffffff;
  --radius: 10px;
  --heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 var(--body);
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--gold); color: var(--purple-deep); padding: 8px 12px; z-index: 10; }

.site-header { background: var(--purple-deep); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.2; }
.brand-eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.brand-name { font-family: var(--heading); font-size: 20px; font-weight: 700; }
.site-header .button-quiet { color: #fff; border-color: rgba(255, 255, 255, 0.6); background: transparent; }

main { padding-top: 24px; padding-bottom: 48px; outline: none; }

h1, h2, h3 { font-family: var(--heading); color: var(--purple); line-height: 1.2; }
h1 { font-size: 32px; margin: 8px 0 16px; }
h2 { font-size: 24px; margin: 32px 0 12px; }
h1:focus, h2:focus { outline: 3px solid var(--gold); outline-offset: 4px; }

a { color: var(--purple); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.eyebrow { color: var(--gold-deep); font-weight: 900; letter-spacing: 3px; text-transform: uppercase; margin: 0; font-size: 14px; }
.lead { font-size: 20px; }
.small, .help { color: var(--muted); font-size: 16px; }
.help { margin: 0 0 6px; }
.loading { color: var(--muted); }
.step-label { color: var(--gold-deep); font-weight: 700; margin: 0; }
.preserve { white-space: pre-wrap; word-break: break-word; }

.hero { border-bottom: 4px solid var(--gold); padding-bottom: 16px; }

.card { background: var(--purple-tint); border-radius: var(--radius); padding: 16px; margin: 24px 0; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }

.button {
  display: inline-block;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font: 700 18px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--purple-deep); }
.button:disabled { opacity: 0.6; cursor: wait; }
.button-quiet { background: #fff; color: var(--purple); }
.button-quiet:hover { background: var(--purple-tint); }

.field { margin: 0 0 20px; border: 0; padding: 0; }
.field label, legend { display: block; font-weight: 700; margin-bottom: 4px; }
.optional { font-weight: 400; color: var(--muted); }

input[type='text'], input[type='email'], input[type='date'], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font: 18px/1.4 var(--body);
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 360px; resize: vertical; }
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--error); }

.choice-row { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.choice-row input { width: 22px; height: 22px; margin-top: 4px; flex: none; }
.choice-row label { font-weight: 400; }
.choice-title { display: block; font-weight: 700; }
.choice-detail { display: block; color: var(--muted); font-size: 16px; }
.checkbox { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.checkbox input { width: 22px; height: 22px; margin-top: 4px; flex: none; }
.checkbox label { flex: 1; font-weight: 400; }
.checkbox .field-error { flex-basis: 100%; }

.field-error { color: var(--error); font-weight: 700; margin: 6px 0 0; }
.field-error::before { content: '! '; }

.word-count { margin: 6px 0 0; color: var(--muted); }
.word-count.over { color: var(--error); font-weight: 700; }

.notice { border-radius: 8px; padding: 12px 16px; margin: 16px 0; border-left: 6px solid var(--purple); background: var(--purple-tint); }
.notice-error { border-left-color: var(--error); background: var(--error-tint); }
.notice-success { border-left-color: var(--success); background: var(--success-tint); }
.notice .button { margin-left: 8px; min-height: 40px; padding: 8px 16px; }

.save-status { color: var(--muted); font-size: 16px; min-height: 1.6em; }
.save-status.save-waiting { color: var(--error); font-weight: 700; }

.step-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.human-check { margin: 16px 0; min-height: 70px; }

.review-list { margin: 0; }
.review-row { border-bottom: 1px solid var(--line); padding: 10px 0; }
.review-row dt { font-weight: 700; }
.review-row dd { margin: 4px 0 0; }
.missing { color: var(--error); }
.change-link { margin-left: 8px; }
.attestation, .consent-text, .summary { background: var(--purple-tint); border-radius: var(--radius); padding: 4px 16px; }
.consent-text { max-height: 360px; overflow-y: auto; border: 2px solid var(--line); }
.reference strong { font-size: 24px; letter-spacing: 2px; color: var(--purple-deep); }

.filters { display: flex; flex-wrap: wrap; gap: 16px; }
.filters .field { flex: 1 1 200px; }
.staff-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.staff-table th, .staff-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
#staff-list { overflow-x: auto; }

.site-footer { border-top: 4px solid var(--gold); background: var(--purple-tint); font-size: 16px; padding: 16px 0; }

@media (min-width: 720px) {
  h1 { font-size: 40px; }
}

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