* {
  box-sizing: border-box;
}

:root {
  --grass: #5eae32;
  --grass-light: #78c843;
  --grass-dark: #326b27;
  --dirt: #754629;
  --dirt-dark: #4d2d20;
  --text: #f5f5e8;
  --text-dark: #1b2118;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background: #202820 url("assets/stein.png") center / cover fixed;
}

/* Grass-block navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 22px 7px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.045) 0 3px,
      transparent 3px 28px
    ),
    linear-gradient(
      to bottom,
      #7bc943 0,
      #65b336 13px,
      #4e9a2d 27px,
      #3b8129 38px,
      #75482d 38px,
      #75482d 100%
    );
  border-bottom: 5px solid #3f2a1d;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .28);
}

.navbar {
  width: min(1180px, 100%);
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  font-weight: 900;
  letter-spacing: .4px;
  text-shadow: 3px 3px 0 #294b20, 5px 5px 0 rgba(0, 0, 0, .3);
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .3));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  color: #fffbe8;
  text-decoration: none;
  text-transform: uppercase;
  font-size: .83rem;
  font-weight: 800;
  letter-spacing: .7px;
  background: rgba(35, 76, 28, .45);
  border: 2px solid rgba(28, 65, 23, .7);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.15),
              inset -3px -3px 0 rgba(0,0,0,.16),
              3px 3px 0 rgba(0,0,0,.22);
  transition: transform .12s ease, background .12s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: #6ebc39;
  transform: translateY(-2px);
  outline: 2px solid #f4e8a2;
  outline-offset: 2px;
}

.nav-link.active {
  background: #8bce4e;
  color: #20391b;
  border-color: #376b27;
}

.nav-link.join-link {
  color: #fff;
  background: #a7472b;
  border-color: #63321f;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.16),
              inset -3px -3px 0 rgba(0,0,0,.2),
              3px 3px 0 rgba(0,0,0,.22);
}

.nav-link.join-link:hover,
.nav-link.join-link:focus-visible {
  background: #c75a35;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 42px;
  padding: 8px;
  border: 2px solid #315f24;
  background: #5da632;
  box-shadow: 3px 3px 0 rgba(0,0,0,.25);
  cursor: pointer;
}

.menu-toggle > span:not(.sr-only) {
  display: block;
  height: 4px;
  margin: 3px 0;
  background: white;
  box-shadow: 1px 1px 0 #315f24;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-content {
  width: min(1000px, calc(100% - 40px));
  margin: 100px auto;
  padding: 36px;
  background: rgba(20, 28, 19, .78);
  border: 3px solid #4a7134;
  box-shadow: 7px 7px 0 rgba(0,0,0,.28);
}

.page-content h1 {
  margin-top: 0;
  text-shadow: 3px 3px 0 #263b20;
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 14px;
  }

  .navbar {
    min-height: 68px;
    gap: 12px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .nav-links {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 14px 14px;
    background:
      linear-gradient(to bottom, #75482d, #5d3825);
    border-bottom: 5px solid #3f2a1d;
    box-shadow: 0 6px 0 rgba(0,0,0,.25);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    justify-content: flex-start;
    min-height: 46px;
    margin-top: 5px;
  }

  .page-content {
    margin-top: 50px;
    padding: 24px;
  }
}


/* Styles for the JSON-powered rules page */
.rules-page { margin-top: 64px; }
.eyebrow {
  margin: 0 0 10px;
  color: #9fe36b;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 2px;
}
.page-intro { max-width: 720px; color: #d7dfd0; line-height: 1.65; }
.page-intro code { color: #d7ffad; }
.rules-status {
  margin: 26px 0 16px;
  padding: 10px 14px;
  color: #e7e7d7;
  background: rgba(75, 87, 63, .55);
  border-left: 4px solid #a7b69a;
  font-size: .9rem;
  line-height: 1.5;
}
.rules-status.is-loaded { border-left-color: #85d54e; }
.rules-status.is-empty { border-left-color: #e4c45a; }
.rules-status.is-error { border-left-color: #e16d53; color: #ffd6c9; }
.rules-list { display: grid; gap: 12px; margin-top: 16px; }
.rule-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(68,105,46,.72), rgba(47,64,37,.88));
  border: 2px solid #547b3b;
  box-shadow: inset 3px 3px 0 rgba(255,255,255,.07), 4px 4px 0 rgba(0,0,0,.2);
}
.rule-number {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #20351a;
  background: #a5e66b;
  border: 3px solid #4b852e;
  font-weight: 900;
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
}
.rule-content { min-width: 0; }
.rule-content h2 { margin: 0 0 7px; font-size: 1.15rem; color: #fff; }
.rule-content p { margin: 0; line-height: 1.6; color: #e0e7da; white-space: pre-line; }
.rule-category {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  color: #e8f7d9;
  background: #304b26;
  border: 1px solid #6d9a4b;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
}
@media (max-width: 760px) {
  .rules-page { margin-top: 36px; }
  .rule-card { gap: 12px; padding: 13px; }
  .rule-number { flex-basis: 36px; width: 36px; height: 36px; }
}
