/* Ryse The Run Club. Race-day look: condensed signage type, lane lines, start-list rows, bib confirmation. */
:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --ink: #12161c;
  --muted: #55606e;
  --line: #cfd6df;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: #dfe7fb;
  --ok: #17794a;
  --err: #b42318;
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1218; --surface: #161c25; --ink: #eef2f7; --muted: #9aa6b6; --line: #29323f;
    --accent: #7b9cff; --accent-ink: #0b1020; --accent-soft: #1d2a4d; --ok: #4cc38a; --err: #ff8a7a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
}
a { color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.bar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; line-height: 1; }
.brand span { font-weight: 700; font-size: 15px; letter-spacing: 0.1em; color: var(--accent); margin-left: 8px; }
.nav { display: flex; gap: 20px; font-size: 14px; font-weight: 500; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* hero */
.hero { border-bottom: 1px solid var(--line); background:
  repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%); }
.hero .wrap { padding-block: 56px 48px; display: grid; gap: 28px; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow.gap { margin-bottom: 12px; }
h1 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: 0.88; letter-spacing: 0.005em;
  font-size: clamp(64px, 17vw, 168px); margin: 0; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 56ch; font-size: 18px; margin: 0; }
.hero-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 4px; font: 600 16px var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled], .btn.off { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--err); border: 1.5px solid var(--err); }
.next { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px; border-left: 4px solid var(--accent); min-width: 0; }
.next b { font-family: var(--font-display); font-size: 26px; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.next small { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* sections */
section { padding-block: 64px; border-bottom: 1px solid var(--line); }
h2 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 7vw, 72px); line-height: 0.95; margin: 0 0 28px; text-wrap: balance; }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.about-grid > * { min-width: 0; }
.about-grid p { margin: 0 0 16px; max-width: 60ch; }
.groups { border-top: 1px solid var(--ink); }
.group { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.group b { font-family: var(--font-display); font-size: 26px; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.group .pace { font-family: var(--font-mono); font-size: 15px; font-weight: 500; text-align: right; align-self: center; }
.group .d { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

/* events: start list */
.events { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ev { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.ev > * { min-width: 0; }
.date { font-family: var(--font-display); font-weight: 900; line-height: 0.9; text-transform: uppercase; }
.date .n { font-size: 56px; display: block; }
.date .m { font-size: 20px; letter-spacing: 0.06em; color: var(--accent); }
.ev h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1.05; }
.meta { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ev p { margin: 6px 0 0; font-size: 15px; color: var(--muted); max-width: 58ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-family: var(--font-mono); font-size: 13px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.chip.race { background: var(--accent-soft); border-color: transparent; }
.chip.warn { border-color: var(--err); color: var(--err); }
.empty { padding: 28px 0; color: var(--muted); }

/* registration */
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.reg-grid > * { min-width: 0; }
form, .panel { display: grid; gap: 18px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 6px; padding: 24px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row2 > * { min-width: 0; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 46px; padding: 0 12px; background: var(--bg); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 4px; font: 400 16px var(--font-body);
}
textarea { padding: 10px 12px; min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-weight: 400; font-size: 15px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 4px; cursor: pointer; background: var(--bg); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.check b { font-weight: 600; }
.check small { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.check.disabled { opacity: 0.55; cursor: not-allowed; }
.stack { display: grid; gap: 8px; }
.msg { min-height: 24px; font-size: 14px; font-weight: 500; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.note { font-size: 14px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* bib confirmation */
.bib { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 6px; padding: 22px; position: relative; overflow: hidden; }
.bib::before, .bib::after { content: ""; position: absolute; top: 12px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); }
.bib::before { left: 12px; } .bib::after { right: 12px; }
.bib .tag { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: center; margin-top: 14px; }
.bib .who { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 9vw, 64px); line-height: 0.95; text-align: center; margin: 8px 0 12px; overflow-wrap: anywhere; }
.bib .pace-chip { display: block; text-align: center; font-family: var(--font-mono); font-size: 14px; color: var(--accent); margin-bottom: 12px; }
.bib ul { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 6px; font-size: 15px; }
.bib li { display: flex; justify-content: space-between; gap: 12px; }
.bib li span:last-child { font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.how { display: grid; gap: 14px; }
.how p { margin: 0; max-width: 52ch; }
.how ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

footer { padding-block: 32px 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* admin */
.admin-wrap { max-width: 1080px; margin-inline: auto; padding: 32px 20px 64px; display: grid; gap: 28px; }
.admin-wrap h2 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 0; }
.login { max-width: 420px; margin: 64px auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.row3 > * { min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
.pill { display: inline-block; font-family: var(--font-mono); font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); }
.pill.live { color: var(--ok); border-color: var(--ok); }
.pill.off { color: var(--muted); }

@media (max-width: 760px) {
  .about-grid, .reg-grid { grid-template-columns: 1fr; gap: 32px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .ev { grid-template-columns: 72px 1fr; }
  .ev .btn { grid-column: 2; justify-self: start; }
  .date .n { font-size: 44px; }
  section { padding-block: 48px; }
  .hero .wrap { padding-block: 40px 36px; }
  form, .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
