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

:root {
  color-scheme: dark;
  --ink: #08090b;
  --ink-2: #101216;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-solid: #11141a;
  --text: #f0f2f7;
  --text-soft: #c3cad7;
  --muted: #8f97a7;
  --muted-2: #6d7484;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #8cc4ff;
  --accent-ink: #0b1220;
  --cyan: #56d8f6;
  --green: #45e476;
  --purple: #cc5bd8;
  --danger: #ff5d73;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 16px 50px rgba(0, 0, 0, 0.24);
  --shadow-hard: 0 20px 58px rgba(0, 0, 0, 0.36);
  --page-width: 1120px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 320px), var(--ink);
  color: var(--text);
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body::selection {
  color: var(--accent-ink);
  background: var(--accent);
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

h1,
h2,
h3,
h4,
p,
li {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0;
}

code,
pre {
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
}

main {
  width: min(var(--page-width), calc(100% - 44px));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  width: min(var(--page-width), calc(100% - 44px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(10px);
}

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

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a,
.nav-download,
.button,
.back-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), opacity 180ms var(--ease);
}

.nav-links a {
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-soft);
}

.nav-links a:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.nav-download,
.button-primary {
  color: #f5f9ff;
  background: #203a5a;
  border: 1px solid #2f4f79;
}

.nav-download {
  margin-left: 2px;
  padding: 0 16px;
  border-radius: 10px;
}

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.button-secondary:hover,
.nav-download:hover,
.back-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.tour-island-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.download-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
}

.app-store-badge:hover {
  border-color: var(--line);
}

.app-store-badge img {
  width: 180px;
  height: auto;
}

.mas-download-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.mas-availability-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section {
  padding-top: 86px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.68fr) minmax(0, 1.32fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 24px;
}

.section-heading h2 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.04;
}

.site-footer {
  padding: 36px 0 44px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.site-footer a,
.document-content a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.site-footer a:hover,
.document-content a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

.reveal {
  opacity: 1;
}

.page-document {
  --page-width: 940px;
}

.doc-nav {
  margin-bottom: 30px;
}

.document-shell {
  padding-bottom: 72px;
}

.back-link {
  width: fit-content;
  min-height: 38px;
  margin: 0 0 20px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
}

.document-hero {
  padding: 44px 0 30px;
  border-bottom: 1px solid var(--line);
}

.document-hero h1 {
  max-width: 830px;
  margin: 0;
  font-size: clamp(38px, 6.8vw, 68px);
  line-height: 0.98;
}

.document-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 17px;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.document-content {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding-top: 22px;
}

.document-content section {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.document-content h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.document-content p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

.document-content p:last-child {
  margin-bottom: 0;
}

.document-content ul,
.document-content ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
}

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

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

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

th {
  color: var(--text);
  font-size: 14px;
}

td {
  color: var(--text-soft);
  font-size: 14px;
}

code {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.code {
  max-width: 100%;
  margin: 14px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0c0f15;
  color: var(--text-soft);
  overflow-x: auto;
}

.code code {
  overflow-wrap: normal;
}

.hint {
  color: var(--muted);
  font-size: 14px;
}

.doc-footer {
  margin: 20px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes revealUp {
    from {
      opacity: 0;
      transform: translateY(14px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .reveal {
    opacity: 0;
    transform: translateY(14px);
  }

  .reveal.is-visible {
    animation: revealUp 420ms var(--ease) forwards;
  }
}

@media (max-width: 860px) {
  main,
  .site-nav {
    width: min(var(--page-width), calc(100% - 30px));
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 700px) {
  main,
  .site-nav {
    width: min(var(--page-width), calc(100% - 22px));
  }

  .site-nav {
    min-height: 64px;
    gap: 10px;
  }

  .nav-links {
    display: none;
  }

  .nav-download {
    margin-left: auto;
    padding: 0 13px;
  }

  .button {
    width: 100%;
  }

  .download-group {
    width: 100%;
    display: grid;
  }

  .app-store-badge {
    justify-content: center;
  }

  .mas-download-block {
    align-items: center;
  }

  .mas-availability-note {
    margin-top: 6px;
    text-align: center;
  }

  .download-community-button {
    width: 180px;
    justify-self: center;
  }

  .document-content section {
    padding: 18px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
