@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./inter-latin.woff2") format("woff2");
}

:root,
html[data-theme="light"] {
  color-scheme: light;
  --paper: #FAFAF7;
  --paper-2: #FFFFFF;
  --paper-3: #F1F1EC;
  --ink: #0A2540;
  --ink-soft: #334155;
  --muted: #5B6B82;
  --line: #E3E3DD;
  --line-strong: #D2D2CA;
  --blue: #0057B7;
  --purple: #7C3AED;
  --head-bg: rgba(250, 250, 247, 0.9);
  --shadow: 0 24px 70px rgba(10, 37, 64, 0.07);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0B0B0F;
  --paper-2: #121218;
  --paper-3: #17171F;
  --ink: #F5F5F7;
  --ink-soft: #D7D7DB;
  --muted: #A1A1A6;
  --line: #262630;
  --line-strong: #343440;
  --blue: #A78BFA;
  --purple: #C4B5FD;
  --head-bg: rgba(11, 11, 15, 0.9);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(900px 460px at 10% 0%, rgba(0, 87, 183, 0.045), transparent 68%),
    var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-160%);
}

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

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--head-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.head-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  color: var(--blue);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-text strong {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.2;
}

.brand-text small {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.16em;
  line-height: 1.25;
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.head-nav a {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.head-nav a:hover {
  color: var(--ink);
}

.theme-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-btn:hover {
  border-color: var(--blue);
}

.legal-main {
  padding: clamp(48px, 8vw, 88px) 0 clamp(64px, 9vw, 112px);
}

.legal-doc {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.doc-head {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.doc-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 680;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.doc-updated {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.doc-intro {
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

.legal-doc section {
  margin-top: 38px;
}

.legal-doc h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.legal-doc h3 {
  margin: 24px 0 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal-doc p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.75;
}

.legal-doc ul {
  margin: 10px 0 18px;
  padding-left: 22px;
}

.legal-doc li {
  margin: 8px 0;
  padding-left: 4px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.legal-doc li::marker {
  color: var(--blue);
}

.legal-doc strong {
  color: var(--ink);
  font-weight: 660;
}

.contact-box {
  margin-top: 34px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-3);
}

.contact-box h2 {
  font-size: 16px;
}

.contact-box p {
  margin-bottom: 8px;
}

.contact-box p:last-child {
  margin-bottom: 0;
}

.doc-foot {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.doc-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}

.doc-action:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.site-foot {
  padding: 26px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

.foot-inner a {
  color: var(--muted);
  text-decoration: none;
}

.foot-inner a:hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .wrap {
    width: min(1120px, calc(100% - 28px));
  }

  .head-inner {
    min-height: 66px;
    gap: 12px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-text strong {
    font-size: 10.5px;
  }

  .brand-text small {
    font-size: 7.5px;
  }

  .head-nav {
    gap: 10px;
  }

  .head-nav a:first-child {
    display: none;
  }

  .head-nav a {
    font-size: 11.5px;
  }

  .theme-btn {
    min-height: 36px;
    padding: 0 11px;
    font-size: 11px;
  }

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

  .legal-doc {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .doc-head h1 {
    font-size: clamp(34px, 11vw, 44px);
  }

  .doc-intro {
    font-size: 16px;
  }

  .legal-doc p,
  .legal-doc li {
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .brand-text small {
    display: none;
  }

  .head-nav a {
    display: none;
  }
}

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

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

@media print {
  @page {
    size: A4;
    margin: 18mm;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 10pt;
    line-height: 1.55;
  }

  .skip-link,
  .site-head,
  .site-foot,
  .doc-actions {
    display: none !important;
  }

  .legal-main {
    padding: 0 !important;
  }

  .legal-doc {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
  }

  .doc-head {
    border-bottom-color: #000000 !important;
  }

  .eyebrow,
  .doc-updated,
  .legal-doc p,
  .legal-doc li,
  .doc-foot,
  .contact-box {
    color: #111111 !important;
  }

  .legal-doc h1,
  .legal-doc h2,
  .legal-doc h3,
  .legal-doc strong {
    color: #000000 !important;
  }

  .legal-doc section {
    margin-top: 24px !important;
  }

  .legal-doc h2 {
    font-size: 13pt;
    line-height: 1.25;
  }

  .legal-doc h3 {
    margin-top: 16px;
    font-size: 10.5pt;
  }

  .legal-doc h2,
  .legal-doc h3 {
    break-after: avoid;
  }

  .legal-doc p,
  .legal-doc li {
    font-size: 10pt;
    line-height: 1.55;
  }

  .legal-doc p,
  .legal-doc li {
    orphans: 3;
    widows: 3;
  }

  .contact-box {
    break-inside: avoid;
  }

  a {
    color: #000000 !important;
    text-decoration: none !important;
  }
}
