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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #ffffff;
  color: #18241b;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

#ballpit-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ballpit-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 120px 20px 64px;
  display: flex;
  justify-content: center;
}

.legal-card {
  width: 100%;
  max-width: 880px;
  background-color: #ffffff;
  border: 1.5px solid #4d5850;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(16, 40, 21, 0.1);
  padding: 0 36px 40px;
}

.brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: -86px;
  margin-bottom: 22px;
}

.brand-logo {
  width: 164px;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(16, 40, 21, 0.12));
}

.brand-slogan {
  width: 240px;
  max-width: 72%;
  height: auto;
  display: block;
  margin-top: 4px;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1.5px solid #e4eee6;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  color: #18241b;
  background-color: #f4faf5;
  border: 1px solid #dce8df;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.nav-tab:hover {
  background-color: #e8f4eb;
  border-color: #b7d3be;
  transform: translateY(-1px);
}

.nav-tab.active {
  background-color: #1b5e20;
  border-color: #1b5e20;
  color: #ffffff;
}

.doc-header {
  margin-bottom: 24px;
}

.doc-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.28;
  font-weight: 800;
  color: #18241b;
}

.version-badge {
  display: inline-block;
  background-color: #1b5e20;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.portal-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid #dce8df;
  border-radius: 18px;
  padding: 20px;
  text-decoration: none;
  color: #18241b;
  box-shadow: 0 6px 20px rgba(16, 40, 21, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.portal-tile:hover {
  transform: translateY(-2px);
  border-color: #1b5e20;
  box-shadow: 0 10px 26px rgba(27, 94, 32, 0.12);
}

.portal-tile h2 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #1b5e20;
  border: none;
  padding: 0;
}

.portal-tile p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #415445;
}

.tile-cta {
  font-size: 13px;
  font-weight: 700;
  color: #1b5e20;
}

h2.section-heading {
  margin: 28px 0 10px;
  padding-bottom: 6px;
  font-size: 17px;
  font-weight: 800;
  color: #1b5e20;
  border-bottom: 1.5px solid #dce8df;
}

h3.subsection-heading {
  margin: 18px 0 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: #18241b;
}

p {
  margin: 0 0 12px;
  font-size: 15px;
  color: #263329;
}

ul, ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
  font-size: 15px;
  color: #263329;
}

.letter-list {
  list-style: none;
  padding-left: 4px;
}

.letter-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.letter-marker {
  min-width: 22px;
  font-weight: 700;
  color: #1b5e20;
}

.relief-box {
  background-color: #ffffff;
  border: 1px solid #dce8df;
  border-radius: 18px;
  padding: 18px 20px;
  margin: 16px 0;
  box-shadow: 0 6px 20px rgba(16, 40, 21, 0.07);
}

.relief-box.warn {
  background-color: #fff8f3;
  border-color: #ffccbc;
  box-shadow: 0 6px 20px rgba(191, 54, 12, 0.08);
}

.relief-box p:last-child,
.relief-box ul:last-child {
  margin-bottom: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0 18px;
  border: 1px solid #dce8df;
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 40, 21, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  background-color: #f4faf5;
  color: #1b5e20;
  font-weight: 800;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1.5px solid #dce8df;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid #ebf2ec;
  vertical-align: top;
  color: #263329;
}

tr:last-child td {
  border-bottom: none;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #1b5e20;
  color: #ffffff;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(27, 94, 32, 0.22);
  transition: background-color 0.16s ease, transform 0.12s ease;
}

.primary-btn:hover {
  background-color: #144718;
  transform: translateY(-1px);
}

a {
  color: #1b5e20;
  font-weight: 600;
}

.doc-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1.5px solid #e4eee6;
  text-align: center;
  font-size: 13px;
  color: #526856;
}

@media (max-width: 640px) {
  .page-shell {
    padding: 96px 12px 40px;
  }

  .legal-card {
    padding: 0 18px 28px;
    border-radius: 18px;
  }

  .brand-hero {
    margin-top: -68px;
  }

  .brand-logo {
    width: 128px;
  }

  .brand-slogan {
    width: 196px;
  }

  .doc-title {
    font-size: 20px;
  }
}
