.rules-body {
  background: #f4f6f9;
}

.rules-context-nav {
  padding-block: 20px;
}

.rules-page {
  padding-bottom: 112px;
}

.rules-hero {
  color: white;
  background:
    radial-gradient(circle at 82% 12%, rgba(245, 164, 0, .22), transparent 27%),
    linear-gradient(145deg, #0b1220, #17243b 72%, #101929);
}

.rules-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding-block: 48px 52px;
}

.rules-hero .eyebrow {
  color: #ffc85c;
}

.rules-hero h1 {
  max-width: 760px;
  margin-bottom: 15px;
  font-size: clamp(38px, 6vw, 64px);
}

.rules-hero__lede {
  max-width: 720px;
  margin: 0;
  color: #d0d5dd;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}

.rules-version {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #d0d5dd;
  background: rgba(255, 255, 255, .06);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.rules-shell {
  width: min(920px, calc(100% - 40px));
}

.rules-notices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-block: 28px 20px;
}

.rules-notice {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 18px;
  border: 1px solid;
  border-radius: 16px;
  background: white;
}

.rules-notice--review {
  border-color: #f0c36a;
  background: #fff9eb;
}

.rules-notice--status {
  border-color: #b9d4f5;
  background: #f3f8fe;
}

.rules-notice__mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #3b2500;
  background: #ffd780;
  font-size: 14px;
  font-weight: 900;
}

.rules-notice--status .rules-notice__mark {
  color: #0b3b72;
  background: #cfe4fb;
}

.rules-notice h2 {
  margin: 2px 0 6px;
  font-size: 16px;
  letter-spacing: -.015em;
}

.rules-notice p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.rules-language-tabs {
  position: sticky;
  z-index: 20;
  top: 80px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  margin-bottom: 18px;
  border: 1px solid #dfe3e8;
  border-radius: 15px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 9px 24px rgba(16, 24, 40, .08);
  backdrop-filter: blur(12px);
}

.rules-language-tabs a {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding-inline: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #475467;
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .05em;
}

.rules-language-tabs a:hover {
  color: var(--ink);
  background: #f2f4f7;
}

.rules-language-tabs a[aria-selected="true"] {
  border-color: #e39a08;
  color: #241700;
  background: var(--accent);
  box-shadow: 0 5px 12px rgba(201, 121, 0, .18);
}

.rules-language-tabs a:focus-visible,
.rules-language-panel:focus-visible {
  outline: 3px solid rgba(245, 164, 0, .4);
  outline-offset: 2px;
}

.rules-language-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  scroll-margin-top: 154px;
}

.rules-language-panel .legal-summary,
.rules-language-panel .legal-section {
  min-width: 0;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid #e1e5eb;
  border-radius: 18px;
  background: white;
  box-shadow: 0 2px 5px rgba(16, 24, 40, .035);
}

.rules-language-panel .legal-summary {
  border-color: #efcb80;
  background: linear-gradient(135deg, #fff9ea, #fffdf7);
}

.rules-language-panel .legal-summary p {
  margin: 0;
  color: #3f4653;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.7;
}

.rules-language-panel .legal-section h2 {
  margin: 0 0 14px;
  color: #172033;
  font-size: clamp(19px, 2.5vw, 23px);
  line-height: 1.3;
  letter-spacing: -.025em;
}

.rules-language-panel .legal-section p,
.rules-language-panel .legal-section li {
  color: #475467;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.rules-language-panel .legal-section p {
  margin-bottom: 12px;
}

.rules-language-panel .legal-section p:last-child {
  margin-bottom: 0;
}

.rules-language-panel .legal-section ul,
.rules-language-panel .legal-section ol {
  margin: 12px 0 15px;
  padding-left: 24px;
}

.rules-language-panel .legal-section li + li {
  margin-top: 8px;
}

.rules-language-panel .legal-section strong {
  color: #202939;
}

.rules-language-panel a,
.rules-legal-nav a {
  color: #8a4d00;
  text-underline-offset: 3px;
}

.rules-language-panel .placeholder {
  display: inline;
  padding: 2px 5px;
  border: 1px dashed #ce8c08;
  border-radius: 5px;
  color: #784300;
  background: #fff5d9;
  font-size: .9em;
  font-weight: 750;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.rules-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
  padding: 22px 4px 4px;
  border-top: 1px solid #dfe3e8;
  font-size: 14px;
  font-weight: 700;
}

.rules-footer {
  padding-block: 20px;
  color: #7b8493;
  font-size: 12px;
}

@media (max-width: 800px) {
  .rules-hero__inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
  }

  .rules-version {
    white-space: normal;
  }

  .rules-notices {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .rules-language-tabs {
    top: 8px;
  }
}

@media (max-width: 480px) {
  .rules-context-nav {
    padding-block: 16px;
  }

  .rules-page {
    padding-bottom: 100px;
  }

  .rules-hero__inner,
  .rules-shell {
    width: calc(100% - 28px);
  }

  .rules-hero__inner {
    padding-block: 34px 38px;
  }

  .rules-hero h1 {
    font-size: clamp(34px, 11vw, 44px);
  }

  .rules-hero__lede {
    font-size: 16px;
  }

  .rules-notices {
    margin-top: 18px;
  }

  .rules-notice {
    padding: 15px;
  }

  .rules-language-tabs {
    top: 8px;
    gap: 4px;
    padding: 5px;
    border-radius: 13px;
  }

  .rules-language-tabs a {
    min-height: 42px;
    padding-inline: 6px;
  }

  .rules-language-panel .legal-summary,
  .rules-language-panel .legal-section {
    padding: 18px;
    border-radius: 15px;
  }

  .rules-language-panel .legal-section ul,
  .rules-language-panel .legal-section ol {
    padding-left: 20px;
  }

  .rules-legal-nav {
    display: grid;
    gap: 12px;
  }
}

@media print {
  .site-header,
  .rules-context-nav,
  .rules-notices,
  .rules-language-tabs,
  .rules-legal-nav,
  .rules-footer,
  .mobile-nav {
    display: none !important;
  }

  .rules-page {
    padding: 0;
  }

  .rules-hero {
    color: #111827;
    background: white;
  }

  .rules-hero__inner,
  .rules-shell {
    width: 100%;
    padding-block: 18px;
  }

  .rules-hero .eyebrow,
  .rules-hero__lede {
    color: #374151;
  }

  .rules-language-panel .legal-summary,
  .rules-language-panel .legal-section {
    break-inside: avoid;
    box-shadow: none;
  }
}
