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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: #2c5f2d;
}

a:hover {
  color: #1e4420;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: #1a1a1a;
  color: white;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-header nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-header nav a:hover {
  color: white;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-top: 1px solid #333;
  }

  .site-header nav.open {
    display: flex;
  }

  .site-header nav a {
    padding: 0.6rem 0;
    font-size: 1rem;
    border-bottom: 1px solid #2a2a2a;
  }

  .site-header nav a:last-child {
    border-bottom: none;
  }
}

/* Footer */
.site-footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 2rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.site-footer a {
  color: #ccc;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

/* Tables responsive */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.4rem 0.5rem;
  }
}

/* Internal links nav */
.internal-links {
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.internal-links a {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: #f0f4f0;
  border: 1px solid #d4e0d4;
  border-radius: 20px;
  color: #2c5f2d;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.internal-links a:hover {
  background: #e0ebe0;
}

/* Pagefind overrides */
.pagefind-ui {
  --pagefind-ui-primary: #2c5f2d;
  --pagefind-ui-text: #1a1a1a;
  --pagefind-ui-background: #fff;
  --pagefind-ui-border: #d0d0d0;
  --pagefind-ui-border-width: 2px;
  --pagefind-ui-border-radius: 8px;
  --pagefind-ui-font: inherit;
  --pagefind-ui-scale: 1.1;
}
