:root {
  color-scheme: dark;
  --ink: #050505;
  --ink-soft: #0b0a08;
  --panel: rgba(15, 13, 10, 0.82);
  --gold: #d8b76a;
  --gold-bright: #f0d894;
  --gold-muted: #a8894b;
  --ivory: #f5efe2;
  --text: #d8d0c1;
  --muted: #a79e8e;
  --line: rgba(216, 183, 106, 0.22);
  --line-soft: rgba(216, 183, 106, 0.11);
  --content: 790px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, rgba(216, 183, 106, 0.08), transparent 28rem),
    radial-gradient(circle at 86% 45%, rgba(216, 183, 106, 0.035), transparent 32rem),
    linear-gradient(180deg, #070706 0%, var(--ink) 36%, #080706 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    radial-gradient(circle, rgba(240, 216, 148, 0.45) 0 0.7px, transparent 0.9px),
    radial-gradient(circle, rgba(240, 216, 148, 0.24) 0 0.65px, transparent 0.85px);
  background-position: 0 0, 30px 38px;
  background-size: 72px 72px, 96px 96px;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.site-header {
  position: relative;
  z-index: 5;
  width: min(calc(100% - 80px), var(--shell));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-home {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ivory);
  text-decoration: none;
}

.brand-home img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(216, 183, 106, 0.18));
}

.brand-home span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 0.055em;
}

.page-label {
  margin: 0;
  color: var(--gold-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-transform: uppercase;
}

main {
  display: block;
}

.legal-hero {
  width: min(calc(100% - 80px), var(--content));
  margin: 0 auto;
  padding: 72px 0 46px;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5vw, 70px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.updated {
  margin: 20px 0 0;
  color: var(--gold-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.legal-intro {
  margin-top: 30px;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.65;
}

.legal-intro p {
  margin: 0;
}

.legal-intro p + p {
  margin-top: 17px;
}

.legal-copy {
  width: min(calc(100% - 80px), var(--content));
  margin: 0 auto;
  padding: 10px 0 76px;
}

.legal-section {
  padding: 34px 0 36px;
  border-bottom: 1px solid var(--line-soft);
}

.legal-section:last-child {
  border-bottom-color: var(--line);
}

.legal-section h2 {
  margin: 0 0 19px;
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.45;
  text-transform: uppercase;
}

.legal-section p {
  margin: 0;
}

.legal-section p + p {
  margin-top: 16px;
}

.legal-section ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.legal-section li {
  position: relative;
  margin: 0;
  padding: 11px 0 11px 23px;
  border-top: 1px solid var(--line-soft);
}

.legal-section li:first-child {
  border-top: 0;
}

.legal-section li::before {
  position: absolute;
  top: 20px;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--gold);
  box-shadow: 0 0 10px rgba(216, 183, 106, 0.35);
}

.support-link {
  display: inline-flex;
  align-items: center;
  color: var(--gold-bright);
  font-weight: 700;
  text-decoration-color: rgba(240, 216, 148, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.support-link:hover {
  color: #fff1bd;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 120;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: none;
  place-items: center;
  border: 1px solid rgba(219, 179, 92, 0.75);
  border-radius: 50%;
  color: #f3d994;
  background: rgba(9, 9, 9, 0.96);
  box-shadow: 0 0 22px rgba(219, 179, 92, 0.18);
  cursor: pointer;
}

.back-to-top:not([hidden]) {
  display: grid;
}

.back-to-top span {
  display: block;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
    line-height: 1.72;
  }

  .site-header {
    width: min(calc(100% - 36px), var(--shell));
    min-height: 72px;
    gap: 12px;
  }

  .brand-home {
    gap: 10px;
  }

  .brand-home img {
    width: 30px;
    height: 30px;
  }

  .brand-home span {
    font-size: 13px;
  }

  .page-label {
    max-width: 100px;
    text-align: right;
    font-size: 9px;
  }

  .legal-hero,
  .legal-copy {
    width: min(calc(100% - 36px), var(--content));
  }

  .legal-hero {
    padding: 46px 0 34px;
  }

  .legal-hero h1 {
    font-size: clamp(39px, 12vw, 48px);
    line-height: 1;
  }

  .updated {
    margin-top: 17px;
    font-size: 10px;
  }

  .legal-intro {
    margin-top: 24px;
    font-size: 17px;
    line-height: 1.58;
  }

  .legal-copy {
    padding-top: 4px;
    padding-bottom: 82px;
  }

  .legal-section {
    padding: 28px 0 30px;
  }

  .legal-section h2 {
    margin-bottom: 16px;
    font-size: 10px;
    letter-spacing: 0.15em;
  }

  .legal-section p + p {
    margin-top: 14px;
  }

  .legal-section li {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .legal-section li::before {
    top: 18px;
  }

  .support-link {
    min-height: 44px;
  }

  .back-to-top {
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 39;
    border-color: rgba(232, 182, 89, 0.72);
    border-radius: 10px;
    color: var(--gold);
    background: rgba(3, 9, 12, 0.94);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
    touch-action: manipulation;
  }

  .back-to-top span {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
