:root {
  --ink: #1b2333;
  --muted: #5a5348;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --line: #8a8f99;
  --gold: #b6955c; /* ANCM brand gold: header only. White text on it is too faint (2.8:1). */
  --bronze: #7f6435; /* darker gold for buttons, focus and selected answers (5.6:1 with white) */
  --gold-tint: #f3ecdf;
  --error: #a4161a;
  --radius: 10px;
  --serif: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 20px; /* iPad: big enough to read at arm's length */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
}

.masthead {
  background: var(--gold);
  padding: 0.9rem 1rem;
  text-align: center;
}

.masthead img {
  display: block;
  width: min(100%, 380px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

h1 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.lede {
  margin: 0 auto 1.75rem;
  max-width: 34rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.row {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 600px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  margin: 0 0 1rem;
}

label,
legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  padding: 0;
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  font: inherit;
}

/* A field that doesn't apply, e.g. ZIP outside the US */
input:disabled {
  border-color: #c9c4b8;
  background: #ece8e0;
}

input:disabled::placeholder {
  color: var(--muted);
  opacity: 1;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231b2333' stroke-width='2'/%3E%3C/svg%3E");
  background-position: right 0.9rem center;
  background-repeat: no-repeat;
}

/* "Choose one" looks like a hint until something is picked */
select:has(option[value=""]:checked) {
  color: var(--muted);
}

select option {
  color: var(--ink);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
}

:focus-visible {
  outline: 3px solid var(--bronze);
  outline-offset: 2px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.8rem;
  padding: 0.4rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 400;
  line-height: 1.25;
}

.choice input {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: var(--bronze);
  flex: none;
}

.choice:has(input:checked) {
  border-color: var(--bronze);
  background: var(--gold-tint);
  box-shadow: inset 0 0 0 1px var(--bronze);
}

.choice:has(input[aria-invalid="true"]) {
  border-color: var(--error);
}

.follow-up {
  padding-left: 1rem;
  border-left: 4px solid var(--gold);
}

.notice {
  margin: 1.25rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.error {
  margin: 0.25rem 0 0;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 600;
}

.error:empty {
  display: none;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  display: block;
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--bronze);
  color: #ffffff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.thanks {
  text-align: center;
  padding: 3rem 0;
}

.thanks h2 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 2rem;
}

.thanks p {
  font-size: 1.15rem;
  margin: 0 0 2rem;
}

.queue-status {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}
