/* Race Walk Judging System — public site
   Palette follows the app itself: dark board, yellow paddle, red card. */
:root {
  --bg: #0d0f12;
  --panel: #16191f;
  --panel2: #1e2229;
  --line: #2a2f38;
  --text: #f2f4f7;
  --dim: #9aa3af;
  --yellow: #e6c619;
  --red: #d5372f;
  --green: #35b558;
  --max: 1120px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 15, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-mark { display: inline-flex; gap: 3px; }
.brand-mark span { width: 9px; height: 22px; border-radius: 2px; }
.brand-mark span:first-child { background: var(--yellow); transform: rotate(-8deg); }
.brand-mark span:last-child { background: var(--red); transform: rotate(8deg); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.link { text-decoration: none; color: var(--dim); font-size: 15px; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; transition: transform .1s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-login { background: var(--yellow); color: #111; }
.btn-login:hover { background: #f2d42c; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--panel2); }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 64px; border-bottom: 1px solid var(--line); }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.eyebrow {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--yellow); font-weight: 600; margin-bottom: 14px;
}
h1 {
  font-size: clamp(36px, 5vw, 56px); line-height: 1.05;
  letter-spacing: -0.03em; font-weight: 800; margin-bottom: 20px;
}
.lede { font-size: 19px; color: var(--dim); max-width: 34em; margin-bottom: 30px; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sample posting board */
.board {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.board-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--dim);
}
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; }
.live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
.board table { width: 100%; border-collapse: collapse; font-size: 14px; }
.board th {
  text-align: left; font-weight: 500; color: var(--dim); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.board td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.board tr:last-child td { border-bottom: 0; }
.bib { font-weight: 700; font-size: 16px; }
.cards { display: flex; gap: 5px; }
.card {
  width: 26px; height: 32px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.card.r { background: var(--red); color: #fff; }
.card.y { background: var(--yellow); color: #111; }
.status { font-size: 12px; font-weight: 600; white-space: nowrap; }
.status.dq { color: var(--red); }
.status.pz { color: var(--yellow); }
.status.ok { color: var(--dim); font-weight: 500; }
.board-foot { padding: 10px 16px; font-size: 12px; color: var(--dim); border-top: 1px solid var(--line); }

/* ---------- Sections ---------- */
section.block { padding: 80px 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 40px; }
h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 12px; }
.section-head p { color: var(--dim); font-size: 17px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px;
}
.tile h3 { font-size: 18px; margin-bottom: 4px; }
.tile .on { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.tile p { color: var(--dim); font-size: 15px; }

/* Rules list */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.rule {
  display: grid; grid-template-columns: 76px 1fr; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.rule .num { color: var(--yellow); font-weight: 600; font-size: 15px; }
.rule p { color: var(--dim); }
.rule p strong { color: var(--text); font-weight: 600; }

/* Stats */
.stat { padding: 26px 22px; }
.stat .big { font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin-bottom: 10px; }
.stat:nth-child(odd) .big { color: var(--yellow); }
.stat:nth-child(even) .big { color: var(--red); }

/* Structure diagram */
.chain { display: flex; align-items: stretch; gap: 0; margin-bottom: 28px; flex-wrap: wrap; }
.chain .node {
  flex: 1 1 200px; background: var(--panel); border: 1px solid var(--line);
  padding: 20px; position: relative;
}
.chain .node:first-child { border-radius: 12px 0 0 12px; }
.chain .node:last-child { border-radius: 0 12px 12px 0; }
.chain .node + .node { border-left: 0; }
.chain .node h3 { font-size: 17px; margin-bottom: 4px; }
.chain .node p { color: var(--dim); font-size: 14px; }
.chain .node .tag { font-size: 12px; color: var(--yellow); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.callout {
  border-left: 3px solid var(--yellow); padding: 4px 0 4px 18px; color: var(--dim);
  max-width: 48em;
}
.callout strong { color: var(--text); }

/* CTA */
.cta { padding: 80px 0; text-align: center; }
.cta h2 { margin-bottom: 14px; }
.cta p { color: var(--dim); margin-bottom: 28px; font-size: 17px; }
.cta .hero-actions { justify-content: center; }

/* Footer */
footer { padding: 32px 0; color: var(--dim); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--dim); text-decoration: none; }
footer a:hover { color: var(--text); }
footer nav { display: flex; gap: 20px; }

/* ---------- Wiki pages ---------- */
.wiki { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding: 48px 0 80px; }
.wiki-nav { position: sticky; top: 88px; align-self: start; font-size: 15px; }
.wiki-nav h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin: 22px 0 8px; }
.wiki-nav h4:first-child { margin-top: 0; }
.wiki-nav ul { list-style: none; }
.wiki-nav li a { display: block; padding: 5px 10px; border-radius: 6px; text-decoration: none; color: var(--dim); }
.wiki-nav li a:hover { background: var(--panel); color: var(--text); }
.wiki-nav li a[aria-current="page"] { background: var(--panel2); color: var(--text); }
.wiki-nav li.soon a { opacity: .55; }
.prose { max-width: 46em; }
.prose h1 { font-size: 40px; }
.prose h2 { font-size: 26px; margin: 40px 0 12px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { color: #cfd4db; margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose code { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: .9em; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--dim); font-weight: 500; }
.prose a { color: var(--yellow); }
.cards-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
.cards-list a { text-decoration: none; color: var(--text); }
.cards-list .tile { height: 100%; }
.cards-list h3 { margin: 0 0 6px; }
.cards-list p { margin: 0; color: var(--dim); }
.cards-list .tile:hover { border-color: #3a404b; background: var(--panel2); }
.pill { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--dim); margin-left: 6px; vertical-align: middle; }

/* Wiki guide extras */
.lede-sm { font-size: 18px; }
.prose .lede-sm strong { color: var(--text); }
.note {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--yellow);
  border-radius: 8px; padding: 14px 18px; margin: 0 0 20px; color: #cfd4db;
}
.note strong { color: var(--text); }
.prose .tip { color: var(--dim); font-size: 15px; }
.prose ol li::marker { color: var(--yellow); font-weight: 600; }
.screen-split { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; margin-bottom: 8px; }
.mock-phone {
  background: #0d0f12; border: 1px solid #3a404b; border-radius: 28px; padding: 18px 14px 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45); font-size: 12px; color: var(--text);
}
.mp-top { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mp-title { text-align: center; font-weight: 700; font-size: 17px; margin: 10px 0 8px; }
.mp-input { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; text-align: center; font-size: 22px; padding: 6px; }
.mp-name { text-align: center; color: var(--green); font-weight: 600; margin: 6px 0 10px; }
.mp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp-btn { background: var(--red); color: #fff; border-radius: 10px; text-align: center; font-weight: 800; font-size: 11px; line-height: 1.25; padding: 12px 4px; border: 3px solid transparent; }
.mp-btn.sel { border-color: #fff; }
.mp-ok { margin: 10px 0 12px; background: var(--green); color: #fff; text-align: center; font-weight: 800; border-radius: 10px; padding: 9px; }
.mp-h { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.mp-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 11px; }
.mp-dim { color: var(--dim); }
.mp-pill, .pill-inline { display: inline-block; border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.pill-inline { font-size: 11px; }
.mp-pill.r, .pill-inline.r { background: var(--red); color: #fff; }
.mp-pill.y, .pill-inline.y { background: var(--yellow); color: #111; }
.mp-pill.g, .pill-inline.g { background: var(--green); color: #fff; }
.prose td { vertical-align: top; }
.quickref { display: grid; gap: 8px; margin-bottom: 24px; }
.quickref div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; color: #cfd4db; }
.qr-k { display: inline-block; min-width: 100px; color: var(--yellow); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.page-meta { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim) !important; }

.mp-sub { text-align: center; color: var(--dim); font-size: 11px; margin: -4px 0 8px; }
.mp-btn.y { background: var(--yellow); color: #111; }
.mp-del { display: inline-block; margin-left: 6px; background: var(--red); color: #fff; border-radius: 5px; padding: 1px 6px; font-size: 10px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .rules { grid-template-columns: 1fr; }
  .wiki { grid-template-columns: 1fr; gap: 24px; }
  .wiki-nav { position: static; }
  .screen-split { grid-template-columns: 1fr; }
  .mock-phone { max-width: 300px; }
  .chain .node, .chain .node:first-child, .chain .node:last-child { border-radius: 0; }
  .chain .node + .node { border-left: 1px solid var(--line); border-top: 0; }
  .chain { flex-direction: column; }
  .chain .node:first-child { border-radius: 12px 12px 0 0; }
  .chain .node:last-child { border-radius: 0 0 12px 12px; }
}
@media (max-width: 640px) {
  .nav a.link { display: none; }
  .hero { padding: 48px 0; }
  section.block { padding: 56px 0; }
  .grid-3, .grid-2, .grid-4, .cards-list { grid-template-columns: 1fr; }
  .board td, .board th { padding: 9px 8px; }
  .board .name { display: none; }
  .brand .brand-text-long { display: none; }
}
