:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --surface: #1c2230;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #9da7b3;
  --accent: #3fb950;
  --accent-strong: #56d364;
  --link: #6cb6ff;
  --code-bg: #0a0e14;
  --on-accent: #04130a;
  --radius: 12px;
  --max: 1080px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f6f8fa;
    --surface: #ffffff;
    --border: #d0d7de;
    --text: #1f2328;
    --muted: #57606a;
    --accent: #1a7f37;
    --accent-strong: #116329;
    --link: #0757c9;
    --code-bg: #f3f5f7;
    --on-accent: #ffffff;
    color-scheme: light;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    17px/1.6 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:focus-visible,
summary:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
kbd,
pre {
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 0.9em;
}

:not(pre) > code,
kbd {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.35em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.5;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

nav .gh-link {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 760px) {
  nav li:not(:last-child) {
    display: none;
  }
}

/* Sections */
section {
  padding: 4.5rem 0;
}

section:nth-of-type(even) {
  background: var(--bg-alt);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}

.section-lead {
  color: var(--muted);
  margin-top: 0;
  max-width: 60ch;
}

/* Hero */
.hero {
  padding-top: 4rem;
  text-align: center;
  background:
    radial-gradient(
      60rem 30rem at 50% -10rem,
      color-mix(in srgb, var(--accent) 18%, transparent),
      transparent
    ),
    var(--bg);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  max-width: 20ch;
  margin: 0 auto 1rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto 1.75rem;
}

.lead strong {
  color: var(--text);
}

.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.hero-cmd {
  display: inline-block;
  text-align: left;
  max-width: 100%;
  margin: 0 auto 2.5rem;
}

.shot {
  margin: 2rem 0 0;
}

.shot img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.35);
}

.shot figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 2.75rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

blockquote p {
  margin: 0;
}

/* FAQ */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  list-style-position: inside;
}

.faq summary h3 {
  display: inline;
  font-size: 1.05rem;
}

.faq details p {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  color: var(--muted);
}

.contrib-steps li {
  margin-bottom: 0.75rem;
}

.contrib-steps pre {
  margin: 0.5rem 0 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.site-footer p {
  margin: 0.35rem 0;
}

/* 404 */
.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}
