@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=Onest:wght@400;500;600;700&display=swap");

:root {
  --bg: #ffffff;
  --ink: #151515;
  --brand: #074aab;
  --brand-hover: #063f92;
  --muted: rgba(21, 21, 21, 0.62);
  --border: rgba(21, 21, 21, 0.12);
  --border-strong: rgba(21, 21, 21, 0.2);
  --surface: rgba(255, 255, 255, 0.86);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.42) 100%);
  --shadow: 0 18px 45px rgba(21, 21, 21, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", "Segoe UI", sans-serif;
}

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

.legal-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 40px 56px;
}

.legal-topbar {
  position: sticky;
  top: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(28px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding-left: 6px;
}

.brand-logo {
  width: 38px;
  height: 33px;
  object-fit: contain;
  flex-shrink: 0;
}

.legal-menu {
  display: none;
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
  background: rgba(7, 74, 171, 0.08);
}

.nav-link--primary {
  background: var(--brand);
  color: #ffffff;
}

.nav-link--primary:hover {
  background: var(--brand-hover);
  color: #ffffff;
}

.legal-main {
  padding-top: 56px;
}

.legal-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 40px;
}

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.legal-hero h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1;
  font-weight: 400;
}

.lead {
  margin: 0;
  max-width: 760px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: rgba(7, 74, 171, 0.2);
  color: var(--brand);
}

.legal-card {
  border: 1px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(21, 21, 21, 0.05);
}

.content {
  padding: 30px;
}

.legal-text {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 900px) {
  .legal-shell {
    padding: 16px 20px 40px;
  }

  .legal-topbar {
    border-radius: 28px;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .legal-nav {
    justify-content: flex-start;
  }

  .legal-main {
    padding-top: 40px;
  }

  .content {
    padding: 22px 20px;
  }
}

@media (max-width: 640px) {
  .legal-shell {
    padding: 12px 12px 28px;
  }

  .legal-topbar {
    top: 12px;
    padding: 12px 14px;
    border-radius: 22px;
    flex-direction: row;
    align-items: center;
  }

  .brand {
    padding-left: 2px;
  }

  .brand-logo {
    width: 34px;
    height: 30px;
  }

  .legal-nav {
    display: none;
  }

  .legal-menu {
    display: block;
    position: relative;
    margin-left: auto;
  }

  .legal-menu summary {
    list-style: none;
  }

  .legal-menu summary::-webkit-details-marker {
    display: none;
  }

  .legal-menu__button {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(7, 74, 171, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .legal-menu__button span {
    position: absolute;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .legal-menu__button span:nth-child(1) {
    transform: translateY(-5px);
  }

  .legal-menu__button span:nth-child(3) {
    transform: translateY(5px);
  }

  .legal-menu[open] .legal-menu__button span:nth-child(1) {
    transform: rotate(45deg);
  }

  .legal-menu[open] .legal-menu__button span:nth-child(2) {
    opacity: 0;
  }

  .legal-menu[open] .legal-menu__button span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .legal-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(21, 21, 21, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .legal-menu__link {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
  }

  .legal-menu__link.is-active {
    color: var(--brand);
    background: rgba(7, 74, 171, 0.08);
  }

  .legal-menu__link--primary {
    background: var(--brand);
    color: #ffffff;
  }

  .legal-hero {
    gap: 16px;
    align-items: center;
    text-align: center;
  }

  .eyebrow {
    text-align: center;
  }

  .legal-hero h1 {
    max-width: none;
    font-size: 30px;
    line-height: 1.04;
    text-align: center;
  }

  .legal-actions {
    justify-content: center;
  }

  .legal-text {
    font-size: 12px;
    line-height: 1.58;
  }

  .legal-card {
    border-radius: 24px;
  }

  .content {
    padding: 18px 14px;
  }
}
