@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('./brand-tokens.css?v=1.0');

:root {
  --bg: #0a0a0b !important;
  --green: #22d3ee !important;
  --legal-ink: #ffffff;
  --text: #c7c7cb !important;
  --muted: #8a8a8e !important;
  --legal-surface: #18181b;
  --legal-raised: #26262a;
  --legal-plane: #111113;
  --legal-border: rgba(255, 255, 255, 0.1);
  --legal-focus: #22d3ee;
  --legal-spectrum: var(--brand-gradient);
  --scrollbar-track: #111113;
  --scrollbar-thumb: #45454b;
  color-scheme: dark;
}

:root.light-mode {
  --bg: #f7f7f5 !important;
  --green: #087f91 !important;
  --legal-ink: #101012;
  --text: #45454a !important;
  --muted: #69696f !important;
  --legal-surface: #ffffff;
  --legal-raised: #e8e8e5;
  --legal-plane: #efefec;
  --legal-border: rgba(16, 16, 18, 0.12);
  --legal-focus: #087f91;
  --scrollbar-track: #efefec;
  --scrollbar-thumb: #a7a7a2;
  color-scheme: light;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  margin: 0 auto !important;
  max-width: 940px !important;
  min-height: 100dvh !important;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 36px) 88px !important;
  color: var(--legal-ink) !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-red) 5%, transparent), transparent 24rem),
    var(--bg) !important;
  font: 16px/1.7 'Space Grotesk', ui-sans-serif, system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  right: 36px;
  left: 36px;
  height: 3px;
  background: var(--legal-spectrum);
}

::selection {
  color: #ffffff;
  background: var(--legal-focus);
}

a {
  color: var(--green) !important;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px solid var(--legal-focus);
  outline-offset: 3px;
}

.back {
  margin-bottom: 48px !important;
  padding: 8px 0;
  font-weight: 600 !important;
}

h1 {
  max-width: 16ch;
  margin: 0 0 12px !important;
  color: var(--legal-ink) !important;
  font-size: clamp(2.5rem, 7vw, 4.7rem) !important;
  font-weight: 650;
  line-height: 0.98 !important;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h2 {
  margin-top: 54px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--legal-border) !important;
  color: var(--legal-ink);
  font-size: 1.25rem !important;
  font-weight: 650;
  letter-spacing: -0.015em;
}

p,
li,
td {
  color: var(--text) !important;
}

strong,
th,
code {
  color: var(--legal-ink) !important;
}

code,
th,
.updated {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.updated {
  margin-bottom: 34px !important;
  color: var(--muted) !important;
  font-size: 0.78rem !important;
}

.summary,
.notice,
.note,
.choice {
  margin: 28px 0 !important;
  padding: 20px !important;
  border: 1px solid var(--legal-border) !important;
  border-radius: 6px !important;
  background: var(--legal-surface) !important;
  box-shadow: none !important;
}

.summary,
.choice {
  border-top-color: rgba(34, 211, 238, 0.55) !important;
}

.notice {
  border-top-color: rgba(255, 172, 46, 0.7) !important;
}

.table-wrap {
  margin: 18px 0 28px;
  overflow-x: auto;
  border: 1px solid var(--legal-border);
  border-radius: 6px;
}

table {
  margin: 0 !important;
  background: var(--legal-surface) !important;
}

th,
td {
  padding: 13px 14px !important;
  border-color: var(--legal-border) !important;
}

th {
  color: var(--muted) !important;
  background: var(--legal-plane) !important;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.button {
  min-height: 44px;
  padding: 11px 16px !important;
  border-radius: 4px !important;
  color: #ffffff !important;
  background: var(--legal-focus) !important;
  font-weight: 650 !important;
}

footer {
  margin-top: 64px !important;
  padding-top: 24px !important;
  border-top: 1px solid var(--legal-border) !important;
  color: var(--muted) !important;
}

* {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
  background: var(--scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--legal-focus);
}

:root.light-mode .header {
  background: rgba(247, 247, 245, 0.96) !important;
  border-color: var(--legal-border) !important;
  box-shadow: none !important;
}

:root.light-mode .faq-item,
:root.light-mode .back-btn,
:root.light-mode .auth-btn {
  color: var(--legal-ink) !important;
  background: var(--legal-surface) !important;
  border-color: var(--legal-border) !important;
  box-shadow: none !important;
}

:root.light-mode .faq-q,
:root.light-mode .back-btn:hover {
  color: var(--green) !important;
}

:root.light-mode .bg-mesh {
  display: none !important;
}

@media (max-width: 620px) {
  body::before {
    right: 18px;
    left: 18px;
  }

  h2 {
    margin-top: 44px !important;
  }

  th,
  td {
    min-width: 150px;
  }
}
