/* === Base Reset & Typography === */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #1a1a1a;
  background: #f5f5f0;
  -webkit-font-smoothing: antialiased;
}

/* === Page Layout === */

.rulebook {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 32px;
  background: #fff;
  min-height: 100vh;
}

/* === Section Header === */

.section-header {
  margin-bottom: 32px;
}

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 2px;
}

.section-header h1 {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  color: #1a1a1a;
  text-transform: uppercase;
}

/* === Subsection Headers (h2) — Dark Pill Badge === */

.section-content h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: #1a1a1a;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 4px;
  margin-top: 28px;
  margin-bottom: 12px;
}

/* === Body Content === */

.section-content p {
  margin-bottom: 14px;
}

.section-content ol,
.section-content ul {
  margin-bottom: 14px;
  padding-left: 24px;
}

.section-content li {
  margin-bottom: 6px;
}

.section-content em {
  font-style: italic;
}

.section-content strong {
  font-weight: 700;
}

/* === Game Size Badges === */

.badge-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  padding: 3px 12px;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 70px;
  text-align: center;
}

.badge-small {
  background: #C0392B;
}

.badge-medium {
  background: #E67E22;
}

.badge-large {
  background: #2C3E50;
}

.badge-text {
  font-size: 14px;
  line-height: 1.5;
}

.badge-text p {
  margin-bottom: 4px;
}

.badge-text p:last-child {
  margin-bottom: 0;
}

/* === Game Size Table === */

.game-size-table {
  margin: 20px 0;
}

.game-size-table .badge-row {
  margin-bottom: 14px;
}

/* === Chapter Navigation === */

.chapter-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  background: #1a1a1a;
  padding: 0;
  gap: 0;
}

.chapter-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  margin: 4px;
  flex: 1;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
}

.chapter-nav-item:hover {
  color: rgba(255, 255, 255, 0.85);
}

.chapter-nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.chapter-nav-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.chapter-nav-title {
  display: none;
}

/* Top nav padding */
body {
  padding-top: 64px;
}

/* Desktop: top nav */
@media (min-width: 700px) {
  .chapter-nav {
    gap: 2px;
  }

  .chapter-nav-item {
    flex-direction: row;
    gap: 6px;
    padding: 12px 16px;
    flex: 0 1 auto;
    max-width: none;
    font-size: 12px;
  }

  .chapter-nav-label {
    display: none;
  }

  .chapter-nav-title {
    display: inline;
  }

  body {
    padding-top: 48px;
  }
}

.section-content h3 {
  margin-top: 28px;
  margin-bottom: 12px;
}

/* === Content Cards === */

.card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 10px 0;
}

.card > *:first-child {
  margin-top: 0;
}

.card > *:last-child {
  margin-bottom: 0;
}

/* === Utility === */

.section-content hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 24px 0;
}
