/* ModelLeague — site stylesheet. Dark board aesthetic, no dependencies. */

:root {
  --bg: #0e1116;
  --panel: #151b23;
  --panel-2: #1b232e;
  --border: #28313e;
  --text: #e7ecf3;
  --muted: #9aa7b8;
  --faint: #6b7788;
  --accent: #5b9dff;
  --accent-soft: rgba(91, 157, 255, 0.14);
  --green: #3fb96f;
  --green-soft: rgba(63, 185, 111, 0.16);
  --red: #e0574e;
  --red-soft: rgba(224, 87, 78, 0.16);
  --gold: #d9a441;
  --gold-soft: rgba(217, 164, 65, 0.16);
  --radius: 12px;
}

body.league-frontier { --accent: #5b9dff; --accent-soft: rgba(91, 157, 255, 0.14); }
body.league-open { --accent: #3fb96f; --accent-soft: rgba(63, 185, 111, 0.16); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(14, 17, 22, 0.92);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.2px;
  color: var(--text);
  text-decoration: none;
}
.brand::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  margin-right: 9px;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  padding: 6px 11px;
  border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }

main { padding-bottom: 72px; }

/* Banner */
.banner {
  margin: 22px 0 0;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 14.5px;
}
.banner strong { color: var(--text); }

/* Hero */
.hero { padding: 44px 0 10px; }
.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}
.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 720px;
  margin: 0;
}
.lede em { color: var(--text); font-style: normal; font-weight: 600; }

/* Sections */
section { margin-top: 46px; }
h2 {
  font-size: 22px;
  margin: 0 0 14px;
  letter-spacing: -0.2px;
}
h1 { font-size: 32px; margin: 26px 0 10px; letter-spacing: -0.3px; }

p { margin: 10px 0; }

ul, ol { margin: 10px 0; padding-left: 24px; }
li { margin: 7px 0; }

a { color: var(--accent); }

.steps li { margin: 12px 0; }
.steps li strong { color: var(--text); }

.aside {
  color: var(--faint);
  font-size: 14.5px;
  border-left: 3px solid var(--border);
  padding-left: 14px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { transform: translateY(-2px); }
.card-frontier:hover { border-color: #5b9dff; }
.card-open:hover { border-color: #3fb96f; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.card-frontier .card-title { color: #5b9dff; }
.card-open .card-title { color: #3fb96f; }
.card-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 10px; }
.card-meta { color: var(--faint); font-size: 13.5px; }

/* League hero */
.league-hero h1 {
  font-size: 34px;
  margin-top: 34px;
}
.league-hero .lede { font-size: 17px; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
thead th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--faint);
  background: var(--panel-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Badges */
.pts {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.pts.pos { color: var(--green); background: var(--green-soft); }
.pts.neg { color: var(--red); background: var(--red-soft); }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.pill.open { color: var(--gold); background: var(--gold-soft); }
.pill.claimed { color: var(--green); background: var(--green-soft); }

.empty {
  color: var(--faint);
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin: 14px 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 13.5px;
  padding: 26px 0 34px;
}
footer a { color: var(--muted); }

/* Password gate */
html.gated header,
html.gated main,
html.gated footer { display: none; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
html:not(.gated) .gate { display: none; }

.gate-box { width: 100%; max-width: 360px; text-align: center; }
.gate-logo {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 20px;
}
.gate-logo::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
  margin-right: 8px;
}
.gate-box h1 { font-size: 26px; margin: 0 0 8px; }
.gate-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.gate-box input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.gate-box input:focus { border-color: var(--accent); }
.gate-box button {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #0b0e13;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.gate-box button:hover { filter: brightness(1.1); }
.gate-error { color: var(--red); font-size: 14px; margin: 14px 0 0; }
.gate-foot { color: var(--faint); font-size: 12.5px; margin: 18px 0 0; }

@keyframes mlshake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.gate-box.shake { animation: mlshake 0.18s ease-in-out 2; }

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  h1 { font-size: 26px; }
  thead th, tbody td { padding: 9px 10px; font-size: 14px; }
}
