* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -12%, rgba(145, 242, 184, 0.1), transparent 34rem),
    var(--s-canvas);
  color: var(--s-text);
  font-family: var(--s-font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.legal-header {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 64px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--s-line);
  background: rgba(5, 6, 5, 0.78);
  backdrop-filter: blur(22px) saturate(140%);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark > span {
  display: block;
  width: 32px;
  height: 32px;
}

.wordmark > span img {
  display: block;
  width: 100%;
  height: 100%;
}

.wordmark strong {
  letter-spacing: -0.025em;
}

.wordmark em {
  color: var(--s-text-3);
  font-style: normal;
  font-weight: var(--s-weight-regular);
}

.back-link {
  color: var(--s-text-2);
  font-size: 12px;
  font-weight: var(--s-weight-medium);
  transition: color 180ms ease;
}

.back-link:hover {
  color: var(--s-text);
}

.legal-shell {
  width: min(1080px, calc(100vw - 48px));
  margin: 0 auto;
}

.legal-intro {
  padding: 120px 0 72px;
}

.legal-intro > p,
.kicker {
  margin: 0 0 18px;
  color: var(--s-accent);
  font-size: 9px;
  font-weight: var(--s-weight-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.legal-intro h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(56px, 8vw, 96px);
  font-weight: var(--s-weight-semibold);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.draft-alert {
  max-width: 720px;
  margin-top: 48px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  border: 1px solid rgba(255, 210, 140, 0.22);
  border-radius: var(--s-radius-sm);
  background: rgba(255, 210, 140, 0.08);
  color: var(--s-amber);
}

.draft-alert strong {
  font-size: 13px;
  font-weight: var(--s-weight-semibold);
}

.draft-alert span {
  color: rgba(255, 210, 140, 0.7);
  font-size: 11px;
  line-height: 1.6;
}

.policy-meta {
  margin-top: 20px !important;
  color: var(--s-text-3) !important;
  font: 9px var(--s-font-mono) !important;
  letter-spacing: 0.04em;
}

.legal-nav {
  position: sticky;
  z-index: 8;
  top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--s-line);
  border-radius: var(--s-radius-sm);
  background: rgba(11, 13, 12, 0.88);
  backdrop-filter: blur(18px);
}

.legal-nav a {
  min-height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--s-line);
  color: var(--s-text-2);
  font-size: 10px;
  font-weight: var(--s-weight-semibold);
  transition:
    color 180ms ease,
    background 180ms ease;
}

.legal-nav a:hover {
  background: var(--s-surface-2);
  color: var(--s-text);
}

.legal-nav a:first-child {
  border-left: 0;
}

.legal-nav span {
  color: var(--s-accent);
  font: 8px var(--s-font-mono);
}

.legal-content {
  padding: 40px 0 120px;
}

.legal-content section {
  scroll-margin-top: 142px;
  padding: 88px 0;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 40px;
  border-bottom: 1px solid var(--s-line);
}

.section-index {
  color: var(--s-accent);
  font: 10px var(--s-font-mono);
}

.legal-content h2 {
  max-width: 760px;
  margin: 0 0 28px;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: var(--s-weight-semibold);
  line-height: 1;
  letter-spacing: -0.055em;
}

.legal-content h3 {
  margin: 38px 0 12px;
  font-size: 20px;
  font-weight: var(--s-weight-semibold);
  letter-spacing: -0.025em;
}

.legal-content p:not(.kicker) {
  max-width: 720px;
  margin: 0 0 18px;
  color: var(--s-text-2);
  font-size: 13px;
  line-height: 1.75;
}

.legal-content strong {
  color: var(--s-text);
  font-weight: var(--s-weight-semibold);
}

.legal-link {
  color: var(--s-accent);
  text-decoration: underline;
  text-decoration-color: rgba(145, 242, 184, 0.35);
  text-underline-offset: 3px;
}

.legal-list {
  max-width: 720px;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.legal-list li {
  position: relative;
  padding-left: 22px;
  color: var(--s-text-2);
  font-size: 13px;
  line-height: 1.65;
}

.legal-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--s-accent);
  font: 10px var(--s-font-mono);
}

.legal-note {
  padding: 18px 20px;
  border: 1px solid var(--s-line);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
}

.identity-grid,
.legal-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.identity-grid {
  margin: 30px 0 42px;
}

.identity-grid > div,
.legal-cards article {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--s-line);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
}

.identity-grid dt {
  margin-bottom: 9px;
  color: var(--s-text-3);
  font-size: 8px;
  font-weight: var(--s-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.identity-grid dd {
  margin: 0;
  color: var(--s-text);
  font-size: 15px;
  font-weight: var(--s-weight-medium);
}

.legal-cards {
  margin-top: 30px;
}

.legal-cards article h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.legal-cards article p {
  margin: 0 !important;
  font-size: 11px !important;
}

.legal-footer {
  min-height: 100px;
  padding: 0 max(24px, calc((100vw - 1080px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--s-line);
  background: var(--s-black);
  color: var(--s-text-3);
  font-size: 10px;
}

.legal-footer a {
  color: var(--s-text);
}

@media (max-width: 680px) {
  .legal-header {
    min-height: 60px;
    padding: 0 14px;
  }

  .wordmark strong {
    font-size: 14px;
  }

  .legal-shell {
    width: calc(100vw - 28px);
  }

  .legal-intro {
    padding: 84px 0 56px;
  }

  .legal-intro h1 {
    font-size: clamp(50px, 15vw, 66px);
  }

  .legal-nav {
    top: 60px;
    grid-template-columns: repeat(2, 1fr);
  }

  .legal-nav a:nth-child(3) {
    border-top: 1px solid var(--s-line);
    border-left: 0;
  }

  .legal-nav a:nth-child(4) {
    border-top: 1px solid var(--s-line);
  }

  .draft-alert,
  .legal-content section {
    grid-template-columns: 1fr;
  }

  .legal-content section {
    gap: 18px;
    padding: 64px 0;
  }

  .identity-grid,
  .legal-cards {
    grid-template-columns: 1fr;
  }

  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
