:root {
  --bg: #080c13;
  --surface: #0f1821;
  --surface-soft: #111e27;
  --aqua: #69cec7;
  --aqua-soft: #a2e2dd;
  --gold: #cca05e;
  --ivory: #f2ece3;
  --muted: #b0aca6;
  --subtle: #7f878c;
  --line: rgba(166, 221, 216, 0.14);
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  color: var(--ivory);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 12, 19, 0.9);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(var(--content), calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 24px;
}
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand span { color: var(--ivory); }
.top-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.top-nav a {
  color: #bbb9b5;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.18s ease;
}
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--aqua-soft); }
.app-link {
  display: inline-flex;
  min-height: 40px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(105, 206, 199, 0.28);
  border-radius: 999px;
  color: var(--aqua-soft) !important;
  background: rgba(105, 206, 199, 0.07);
  font-weight: 650;
}

.hero {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  padding: 74px 0 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 850px;
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0;
}
.hero p:last-child {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.page-layout {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 96px;
}
.toc {
  position: sticky;
  top: 112px;
  align-self: start;
  max-height: calc(100vh - 144px);
  overflow: auto;
  padding-right: 14px;
}
.toc-label {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.toc nav { display: grid; gap: 3px; }
.toc a {
  display: block;
  padding: 8px 11px;
  border-left: 1px solid var(--line);
  color: #939b9d;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.45;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.toc a:hover, .toc a.is-active {
  color: var(--aqua-soft);
  border-left-color: var(--aqua);
  background: rgba(105, 206, 199, 0.06);
}
.toc a.is-part { margin-top: 8px; color: var(--ivory); font-weight: 700; }

.legal-document { min-width: 0; max-width: 820px; }
.policy-part {
  scroll-margin-top: 98px;
}
.policy-part + .policy-part {
  margin-top: 82px;
  padding-top: 72px;
  border-top: 1px solid rgba(204, 160, 94, 0.25);
}
.part-heading {
  margin-bottom: 38px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.part-heading span {
  display: block;
  margin-bottom: 9px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.part-heading h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5 {
  scroll-margin-top: 100px;
  color: var(--ivory);
  letter-spacing: 0;
}
.legal-content h2 {
  margin: 58px 0 17px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.25;
}
.legal-content h3 {
  margin: 48px 0 14px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3;
}
.legal-content h4 {
  margin: 34px 0 12px;
  color: var(--aqua-soft);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.45;
}
.legal-content h5 {
  margin: 28px 0 10px;
  color: #d6d3cd;
  font-size: 15px;
  font-weight: 650;
}
.legal-content p {
  margin: 0 0 18px;
  color: #c0bfbb;
}
.legal-content ul,
.legal-content ol {
  margin: 4px 0 24px;
  padding-left: 23px;
  color: #c0bfbb;
}
.legal-content li { margin: 8px 0; padding-left: 5px; }
.legal-content li::marker { color: var(--gold); }
.legal-content a { color: var(--aqua-soft); text-underline-offset: 3px; }
.legal-content p:first-child { margin-top: 0; }
.legal-content h2:first-child,
.legal-content h3:first-child { margin-top: 0; }

.legal-action-panel {
  margin: 28px 0 34px;
  padding: 24px;
  border: 1px solid rgba(105, 206, 199, 0.24);
  border-radius: 8px;
  background: rgba(105, 206, 199, 0.06);
}
.legal-action-panel p { margin-bottom: 17px; color: var(--ivory); }
.legal-action-panel span {
  display: block;
  margin-top: 12px;
  color: var(--subtle);
  font-size: 13px;
}
.legal-primary-action {
  display: inline-flex;
  min-height: 44px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(105, 206, 199, 0.35);
  border-radius: 6px;
  color: #071117 !important;
  background: var(--aqua);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}
.legal-primary-action:hover { background: var(--aqua-soft); }
.language-section {
  margin-top: 64px;
  padding-top: 52px;
  border-top: 1px solid rgba(204, 160, 94, 0.25);
}

.back-top {
  display: inline-flex;
  margin-top: 48px;
  color: var(--aqua-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--subtle);
}
.footer-inner {
  width: min(var(--content), calc(100% - 48px));
  min-height: 110px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #a9acab; text-decoration: none; }
.footer-links a:hover { color: var(--aqua-soft); }

@media (max-width: 900px) {
  .top-nav a:not(.app-link) { display: none; }
  .page-layout { grid-template-columns: 1fr; gap: 30px; }
  .toc {
    position: relative;
    top: auto;
    z-index: 1;
    max-height: none;
    margin: -10px 0 8px;
    padding: 0 0 14px;
    overflow: auto hidden;
    scrollbar-width: none;
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc-label { margin-bottom: 10px; }
  .toc nav { display: flex; width: max-content; gap: 8px; }
  .toc a {
    max-width: 230px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .toc a.is-part { margin-top: 0; }
  .toc a:hover, .toc a.is-active {
    border-color: rgba(105, 206, 199, 0.4);
    background: rgba(105, 206, 199, 0.08);
  }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 78px; }
  body { font-size: 15px; line-height: 1.72; }
  .header-inner,
  .hero,
  .page-layout,
  .footer-inner { width: min(100% - 34px, var(--content)); }
  .header-inner { min-height: 68px; }
  .brand { font-size: 21px; }
  .brand img { width: 33px; height: 33px; }
  .app-link { min-height: 37px; padding: 0 13px; font-size: 12px !important; }
  .hero { padding: 49px 0 38px; }
  .hero h1 { font-size: 38px; }
  .hero p:last-child { font-size: 15px; }
  .page-layout { padding: 34px 0 70px; }
  .legal-content h2 { margin-top: 46px; font-size: 27px; }
  .legal-content h3 { margin-top: 39px; font-size: 23px; }
  .legal-content h4 { margin-top: 29px; font-size: 16px; }
  .policy-part + .policy-part { margin-top: 62px; padding-top: 54px; }
  .footer-inner { min-height: 130px; padding: 26px 0; flex-direction: column; align-items: flex-start; justify-content: center; }
}

@media print {
  :root { --ivory: #111; --muted: #444; }
  body { color: #111; background: #fff; font-size: 11pt; }
  .site-header, .toc, .site-footer, .back-top { display: none; }
  .hero { width: 100%; padding: 0 0 24px; }
  .hero h1 { color: #111; font-size: 30pt; }
  .hero p:last-child { color: #444; }
  .page-layout { display: block; width: 100%; padding: 28px 0 0; }
  .legal-document { max-width: none; }
  .legal-content h2, .legal-content h3, .legal-content h4, .legal-content h5 { color: #111; break-after: avoid; }
  .legal-content p, .legal-content li { color: #222; }
  .policy-part + .policy-part { border-color: #bbb; }
}
