@font-face {
  font-family: 'Overpass';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/overpass.woff2') format('woff2');
}

@font-face {
  font-family: 'Overpass Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/overpass-mono.woff2') format('woff2');
}

:root {
  --code-bg: #17191e;
  --code-text: #f3f3f1;
  --code-muted: #9ea1a8;
  --code-rule: #2b2e35;
  --topbar: 64px;
  --gutter: 48px;
}

:root[data-theme='light'] {
  color-scheme: light;
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

.only-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .only-light {
    display: none;
  }
  :root:not([data-theme='light']) .only-dark {
    display: block;
  }
}

:root[data-theme='dark'] .only-light {
  display: none;
}

:root[data-theme='dark'] .only-dark {
  display: block;
}

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

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

body {
  margin: 0;
  background: var(--al-bg);
  color: var(--al-text);
  font-family: var(--al-font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--al-font-heading);
  font-weight: var(--al-weight-heading);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--al-font-code);
}

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

[id] {
  scroll-margin-top: calc(var(--topbar) + 24px);
}

:focus-visible {
  outline: 2px solid var(--al-text);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--al-accent);
  color: var(--al-on-accent);
  font-weight: 600;
  border-radius: 6px;
}

.skip:focus {
  top: 12px;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--topbar);
  padding: 0 24px;
  background: var(--al-bg);
  border-bottom: 1px solid var(--al-border);
}

.brand {
  display: flex;
  align-items: center;
}

.lockup {
  height: 32px;
  width: auto;
}

.topnav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 0.9375rem;
}

.topnav a {
  color: var(--al-muted);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--al-text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--al-border);
  border-radius: 6px;
  background: var(--al-surface);
  color: var(--al-text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.theme-toggle[hidden] {
  display: none;
}

/* Frame and sidebar */

.frame {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: var(--topbar);
  height: calc(100vh - var(--topbar));
  overflow-y: auto;
  padding: 24px 16px 32px;
}

.menu {
  display: none;
}

.sidebar ul,
.sidebar ol,
.menu ul,
.menu ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-top a,
.nav-path a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--al-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  text-decoration: none;
}

.nav-top a:hover,
.nav-path a:hover {
  color: var(--al-text);
  background: var(--al-surface);
}

.nav-top a[aria-current='page'],
.nav-path a[aria-current='page'] {
  color: var(--al-text);
  background: var(--al-surface);
  font-weight: 600;
}

.nav-top a[aria-current='page']::before,
.nav-path a[aria-current='page']::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 7px;
  bottom: 7px;
  width: 5px;
  background: var(--al-accent);
  transform: skewX(-12deg);
}

.nav-path {
  margin: 12px 0 !important;
}

.nav-section + .nav-section {
  margin-top: 14px;
}

.nav-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px 4px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.nav-num {
  flex: none;
  width: 2.6em;
  color: var(--al-muted);
  font-family: var(--al-font-code);
  font-size: 0.8125rem;
  font-weight: 400;
}

main {
  min-width: 0;
  background: var(--al-surface);
  border-left: 1px solid var(--al-border);
}

/* Commands */

.cmd,
.code {
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
}

.cmd {
  margin: 0;
  padding: 12px 16px;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cmd code::before {
  content: '$ ';
  color: var(--al-accent);
}

/* Landing */

.landing {
  max-width: 1240px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 56px;
  padding: 64px var(--gutter) 48px;
}

.intro h1 {
  font-size: clamp(2.5rem, 1.6rem + 2.4vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 15ch;
}

.pitch {
  margin-top: 24px;
  max-width: 34em;
  color: var(--al-muted);
  font-size: 1.1875rem;
  line-height: 1.6;
}

.works-with {
  margin-top: 32px;
}

.works-with p {
  color: var(--al-muted);
  font-size: 0.875rem;
}

.works-with ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.works-with li {
  padding: 4px 12px;
  border: 1px solid var(--al-border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.install {
  align-self: start;
  padding: 24px;
  border: 1px solid var(--al-border);
  border-radius: 12px;
  background: var(--al-bg);
}

.install h2 {
  font-size: 1.125rem;
}

.steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.steps li + li {
  margin-top: 18px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--al-accent);
  color: var(--al-on-accent);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
}

.prompt {
  padding: 11px 16px;
  border: 1px solid var(--al-border);
  border-radius: 8px;
  background: var(--al-surface);
  font-size: 0.9375rem;
}

.install-more {
  margin-top: 20px;
  color: var(--al-muted);
  font-size: 0.875rem;
}

.hero {
  margin: 0;
  padding: 0 var(--gutter) 56px;
}

.hero-stage {
  aspect-ratio: 16 / 9;
}

.hero picture {
  height: 100%;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
}

.why,
.speed-strip {
  padding: 72px var(--gutter) 0;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--al-border);
}

.why-grid li {
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--al-border);
}

.why-grid li:nth-child(odd) {
  padding-right: 32px;
  border-right: 1px solid var(--al-border);
}

.why-grid li:nth-child(even) {
  padding-left: 32px;
}

.why-grid h3 {
  font-size: 1.125rem;
}

.why-grid p {
  margin-top: 8px;
  color: var(--al-muted);
}

.why-grid a {
  color: var(--al-text);
  text-decoration-color: var(--al-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

.stats div {
  padding: 24px;
  border: 1px solid var(--al-border);
  border-radius: 12px;
  background: var(--al-bg);
}

.stats dt {
  font-family: var(--al-font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stats dt::after {
  content: '';
  display: block;
  width: 36px;
  height: 5px;
  margin-top: 14px;
  background: var(--al-accent);
  transform: skewX(-12deg);
}

.stats dd {
  margin: 12px 0 0;
  color: var(--al-muted);
}

.stats-note {
  margin-top: 14px;
  color: var(--al-muted);
  font-size: 0.875rem;
}

.stats-note a {
  color: var(--al-text);
}

.path,
.recent {
  padding: 72px var(--gutter) 0;
}

.recent {
  padding-bottom: 80px;
}

.path-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 20px;
}

.path-head h2 {
  font-size: 2rem;
}

.path-head p {
  color: var(--al-muted);
}

.path-sections,
.recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.path-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--al-border);
}

.path-section h3 {
  display: flex;
  gap: 12px;
  font-size: 1.25rem;
}

.path-num {
  color: var(--al-muted);
  font-family: var(--al-font-code);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
}

.path-section ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.path-section a {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  text-decoration: none;
}

.path-section a:hover {
  background: var(--al-bg);
}

.path-page-num {
  grid-row: span 2;
  color: var(--al-muted);
  font-family: var(--al-font-code);
  font-size: 0.8125rem;
  line-height: 1.95;
}

.path-page-title {
  font-weight: 700;
}

.path-page-short {
  color: var(--al-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.recent-list a {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--al-border);
  text-decoration: none;
}

.recent-version {
  font-family: var(--al-font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.recent-lead {
  max-width: 68ch;
  color: var(--al-muted);
}

.recent-list a:hover .recent-lead {
  color: var(--al-text);
}

/* Docs pages */

.doc-head {
  padding: 48px var(--gutter) 36px;
  border-bottom: 1px solid var(--al-border);
}

.doc-pos {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--al-muted);
  font-size: 0.875rem;
}

.doc-num {
  padding: 1px 8px;
  border: 1px solid var(--al-border);
  border-radius: 6px;
  color: var(--al-text);
  font-family: var(--al-font-code);
  font-size: 0.8125rem;
}

.doc-head h1 {
  margin-top: 16px;
  font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lead {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--al-muted);
  font-size: 1.1875rem;
  line-height: 1.6;
}

.outline-note {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 12px;
  border: 1px dashed var(--al-border);
  border-radius: 6px;
  color: var(--al-muted);
  font-size: 0.875rem;
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
}

.doc-main {
  min-width: 0;
  max-width: calc(900px + 2 * var(--gutter));
  padding: 44px var(--gutter) 0;
}

.toc-col {
  border-left: 1px solid var(--al-border);
}

.toc {
  position: sticky;
  top: var(--topbar);
  max-height: calc(100vh - var(--topbar));
  overflow-y: auto;
  padding: 44px 24px 32px;
  font-size: 0.875rem;
}

.toc p {
  margin-bottom: 10px;
  color: var(--al-muted);
  font-family: var(--al-font-code);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--al-border);
}

.toc a {
  position: relative;
  display: block;
  padding: 5px 0 5px 14px;
  color: var(--al-muted);
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover {
  color: var(--al-text);
}

.toc a[aria-current] {
  color: var(--al-text);
  font-weight: 600;
}

.toc a[aria-current]::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--al-accent);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
  padding-bottom: 64px;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--al-border);
  border-radius: 8px;
  text-decoration: none;
}

.pager a:hover {
  background: var(--al-bg);
}

.pager-next {
  text-align: right;
}

.pager-label {
  color: var(--al-muted);
  font-size: 0.8125rem;
}

.pager-title {
  font-weight: 600;
}

/* Prose */

.prose {
  overflow-wrap: break-word;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose > p,
.prose > ul,
.prose > ol,
.prose > h2,
.prose > h3 {
  max-width: 72ch;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2.4em 0 0.7em;
  padding-top: 1.1em;
  border-top: 1px solid var(--al-border);
  font-size: 1.625rem;
}

.prose > h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin: 1.8em 0 0.5em;
  font-size: 1.1875rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose li::marker {
  color: var(--al-muted);
}

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

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose :not(pre) > code,
.lead code,
.pitch code,
.why-grid code {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--al-bg);
  box-shadow: inset 0 0 0 1px var(--al-border);
  font-size: 0.85em;
  overflow-wrap: break-word;
}

.table td:first-child code {
  white-space: nowrap;
}

.prose strong {
  font-weight: 700;
}

.code {
  margin: 1.4em 0;
  overflow: hidden;
}

:root[data-theme='dark'] .code,
:root[data-theme='dark'] .cmd {
  border: 1px solid var(--code-rule);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .code,
  :root:not([data-theme='light']) .cmd {
    border: 1px solid var(--code-rule);
  }
}

.code .code-title {
  margin: 0;
  padding: 8px 18px;
  border-bottom: 1px solid var(--code-rule);
  color: var(--code-muted);
  font-family: var(--al-font-code);
  font-size: 0.8125rem;
}

.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.65;
}

.code .language-text {
  white-space: pre-wrap;
}

.table {
  margin: 1.4em 0;
  overflow-x: auto;
  border: 1px solid var(--al-border);
  border-radius: 8px;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.table th,
.table td {
  min-width: 7em;
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--al-border);
}

.table th {
  background: var(--al-bg);
  font-weight: 700;
}

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

.callout {
  margin: 1.4em 0;
  padding: 14px 18px;
  border: 1px solid var(--al-border);
  border-left: 4px solid var(--al-accent);
  border-radius: 8px;
  background: var(--al-bg);
}

.callout-warning {
  border-left-color: var(--al-accent-text);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.5em;
}

.callout-title {
  font-weight: 700;
}

.fields {
  margin: 1.4em 0;
  border: 1px solid var(--al-border);
  border-radius: 8px;
}

.field {
  padding: 14px 18px;
  border-bottom: 1px solid var(--al-border);
}

.field:last-child {
  border-bottom: 0;
}

.fields dt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.prose .field-name code {
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: 0.9375rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.field-type {
  color: var(--al-muted);
  font-size: 0.875rem;
}

.prose .field-type code {
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--al-muted);
  font-size: 0.875rem;
}

.field-required {
  padding: 0 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: var(--al-accent-text);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.6;
  text-transform: uppercase;
}

.fields dd {
  margin: 6px 0 0;
  max-width: 72ch;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Changelog */

.release {
  display: grid;
  grid-template-columns: 200px minmax(0, 720px);
  gap: 48px;
  padding: 40px var(--gutter);
  border-bottom: 1px solid var(--al-border);
}

.release-version {
  position: sticky;
  top: calc(var(--topbar) + 32px);
  align-self: start;
  font-size: 1.5rem;
}

.release .prose h3 {
  margin-top: 1.6em;
  font-size: 1.1875rem;
}

.release .prose > h3:first-child {
  margin-top: 0;
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px;
  border-top: 1px solid var(--al-border);
  color: var(--al-muted);
  font-size: 0.875rem;
}

.footer p:last-child {
  display: flex;
  gap: 20px;
}

/* Narrower screens */

@media (max-width: 1180px) {
  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc-col {
    display: none;
  }
  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .install {
    max-width: 560px;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: 20px;
  }
  [id] {
    scroll-margin-top: calc(var(--topbar) + 64px);
  }
  .topbar {
    padding: 0 20px;
  }
  .topnav {
    display: none;
  }
  .theme-toggle {
    margin-left: auto;
  }
  .frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
  .menu {
    display: block;
    position: sticky;
    top: var(--topbar);
    z-index: 9;
    background: var(--al-bg);
    border-bottom: 1px solid var(--al-border);
  }
  .menu summary {
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
  }
  .menu nav {
    max-height: calc(100vh - var(--topbar) - 48px);
    overflow-y: auto;
    padding: 4px 12px 20px;
  }
  .intro {
    padding-top: 40px;
  }
  .hero {
    padding: 0 0 40px;
  }
  .why-grid,
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .why-grid li:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }
  .why-grid li:nth-child(even) {
    padding-left: 0;
  }
  .why,
  .speed-strip {
    padding-top: 56px;
  }
  .path-section,
  .recent-list a,
  .release {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .release-version {
    position: static;
  }
  .path,
  .recent {
    padding-top: 56px;
  }
  .doc-head {
    padding-top: 32px;
  }
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer {
    padding: 24px 20px;
  }
}

.doc-md {
  margin-left: auto;
  color: var(--al-muted);
  font-size: 0.8125rem;
}

.doc-md:hover {
  color: var(--al-text);
}

/* Tables of three or more columns read as one card per row on phones. */

@media (max-width: 640px) {
  .table-wide table,
  .table-wide tbody,
  .table-wide tr,
  .table-wide td {
    display: block;
  }
  .table-wide thead {
    display: none;
  }
  .table-wide tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--al-border);
  }
  .table-wide tr:last-child {
    border-bottom: 0;
  }
  .table-wide td {
    padding: 2px 0;
    border-bottom: 0;
  }
  .table-wide td:first-child {
    padding-bottom: 6px;
    font-weight: 700;
  }
  .table-wide td:not(:first-child)::before {
    content: attr(data-label) ': ';
    color: var(--al-muted);
    font-size: 0.8125rem;
  }
  .table-wide td:empty {
    display: none;
  }
  .table-wide code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
