:root {
  --bg: #0b0f14;
  --bg-alt: #111821;
  --panel: #141d28;
  --panel-light: #1a2635;
  --text: #e8eef7;
  --muted: #a7b3c4;
  --accent: #79ff97;
  --accent-2: #6be4ff;
  --danger: #ff6b8a;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max-width: 1120px;
  --rules-width: 1380px;
  --leaderboard-width: 360px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(121, 255, 151, 0.15),
      transparent 34rem
    ),
    radial-gradient(
      circle at top right,
      rgba(107, 228, 255, 0.12),
      transparent 32rem
    ),
    var(--bg);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.narrow {
  max-width: 820px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 0;
}

.brand {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.hero {
  padding: 7rem 0 5rem;
}

.hero-inner {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.4rem);
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-text {
  max-width: 760px;
  margin: 1.5rem 0 0;
  color: #c9d5e5;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

.button.primary {
  color: #061008;
  background: var(--accent);
  border-color: rgba(121, 255, 151, 0.65);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: rgba(121, 255, 151, 0.45);
  background: rgba(121, 255, 151, 0.08);
}

.section {
  padding: 4rem 0;
}

.section.alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card,
.callout,
.rule {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0.02)
    ),
    var(--panel);
  box-shadow: var(--shadow);
}

.card {
  padding: 1.35rem;
}

.card p,
.rule p,
.callout p {
  margin-bottom: 0;
}

.page-hero {
  padding: 5rem 0 2rem;
}

.page-hero h1 {
  font-size: clamp(3rem, 7vw, 5.6rem);
}

.profile-photo {
  max-width: 440px;
  margin: 2rem auto 3rem;
}

.profile-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-photo figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
}

.callout {
  margin: 2rem 0;
  padding: 1.25rem;
  background:
    linear-gradient(
      135deg,
      rgba(121, 255, 151, 0.09),
      rgba(107, 228, 255, 0.07)
    ),
    var(--panel-light);
}

.callout h3 {
  color: var(--accent);
}

ul {
  padding-left: 1.35rem;
  color: var(--muted);
}

li + li {
  margin-top: 0.4rem;
}

.rule-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 3rem;
}

.rule {
  padding: 1.25rem;
}

.rule h3 {
  color: var(--text);
}

.command-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.command-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.command-table th,
.command-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.command-table th {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-table tr:last-child td {
  border-bottom: 0;
}

code {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(121, 255, 151, 0.1);
  font-family:
    "Cascadia Code",
    "Fira Code",
    Consolas,
    monospace;
  font-size: 0.95em;
}

.rules-page {
  padding: 4rem 0;
}

.rules-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    var(--leaderboard-width);
  align-items: start;
  gap: 2rem;
  width: min(100% - 2rem, var(--rules-width));
  margin: 0 auto;
}

.rules-content {
  min-width: 0;
}

.leaderboard-sidebar {
  min-width: 0;
  scroll-margin-top: 7rem;
}

.leaderboard-heading {
  margin-bottom: 1.5rem;
}

.leaderboard-heading .eyebrow {
  margin-bottom: 0.5rem;
}

.leaderboard-heading h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.leaderboard-heading p:last-child {
  margin: 0;
}

.leaderboard-frame {
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(121, 255, 151, 0.25);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(121, 255, 151, 0.06);
}

.leaderboard-frame iframe {
  display: block;
  width: 100%;
  height: 1250px;
  border: 0;
  background: var(--panel);
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 1050px) {
  .rules-layout {
    grid-template-columns: 1fr;
    width: min(100% - 2rem, var(--max-width));
  }

  .leaderboard-sidebar {
    margin-top: 2rem;
  }

  .leaderboard-frame iframe {
    height: 760px;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 4.5rem 0 3.5rem;
  }

  .section,
  .rules-page {
    padding: 3rem 0;
  }

  .leaderboard-frame iframe {
    height: 680px;
  }
}

@media (max-width: 520px) {
  html {
    scroll-padding-top: 10rem;
  }

  .nav {
    gap: 0.7rem;
  }

  .nav a {
    font-size: 0.9rem;
  }

  .button {
    width: 100%;
  }

  .profile-photo {
    margin: 1.5rem auto 2rem;
  }

  .leaderboard-frame {
    border-radius: 12px;
  }

  .leaderboard-frame iframe {
    height: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
