/* Calvin Block Party — a neighborhood flyer, not a product.
   The photo carries the personality; everything else gets out of its way. */

:root {
  --bg:      #FBF7F2;
  --ink:     #22303C;
  --muted:   #5D6B77;
  --line:    #E4DBD0;
  --card:    #FFFFFF;
  --accent:  #C4622D;
  --success: #3F7D5C;
  --alert:   #B3402E;
  --radius:  10px;
  --pad:     16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 0 var(--pad) 64px; }

/* ---------- type ---------- */
h1 { font-size: 30px; line-height: 1.15; margin: 20px 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 21px; margin: 32px 0 10px; }
h3 { font-size: 17px; margin: 20px 0 6px; }
p  { margin: 0 0 12px; }
a  { color: var(--accent); }
.muted   { color: var(--muted); }
.small   { font-size: 15px; }
.center  { text-align: center; }
.tight   { margin-top: 0; }

/* ---------- hero ---------- */
.hero {
  margin: 0 calc(-1 * var(--pad));
  background: #ddd;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 787;
  object-fit: cover;
}
@media (min-width: 672px) {
  .hero { margin: 16px 0 0; border-radius: var(--radius); overflow: hidden; }
}

.facts {
  font-size: 19px;
  line-height: 1.45;
  border-left: 4px solid var(--accent);
  padding-left: 14px;
  margin: 18px 0 20px;
}
.facts strong { display: block; font-size: 21px; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 0 12px;
}
.card h3 { margin-top: 0; }

.headcount {
  font-size: 19px;
  text-align: center;
  padding: 16px 14px;
}
.headcount .big {
  display: block;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  margin: 0 0 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
}
.btn:active { filter: brightness(0.92); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.plain     { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger    { background: transparent; color: var(--alert); border-color: var(--alert); }
.btn:disabled  { opacity: 0.5; cursor: default; }
.btn.inline    { display: inline-block; width: auto; min-height: 44px; padding: 10px 16px; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); }

input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  -webkit-appearance: none;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* number steppers — the exact field that broke the spreadsheet */
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button {
  width: 52px; height: 52px;
  flex: 0 0 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
}
.stepper button:active { background: var(--line); }
.stepper output {
  min-width: 48px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.choices { display: flex; gap: 8px; }
.choices label {
  flex: 1;
  margin: 0;
  text-align: center;
  padding: 14px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 500;
  cursor: pointer;
}
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices input:checked + span { font-weight: 700; }
.choices label:has(input:checked) {
  border-color: var(--accent);
  background: #FDF1E9;
  color: var(--accent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- board ---------- */
.strip {
  background: #FDF1E9;
  border: 1px solid #F0D8C6;
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 0 18px;
}
.strip h3 { margin: 0 0 6px; color: var(--accent); }
.strip ul { margin: 0; padding-left: 20px; }
.strip li { margin: 2px 0; }

.row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .who { font-size: 15px; color: var(--muted); margin-top: 3px; }
.row .who b { font-weight: 600; color: var(--ink); }

.pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.open   { background: #EAF3EE; color: var(--success); }
.pill.full   { background: #EFEAE3; color: var(--muted); }
.pill.need   { background: #F7E5E1; color: var(--alert); }
.pill.crit   { background: var(--alert); color: #fff; }

.claim-panel {
  background: #FDF9F5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin: 10px 0 4px;
}
.claim-panel label:first-child { margin-top: 0; }

/* ---------- misc ---------- */
.note {
  border-left: 3px solid var(--line);
  padding-left: 12px;
  color: var(--muted);
  font-size: 15px;
}
.msg { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; font-weight: 500; }
.msg.ok   { background: #EAF3EE; color: var(--success); border: 1px solid #C9E0D4; }
.msg.err  { background: #F7E5E1; color: var(--alert);  border: 1px solid #EFC9C1; }
.msg.info { background: #FDF1E9; color: var(--accent); border: 1px solid #F0D8C6; }
.hide { display: none !important; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.backlink { display: inline-block; margin: 18px 0 0; }

/* two-step RSVP flow */
.step {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 18px 0 4px;
}
