:root {
  --snow: #FEF8F5;
  --glacier: #D7DFE1;
  --winter: #08151E;
  --red: #C74B4E;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--snow);
  color: var(--winter);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────────────────── */
nav {
  background: var(--winter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 56px;
  position: relative;
  z-index: 10;
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 0.18em;
  color: var(--snow);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}
.nav-links li { display: flex; align-items: center; }
.nav-links li:not(:last-child)::after {
  content: '|';
  color: var(--snow);
  opacity: 0.25;
  padding: 0 14px;
  font-size: 11px;
}
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--snow);
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { opacity: 1; }
.nav-active { opacity: 1 !important; }

@media (max-width: 640px) {
  nav { padding: 0 16px; }
  .nav-links a { font-size: 9px; letter-spacing: 0.08em; }
}

/* ── Content ─────────────────────────────────────────────── */
.rules-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* ── Tabs ────────────────────────────────────────────────── */
.rules-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--glacier);
}
.rules-tab {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  padding: 0 0 12px;
  margin-right: 32px;
  color: var(--winter);
  opacity: 0.28;
  position: relative;
  bottom: -1px;
  transition: opacity 0.15s;
}
.rules-tab:hover { opacity: 0.6; }
.rules-tab-active {
  opacity: 1;
  border-bottom-color: var(--winter);
}
.rules-tab-active:hover { opacity: 1; }

/* ── General rules bullets ───────────────────────────────── */
.rules-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rules-bullets li {
  font-size: 13px;
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}
.rules-bullets li::before {
  content: '\00B7';
  position: absolute;
  left: 0;
  opacity: 0.45;
  font-size: 16px;
  line-height: 1.3;
}

.rules-header {
  margin-bottom: 40px;
}
.page-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 6px;
}
h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  letter-spacing: 0.06em;
}

/* Section */
.rules-section {
  margin-bottom: 40px;
}
h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.rules-intro {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* Table */
.rules-table {
  background: white;
  border: 1px solid var(--glacier);
  border-radius: 12px;
  overflow: hidden;
}
.rules-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--glacier);
  font-size: 13px;
  line-height: 1.5;
}
.rules-row:last-child { border-bottom: none; }
.rules-row > * { flex: 1; }
.rules-row > *:last-child { text-align: right; flex: 0 0 auto; min-width: 90px; }

.rules-row-head {
  background: var(--snow);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pts {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}
.mult {
  color: var(--winter);
  font-size: 13px;
}
.tier-label {
  font-weight: 600;
}
.cantons {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  opacity: 0.75;
}
.bonus-name {
  display: block;
  font-weight: 600;
}
.bonus-sub {
  display: block;
  font-size: 11px;
  opacity: 0.55;
  margin-top: 2px;
}

/* Formula */
.formula-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--glacier);
  border-radius: 12px;
  padding: 24px 28px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}
.formula-op {
  opacity: 0.35;
  font-size: 16px;
}
.formula-eq {
  opacity: 0.35;
  font-size: 16px;
}
.formula-result {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--red);
}

footer {
  text-align: center;
  padding: 24px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.4;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { opacity: 0.8; }

@media (max-width: 600px) {
  .rules-wrap { padding: 32px 16px 60px; }
  .formula-box { font-size: 11px; gap: 8px; }
  .rules-row { flex-wrap: wrap; }
  .rules-row > *:last-child { text-align: left; }
}
