/* Designed for readability first: large type, high contrast, big click
   targets. Built to be comfortable for players who aren't big computer
   users, not just "responsive". */

:root {
  --surface: #fcfcfb;
  --page: #f9f9f7;
  --ink: #0b0b0b;
  --ink-secondary: #3a3a38;
  --muted: #6b6a65;
  --gridline: #e1e0d9;
  --border: rgba(11, 11, 11, 0.14);
  --blue: #185fa8;
  --blue-dark: #0f4a87;
  --green: #0ca30c;
  --green-tint: #eaf7ec;
  --red: #b5251f;
  --amber: #8a5a00;
  --focus: #0f4a87;
  --shadow-card: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.06);
  --shadow-button: 0 4px 14px rgba(24, 95, 168, 0.28);
}

* { box-sizing: border-box; }

html { font-size: 20px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { flex-shrink: 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.navlink {
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.navlink:hover { background: var(--gridline); }
.navlink.active { background: var(--blue); color: #fff; }

main.wrap { padding-top: 28px; padding-bottom: 60px; }

h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 12px; }
h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; margin: 32px 0 12px; }
h3 { font-size: 1.2rem; margin: 20px 0 8px; }
p { margin: 0 0 16px; }
.lede { font-size: 1.15rem; color: var(--ink-secondary); }
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.radio-row, .checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--gridline);
  cursor: pointer;
  font-weight: 400;
}
.radio-row:last-child, .checkbox-row:last-child { border-bottom: none; }
.radio-row input, .checkbox-row input {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  flex-shrink: 0;
}
.radio-row strong, .checkbox-row strong { display: block; font-size: 1.05rem; }
.radio-row .hint, .checkbox-row .hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2px;
}
.checkbox-row { font-size: 1.05rem; }

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.big-link, button.big {
  display: block;
  text-align: center;
  padding: 22px 20px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  background: var(--blue);
  color: #fff;
  border: none;
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-button);
}
.big-link:hover, button.big:hover { background: var(--blue-dark); }
.big-link.secondary, button.big.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: 0 1px 2px rgba(11, 11, 11, 0.04);
}
.big-link.secondary:hover, button.big.secondary:hover { background: var(--gridline); }

label { display: block; font-weight: 700; margin: 16px 0 6px; }
label .hint { font-weight: 400; color: var(--muted); font-size: 0.95rem; display: block; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select {
  width: 100%;
  padding: 14px 14px;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.form-actions { margin-top: 24px; }

.flash {
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 1.05rem;
}
.flash-success { background: #e5f6e5; color: #0a5a0a; border: 2px solid #0ca30c; }
.flash-error { background: #fbe9e8; color: #7a1a16; border: 2px solid var(--red); }
.flash-info { background: #e9f1fb; color: #0f4a87; border: 2px solid var(--blue); }

table { width: 100%; border-collapse: collapse; margin: 16px 0; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--gridline); font-size: 1rem; }
th { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.03em; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}
.badge-alive { background: #e5f6e5; color: #0a5a0a; }
.badge-out { background: #f3e9e3; color: #7a4a1a; }

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-tint);
  color: #0a5a0a;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 16px;
  border-radius: 999px;
  margin: 0 0 20px;
}
.stat-pill .dot { width: 8px; height: 8px; border-radius: 999px; background: #0a8f2f; flex-shrink: 0; }

.game-card {
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.game-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.game-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.team-button {
  display: block;
  width: 100%;
  padding: 18px 14px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}
.team-button:hover:not(:disabled) { border-color: var(--blue); }
.team-button.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.team-button:disabled {
  background: var(--gridline);
  color: var(--muted);
  cursor: not-allowed;
}
.team-note { display: block; font-weight: 400; font-size: 0.85rem; margin-top: 4px; }

.steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.notice {
  background: #fdf3e0;
  border: 2px solid var(--amber);
  color: #6b4400;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.chart-wrap { overflow-x: auto; }

@media (max-width: 520px) {
  html { font-size: 18px; }
  .game-teams { grid-template-columns: 1fr; }
}
