/* CHAMP bowling registration.
   Palette taken from a bowling scorecard: paper, blue ink, and one red mark
   used only where a lane is actually full. */

:root {
  --paper: #f6f4ee;
  --surface: #ffffff;
  --ink: #171c28;
  --ink-soft: #58627a;
  --rule: #dcdee5;
  --accent: #1d3e77;
  --accent-tint: #e9eef8;
  --go: #2c6b50;
  --strike: #b44a32;
  --shadow: 0 1px 2px rgba(23, 28, 40, 0.06), 0 8px 24px rgba(23, 28, 40, 0.06);

  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121620;
    --surface: #1a1f2b;
    --ink: #e9ebf0;
    --ink-soft: #97a0b4;
    --rule: #2c3342;
    --accent: #86abec;
    --accent-tint: #1c2635;
    --go: #5cb58b;
    --strike: #e5836a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.eyebrow {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

/* ---- the scorecard: the one piece of structure that carries meaning ---- */

.scorecard {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent);
  border-radius: 3px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.seats {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.seats-number {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 0.9;
  color: var(--go);
}

.seats.is-low .seats-number { color: var(--accent); }
.seats.is-full .seats-number { color: var(--strike); font-size: 2.1rem; }

.seats-label { font-size: 0.98rem; color: var(--ink-soft); }
.seats-label strong { color: var(--ink); font-weight: 600; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1.1rem; }
.facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.28rem;
}
.facts dd { margin: 0; font-weight: 500; }
.facts .t { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---- knowing what to expect ---- */

.notes { display: flex; flex-direction: column; gap: 0.6rem; }
.notes ul { margin: 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; }
.notes li { padding-left: 0.15rem; }

/* ---- the form ---- */

form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--ink-soft); }

input {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.7rem 0.75rem;
  min-height: 2.9rem;
  width: 100%;
}
input::placeholder { color: var(--ink-soft); opacity: 0.7; }

button {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--surface);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 0.85rem 1.2rem;
  min-height: 3rem;
  cursor: pointer;
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { opacity: 0.55; cursor: default; }

button.quiet {
  color: var(--accent);
  background: transparent;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  border-color: var(--rule);
}

.privacy { font-size: 0.85rem; color: var(--ink-soft); }

.error {
  color: var(--strike);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---- results ---- */

.result { display: flex; flex-direction: column; gap: 1rem; }

.badge {
  align-self: flex-start;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  background: var(--accent-tint);
  color: var(--accent);
}
.badge.go { background: color-mix(in srgb, var(--go) 14%, transparent); color: var(--go); }
.badge.stop { background: color-mix(in srgb, var(--strike) 14%, transparent); color: var(--strike); }

.keeplink {
  background: var(--accent-tint);
  border-radius: 3px;
  padding: 0.85rem 0.95rem;
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
/* Only the URL may break mid-word; breaking the prose too gives "plan s change". */
.keeplink code {
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

footer {
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hidden { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .result { animation: rise 0.28s ease-out; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}
