:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --ink: #233b34;
  --muted: #65716a;
  --line: #d9ddd3;
  --accent: #265744;
  --viewport-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden, .file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 12px; background: white; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { height: 76px; max-width: 1120px; margin: auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 22px; font-weight: 600; letter-spacing: -.6px; }
.brand img { width: 28px; height: 28px; }
.help-links { display: flex; gap: 12px; align-items: center; font-size: 12px; }
.help-links a { text-decoration: none; white-space: nowrap; }
.help-links button { border: 0; background: none; padding: 10px 0 10px 12px; border-left: 1px solid var(--line); }
#intake-main { max-width: 528px; margin: auto; padding: 0 24px; outline: none; }
.screen { min-height: calc(var(--viewport-height) - 76px); display: flex; flex-direction: column; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.step-line { min-height: 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.step-line .text-button { min-height: 40px; }
.screen-body { margin-block: auto; padding-block: 28px; min-width: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 5vw, 40px); line-height: 1.12; font-weight: 400; letter-spacing: -1px; margin: 0; text-wrap: balance; }
p { line-height: 1.5; }
.supporting { color: var(--muted); font-size: 14px; margin: 12px 0 24px; }
.screen-bottom { margin-top: 12px; }
.screen-actions { display: flex; gap: 12px; align-items: center; }
.screen-actions > .button { flex: 1; }
.button { border: 1px solid transparent; min-height: 50px; border-radius: 7px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 550; }
.button svg { width: 20px; height: 20px; flex: none; }
.button-primary { background: var(--accent); color: #fff; justify-content: space-between; }
.button-primary:not(:disabled):hover { background: #1f4939; }
.button-secondary { background: transparent; border-color: var(--line); }
.button-secondary:not(:disabled):hover { background: #eff0e8; }
.text-button { border: 0; padding: 10px 0; background: transparent; font-size: 13px; min-height: 44px; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.fine-print { font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.fine-print:empty, .error-message:empty { display: none; }
.location-options { display: block; color: var(--muted); font-size: 11px; padding-top: 0; min-height: 32px; margin-top: -6px; }
.location-attribution { display: inline-block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.location-review { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.location-review button { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; flex: 1; min-height: 32px; padding-block: 4px; font-size: 12px; text-align: left; }
.location-review button span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.location-review > a { flex: none; font-size: 11px; }
.error-message, .field-error { display: block; color: #9a3227; font-size: 13px; line-height: 1.4; margin: 8px 0; overflow-wrap: anywhere; }
.photo-zone { text-align: center; padding: 12px 0 0; }
.photo-zone.dragging { outline: 2px dashed var(--accent); outline-offset: 8px; }
/* Reserve room for the controls, location disclosure, and action in the visible viewport. */
.photo-illustration { display: flex; align-items: center; justify-content: center; gap: 26px; height: clamp(64px, calc(var(--viewport-height) - 530px - env(safe-area-inset-bottom)), 200px); color: #7c8c77; }
.photo-illustration svg { height: 90px; max-height: 100%; width: 70px; }
.photo-illustration svg:last-child { transform: rotate(10deg); height: 76px; }
.photo-controls { display: flex; justify-content: center; gap: 20px; align-items: center; margin-top: 18px; }
.photo-count { color: var(--muted); font-size: 11px; margin: 16px 0 0; }
.photo-thumbnails { display: flex; justify-content: center; gap: 10px; padding: 10px 0; }
.photo-thumbnail { position: relative; width: min(22%, 100px); aspect-ratio: 3 / 4; }
.photo-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.photo-remove { position: absolute; top: -10px; right: -8px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; padding: 5px; background: var(--paper); }
.photo-remove svg { width: 100%; height: 100%; }
.research-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.research-status > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.is-pending > span { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.match-instruction { font-size: 13px; color: var(--muted); margin: 12px 0 18px; }
.product-options { display: grid; gap: 14px; }
.product-option { min-width: 0; display: flex; flex-direction: row-reverse; align-items: center; gap: 12px; position: relative; padding-bottom: 14px; border-bottom: 2px solid var(--line); cursor: pointer; }
.product-option:has(:checked) { border-color: var(--accent); }
.product-option-content { display: grid; grid-template-columns: 1fr; align-content: center; flex: 1; min-width: 0; }
.product-option-content:has(.product-option-image) { grid-template-columns: 100px minmax(0, 1fr); column-gap: 16px; }
.product-option-content:has(.product-option-image) > :not(.product-option-image) { grid-column: 2; }
.product-option strong { display: block; font-weight: 550; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.product-detail, .product-option small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.product-option-image { display: flex; align-items: center; justify-content: center; grid-column: 1; grid-row: 1 / span 5; height: 120px; margin-bottom: 0; background: #fff; border-radius: 4px; padding: 8px; }
.product-option-image img { width: 100%; height: 100%; object-fit: contain; }
.product-option-image > span { font-size: 11px; color: var(--muted); text-align: center; }
.product-option-image.unavailable { background: #efefe8; }
.match-answers { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 12px; }
.match-answers label, .field-check { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.product-paging { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.product-paging button { min-width: 32px; min-height: 40px; font-size: 18px; padding-block: 8px; }
.research-wait { padding: 18px 0; text-align: center; }
.research-wait p { color: var(--muted); font-size: 14px; }
.answer-field { margin-top: 28px; }
input:not([type="radio"]):not([type="checkbox"]):not([type="file"]), select, textarea { display: block; width: 100%; min-width: 0; border: 1px solid #b7c1b6; border-radius: 5px; background: transparent; padding: 13px; min-height: 52px; font-size: 18px; }
input::placeholder, textarea::placeholder { color: #859087; }
input:disabled, select:disabled { opacity: .5; }
input[aria-invalid="true"] { border-color: #9a3227; }
textarea { resize: vertical; height: 124px; line-height: 1.5; font-size: 16px; }
.age-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-check { margin-top: 12px; }
.route-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.route-options label { min-height: 48px; display: flex; gap: 10px; align-items: center; font-size: 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
#identity-update { min-height: 40px; display: flex; align-items: center; margin-bottom: 6px; }
#identity-update .fine-print { margin: 0; }
.match-notice { border: 0; background: transparent; padding: 10px 0; min-height: 40px; font-size: 12px; color: var(--accent); display: flex; justify-content: space-between; width: 100%; }
.review-list { margin-top: 12px; }
.review-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 14px; align-items: center; gap: 10px; padding: 10px 0; min-height: 44px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; font-size: 13px; }
.review-row > span:first-child, .review-row > span:last-child { color: var(--muted); }
.review-row > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-row:hover { border-color: var(--accent); }
.consent-box { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.45; color: var(--muted); margin-bottom: 18px; }
.consent-box input { margin-top: 2px; }
[data-step="review"] .screen-body { padding-block: 14px; }
[data-step="review"] .supporting { margin-bottom: 0; }
[data-step="review"] .review-list { margin-top: 0; }
.receipt-reference { display: flex; flex-direction: column; gap: 8px; margin: 32px 0; }
.receipt-reference span { color: var(--muted); font-size: 12px; }
.receipt-reference strong { font-size: 24px; font-weight: 500; overflow-wrap: anywhere; }
.receipt-note { font-size: 14px; }
#receipt-research { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
#receipt-research p { font-size: 12px; color: var(--muted); margin-bottom: 0; }
dialog { max-width: min(440px, calc(100% - 32px)); max-height: calc(var(--viewport-height) - 32px); padding: 24px; border: 0; border-radius: 8px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #15271eb3; }
dialog h2 { font: 400 28px Georgia, serif; margin: 0 0 16px; }
dialog p { font-size: 14px; }
dialog .dialog-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 20px; font-size: 12px; }
.no-script { padding: 24px; }
@media (max-width: 600px) {
  .site-header { height: 60px; padding-inline: 20px; }
  .brand { font-size: 20px; }
  .brand img { width: 25px; height: 25px; }
  .help-links { gap: 8px; font-size: 11px; }
  .help-links button { padding-left: 8px; }
  #intake-main { padding-inline: 24px; }
  .screen { min-height: calc(var(--viewport-height) - 60px); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (max-height: 740px) {
  .screen-body { padding-block: 18px; }
  .review-row { min-height: 36px; padding-block: 8px; font-size: 12px; }
  .product-option-image { height: 90px; }
  .product-option-content:has(.product-option-image) { grid-template-columns: 76px minmax(0, 1fr); column-gap: 12px; }
}
@media (max-height: 620px) {
  .screen-body { padding-block: 12px; }
  .supporting { margin: 10px 0 16px; font-size: 13px; }
  .review-row { min-height: 30px; padding-block: 6px; }
  [data-step="review"] h1 { font-size: 28px; }
  [data-step="review"] .screen-body { padding-block: 4px; }
  [data-step="review"] .screen-bottom { margin-top: 8px; }
  .consent-box { font-size: 11px; margin-bottom: 12px; }
  .photo-zone { padding-top: 4px; }
  .photo-controls { margin-top: 10px; }
  .product-option-image { height: 84px; }
  .product-options { gap: 10px; }
  .product-option { padding-bottom: 10px; }
  .product-detail { font-size: 10px; margin-top: 2px; }
  .match-instruction { margin: 10px 0; }
}
/* iOS browser chrome can reduce the visual viewport without changing height media queries. */
.short-viewport [data-step="photos"] .screen-body { padding-block: 12px; }
.short-viewport [data-step="photos"] .supporting { margin: 10px 0 16px; font-size: 13px; }
.short-viewport .photo-zone { padding-top: 4px; }
.short-viewport .photo-controls { margin-top: 10px; }
.short-viewport #location-dialog { padding-block: 16px; }
.short-viewport .receipt-reference { margin-block: 24px; }
.short-viewport .research-wait { padding-block: 8px; }
/* Use the actual keyboard-reduced viewport too, not just CSS layout height. */
.compact-viewport .site-header { height: 44px; }
.compact-viewport .screen { min-height: calc(var(--viewport-height) - 44px); padding-bottom: 10px; }
.compact-viewport .step-line, .compact-viewport .step-line .text-button { min-height: 30px; }
.compact-viewport .screen-body { padding-block: 8px; }
.compact-viewport h1 { font-size: 26px; }
.compact-viewport .supporting { font-size: 12px; margin: 8px 0 12px; }
.compact-viewport .answer-field { margin-top: 12px; }
.compact-viewport textarea { height: 78px; min-height: 65px; }
.compact-viewport .screen-bottom { margin-top: 4px; }
.compact-viewport .button { min-height: 44px; padding-block: 10px; }
.compact-viewport #identity-update { min-height: 28px; margin-bottom: 4px; }
.compact-viewport .match-notice { min-height: 28px; padding-block: 6px; }
.compact-viewport .field-check { margin-top: 4px; min-height: 36px; }
.compact-viewport .route-options { gap: 4px 16px; }
.compact-viewport .route-options label { min-height: 36px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }

@media (max-width: 360px) {
  .site-header { padding-inline: 16px; }
  .brand { font-size: 18px; gap: 5px; }
  .brand img { width: 23px; height: 23px; }
  .help-links { font-size: 10px; gap: 6px; }
  .help-links button { padding-left: 6px; }
}
.identification-progress { display: flex; align-items: center; gap: 16px; margin: 32px 0 24px; font-size: 15px; }
.working-spinner { width: 32px; height: 32px; flex: none; border: 3px solid var(--line); border-top-color: var(--accent); border-right-color: var(--accent); border-radius: 50%; animation: working-spin 1s linear infinite; }
@keyframes working-spin { to { transform: rotate(360deg); } }
.waiting-note { margin: 0; padding-block: 14px; color: var(--muted); font-size: 13px; }
.time-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.time-options label, .time-options button { min-height: 46px; display: flex; align-items: center; gap: 9px; font-size: 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.time-options button { justify-content: space-between; text-align: left; gap: 5px; font-size: 12px; }
.time-options button[aria-pressed="true"] { border-color: var(--accent); font-weight: 600; }
.time-options .time-unknown { grid-column: 1 / -1; border: 0; }
.hours-input { display: flex; align-items: center; gap: 14px; }
.hours-input > span { flex: none; font-size: 16px; }
.time-options:focus, .route-options:focus { outline: none; }
.answer-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.answer-options label { min-height: 46px; display: flex; align-items: center; gap: 9px; font-size: 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.answer-write-in { grid-column: 1 / -1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.answer-write-in > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.answer-write-in > span:last-child { flex: none; }
.answer-write-in[aria-pressed="true"] { color: var(--accent); font-weight: 600; }
.answer-options:focus { outline: none; }
.time-options[aria-invalid="true"], .route-options[aria-invalid="true"] { outline: 1px solid #9a3227; outline-offset: 6px; }
.compact-viewport .time-options { gap: 0 12px; }
.compact-viewport .time-options label, .compact-viewport .time-options button { min-height: 36px; }
