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

:root {
  --bg: #17171a;
  --fg: #edeae4;
  --mid: #7a766f;
  --dim: #3e3b38;
  --subtle: #524f4b;
  --rule: #232120;
  --accent: #d7c084;
  --brand-disp: "Syne", sans-serif;
  --legal-sans: "gg sans", "Ggsans", "Abcgintodiscord", "ABC Ginto Normal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --legal-head: "Abcgintodiscordnord", "gg sans", "Ggsans", "Abcgintodiscord", "ABC Ginto Normal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: var(--legal-sans);
  --disp: var(--legal-head);
  --legal-mobile-drawer-top: 50px;
  --legal-mobile-drawer-height: calc(100svh - 50px);
  --legal-mobile-overlay-top: 50px;
}

html { min-height: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 400;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.legal-nav-open {
  overflow: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 50px;
  padding: 0 44px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.h-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.h-logo-img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.h-logo {
  color: var(--fg);
  font: 800 15px var(--brand-disp);
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
}
.h-logo:hover,
.h-nav a:hover,
.h-nav a.active,
.side-link:hover,
.side-link.active,
.doc-link:hover,
.inline-link:hover,
.ft-a:hover { color: #fff; }

.h-sep { width: 1px; height: 14px; background: var(--dim); flex-shrink: 0; }
.h-tag {
  color: var(--mid);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.h-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--mid); flex-shrink: 0; }
.h-nav { display: flex; align-items: center; gap: 22px; }
.h-nav a,
.side-link,
.doc-link,
.ft-a {
  color: var(--mid);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.12s, border-color 0.12s;
}

.inline-link {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--dim);
}
.inline-link:hover { border-color: var(--fg); }

.h-burger {
  display: none;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: none;
  border: 0;
  color: var(--mid);
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
}
.h-burger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.legal-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: calc(100vh - 102px);
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  overflow-x: hidden;
}

.legal-main::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 270px;
  border-right: 1px solid var(--rule);
  background: rgba(255,255,255,0.01);
  pointer-events: none;
}

.legal-sidebar {
  position: sticky;
  top: 50px;
  min-width: 0;
  padding: 32px 24px 28px;
  height: calc(100svh - 50px);
  max-height: calc(100svh - 50px);
  min-height: calc(100svh - 50px);
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) transparent;
}

.legal-sidebar::-webkit-scrollbar { width: 4px; }
.legal-sidebar::-webkit-scrollbar-track { background: transparent; }
.legal-sidebar::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 999px; }

.side-top,
.side-group { display: grid; gap: 13px; min-width: 0; }
.side-label {
  color: var(--subtle);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: none;
}
.side-link.active { color: var(--fg); }
.side-note {
  color: var(--subtle);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.8;
  text-transform: uppercase;
}

.legal-sidebar-site,
.legal-sidebar-overlay,
.legal-sidebar-site-dropdown {
  display: none;
}

.legal-sidebar-site {
  gap: 12px;
}

.legal-sidebar-site-links {
  display: grid;
  gap: 13px;
}

.legal-sidebar-site-links .doc-link {
  width: 100%;
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
  border: 0;
}

.legal-sidebar-site-dropdown {
  display: none;
}

.legal-sidebar-site-dropdown summary {
  display: none;
}

.legal-sidebar-site-dropdown summary::-webkit-details-marker {
  display: none;
}

.legal-sidebar-site-dropdown summary::after {
  content: "+";
  color: var(--mid);
  font-size: 14px;
  line-height: 1;
}

.legal-sidebar-site-dropdown[open] summary::after {
  content: "−";
}

.legal-sidebar-site-dropdown .legal-sidebar-site-links {
  padding: 0;
}

.doc-shell {
  width: min(860px, calc(100% - 88px));
  min-width: 0;
  margin: 0 auto;
  padding: 72px 0 104px;
}

.doc-shell.doc-centered .doc-kicker,
.doc-shell.doc-centered .updated,
.doc-shell.doc-centered .doc-title,
.doc-shell.doc-centered .doc-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.doc-shell.doc-centered .doc-title {
  display: block;
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.doc-kicker,
.updated,
.section-kicker {
  color: var(--subtle);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.doc-title {
  margin-top: 28px;
  color: var(--fg);
  font: 800 clamp(34px, 3.9vw, 58px)/0.9 var(--brand-disp);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  text-wrap: balance;
}

.doc-shell.doc-legal .doc-intro,
.doc-shell.doc-legal .doc-section p,
.doc-shell.doc-legal .doc-section li,
.doc-shell.doc-legal .callout p {
  color: #ddd6cb;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.82;
  font-weight: 400;
}

.doc-shell.doc-legal .doc-section h2 {
  font-family: var(--disp);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.updated { margin-top: 28px; }

.doc-intro {
  max-width: 76ch;
  margin-top: 44px;
  color: var(--mid);
  font-size: 13px;
  line-height: 2;
}

.contact-layout {
  margin-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.contact-card,
.contact-info-card {
  border: 1px solid var(--rule);
  background: rgba(255,255,255,0.02);
  padding: 24px;
  display: grid;
  gap: 18px;
}

.contact-card-title,
.contact-info-title {
  color: var(--fg);
  font: 800 20px/1.15 var(--disp);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.contact-copy,
.contact-note,
.contact-list li {
  color: var(--mid);
  font-size: 13px;
  line-height: 1.9;
  font-weight: 400;
}

.contact-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.support-form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--subtle);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--dim);
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  font: 13px/1.5 var(--mono);
  padding: 13px 14px;
  outline: none;
}

.field select {
  background-color: #17171a;
  color-scheme: dark;
}

.field select option,
.field select optgroup {
  background: #17171a;
  color: var(--fg);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field.is-hidden {
  display: none;
}

.field-hint {
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.7;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--dim);
  background: transparent;
  color: var(--fg);
  font: 700 11px/1 var(--disp);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(180deg, rgba(215,192,132,0.18), rgba(215,192,132,0.08));
  border-color: rgba(215,192,132,0.45);
}

.primary-btn:hover,
.secondary-btn:hover {
  border-color: rgba(255,255,255,0.28);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-status {
  min-height: 20px;
  color: var(--mid);
  font-size: 12px;
  line-height: 1.6;
}

.support-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}

.support-drawer.open {
  display: block;
}

.support-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 10, 0.72);
}

.support-drawer__card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 32px));
  margin: 10vh auto 0;
  border: 1px solid var(--rule);
  background: #17171a;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.support-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.support-drawer__title {
  color: var(--fg);
  font: 800 22px/1.1 var(--disp);
}

.support-drawer__close {
  border: 0;
  background: none;
  color: var(--mid);
  cursor: pointer;
  padding: 4px;
}

.support-drawer__note {
  color: var(--mid);
  font-size: 13px;
  line-height: 1.8;
}

.support-drawer__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-meta {
  display: grid;
  gap: 10px;
}

.contact-meta-item {
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

.contact-meta-item strong {
  display: block;
  color: var(--fg);
  margin-bottom: 4px;
}

.doc-section {
  margin-top: 42px;
  scroll-margin-top: 82px;
}

.doc-section h2 {
  color: var(--fg);
  font: 800 17px/1.25 var(--disp);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.doc-section p,
.doc-section li {
  color: var(--mid);
  font-size: 13px;
  line-height: 2;
}

.doc-section p { margin-top: 18px; }
.doc-section ul { margin-top: 18px; padding-left: 18px; display: grid; gap: 10px; }
.doc-section strong { color: var(--fg); font-weight: 700; }
.doc-section code { font-family: var(--mono); color: var(--fg); }

.callout {
  margin-top: 12px;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(255,255,255,0.025);
}

.callout p {
  margin-top: 0;
}

.doc-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 42px;
  min-width: 144px;
  padding: 13px 15px;
  border: 1px solid var(--dim);
  color: var(--fg);
  text-align: center;
}
.doc-link:hover { border-color: rgba(255,255,255,0.28); }

.doc-index {
  margin-top: 44px;
  display: grid;
  gap: 14px;
}
.index-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.index-row:last-child { border-bottom: 1px solid var(--rule); }
.index-title {
  color: var(--fg);
  font: 800 18px/1.2 var(--disp);
  letter-spacing: 0;
}
.index-copy {
  color: var(--mid);
  font-size: 12px;
  line-height: 1.8;
}

footer {
  position: relative;
  z-index: 20;
  min-height: 52px;
  padding: 0 44px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ft-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ft-vsep { width: 1px; height: 9px; background: var(--subtle); }
.ft-copy { color: var(--subtle); font-size: 9px; letter-spacing: 0.08em; }

@media (max-width: 1169px) {
  .legal-main {
    position: static;
    z-index: auto;
    display: block;
    min-height: calc(100vh - 102px);
  }
  .legal-main::before {
    display: none;
  }
  .legal-sidebar {
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 20px 18px 24px;
    margin: 0 0 26px;
    border: 1px solid var(--rule);
    background: rgba(255,255,255,0.02);
    box-shadow: none;
    transform: none;
    transition: none;
    pointer-events: auto;
  }
  .legal-sidebar-overlay {
    display: none !important;
  }
  .legal-sidebar-site { display: none !important; }
  .side-top {
    gap: 12px;
  }
  .side-bottom {
    display: block;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
  }
  .side-link { white-space: normal; }
  .doc-shell {
    width: min(860px, calc(100% - 44px));
    padding: 48px 0 84px;
  }
  .doc-title {
    font-size: clamp(34px, 9vw, 58px);
    line-height: 0.94;
    white-space: normal;
  }
  .contact-layout,
  .field-grid,
  .index-row {
    grid-template-columns: 1fr;
  }
  .index-row {
    gap: 10px;
    align-items: start;
  }
  .doc-link {
    align-self: auto;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  header { padding: 0 20px; }
  .h-sep { display: none; }
  .h-burger { display: flex; }
  .h-nav { display: none !important; }
  footer { min-height: auto; padding: 12px 20px; justify-content: center; }
  .doc-shell {
    width: calc(100% - 32px);
    padding: 40px 0 72px;
  }
  .doc-shell.doc-centered .doc-title {
    width: 100%;
    max-width: 100%;
  }
  .contact-info-card {
    order: -1;
  }
  .contact-card {
    order: 0;
  }
  .doc-title {
    font-size: clamp(26px, 7.6vw, 34px);
    letter-spacing: 0;
  }
  .doc-intro,
  .doc-section p,
  .doc-section li,
  .contact-copy,
  .contact-note,
  .contact-list li {
    font-size: 12px;
  }
  .doc-shell.doc-legal .doc-section h2,
  .doc-section h2,
  .contact-card-title,
  .contact-info-title,
  .index-title {
    font-size: 20px;
    line-height: 1.05;
  }
  .support-drawer__card {
    width: calc(100% - 20px);
    margin-top: 7vh;
    padding: 20px;
  }
}

@media (max-width: 420px) {
  header { height: 48px; padding: 0 14px; }
  :root {
    --legal-mobile-drawer-top: 48px;
    --legal-mobile-drawer-height: calc(100svh - 48px);
    --legal-mobile-overlay-top: 48px;
  }
  .legal-main { min-height: calc(100vh - 100px); }
  .legal-sidebar {
    width: 100%;
    padding: 20px 18px 24px;
  }
  .doc-shell { width: calc(100% - 28px); }
  .doc-title {
    font-size: clamp(22px, 7.2vw, 28px);
    line-height: 0.98;
  }
}
