:root {
  color-scheme: light dark;
  --ink: #121522;
  --navy: #0b1030;
  --blue: #1f5fe0;
  --blue-soft: #edf3ff;
  --cyan: #3ec6f8;
  --paper: #f6f7fa;
  --surface: #ffffff;
  --surface-muted: #f2f5fa;
  --text: #1b2033;
  --muted: #5b6481;
  --faint: #898fa2;
  --line: #dfe3eb;
  --header: rgba(246, 247, 250, 0.92);
  --shadow: 0 18px 50px rgba(28, 39, 68, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f6fb;
    --paper: #080b18;
    --surface: #11162a;
    --surface-muted: #171d34;
    --text: #e9edf7;
    --muted: #a6b0c9;
    --faint: #75809d;
    --line: rgba(255, 255, 255, 0.11);
    --header: rgba(8, 11, 24, 0.9);
    --blue: #78c7ff;
    --blue-soft: rgba(85, 177, 255, 0.12);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

a {
  color: var(--blue);
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid rgba(31, 95, 224, 0.4);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  background: var(--navy);
  border-radius: 9px;
  transform: translateY(-150%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(145%);
}

.site-header-inner {
  display: flex;
  width: min(100% - 48px, 1180px);
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 550;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--blue);
}

.header-download {
  padding: 9px 14px;
  color: #fff !important;
  background: #2365d8;
  border-radius: 9px;
}

.header-download:hover {
  background: #1b55c1;
}

.page-shell {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
}

.document-hero {
  margin-top: 32px;
  padding: clamp(42px, 6vw, 70px);
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 82% 18%, rgba(151, 221, 255, 0.3), transparent 30rem),
    linear-gradient(145deg, #327fe8 0%, #2365d8 64%, #1b55c1 100%);
  background-size: 40px 40px, 40px 40px, auto, auto;
  border-radius: 26px;
}

.guide-header {
  max-width: 800px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(2.7rem, 5.5vw, 4.7rem);
  font-weight: 720;
  letter-spacing: -0.057em;
  line-height: 1;
  text-wrap: balance;
}

.lede {
  max-width: 720px;
  margin: 0;
  color: #e1eeff;
  font-size: clamp(1.04rem, 1.6vw, 1.18rem);
  line-height: 1.7;
}

.document-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding-top: 20px;
  color: #8894b1;
  font-size: 0.78rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.document-meta a {
  color: #b6eaff;
  text-decoration: none;
}

.guide-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  align-items: start;
  gap: 34px;
  margin: 36px 0 82px;
}

nav.contents {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 120px);
  padding: 22px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}

nav.contents ol {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav.contents a {
  display: block;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 6px;
}

nav.contents a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.guide-content {
  min-width: 0;
  padding: clamp(30px, 5vw, 58px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.guide-content h2 {
  margin: 58px 0 16px;
  padding-top: 22px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.7vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  border-top: 1px solid var(--line);
  text-wrap: balance;
}

.guide-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.guide-content h3 {
  margin: 34px 0 10px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 680;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.guide-content h4 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  text-wrap: balance;
}

.guide-content code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.guide-content pre {
  margin: 8px 0 12px;
  padding: 12px 14px;
  overflow-x: auto;
  color: var(--ink);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.5;
}

.guide-content li ul {
  margin: 6px 0 4px;
}

.guide-content p,
.guide-content li {
  color: var(--text);
}

.guide-content p {
  margin: 0 0 15px;
}

.guide-content ul,
.guide-content ol {
  margin: 0 0 20px;
  padding-left: 1.35rem;
}

.guide-content li {
  margin-bottom: 7px;
  padding-left: 3px;
}

.guide-content li::marker {
  color: var(--blue);
}

.guide-content strong {
  color: var(--ink);
  font-weight: 650;
}

.guide-content a {
  text-underline-offset: 3px;
}

.note {
  margin: 20px 0;
  padding: 16px 18px;
  color: var(--text);
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
}

table {
  width: 100%;
  margin: 18px 0 24px;
  overflow: hidden;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

th,
td {
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--surface-muted);
}

td {
  font-size: 0.9rem;
}

kbd {
  padding: 1px 6px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9em;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.site-footer {
  padding: 44px 0;
  color: #adb6cc;
  background: #080b1b;
}

.site-footer-inner {
  display: grid;
  width: min(100% - 48px, 1180px);
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 34px 60px;
  margin: 0 auto;
}

.site-footer .brand {
  color: #fff;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand .footer-tagline {
  margin: 4px 0 0;
  color: #7884a1;
  font-size: 0.83rem;
  line-height: 1.4;
}

.footer-brand p {
  max-width: 330px;
  margin: 14px 0 0;
  color: #7884a1;
  font-size: 0.83rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 24px;
  font-size: 0.85rem;
}

.footer-links a {
  color: #c3cbdd;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: -5px 0;
  border-radius: 8px;
}

.footer-icon:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.footer-legal {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  padding-top: 22px;
  color: #5f6b87;
  font-size: 0.73rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  nav.contents {
    position: static;
    max-height: none;
  }

  nav.contents ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 72px;
  }

  .site-header-inner,
  .page-shell,
  .site-footer-inner {
    width: min(100% - 32px, 1180px);
  }

  .site-header-inner {
    min-height: 62px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .site-nav {
    width: 100%;
    gap: 6px 16px;
    padding-top: 3px;
    overflow-x: auto;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .header-download {
    padding: 6px 10px;
  }

  .document-hero {
    margin-top: 18px;
    padding: 36px 24px 28px;
    border-radius: 18px;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }

  .document-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-top: 28px;
  }

  .guide-layout {
    gap: 18px;
    margin: 18px 0 58px;
  }

  nav.contents {
    padding: 16px;
    border-radius: 13px;
  }

  nav.contents ol {
    grid-template-columns: 1fr;
  }

  .guide-content {
    padding: 26px 20px;
    border-radius: 16px;
  }

  .guide-content h2 {
    margin-top: 42px;
    font-size: 1.5rem;
  }

  .guide-content h3 {
    margin-top: 28px;
  }

  table {
    display: block;
    overflow-x: auto;
  }

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

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-legal {
    grid-column: auto;
  }
}

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

/* FAQ page */
.faq-page details {
  border-top: 1px solid var(--line);
}

.faq-page details:first-child {
  border-top: 0;
}

.faq-page summary {
  position: relative;
  padding: 23px 42px 23px 0;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 660;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq-page summary::-webkit-details-marker {
  display: none;
}

.faq-page summary::after {
  position: absolute;
  top: 20px;
  right: 7px;
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 400;
  content: "+";
  transition: transform 160ms ease;
}

.faq-page details[open] summary::after {
  transform: rotate(45deg);
}

.faq-page details p {
  max-width: 730px;
  margin: -3px 42px 24px 0;
  color: var(--muted);
}

.faq-page details p:last-child {
  margin-bottom: 24px;
}

/* Long-form policy */
.policy-page > p:first-of-type {
  color: var(--muted);
  font-size: 1.04rem;
}

@media (prefers-reduced-motion: reduce) {
  .faq-page summary::after {
    transition: none;
  }
}

.guide-header a {
  color: #b8eaff;
  text-decoration-color: rgba(184, 234, 255, 0.5);
}
