/* Minimal, accessible base styles. A full design pass comes with the member portal. */
:root {
  --bg: #fafaf7; --surface: #fff; --text: #1d1d1b; --muted: #5c5c57; --border: #dcdcd4;
  --accent: #1f5f4a; --accent-text: #fff; --warn-bg: #fff4d6; --warn: #7a5300;
  --danger: #a1261c; --ok-bg: #e5f3ec; --admin: #3b2d6b;
  --radius: 8px; --gap: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --surface: #20201e; --text: #ecece6; --muted: #a5a59c; --border: #3a3a36;
          --accent: #4fae8c; --accent-text: #0d1a14; --warn-bg: #3a2f12; --warn: #f2cf75; --ok-bg: #18322a;
          --danger: #ff8a7a; --admin: #b9a8f5; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
.wrap { max-width: 44rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
header.site { border-bottom: 1px solid var(--border); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: .75rem 1rem; flex-wrap: wrap; }
header.site .brand { font-weight: 700; text-decoration: none; color: var(--text); }
nav a { margin-left: .75rem; white-space: nowrap; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .5rem 0 1rem; }
h2 { font-size: 1.2rem; margin-top: 2rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: var(--gap); }
label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input[type=email], input[type=password], input[type=text], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: .6rem .7rem; font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; }
.helptext { display: block; color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.btn { display: inline-block; padding: .6rem 1.1rem; border-radius: 6px; border: 1px solid var(--accent);
       background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
.errorlist { color: var(--danger); padding-left: 1.1rem; margin: .25rem 0; }
.messages { list-style: none; padding: 0; }
.messages li { padding: .75rem 1rem; border-radius: 6px; margin-bottom: .5rem; background: var(--ok-bg); }
.messages li.warning, .messages li.info { background: var(--warn-bg); color: var(--warn); }
.muted { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-banner { background: var(--admin); color: #fff; }
.admin-banner .wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--gap); padding: .5rem 1rem; flex-wrap: wrap; }
.admin-banner button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: .3rem .8rem; font: inherit; cursor: pointer; }
@media (prefers-color-scheme: dark) { .admin-banner { color: #0f0b1f; } .admin-banner button { color: #0f0b1f; border-color: rgba(0,0,0,.4); } }
.qr { background: #fff; display: block; width: max-content; max-width: 100%; padding: .5rem; border-radius: 6px; margin: .75rem 0; }
.qr svg { display: block; max-width: 100%; height: auto; }
.codes { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.1rem; columns: 2; padding-left: 2.5rem; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
.badge { display: inline-block; font-size: .8rem; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--border); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

input[type=number], input[type=date], input[type=time] { max-width: 14rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; margin: 1rem 0 .25rem; }
label.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; flex: none; accent-color: var(--accent); }
ul.radio { list-style: none; padding: 0; margin: .25rem 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
ul.radio label { font-weight: 400; margin: 0; display: flex; gap: .4rem; align-items: center; }
ul.radio li { display: flex; gap: .4rem; align-items: center; } ul.radio input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* --- Number picker (SPEC §4.2): a 10 x 10 grid, like choosing seats ------------------- */
.picker { border: 0; padding: 0; margin: 0; }
.picker h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .35rem; max-width: 36rem; }
.seat { position: relative; }
.seat input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seat span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px 8px 4px 4px;
  font-weight: 600; font-variant-numeric: tabular-nums; font-size: clamp(.7rem, 2.6vw, .95rem);
  border: 2px solid var(--accent); background: var(--surface); color: var(--accent); user-select: none;
  transition: transform .08s ease, background .08s ease; }
.seat input:hover + span { transform: translateY(-2px); }
.seat input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seat input:checked + span { background: var(--accent); color: var(--accent-text); }
.seat.taken span { border-color: var(--border); background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 4px, var(--border) 4px, var(--border) 5px);
  color: var(--muted); font-weight: 400; cursor: not-allowed; }
.seat.yours span { border-style: dashed; border-color: var(--admin); color: var(--admin); background: var(--surface); cursor: default; }
.seat.yours input:checked + span { background: var(--admin); color: #fff; border-style: solid; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: .75rem 0; font-size: .9rem; color: var(--muted); }
.legend .seat { width: 1.6rem; display: inline-block; vertical-align: middle; margin-right: .35rem; }
.legend .seat span { font-size: .6rem; }
.summary { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border);
  padding: .75rem 0; margin-top: 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
/* Admin overview */
.seat.st-allocated span { background: var(--accent); color: var(--accent-text); }
.seat.st-reserved span { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.seat.st-retired span { background: var(--bg); color: var(--muted); border-color: var(--border); border-style: dotted; }
a.seat { text-decoration: none; }
.grid label.seat, .grid .seat { margin: 0; display: block; font-weight: 600; }
.summary { z-index: 1; }

/* Printing a page (for example a return): just the content. */
@media print {
  .admin-banner, header.site, nav, .messages, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #999; break-inside: avoid; }
}

/* --- Public pages --------------------------------------------------------------------
   One memorable thing: winning numbers on raffle-ticket stubs. Everything else is quiet. */
:root { --stub: #f3c74f; --stub-ink: #3a2c00; --paper: #f6f8f5; }
@media (prefers-color-scheme: dark) { :root { --stub: #e2b53c; --stub-ink: #241a00; --paper: #161615; } }
body.public { background: var(--paper); }
footer.site { border-top: 1px solid var(--border); margin-top: 2rem; }
footer.site nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: 1rem 0 2rem; }
footer.site nav a { margin-left: 0; color: var(--muted); }

.hero h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); letter-spacing: -.01em; margin-bottom: .5rem; }
.hero .lede { font-size: 1.15rem; max-width: 34rem; margin: 0 0 1.25rem; }
.hero .next { font-size: 1.05rem; margin: 0 0 1.5rem; }
.btn.big { font-size: 1.1rem; padding: .8rem 1.4rem; }

.stubs { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.stub { position: relative; background: var(--stub); color: var(--stub-ink); border-radius: 6px;
  padding: .6rem 1.1rem .6rem 1.4rem; min-width: 7.5rem; }
/* the perforated edge of a cloakroom ticket */
.stub::before { content: ""; position: absolute; left: .45rem; top: .5rem; bottom: .5rem; width: 0;
  border-left: 3px dotted color-mix(in srgb, var(--stub-ink) 35%, transparent); }
.stub .num { display: block; font-size: 2.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stub .what { display: block; font-size: .9rem; margin-top: .3rem; }
.stubs.small .stub { min-width: 5.5rem; padding: .4rem .8rem .4rem 1.15rem; }
.stubs.small .num { font-size: 1.6rem; }
.stubs.void .stub { background: transparent; border: 2px dashed var(--border); color: var(--muted); }
.stubs.void .num { text-decoration: line-through; }

ol.steps { padding-left: 1.4rem; } ol.steps li { margin-bottom: .6rem; } ol.steps li::marker { font-weight: 700; color: var(--accent); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
dl.facts dt { font-weight: 600; } dl.facts dd { margin: 0; }
@media (max-width: 30rem) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: .5rem; } }
.result { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.result h2 { margin: 0; font-size: 1.1rem; }
.prose { max-width: 38rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
