:root {
  --brand-50: #eef0fe;
  --brand-100: #e0e2fd;
  --brand-400: #7b74ff;
  --brand-500: #4f46e5;
  --brand-600: #4338ca;
  --brand-700: #3730a3;
  --brand-950: #12102f;
  --violet-500: #7c3aed;
  --n0: #ffffff;
  --n50: #fcfbfe;
  --n100: #f5f3fa;
  --n200: #e7e2f1;
  --n500: #847c98;
  --n600: #5f5872;
  --n700: #3d3750;
  --n800: #201a2e;
  --n850: #171321;
  --n900: #0f0d16;
  --bg: var(--n50);
  --bg-raised: var(--n0);
  --bg-muted: var(--n100);
  --text-strong: #191426;
  --text-medium: #5f5872;
  --text-weak: #847c98;
  --border: #e7e2f1;
  --brand: var(--brand-500);
  --on-brand: #ffffff;
  --focus: #c9811e;
  --maxw: 1120px;
  --reading: 760px;
  --font-display: "Rubik", "Assistant", system-ui, sans-serif;
  --font-body: "Assistant", "Rubik", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--n900);
    --bg-raised: var(--n850);
    --bg-muted: var(--n800);
    --text-strong: #f4f1fa;
    --text-medium: #b9b2ca;
    --text-weak: #9b93ad;
    --border: #2e2740;
    --brand: var(--brand-400);
    --on-brand: #0f0d16;
    --focus: #f0a43a;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-strong);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--text-strong);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
}

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

.wrap {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.3) blur(12px);
}

.site-nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.glyph {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--brand-500), var(--violet-500));
  color: #ffffff;
  font-weight: 700;
}

.nav-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-links a,
.footer-links a {
  color: var(--text-medium);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.footer-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-strong);
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.legal-hero {
  padding: 68px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 850px;
}

.eyebrow {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-display);
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 14ch;
  margin-top: 12px;
  font-size: clamp(40px, 7vw, 64px);
}

.legal-intro {
  max-width: 65ch;
  margin-top: 20px;
  color: var(--text-medium);
  font-size: 20px;
}

.effective-date {
  display: inline-block;
  margin-top: 24px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-raised);
  color: var(--text-medium);
  font-size: 14px;
  font-weight: 600;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, var(--reading));
  gap: 64px;
  align-items: start;
  padding: 48px 0 80px;
}

.contents {
  position: sticky;
  top: 96px;
  padding-top: 4px;
}

.contents h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contents ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.contents li + li {
  margin-top: 8px;
}

.contents a {
  display: block;
  padding: 4px 0;
  color: var(--text-medium);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

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

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

.legal-section {
  padding: 0 0 40px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 96px;
}

.legal-section + .legal-section {
  padding-top: 40px;
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  font-size: clamp(24px, 4vw, 32px);
}

.legal-section h3 {
  margin-top: 26px;
  font-size: 19px;
}

.legal-section p,
.legal-section ul {
  margin: 16px 0 0;
  color: var(--text-medium);
}

.legal-section ul {
  padding-left: 22px;
}

.legal-section li + li {
  margin-top: 10px;
}

.legal-section strong {
  color: var(--text-strong);
}

.legal-section a {
  color: var(--brand);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.boundary-list {
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.boundary-row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.boundary-row dt {
  color: var(--text-strong);
  font-weight: 700;
}

.boundary-row dd {
  margin: 0;
  color: var(--text-medium);
}

.notice {
  margin-top: 24px;
  padding: 20px 22px;
  border-left: 4px solid var(--brand);
  background: var(--bg-muted);
}

.notice p {
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 42px;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-main .brand {
  font-size: 17px;
}

.copyright,
.footer-note {
  color: var(--text-weak);
  font-size: 14px;
}

.footer-note {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 13px;
}

@media (max-width: 820px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contents {
    position: static;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }

  .contents ol {
    columns: 2;
    column-gap: 28px;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 32px, var(--maxw));
  }

  .site-nav {
    align-items: flex-start;
    padding: 15px 0;
  }

  .nav-links {
    gap: 14px;
    justify-content: flex-end;
  }

  .nav-links a {
    font-size: 14px;
  }

  .legal-hero {
    padding: 48px 0 36px;
  }

  .legal-intro {
    font-size: 18px;
  }

  .legal-layout {
    padding-top: 36px;
  }

  .contents ol {
    columns: 1;
  }

  .boundary-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

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

@media (forced-colors: active) {
  .glyph,
  .notice {
    border: 1px solid CanvasText;
  }
}
