/* SR receipt-upload page (SR Receipt Upload v2). Phone-first. Brand: navy #002A3A, red-orange #E74F3D (accent,
   never a large field), cream #F6EFE1 (vault Reference/Brand-Colors.md). Display: Alfa Slab One. Body: Figtree. */
@font-face { font-family: "Alfa Slab One"; src: url("/fonts/alfa-slab-one.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --navy: #002A3A;
  --red: #E74F3D;
  --cream: #F6EFE1;
  --paper: #FFFDF8;
  --ink: #002A3A;
  --muted: #4A6470;
  --line: #D9CFBD;
  --ok: #2F7D4F;
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 17px/1.45 Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.embed { background: transparent; }

.top { background: var(--navy); display: flex; justify-content: center; padding: 14px 16px 12px; border-bottom: 4px solid var(--red); }
.top img { width: 128px; height: auto; display: block; }

.wrap { max-width: 520px; margin: 0 auto; padding: 22px 16px 28px; }
body.embed .wrap { padding-top: 8px; }

h1, h2 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; letter-spacing: 0.01em; margin: 0; line-height: 1.1; }
h1 { font-size: 30px; text-transform: uppercase; }
h1::after { content: ""; display: block; width: 56px; height: 4px; background: var(--red); border-radius: 2px; margin-top: 10px; }
.intro p { margin: 10px 0 0; color: var(--muted); }

form { margin-top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 20px; }
.field { margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label, .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 42, 58, 0.15); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--red); }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.money input { padding-left: 28px; }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.hint.strong { color: var(--ink); font-weight: 600; }
.row-hint { margin: -10px 0 16px; }

/* The rewards-account choice (Sept 26): two big tappable rows, native radios. */
fieldset.account { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
fieldset.account legend { padding: 0; margin-bottom: 2px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 54px; margin: 8px 0 0; padding: 12px 14px; font-weight: 600; font-size: 16px; line-height: 1.3;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--navy); }
.choice.on { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 42, 58, 0.12); }
.choice input:focus-visible { outline: 3px solid rgba(0, 42, 58, 0.3); outline-offset: 2px; }

/* Phone + the OPTIONAL text-message box (Sept 26): the box is never pre-checked; the words sit beside it, full size. */
.consent { display: flex; align-items: flex-start; gap: 12px; margin: -4px 0 18px; padding: 12px 14px; font-weight: 400; font-size: 14.5px; line-height: 1.45;
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); }
.consent input:focus-visible { outline: 3px solid rgba(0, 42, 58, 0.3); outline-offset: 2px; }

.where { margin-top: 8px; }
.where summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.where summary::-webkit-details-marker { display: none; }
.where figure { margin: 10px 0 0; text-align: center; }
.where img { width: 100%; max-width: 260px; height: auto; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 42, 58, 0.12); }
.where figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

.photo .file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.camera { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; margin: 0; border: 2px dashed var(--navy);
  border-radius: 12px; background: #fff; color: var(--navy); font-weight: 800; font-size: 18px; cursor: pointer; }
.camera:active { background: #F1ECE2; }
.library { display: inline-block; margin: 10px 0 0; font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.photo .file:focus-visible + .library, .photo .file:focus-visible ~ .camera { outline: 3px solid rgba(0, 42, 58, 0.3); }
.preview { margin-top: 12px; display: flex; align-items: center; gap: 14px; }
.preview img { width: 84px; height: 112px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pdf-tile { display: flex; align-items: center; justify-content: center; flex: none; width: 84px; height: 112px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--red); font: 400 20px/1 "Alfa Slab One", Georgia, serif; letter-spacing: 0.04em; }
.pdf-name { font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.linkish { background: none; border: 0; padding: 8px 0; font: inherit; font-weight: 600; color: var(--navy); text-decoration: underline; cursor: pointer; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field-error { margin: 6px 0 0; color: #B3261E; font-weight: 600; font-size: 14.5px; }
.error { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #FDECEA; color: #8A2317; font-weight: 600; font-size: 15px; }
.send { width: 100%; min-height: 56px; border: 0; border-radius: 12px; background: var(--navy); color: #fff; font: 800 18px/1 Figtree, system-ui, sans-serif;
  letter-spacing: 0.02em; cursor: pointer; box-shadow: inset 0 -4px 0 var(--red); }
.send:disabled { opacity: 0.6; cursor: progress; }
.send.ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); box-shadow: none; margin-top: 18px; }

.answer { margin-top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 18px 22px; text-align: center; }
.answer .badge { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--ok) center/30px 30px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.answer.stop .badge { background-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6'/%3E%3Ccircle cx='12' cy='17' r='0.6' fill='white'/%3E%3C/svg%3E"); }
.answer h2 { font-size: 26px; }
.answer p { margin: 10px 0 0; }
.answer .ref { font-size: 14px; color: var(--muted); }
.answer a, .privacy a { color: var(--navy); font-weight: 600; }

.privacy { margin: 18px 4px 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

@media (min-width: 560px) {
  h1 { font-size: 34px; }
  form { padding: 22px 22px 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .answer:not([hidden]) { animation: rise 220ms ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
.preview .linkish { white-space: nowrap; margin-left: auto; }
