/* Colors come from the two official logos.
   Aerie: navy ring, maroon F and outline, gold O and talons.
   Auxiliary: royal-blue banner, red F and frame, sunburst gold. */
:root {
  /* Merged palette (website PRD, Oct 2026): newsletter navy, red and gold
     lead; the logo-sampled deep navy, maroon and Auxiliary colors fill in. */
  --aerie-navy: #13304F;      /* deep navy: Aerie seal ring, bands */
  --aerie-navy-2: #1B3C87;    /* newsletter navy: primary */
  --aerie-maroon: #7A1E1A;    /* rule under mastheads */
  --aerie-gold: #C78D2D;      /* gold on white */
  --eagle-red: #C8202F;       /* accent and main buttons */
  --eagle-gold: #F5B61A;      /* gold on navy */
  --aux-blue: #18599C;
  --aux-blue-dark: #0F3F73;
  --aux-red: #B8253F;
  --aux-gold: #F5B83D;
  --eagle-brown: #5A4436;

  --primary: var(--aerie-navy-2);
  --primary-2: var(--aerie-navy);
  --accent: var(--eagle-red);
  --gold: var(--eagle-gold);
  --rule: var(--aerie-maroon);
  --tint: #EEF2FA;
  --tint-strong: #D8E0F0;

  --ink: #1B2430;
  --ink-soft: #4A525C;
  --line: #C9CDD3;
  --bg: #FFFFFF;
  --page: #F6F7FA;
  --ok: #1E7A3C;
  --error: #B3261E;

  --radius: 16px;
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body[data-branch="auxiliary"] {
  --primary: var(--aux-blue);
  --primary-2: var(--aux-blue-dark);
  --accent: var(--aux-red);
  --gold: var(--aux-gold);
  --rule: var(--aux-red);
  --tint: #EDF3FB;
  --tint-strong: #D6E4F5;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }

a { color: var(--primary-2); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Masthead, after the newsletter's front page */
.masthead {
  background: var(--primary);
  color: #fff;
  border-bottom: 6px solid var(--rule);
  transition: background .3s;
}
.masthead-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.seal {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--aerie-gold);
}
.seal img { width: 84%; height: 84%; object-fit: contain; }
.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body[data-branch="auxiliary"] .eyebrow { color: #FFD27A; }
.masthead h1 { font-size: clamp(32px, 7vw, 48px); font-weight: 800; }
.tipline { color: var(--gold); white-space: nowrap; }
body[data-branch="auxiliary"] .tipline { color: #FFD27A; }
.masthead .sub { margin: 6px 0 0; font-size: 19px; opacity: .92; }

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

.issue-card {
  background: var(--bg);
  border-left: 8px solid var(--aerie-gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.issue-card p { margin: 0; }
.issue-card p + p { margin-top: 4px; color: var(--ink-soft); }
.issue-card strong { color: var(--primary); }

.admin-note {
  background: #FFF6E0;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 18px;
}
.admin-note p { margin: 0; }
.admin-note p + p { margin-top: 6px; }

.step {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px 20px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.step-count {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.step h2 { font-size: clamp(28px, 6vw, 36px); color: var(--primary); font-weight: 800; margin-bottom: 18px; }
.lead { margin: -8px 0 18px; color: var(--ink-soft); }

/* Fields */
.field { display: block; margin: 0 0 22px; border: 0; padding: 0; }
.field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--ink-soft); }
.help { display: block; color: var(--ink-soft); font-size: 17px; margin: -2px 0 8px; }

input[type="text"], input[type="date"], input[type="email"], input[type="password"], textarea, select {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 60px;
}
textarea { min-height: 150px; resize: vertical; }
input.short { max-width: 200px; font-size: 28px; letter-spacing: .2em; font-weight: 600; }
select { appearance: auto; }
input:focus, textarea:focus, select:focus, button:focus-visible, .branch-card:focus-within, .chip:focus-within, .add-photos:focus-within {
  outline: 4px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--primary-2);
}
.has-error input, .has-error textarea, .has-error select, .has-error .branch-pick { border-color: var(--error); }
.error { display: block; color: var(--error); font-weight: 600; font-size: 18px; margin-top: 6px; }
.error:empty { display: none; }
.form-error { color: var(--error); font-weight: 600; margin: 0 0 14px; }
.form-error:empty { display: none; }

.pair { display: flex; gap: 12px; flex-wrap: wrap; }
.pair select { flex: 1 1 140px; }

/* Aerie / Auxiliary picker */
.branch-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-radius: 14px; }
.branch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px 14px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
}
.branch-card input { position: absolute; opacity: 0; }
.branch-card img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; }
.branch-card[data-for="aerie"]:has(input:checked) { border-color: var(--aerie-navy); background: #EEF2F8; color: var(--aerie-navy); box-shadow: inset 0 0 0 2px var(--aerie-navy); }
.branch-card[data-for="auxiliary"]:has(input:checked) { border-color: var(--aux-blue); background: #EDF3FB; color: var(--aux-blue-dark); box-shadow: inset 0 0 0 2px var(--aux-blue); }
.branch-card:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 18px;
  display: grid;
  place-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  flex: 1 1 140px;
}
.chip input { width: 22px; height: 22px; accent-color: var(--primary); }
.chip:has(input:checked) { border-color: var(--primary-2); background: var(--tint); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 700 21px/1.2 var(--font-display);
  min-height: 64px;
  padding: 14px 28px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--primary-2); }
.btn-send { background: var(--accent); color: #fff; width: 100%; min-height: 72px; font-size: 23px; }
.btn-send:hover { filter: brightness(1.1); }
.btn-secondary { background: var(--tint); color: var(--primary); border: 2px solid var(--tint-strong); }
.btn-link { background: none; color: var(--primary-2); text-decoration: underline; margin-top: 14px; padding-left: 0; min-height: 48px; }
.btn-inline { background: none; border: 0; color: var(--primary-2); text-decoration: underline; font: inherit; font-size: 18px; cursor: pointer; padding: 4px 6px; }

/* Step 2 */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.type-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 18px 16px;
  min-height: 150px;
  background: #fff;
  border: 3px solid var(--tint-strong);
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.type-btn:hover { border-color: var(--primary-2); background: var(--tint); }
.type-icon { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.type-label { font: 800 21px/1.2 var(--font-display); color: var(--primary); }
.type-hint { font-size: 16px; color: var(--ink-soft); line-height: 1.35; }

/* Step 3 */
.chosen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -6px 0 20px;
  padding: 10px 14px;
  background: var(--tint);
  border-radius: 12px;
}
.chosen [data-chosen-icon] { font-size: 28px; }
.type-fields { border: 0; padding: 0; margin: 0; min-width: 0; }

.photos { padding-top: 6px; border-top: 2px dashed var(--line); padding-top: 20px; }
.add-photos { position: relative; width: 100%; overflow: hidden; }
.add-photos input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.photo-list:empty { display: none; }
.photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tint);
  aspect-ratio: 1;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .remove {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.95);
  color: var(--error);
  font: 600 16px/1 var(--font-body);
  cursor: pointer;
}
.photo .working {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--ink-soft);
}

/* Sending and done */
.progress { height: 22px; background: var(--tint); border-radius: 11px; overflow: hidden; margin: 10px 0 16px; }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.done { text-align: center; }
.done h2 { margin: 10px auto 24px; max-width: 520px; }
.check {
  width: 96px;
  height: 96px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 56px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.foot { text-align: center; color: var(--ink-soft); font-size: 17px; padding: 0 16px 40px; }
.foot p { margin: 4px 0; }
.foot-admin { margin-top: 18px !important; font-size: 14px; }
.foot-admin a { color: var(--ink-soft); }

@media (max-width: 520px) {
  body { font-size: 19px; }
  .seal { width: 68px; height: 68px; }
  .eyebrow { font-size: 11px; letter-spacing: .08em; }
  .masthead h1 { font-size: 28px; }
  .tipline { color: var(--gold); white-space: nowrap; }
body[data-branch="auxiliary"] .tipline { color: #FFD27A; }
.masthead .sub { font-size: 17px; margin-top: 4px; }
  .masthead-inner { gap: 14px; padding: 18px 16px; }
  .type-grid { grid-template-columns: 1fr; }
  .type-btn { min-height: 0; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 2px; align-items: center; }
  .type-icon { grid-row: span 2; margin: 0; font-size: 34px; text-align: center; }
  .step { padding: 20px 16px 24px; }
}
