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

:root {
  color-scheme: light;
  --page: oklch(0.99 0 0);
  --panel: oklch(0.97 0.003 280);
  --sheet: oklch(1 0 0);
  --ink: oklch(0.2 0.01 280);
  --ink-muted: oklch(0.48 0.01 280);
  --rule: oklch(0.9 0.005 280);
  --accent: oklch(0.55 0.21 277);
  --accent-soft: oklch(0.55 0.21 277 / 0.1);
  --on-accent: oklch(1 0 0);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.05), 0 12px 40px -12px oklch(0.3 0.05 277 / 0.25);

  --sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wide: 64rem;
  --narrow: 42rem;
}

.dark {
  color-scheme: dark;
  --page: oklch(0.16 0.005 280);
  --panel: oklch(0.205 0.008 280);
  --sheet: oklch(0.22 0.008 280);
  --ink: oklch(0.95 0.005 280);
  --ink-muted: oklch(0.72 0.01 280);
  --rule: oklch(0.3 0.01 280);
  --accent: oklch(0.74 0.14 280);
  --accent-soft: oklch(0.74 0.14 280 / 0.14);
  --on-accent: oklch(0.16 0.02 280);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 20px 60px -20px oklch(0 0 0 / 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    color-scheme: dark;
    --page: oklch(0.16 0.005 280);
    --panel: oklch(0.205 0.008 280);
    --sheet: oklch(0.22 0.008 280);
    --ink: oklch(0.95 0.005 280);
    --ink-muted: oklch(0.72 0.01 280);
    --rule: oklch(0.3 0.01 280);
    --accent: oklch(0.74 0.14 280);
    --accent-soft: oklch(0.74 0.14 280 / 0.14);
    --on-accent: oklch(0.16 0.02 280);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 20px 60px -20px oklch(0 0 0 / 0.6);
  }
}

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

html {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body { margin: 0; min-height: 100svh; }

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

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  font-weight: 600;
  color: var(--ink);
}

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

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

html:not(.js) [data-needs-js] { display: none; }

.dark-only { display: none !important; }
.dark .dark-only { display: block !important; }
.dark .light-only { display: none !important; }

@media (prefers-color-scheme: dark) {
  :root:not(.light) .dark-only { display: block !important; }
  :root:not(.light) .light-only { display: none !important; }
}

.container {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--ink);
  color: var(--page);
}

/* Header */

.header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 2rem; height: 2rem; }

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}
.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 120ms;
}
.nav a:hover { color: var(--ink); }

.theme-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.theme-switch button {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed='true'] { background: var(--panel); color: var(--ink); }
.theme-switch svg { width: 1rem; height: 1rem; }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 120ms, background-color 120ms;
}
.button svg { width: 1.125rem; height: 1.125rem; }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { opacity: 0.9; }
.button-quiet { border: 1px solid var(--rule); }
.button-quiet:hover { background: var(--panel); }

.link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.link:hover { text-decoration-color: var(--accent); }

/* Hero */

.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  text-align: center;
}

.hero h1 {
  max-width: 18ch;
  margin-inline: auto;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-lede {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  color: var(--ink-muted);
  font-size: 1.1875rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-meta {
  margin-top: 1rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.hero-shot {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  filter: drop-shadow(0 24px 48px oklch(0.25 0.04 277 / 0.18));
}
.hero-shot img { width: 100%; }

/* Downloads */

.downloads {
  max-width: var(--narrow);
  margin: 1.5rem auto 0;
  text-align: left;
}
.downloads summary {
  width: fit-content;
  margin-inline: auto;
  color: var(--ink-muted);
  font-size: 0.875rem;
  cursor: pointer;
}
.downloads summary:hover { color: var(--ink); }
.downloads[open] summary { margin-bottom: 1rem; }

.dl-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 1.25rem;
  list-style: none;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--panel);
}
.dl-list h3 {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
.dl-list h3:first-child { margin-top: 0; }
.dl-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  text-decoration: none;
}
.dl-list a:hover .dl-name { color: var(--accent); }
.dl-size { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.dl-path { display: none; }

/* Sections */

.section { padding-top: clamp(4.5rem, 10vw, 7rem); }

.section-head { margin-bottom: 2.5rem; }
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}
.section-head p {
  max-width: var(--narrow);
  margin-top: 0.75rem;
  color: var(--ink-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: var(--panel);
}
.card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card p {
  margin-top: 0.375rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Output gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.output { overflow: hidden; }

.output-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: oklch(0.12 0 0);
}
.output-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.output-media .contain { object-fit: contain; object-position: center; }

.output-body .credit {
  margin-top: 0.75rem;
  font-size: 0.75rem;
}
.output-body .credit a { text-decoration: underline; text-underline-offset: 2px; }
.output-body .credit a:hover { color: var(--ink); }

.output-body { padding: 1.25rem 1.5rem 1.5rem; }
.output-body h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.formats {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature { padding: 1.5rem; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 0.625rem;
  background: var(--accent-soft);
  color: var(--accent);
}
.feature-icon svg { width: 1.25rem; height: 1.25rem; }

/* CLI */

.cli {
  display: grid;
  gap: 1.75rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.cli .section-head { margin-bottom: 0; }
.cli .link { display: inline-block; margin-top: 1rem; }

.code {
  margin: 0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--sheet);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.8;
}
.code .comment { color: var(--ink-muted); }

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(4.5rem, 10vw, 7rem);
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 0.875rem;
}
.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Docs */

.nav a[aria-current='page'] { color: var(--ink); font-weight: 500; }

.doc {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 4rem;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100svh - 3rem);
  overflow-y: auto;
  font-size: 0.875rem;
}
.toc h2 {
  margin-bottom: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc ul ul { padding-left: 0.875rem; }
.toc a {
  display: block;
  padding: 0.25rem 0;
  color: var(--ink-muted);
  text-decoration: none;
}
.toc a:hover { color: var(--ink); }

.prose {
  max-width: var(--narrow);
  font-size: 1rem;
  line-height: 1.75;
}
.prose > * + * { margin-top: 1.25rem; }
.prose h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.prose .lede {
  color: var(--ink-muted);
  font-size: 1.1875rem;
  line-height: 1.6;
}
.prose h2 {
  margin-top: 3.5rem;
  padding-top: 0.5rem;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  scroll-margin-top: 1rem;
}
.prose h3 {
  margin-top: 2.25rem;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  scroll-margin-top: 1rem;
}
.prose h2 + *, .prose h3 + * { margin-top: 0.75rem; }
.prose p, .prose li { color: var(--ink-muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a:not(.button) {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:not(.button):hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.375rem; }
.prose li::marker { color: var(--ink-muted); }
.prose pre {
  margin-inline: 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--panel);
  font-size: 0.875rem;
  line-height: 1.7;
}
.prose pre code { font-weight: 400; }
.prose :not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 0.3em;
  background: var(--panel);
  overflow-wrap: anywhere;
}
.prose h3 code { padding: 0; background: none; }
.prose figure { margin: 2rem 0 0; }
.prose figure img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}
.prose .shot img { border: 0; }
.prose figcaption {
  margin-top: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.note {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--accent-soft);
}
.prose .note { color: var(--ink); }

.prose .dl-list { margin-top: 1rem; }
.prose .dl-list h3 {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0;
}
.prose .dl-list h3:first-child { margin-top: 0; }
.prose .dl-list h3 + a { margin-top: 0; }
.prose .dl-list a { text-decoration: none; font-weight: 400; }

.faq { display: flex; flex-direction: column; gap: 2rem; }
.faq h3 { margin-top: 0; }
.faq h3 + p { margin-top: 0.5rem; }
.faq p + p, .faq p + ul, .faq ul + p, .faq p + pre, .faq pre + p { margin-top: 0.75rem; }
.prose .faq { margin-top: 1.5rem; }

@media (max-width: 52rem) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}

@media (max-width: 52rem) {
  .features { grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
  .header { gap: 1rem; }
  .wide-only { display: none; }
  .gallery { grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; justify-content: center; }
}
