:root {
  --color-brand-50: #f5f3ff;
  --color-brand-100: #ede9fe;
  --color-brand-500: #8b5cf6;
  --color-brand-600: #7c3aed;
  --color-brand-700: #6d28d9;
  --color-neutral-0: #ffffff;
  --color-neutral-50: #fafafa;
  --color-neutral-100: #f4f4f5;
  --color-neutral-200: #e4e4e7;
  --color-neutral-300: #d4d4d8;
  --color-neutral-400: #a1a1aa;
  --color-neutral-500: #71717a;
  --color-neutral-600: #52525b;
  --color-neutral-700: #3f3f46;
  --color-neutral-900: #18181b;
  --color-neutral-950: #09090b;
  --color-success: #22c55e;
  --color-success-soft: #dcfce7;
  --color-info: #3b82f6;
  --color-info-soft: #dbeafe;
  --surface-page: var(--color-neutral-50);
  --surface-card: var(--color-neutral-0);
  --surface-muted: var(--color-neutral-100);
  --text-primary: var(--color-neutral-950);
  --text-secondary: var(--color-neutral-700);
  --text-tertiary: var(--color-neutral-500);
  --border-subtle: var(--color-neutral-100);
  --border-default: var(--color-neutral-200);
  --border-strong: var(--color-neutral-300);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 48px rgba(24, 24, 27, 0.13);
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background:
    linear-gradient(180deg, rgba(245, 243, 255, 0.92), rgba(250, 250, 250, 0) 360px),
    var(--surface-page);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

button {
  border: 0;
  font: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  line-height: 1;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 14px auto 0;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(228, 228, 231, 0.92);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-lg);
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-copy span {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.1;
}

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

.site-nav a {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--surface-muted);
  color: var(--text-primary);
}

.header-cta {
  height: 36px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-brand-600);
  color: var(--color-neutral-0);
  font-size: 14px;
  font-weight: 700;
  transition: background 150ms ease, transform 100ms ease;
}

.language-switcher {
  position: relative;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    transform 100ms ease;
}

.language-switcher::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(139, 92, 246, 0));
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}

.language-switcher:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.language-switcher:hover::before {
  opacity: 1;
}

.language-switcher:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-xs);
}

.language-switcher:focus-visible {
  outline: none;
  box-shadow:
    var(--shadow-sm),
    0 0 0 3px rgba(124, 58, 237, 0.16);
}

.language-switcher-icon,
.language-switcher-chevron {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition:
    color 150ms ease,
    transform 150ms ease;
}

.language-switcher:hover .language-switcher-icon {
  color: var(--color-brand-600);
  transform: rotate(-8deg) scale(1.05);
}

.language-switcher:hover .language-switcher-chevron {
  transform: translateY(1px);
}

.language-switcher-content {
  position: relative;
  z-index: 1;
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-switcher-flag {
  font-size: 15px;
  line-height: 1;
  transform-origin: center;
}

.language-switcher-text {
  line-height: 1;
  white-space: nowrap;
}

.language-switcher.is-changing {
  pointer-events: none;
}

.language-switcher.is-changing .language-switcher-content {
  animation: language-content-change 260ms ease both;
}

.language-switcher.is-changing .language-switcher-chevron {
  animation: language-chevron-spin 260ms ease both;
}

.language-switcher.is-changing .language-switcher-icon {
  animation: language-icon-pulse 260ms ease both;
}

.header-cta:hover,
.btn-primary:hover,
.copy-button:hover {
  background: var(--color-brand-700);
}

.header-cta:active,
.btn:active,
.copy-button:active {
  transform: translateY(1px);
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--text-secondary);
  cursor: pointer;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 82px);
  padding: 84px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(500px, 1.12fr);
  align-items: center;
  gap: 58px;
}

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

.eyebrow {
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.82);
  color: var(--color-brand-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(54px, 7vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p {
  max-width: 610px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.65;
}

.hero-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}

.btn-primary {
  background: var(--color-brand-600);
  color: var(--color-neutral-0);
}

.btn-secondary {
  border-color: var(--border-default);
  background: var(--surface-card);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
}

.install-card {
  max-width: 680px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.install-card-head {
  min-height: 68px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.install-card-head > .material-symbols-rounded {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-brand-100);
  color: var(--color-brand-700);
  font-size: 21px;
}

.install-card-head strong,
.install-card-head small {
  display: block;
}

.install-card-head strong {
  font-size: 15px;
  font-weight: 800;
}

.install-card-head small {
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.copy-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-brand-600);
  color: var(--color-neutral-0);
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
}

pre {
  margin: 0;
  overflow: auto;
  padding: 16px;
  background: var(--color-neutral-950);
  color: var(--color-neutral-50);
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
}

.hero-visual {
  min-width: 0;
}

.app-window {
  min-height: 590px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  background: var(--surface-card);
  box-shadow: var(--shadow-lg);
}

.window-sidebar {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-right: 1px solid var(--border-default);
  background: #fbfbfc;
}

.sidebar-brand-mini {
  margin-bottom: 14px;
  padding: 0 8px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-brand-mini img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-line {
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.nav-line i {
  color: var(--text-tertiary);
  font-size: 19px;
}

.nav-line.active {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

.nav-line.active i {
  color: var(--color-brand-600);
}

.window-main {
  min-width: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface-page);
}

.window-topbar {
  min-height: 58px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
}

.window-topbar div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.window-topbar strong {
  font-size: 16px;
  font-weight: 800;
}

.window-topbar span {
  color: var(--text-tertiary);
  font-size: 12px;
}

.window-topbar button {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-700));
  color: var(--color-neutral-0);
  font-size: 13px;
  font-weight: 800;
}

.window-topbar button span {
  color: var(--color-neutral-0);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 12px;
}

.metric-card,
.chart-panel,
.doc-card,
.doc-callout,
.not-found-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  box-shadow: var(--shadow-xs);
}

.metric-card {
  min-width: 0;
  min-height: 118px;
  container-type: inline-size;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.metric-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 20px;
}

.metric-icon.purple {
  background: var(--color-brand-100);
  color: var(--color-brand-700);
}

.metric-icon.blue {
  background: var(--color-info-soft);
  color: #2563eb;
}

.metric-icon.green {
  background: var(--color-success-soft);
  color: #16a34a;
}

.metric-card small {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  font-size: clamp(14px, 13.6cqi, 22px);
  line-height: 1.1;
  white-space: nowrap;
}

.chart-panel {
  flex: 1;
  min-height: 260px;
  padding: 18px;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-head strong {
  font-size: 15px;
  font-weight: 800;
}

.chart-head span {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.bars {
  height: 185px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(6, minmax(22px, 1fr));
  align-items: end;
  gap: 14px;
  border-bottom: 1px solid var(--border-default);
  background:
    linear-gradient(to bottom, transparent 0 33%, var(--border-subtle) 33% calc(33% + 1px), transparent calc(33% + 1px) 66%, var(--border-subtle) 66% calc(66% + 1px), transparent calc(66% + 1px));
}

.bars span {
  height: var(--h);
  min-height: 24px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--color-brand-600);
}

.bars span:nth-child(2n) {
  background: var(--color-info);
}

.bars span:nth-child(3n) {
  background: var(--color-success);
}

.bars i {
  flex: 1;
  opacity: 0.2;
  background: #fff;
}

.docs-main {
  padding: 78px 0 64px;
}

.docs-hero {
  max-width: 820px;
  margin-bottom: 28px;
}

.docs-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 0.98;
  letter-spacing: 0;
}

.docs-hero p,
.doc-card p,
.doc-card li,
.doc-callout p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.docs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.doc-card,
.doc-callout {
  padding: 22px;
}

.doc-card h2,
.doc-callout h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.18;
}

.doc-card h3 {
  margin: 20px 0 8px;
  font-size: 17px;
}

.doc-card p,
.doc-callout p {
  margin: 0 0 12px;
}

.doc-card ol,
.doc-card ul {
  margin: 0;
  padding-left: 20px;
}

.doc-card li + li {
  margin-top: 7px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.permission-item strong,
.permission-item span {
  display: block;
}

.permission-item strong {
  font-size: 13px;
  line-height: 1.35;
}

.permission-item span {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.doc-callout {
  background:
    linear-gradient(135deg, rgba(245, 243, 255, 0.9), rgba(255, 255, 255, 0.94)),
    var(--surface-card);
}

.not-found {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-page);
}

.not-found-card {
  width: min(100%, 460px);
  padding: 28px;
  text-align: center;
}

.not-found-card img {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  object-fit: contain;
}

.not-found-card h1 {
  margin: 14px 0 8px;
  font-size: 32px;
  line-height: 1.1;
}

.not-found-card p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes language-content-change {
  0% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }

  45% {
    opacity: 0;
    transform: translateY(-4px);
    filter: blur(2px);
  }

  55% {
    opacity: 0;
    transform: translateY(4px);
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes language-chevron-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(180deg);
  }
}

@keyframes language-icon-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12) rotate(-8deg);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 58px;
  }

  .app-window {
    min-height: 520px;
  }
}

@media (max-width: 780px) {
  .site-header {
    width: min(100% - 24px, 1180px);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 88px;
    right: 12px;
    left: 12px;
    display: none;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    background: var(--surface-card);
    box-shadow: var(--shadow-lg);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    min-height: 42px;
  }

  .header-cta {
    display: none;
  }

  .app-window {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .sidebar-brand-mini span,
  .nav-line {
    font-size: 0;
    justify-content: center;
  }

  .sidebar-brand-mini {
    justify-content: center;
    padding-inline: 0;
  }

  .nav-line i {
    font-size: 21px;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .section {
    width: min(100% - 24px, 1180px);
  }

  .brand-copy span {
    display: none;
  }

  .hero {
    gap: 28px;
    padding-top: 42px;
  }

  .hero h1 {
    font-size: clamp(48px, 17vw, 70px);
  }

  .hero p {
    font-size: 16px;
  }

  .hero-links .btn {
    width: 100%;
  }

  .install-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .copy-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .app-window {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .window-sidebar {
    display: none;
  }

  .window-main {
    padding: 12px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .bars {
    gap: 8px;
  }

  code {
    font-size: 12px;
  }

  .doc-card,
  .doc-callout {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .language-switcher,
  .language-switcher *,
  .language-switcher::before {
    transition: none !important;
    animation: none !important;
  }
}
