:root {
  color-scheme: light;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --border: #d8d8d8;
  --accent: #a3324a;
  --error-bg: #fdecec;
  --error-fg: #8a1f1f;
  --success-bg: #eaf6ec;
  --success-fg: #1f5c2e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1rem;
  color: var(--fg);
  background: #fff;
  max-width: 640px;
  margin-inline: auto;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.pay-banner {
  color: var(--muted);
  font-size: 0.95rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0 0 1.25rem;
  padding: 1rem;
}

fieldset.nested {
  margin-bottom: 0;
}

legend {
  font-weight: 600;
  padding: 0 0.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85em;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0;
}

/* 16px minimum stops iOS Safari from zooming the viewport on focus. */
input,
select,
textarea {
  font-size: 16px;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
}

textarea {
  resize: vertical;
}

#toppings-list label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#toppings-list input[type="checkbox"] {
  width: auto;
}

button[type="submit"] {
  font-size: 16px;
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.banner {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.banner-error {
  background: var(--error-bg);
  color: var(--error-fg);
}

.error-summary {
  background: var(--error-bg);
  color: var(--error-fg);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.error-summary ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

#submit-status {
  min-height: 1.2em;
  color: var(--muted);
}

#success-panel {
  background: var(--success-bg);
  color: var(--success-fg);
  border-radius: 8px;
  padding: 1.25rem;
}

/* Visually hidden but still in the accessibility tree / DOM flow — not display:none or
   type=hidden, both of which some naive bots skip. Real visitors never see this. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
