:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --surface: #11151b;
  --surface-raised: #171c24;
  --text: #f2f4ef;
  --muted: #9aa3af;
  --line: #29303a;
  --accent: #d9ff57;
  --accent-ink: #151b08;
  --warning: #ffcf70;
  --warning-bg: rgba(255, 207, 112, .08);
  --warning-line: rgba(255, 207, 112, .32);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", var(--font-body);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 82% -5%, rgba(128, 109, 255, .10), transparent 26rem),
    radial-gradient(circle at 14% 15%, rgba(217, 255, 87, .045), transparent 22rem),
    var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:hover { color: var(--accent); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(217, 255, 87, .5);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.draft-notice {
  padding: 10px 20px;
  border-bottom: 1px solid var(--warning-line);
  color: #f8ddb0;
  background: var(--warning-bg);
  font-size: 13px;
  text-align: center;
}

.draft-notice strong { color: var(--warning); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(41, 48, 58, .82);
  background: rgba(11, 14, 19, .88);
  backdrop-filter: blur(16px);
}

.header-inner,
.legal-layout,
.footer-inner {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 800 15px/1 var(--font-display);
  letter-spacing: -.25px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 27px;
  height: 27px;
  display: inline-block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 0 28px rgba(217, 255, 87, .12);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 5px;
  height: 13px;
  border-radius: 99px;
  background: #171d0a;
  transform: rotate(-22deg);
}

.brand-mark::before { left: 7px; }
.brand-mark::after { right: 7px; }

.legal-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legal-nav a {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-raised);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.back-link::before { content: "\2190"; }

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  justify-content: center;
  gap: clamp(36px, 7vw, 88px);
  padding: 58px 0 90px;
}

.contents {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 21, 27, .76);
}

.contents strong {
  display: block;
  margin-bottom: 10px;
  font: 800 11px/1 var(--font-display);
  letter-spacing: .9px;
  text-transform: uppercase;
}

.contents ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: legal-sections;
}

.contents li { counter-increment: legal-sections; }

.contents a {
  display: grid;
  grid-template-columns: 20px 1fr;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}

.contents a::before {
  content: counter(legal-sections, decimal-leading-zero);
  color: #69727f;
  font-size: 9px;
  padding-top: 2px;
}

.contents a:hover { color: var(--accent); }

.legal-document { min-width: 0; }

.document-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

h1,
h2,
h3 { font-family: var(--font-display); }

h1 {
  margin: 0 0 13px;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.02;
  letter-spacing: -2.6px;
}

.document-summary {
  max-width: 670px;
  margin: 0 0 14px;
  color: #b7bec8;
  font-size: 17px;
  line-height: 1.62;
}

.updated {
  margin: 0;
  color: #747e8b;
  font-size: 12px;
}

.document-intro {
  margin: 32px 0 12px;
  padding: 18px 20px;
  border: 1px solid rgba(217, 255, 87, .18);
  border-radius: 13px;
  color: #c9d0d8;
  background: rgba(217, 255, 87, .035);
  font-size: 14px;
}

.legal-section {
  padding: 34px 0 5px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}

.legal-section:first-of-type { margin-top: 30px; }

.legal-section h2 {
  margin: 0 0 13px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.55px;
}

.legal-section h3 {
  margin: 24px 0 8px;
  font-size: 15px;
  letter-spacing: -.15px;
}

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

.legal-section p,
.legal-section li { color: #adb5c0; }

.legal-section strong { color: #e4e7e1; }

.legal-section ul,
.legal-section ol {
  margin: 12px 0 17px;
  padding-left: 22px;
}

.legal-section li { margin: 7px 0; }

.placeholder {
  display: inline;
  padding: 1px 4px;
  border: 1px dashed var(--warning-line);
  border-radius: 4px;
  color: var(--warning);
  background: var(--warning-bg);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .88em;
  overflow-wrap: anywhere;
}

.callout {
  margin: 18px 0;
  padding: 17px 19px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface-raised);
}

.callout p:last-child { margin-bottom: 0; }

.contact-card {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.contact-card h3 { margin-top: 0; }

.contact-card address {
  color: var(--muted);
  font-style: normal;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.support-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.support-card h2 {
  margin: 0 0 7px;
  font-size: 16px;
}

.support-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.support-card a {
  display: inline-block;
  margin-top: 13px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(9, 12, 16, .8);
}

.footer-inner {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: #7f8995;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a { text-decoration: none; }

@media (max-width: 860px) {
  .header-inner { align-items: flex-start; padding: 18px 0; }
  .legal-nav { justify-content: flex-end; flex-wrap: wrap; }
  .legal-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .contents { position: static; }
  .contents ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 590px) {
  .draft-notice { text-align: left; }
  .header-inner { display: block; }
  .legal-nav { justify-content: flex-start; margin: 16px -7px -3px; }
  .legal-nav a { padding: 7px; font-size: 12px; }
  .legal-layout,
  .header-inner,
  .footer-inner { width: min(100% - 28px, 1160px); }
  .contents ol,
  .support-grid { grid-template-columns: 1fr; }
  h1 { letter-spacing: -1.8px; }
  .document-summary { font-size: 15px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 25px 0; }
}

@media print {
  :root { color-scheme: light; }
  body { color: #111; background: white; font-size: 11pt; }
  .draft-notice { color: #5b4100; background: #fff8e5; }
  .site-header, .contents, .site-footer, .skip-link { display: none; }
  .legal-layout { width: 100%; display: block; padding: 0; }
  .legal-section p, .legal-section li, .document-summary { color: #333; }
  .legal-section { break-inside: avoid; border-color: #ddd; }
  .placeholder { color: #7d5700; }
}
