:root {
  color-scheme: dark;
  --bg: #101316;
  --panel: #191e23;
  --panel-soft: #151a1f;
  --line: #34404a;
  --text: #f3f7f8;
  --muted: #a9b3bd;
  --teal: #21b6a8;
  /* Brighter teal reserved for text-on-dark uses (eyebrow, inline
     links) where the button-fill teal falls below 4.5:1. */
  --teal-text: #5be0d0;
  --blue: #5c6af2;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(33, 182, 168, 0.14), transparent 34rem),
    radial-gradient(circle at 82% 10%, rgba(92, 106, 242, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(33, 182, 168, 0.24);
}

a {
  color: inherit;
}

a,
.button,
.copy-button {
  touch-action: manipulation;
}

a:focus-visible,
.button:focus-visible,
.copy-button:focus-visible {
  border-radius: 7px;
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  background: var(--teal);
  border-radius: 7px;
  color: #062b32;
  font-weight: 700;
  left: 16px;
  padding: 10px 14px;
  position: absolute;
  text-decoration: none;
  top: 14px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
  z-index: 10;
}

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

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

.nav {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  height: 38px;
  place-items: center;
  width: 38px;
}

.brand-mark img {
  display: block;
  height: 38px;
  width: 38px;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 8px;
}

.nav-links a {
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 10px;
  text-decoration: none;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-links a[aria-current="page"] {
  background: rgba(33, 182, 168, 0.12);
  color: var(--text);
}

#install,
#features,
.doc-section {
  /* Anchor jumps land below the nav with breathing room. */
  scroll-margin-top: 80px;
}

.hero {
  padding: 56px 0 52px;
}

.hero.compact {
  padding-bottom: 28px;
}

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

.eyebrow {
  color: var(--teal-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(52px, 9vw, 88px);
  letter-spacing: 0;
  line-height: 0.92;
  margin: 0 0 22px;
  text-wrap: balance;
}

.hero-copy {
  color: #c9d2da;
  font-size: 21px;
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 680px;
}

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

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
  transition:
    filter 180ms ease,
    transform 120ms ease,
    box-shadow 180ms ease;
}

.button.primary {
  background: var(--teal);
  color: #062b32;
}

.button.secondary {
  border-color: var(--line);
  color: var(--text);
}

.button:hover {
  filter: brightness(1.06);
}

.button:active {
  transform: translateY(1px);
}

.button.primary:focus-visible {
  /* The shared focus outline is teal-on-teal against this fill, so
     swap the outline to high-contrast white and add an inner ring
     for double-indicator visibility. */
  outline-color: var(--text);
  box-shadow: inset 0 0 0 2px #062b32;
}

.install {
  margin-top: 22px;
  max-width: 760px;
}

.command,
.terminal {
  background: #080b0d;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  scrollbar-width: thin;
}

.command {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.terminal {
  margin-top: 16px;
  overflow-x: auto;
}

code {
  color: #d7f8f4;
  font-family:
    "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.command code,
.terminal code {
  display: block;
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
}

.command .mobile-command {
  display: none;
}

.copy-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
  width: 44px;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.copy-button svg {
  height: 18px;
  width: 18px;
}

.copy-button .check-icon {
  display: none;
}

.copy-button.is-copied {
  border-color: rgba(33, 182, 168, 0.75);
  color: var(--teal);
}

.copy-button.is-copied .copy-icon {
  display: none;
}

.copy-button.is-copied .check-icon {
  display: block;
}

.copy-status {
  /* Standard sr-only pattern — keeps the live region announcable
     without leaving a 1×1 element that can break sticky layouts. */
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.section {
  padding: 44px 0;
}

.section h2,
.doc-section h2 {
  font-size: 34px;
  letter-spacing: 0;
  margin: 0 0 22px;
  text-wrap: balance;
}

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

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 22px;
}

.card strong,
.card h3 {
  display: block;
  font-size: 18px;
  margin: 0 0 9px;
}

.card h3 {
  font-size: 22px;
}

.card p,
.doc-section p {
  color: var(--muted);
  line-height: 1.6;
}

.doc-section p {
  /* Cap measure for readability on wide viewports. */
  max-width: 70ch;
}

.card p {
  margin: 0;
}

.card-action {
  margin-top: 16px !important;
}

.card-action a,
.inline-link {
  color: var(--teal-text);
  font-weight: 700;
}

.card-action a {
  border-radius: 6px;
  display: inline-flex;
  padding: 6px 0;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.compact-list {
  color: var(--muted);
  line-height: 1.55;
  margin: 14px 0 0;
  padding-left: 18px;
}

.doc-layout {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) 230px;
  padding-bottom: 56px;
}

.doc-main {
  min-width: 0;
}

.doc-nav {
  align-self: start;
  background: rgba(25, 30, 35, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 18px;
}

.doc-nav strong {
  display: block;
  margin-bottom: 8px;
}

.doc-nav a {
  border-radius: 6px;
  color: var(--muted);
  display: block;
  padding: 7px 8px;
  text-decoration: none;
}

.doc-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.doc-section {
  margin-bottom: 44px;
}

.doc-section h2 {
  margin-bottom: 12px;
}

.doc-section h3 {
  font-size: 22px;
  margin: 24px 0 10px;
}

.doc-section + .doc-section {
  border-top: 1px solid rgba(52, 64, 74, 0.45);
  padding-top: 38px;
}

.code-panel {
  background: #080b0d;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0;
  max-width: 100%;
  overflow: hidden;
}

.code-panel-header {
  align-items: center;
  border-bottom: 1px solid rgba(52, 64, 74, 0.82);
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px 0 15px;
}

.code-panel pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 15px 16px;
  scrollbar-width: thin;
}

.code-panel code {
  white-space: pre;
}

.data-table {
  border-collapse: collapse;
  color: var(--muted);
  margin: 16px 0;
  width: 100%;
}

.data-table th,
.data-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

.data-table th {
  background: var(--panel-soft);
  color: var(--text);
}

.data-table code {
  white-space: nowrap;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 28px 0 42px;
}

footer .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

footer a {
  color: #cbd5dd;
}

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

  .doc-nav {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .nav-links a {
    /* Bump mobile hit area to WCAG 2.5.5 minimum. */
    min-height: 44px;
    padding: 11px 12px;
    display: inline-flex;
    align-items: center;
  }

  .hero {
    padding: 36px 0 42px;
  }

  .hero.compact {
    padding-bottom: 18px;
  }

  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  footer .shell {
    flex-direction: column;
  }

  .code-panel code,
  .terminal code {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  .data-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    table-layout: fixed;
    width: 100%;
  }

  .data-table th,
  .data-table td {
    overflow-wrap: anywhere;
  }

  .data-table code {
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 20px, 1040px);
  }

  /* h1 size handled by the clamp at the top-level rule — no need
     to override at this breakpoint. */

  .section h2,
  .doc-section h2 {
    font-size: 30px;
  }

  .hero-copy {
    font-size: 18px;
  }

  .doc-section {
    margin-bottom: 36px;
  }

  .doc-section + .doc-section {
    padding-top: 30px;
  }

  .command .desktop-command {
    display: none;
  }

  .command .mobile-command {
    display: block;
    grid-column: 1 / -1;
    white-space: normal;
  }

  .command .copy-button {
    grid-column: 1 / -1;
    justify-self: end;
  }

}

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

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

  .button:active {
    transform: none;
  }
}
