/* ---------------------------------------------------------------------------
   Denote website — shared stylesheet.
   Used by the landing page (index.html) and the docs site (added in B3).

   Color tokens are ported verbatim from the app's dark theme in
   `src/renderer/src/globals.css`. The website renders in dark mode only.

   Body sits on --surface-raised (the app's canonical "working canvas" tone)
   rather than --background (near-black), so there is visible dark color
   instead of a flat black sheet.

   Type scale is intentionally larger than the in-app policy: the app's
   typography is tuned for a dense product UI; the marketing surface needs
   bigger type to read. Iterate later if needed.
   --------------------------------------------------------------------------- */

/* ---------- Tokens (ported from globals.css `.dark`) ---------- */

:root {
  --background: 222 16% 4%;
  --foreground: 210 20% 98%;
  --card: 222 14% 12%;
  --card-foreground: 210 20% 98%;
  --muted: 222 12% 16%;
  --muted-foreground: 215 20% 65%;
  --border: 222 12% 18%;
  --input: 222 12% 22%;
  --ring: 217 91% 60%;
  --surface: 222 14% 7%;
  --surface-raised: 222 13% 10%;
  --separator: 222 14% 11%;
  --accent-blue: 217 91% 60%;
  --accent-blue-foreground: 213 94% 68%;
  --code-keyword: 264 70% 72%;
  --code-string: 32 85% 70%;
  --code-function: 168 55% 62%;

  --gray-1: 214 32% 91%;
  --gray-2: 213 23% 75%;
  --gray-3: 215 20% 65%;
  --gray-4: 215 16% 47%;
  --gray-5: 215 19% 35%;
  --gray-6: 215 25% 27%;
  --gray-7: 217 33% 17%;

  --max-prose: 600px;
  --max-content: 1280px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Reset (minimal) ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: hsl(var(--surface-raised));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: hsl(var(--accent-blue-foreground));
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Layout shells ---------- */

.shell {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 32px;
}

.shell-prose {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Top bar (uses .shell for max-width + edge alignment) ---------- */

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-logo {
  height: 24px;
  width: auto;
  display: block;
}

.topbar-nav {
  display: flex;
  gap: 12px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--gray-2));
  background: transparent;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.icon-button:hover {
  background: hsl(var(--card));
  border-color: hsl(var(--gray-6));
  color: hsl(var(--gray-1));
  text-decoration: none;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Hero (two-column) ---------- */

.hero {
  padding-top: 80px;
  padding-bottom: 152px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}

.hero-text {
  max-width: 560px;
}

.hero-tagline {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: hsl(var(--foreground));
}

.hero-subhead {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  color: hsl(var(--gray-3));
  margin: 0 0 40px;
}

.hero-media {
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--gray-4));
  font-family: var(--font-mono);
  font-size: 14px;
}

.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- CTA button (shared) ---------- */

.cta-button {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: hsl(var(--background));
  background: hsl(var(--gray-1));
  border: 1px solid hsl(var(--gray-1));
  border-radius: 6px;
  padding: 10px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.cta-button:hover {
  background: hsl(var(--foreground));
  border-color: hsl(var(--foreground));
  color: hsl(var(--background));
  text-decoration: none;
}

.cta-button:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ---------- Section primitives ---------- */

.section {
  padding-top: 152px;
  padding-bottom: 152px;
}

.section-tight {
  padding-top: 104px;
  padding-bottom: 104px;
}

.section-heading {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: hsl(var(--foreground));
}

.section-heading-centered {
  text-align: center;
}

.section-description {
  font-size: 18px;
  line-height: 1.55;
  color: hsl(var(--gray-3));
  margin: 0 0 56px;
  max-width: 720px;
}

/* ---------- Pitch (standalone section, two-column) ---------- */

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

.pitch {
  font-size: 18px;
  line-height: 1.55;
  color: hsl(var(--gray-3));
  margin: 0;
  max-width: 520px;
}

.pitch-lede {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.pitch-illustration {
  aspect-ratio: 4 / 3;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--gray-4));
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 0;
}

.pitch-illustration img,
.pitch-illustration svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
  row-gap: 64px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-thumb {
  aspect-ratio: 16 / 10;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--gray-4));
  font-family: var(--font-mono);
  font-size: 13px;
}

.feature-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px;
  color: hsl(var(--foreground));
}

.feature-body {
  font-size: 16px;
  line-height: 1.55;
  color: hsl(var(--gray-3));
  margin: 0;
}

/* ---------- Pairs-with-Claude-Code section ---------- */

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

.pairs-body {
  max-width: 520px;
}

.pairs-body p {
  margin: 0 0 18px;
  color: hsl(var(--gray-2));
  font-size: 17px;
  line-height: 1.65;
}

.pairs-body p:last-of-type {
  margin-bottom: 0;
}

.pairs-screenshot {
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--gray-4));
  font-family: var(--font-mono);
  font-size: 14px;
  margin: 0;
}

.pairs-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Closing CTA ---------- */

.closing {
  text-align: center;
}

.closing .section-heading {
  margin-bottom: 32px;
}

.closing-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid hsl(var(--border));
  padding: 24px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: hsl(var(--gray-4));
}

.footer-row a {
  color: hsl(var(--gray-3));
  text-decoration: none;
}

.footer-row a:hover {
  color: hsl(var(--gray-1));
}

/* ---------- Request-access modal ---------- */

.access-modal {
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  padding: 0;
  max-width: 460px;
  width: calc(100% - 48px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);

  /* Subtle open/close transition. allow-discrete keeps the dialog mounted
     long enough for the fade-out to play before display: none kicks in. */
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    overlay 180ms ease allow-discrete,
    display 180ms ease allow-discrete;
}

.access-modal[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .access-modal[open] {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.access-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition:
    opacity 180ms ease,
    overlay 180ms ease allow-discrete,
    display 180ms ease allow-discrete;
}

.access-modal[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .access-modal[open]::backdrop {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-modal,
  .access-modal::backdrop {
    transition: none;
  }
  .access-modal {
    transform: none;
  }
}

.access-modal-content {
  padding: 32px;
}

.access-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: hsl(var(--gray-3));
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.access-modal-close:hover {
  background: hsl(var(--surface-raised));
  color: hsl(var(--foreground));
}

.access-modal-close:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.access-modal-heading {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 8px;
  color: hsl(var(--foreground));
}

.access-modal-lead {
  font-size: 15px;
  color: hsl(var(--gray-3));
  margin: 0 0 20px;
}

.access-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.access-form input {
  font-family: inherit;
  font-size: 15px;
  color: hsl(var(--foreground));
  background: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 120ms ease;
  width: 100%;
}

.access-form input::placeholder {
  color: hsl(var(--gray-4));
}

.access-form input:focus {
  border-color: hsl(var(--ring));
}

.access-form button[type='submit'] {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: hsl(var(--background));
  background: hsl(var(--gray-1));
  border: 1px solid hsl(var(--gray-1));
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  margin-top: 4px;
}

.access-form button[type='submit']:hover {
  background: hsl(var(--foreground));
  border-color: hsl(var(--foreground));
}

.access-form button[type='submit']:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.access-form-success {
  font-size: 15px;
  color: hsl(var(--gray-2));
  padding: 8px 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .shell,
  .shell-prose {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 64px;
    padding-bottom: 104px;
    gap: 48px;
  }

  .hero-tagline {
    font-size: 40px;
  }

  .hero-subhead {
    font-size: 19px;
    margin-bottom: 32px;
  }

  .pairs-grid,
  .pitch-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section {
    padding-top: 104px;
    padding-bottom: 104px;
  }

  .section-tight {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-heading {
    font-size: 26px;
  }

  .section-description {
    font-size: 16px;
    margin-bottom: 48px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .feature-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .shell,
  .shell-prose {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-tagline {
    font-size: 34px;
  }
}

/* ===========================================================================
   Docs shell
   Two-column reading surface: sidebar (240px) + content (max ~720px prose).
   Topbar is three-zone (logo | Documentation pill | search). Mobile collapses
   the sidebar into a <dialog> drawer opened by a hamburger button.
   =========================================================================== */

.docs-body {
  background: hsl(var(--surface-raised));
}

.docs-skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  z-index: 10;
}

.docs-skip-link:focus {
  top: 8px;
}

/* ---------- Docs topbar ---------- */

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: hsl(var(--surface-raised) / 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid hsl(var(--separator));
}

.docs-topbar-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.docs-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.docs-topbar-logo {
  display: inline-flex;
}

.docs-topbar-logo img {
  height: 24px;
  width: auto;
  display: block;
}

.docs-breadcrumb-sep {
  color: hsl(var(--gray-5));
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  user-select: none;
}

.docs-breadcrumb-link {
  color: hsl(var(--gray-2));
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0.005em;
}

.docs-breadcrumb-link:hover {
  color: hsl(var(--foreground));
  text-decoration: none;
}

.docs-breadcrumb-link:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  border-radius: 3px;
}

.docs-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.docs-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 220px;
  max-width: 100%;
  padding: 0 10px 0 32px;
  background: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  height: 34px;
  color: hsl(var(--gray-3));
  cursor: not-allowed;
  transition: border-color 120ms ease;
}

.docs-search:focus-within {
  border-color: hsl(var(--ring));
}

.docs-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: hsl(var(--gray-4));
  pointer-events: none;
}

.docs-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: hsl(var(--foreground));
  padding: 0;
  cursor: inherit;
}

.docs-search input::placeholder {
  color: hsl(var(--gray-4));
}

.docs-search-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: hsl(var(--gray-4));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1;
}

.docs-search-mobile {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  color: hsl(var(--gray-3));
  cursor: not-allowed;
}

.docs-search-mobile svg {
  width: 16px;
  height: 16px;
}

.docs-mobile-nav {
  display: none;
}

.docs-hamburger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  color: hsl(var(--gray-2));
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.docs-hamburger:hover {
  background: hsl(var(--card));
  color: hsl(var(--gray-1));
}

.docs-hamburger:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.docs-hamburger svg {
  width: 16px;
  height: 16px;
}

/* ---------- Docs layout ---------- */

.docs-layout {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 32px 24px 48px 0;
  border-right: 1px solid hsl(var(--separator));
  align-self: stretch;
}

.docs-sidebar-section {
  margin-bottom: 36px;
}

.docs-sidebar-section:last-child {
  margin-bottom: 0;
}

.docs-sidebar-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: hsl(var(--gray-4));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  padding: 0 10px;
}

.docs-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-sidebar-link {
  display: block;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: hsl(var(--gray-3));
  text-decoration: none;
  border-radius: 6px;
  transition: background 120ms ease, color 120ms ease;
}

.docs-sidebar-link:hover {
  background: hsl(var(--muted));
  color: hsl(var(--gray-1));
  text-decoration: none;
}

.docs-sidebar-link:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.docs-sidebar-link[aria-current='page'] {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-weight: 500;
}

/* ---------- Docs content ---------- */

.docs-content {
  padding: 56px 0 96px 64px;
  min-width: 0;
}

.docs-page-title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  color: hsl(var(--foreground));
}

/* Prose: scoped to rendered markdown body only. */

.prose {
  max-width: 660px;
  font-size: 17px;
  line-height: 1.7;
  color: hsl(var(--gray-2));
}

.prose h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: hsl(var(--foreground));
  margin: 48px 0 16px;
}

.prose h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: hsl(var(--foreground));
  margin: 32px 0 12px;
}

.prose h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: hsl(var(--foreground));
  margin: 24px 0 8px;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin: 0 0 20px;
}

.prose ul,
.prose ol {
  padding-left: 24px;
}

.prose li {
  margin: 4px 0;
}

.prose li > ul,
.prose li > ol {
  margin: 4px 0;
}

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

.prose a:hover {
  color: hsl(var(--accent-blue-foreground));
  text-decoration: none;
}

.prose strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: hsl(var(--muted));
  color: hsl(var(--gray-1));
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 500;
}

.prose pre {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: scroll;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: hsl(var(--code-string));
}

.prose pre::-webkit-scrollbar {
  height: 10px;
}

.prose pre::-webkit-scrollbar-track {
  background: hsl(var(--muted));
  border-radius: 8px;
}

.prose pre::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 8px;
}

.prose pre::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--gray-4));
}

.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: 400;
}

.prose blockquote {
  border-left: 2px solid hsl(var(--border));
  padding-left: 16px;
  color: hsl(var(--gray-3));
  font-style: normal;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid hsl(var(--separator));
  margin: 48px 0;
}

.prose table {
  width: 100%;
  margin: 0 0 24px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

.prose thead th {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border));
}

.prose thead th + th {
  border-left: 1px solid hsl(var(--border));
}

.prose tbody td {
  text-align: left;
  padding: 10px 14px;
  vertical-align: top;
  border-bottom: 1px solid hsl(var(--border));
}

.prose tbody td + td {
  border-left: 1px solid hsl(var(--border));
}

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

.prose img {
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  margin: 24px 0;
}

/* ---------- Prism syntax highlighting ---------- */

.prose pre .token.comment,
.prose pre .token.prolog,
.prose pre .token.doctype,
.prose pre .token.cdata {
  color: hsl(var(--gray-5));
  font-style: italic;
}

.prose pre .token.punctuation {
  color: hsl(var(--gray-3));
}

.prose pre .token.property,
.prose pre .token.tag,
.prose pre .token.boolean,
.prose pre .token.number,
.prose pre .token.constant,
.prose pre .token.symbol,
.prose pre .token.deleted {
  color: hsl(var(--accent-blue-foreground));
}

.prose pre .token.selector,
.prose pre .token.string,
.prose pre .token.char,
.prose pre .token.builtin,
.prose pre .token.inserted,
.prose pre .token.regex {
  color: hsl(var(--code-string));
}

.prose pre .token.attr-name {
  color: hsl(var(--code-function));
}

.prose pre .token.operator,
.prose pre .token.entity,
.prose pre .token.url,
.prose pre .language-css .token.string,
.prose pre .style .token.string {
  color: hsl(var(--gray-2));
}

.prose pre .token.atrule,
.prose pre .token.attr-value,
.prose pre .token.keyword {
  color: hsl(var(--code-keyword));
}

.prose pre .token.function,
.prose pre .token.class-name {
  color: hsl(var(--code-function));
  font-weight: 500;
}

.prose pre .token.important,
.prose pre .token.variable {
  color: hsl(var(--code-string));
}

/* ---------- Docs drawer (mobile sidebar) ---------- */

.docs-drawer {
  margin: 0;
  padding: 0;
  max-width: 320px;
  width: 86%;
  height: 100vh;
  max-height: none;
  border: 0;
  border-right: 1px solid hsl(var(--border));
  background: hsl(var(--surface-raised));
  color: hsl(var(--foreground));
  position: fixed;
  inset: 0 auto 0 0;

  opacity: 0;
  transform: translateX(-16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    overlay 180ms ease allow-discrete,
    display 180ms ease allow-discrete;
}

.docs-drawer[open] {
  opacity: 1;
  transform: translateX(0);
}

@starting-style {
  .docs-drawer[open] {
    opacity: 0;
    transform: translateX(-16px);
  }
}

.docs-drawer::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition:
    opacity 180ms ease,
    overlay 180ms ease allow-discrete,
    display 180ms ease allow-discrete;
}

.docs-drawer[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .docs-drawer[open]::backdrop {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-drawer,
  .docs-drawer::backdrop {
    transition: none;
  }
  .docs-drawer {
    transform: none;
  }
}

.docs-drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  border-bottom: 1px solid hsl(var(--separator));
}

.docs-drawer-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: hsl(var(--gray-3));
  cursor: pointer;
}

.docs-drawer-close:hover {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
}

.docs-drawer-close svg {
  width: 18px;
  height: 18px;
}

.docs-drawer-nav {
  padding: 16px 20px 48px;
  overflow-y: auto;
  height: calc(100vh - 60px);
}

.docs-drawer-nav .docs-sidebar-nav {
  display: block;
}

/* ---------- Docs responsive ---------- */

@media (max-width: 1040px) {
  .docs-search {
    width: 180px;
  }
}

@media (max-width: 880px) {
  .docs-topbar-inner {
    padding: 0 20px;
  }

  .docs-topbar-logo img {
    height: 22px;
  }

  .docs-search {
    display: none;
  }

  .docs-search-mobile {
    display: inline-flex;
  }

  .docs-mobile-nav {
    display: flex;
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 20px 20px 0;
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 20px;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-content {
    padding: 24px 0 80px;
  }

  .docs-page-title {
    font-size: 30px;
    margin-bottom: 24px;
  }

  .prose {
    font-size: 16px;
  }

  .prose h2 {
    font-size: 22px;
    margin-top: 40px;
  }

  .prose h3 {
    font-size: 18px;
    margin-top: 28px;
  }
}

@media (max-width: 480px) {
  .docs-topbar-inner {
    padding: 0 16px;
  }

  .docs-pill {
    font-size: 12px;
    padding: 4px 10px;
  }

  .docs-layout {
    padding: 0 16px;
  }
}
