:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --band: #eef2f7;
  --text: #1d2d3e;
  --muted: #556b82;
  --accent: #0a6ed1;
  --accent-text: #ffffff;
  --border: #d9e0e8;
  --code-bg: #1d2d3e;
  --code-text: #e8eef5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171d;
    --surface: #1b232c;
    --band: #161d25;
    --text: #e6edf3;
    --muted: #9aaab9;
    --accent: #4db1ff;
    --accent-text: #0b1620;
    --border: #2c3946;
    --code-bg: #0b1016;
    --code-text: #d6e2ee;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.9rem; margin: 0 0 .5rem; }
section { padding: 64px 0; }
.band { background: var(--band); }
.section-lead { color: var(--muted); max-width: 46rem; margin: 0 0 2rem; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--accent-text); font-weight: 800; }
nav { display: flex; align-items: center; gap: 18px; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--text); }
nav a.github { display: inline-flex; align-items: center; gap: 6px; }
.button svg { vertical-align: -3px; margin-right: 4px; }

.button { display: inline-block; padding: 11px 20px; border-radius: 8px; background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; border: 1px solid var(--accent); }
.button:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--accent); }
.button.small { padding: 6px 12px; color: var(--accent-text); }
.button.big { padding: 14px 26px; font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.actions.center { justify-content: center; }

.hero { padding-top: 56px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .02em; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 16px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 18px 50px rgb(0 0 0 / .12); }
.shot figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; text-align: center; }
.hero-shot { margin-top: 36px; }

.uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.uses h3 { margin: 0 0 6px; font-size: 1.05rem; }
.uses p { margin: 0; color: var(--muted); }

.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: stretch; }
.stage { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.stage.accent { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.stage h3 { margin: 0 0 8px; font-size: 1.05rem; }
.stage ul { margin: 0; padding-left: 18px; color: var(--muted); }
.arrow { display: grid; place-items: center; font-size: 1.8rem; color: var(--accent); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.features article { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.features h3 { margin: 0 0 6px; font-size: 1.05rem; }
.features p { margin: 0; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-top: 40px; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.steps { padding-left: 20px; color: var(--muted); }
.steps li { margin-bottom: 10px; }
.steps em { color: var(--text); font-style: normal; font-weight: 600; }
pre { background: var(--code-bg); color: var(--code-text); padding: 16px 18px; border-radius: 10px; overflow-x: auto; }

.download { text-align: center; }
.download .section-lead { margin-left: auto; margin-right: auto; }
.download .version-note { text-align: center; color: var(--muted); margin: 0.75rem 0 0; font-size: 0.95rem; }
.install { max-width: 36rem; margin: 24px auto 0; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; }
.install h3 { margin-top: 0; }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* documentation cards of the home page */
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.docs-grid a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; color: var(--text); text-decoration: none; }
.docs-grid a:hover { border-color: var(--accent); }
.docs-grid h3 { margin: 0 0 4px; font-size: 1.02rem; color: var(--accent); }
.docs-grid p { margin: 0; color: var(--muted); font-size: .95rem; }

/* documentation pages (docs/*.html) */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 32px; padding-bottom: 48px; }
.doc-side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; font-size: .93rem; }
.doc-side ul { list-style: none; margin: 0; padding: 0; }
.doc-side li { margin: 2px 0; }
.doc-side a { display: block; padding: 4px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.doc-side a:hover { color: var(--text); background: var(--band); }
.doc-side li.current > a { color: var(--accent); background: var(--band); font-weight: 600; }
.doc-side li ul { margin: 2px 0 8px 10px; border-left: 1px solid var(--border); }
.doc-side li ul a { padding: 2px 10px; font-size: .88rem; }
.doc-menu { display: none; }
.doc-menu summary { cursor: pointer; font-weight: 600; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.doc-menu[open] summary { margin-bottom: 8px; }
.doc { min-width: 0; }
.doc h1 { font-size: 2.1rem; margin: 0 0 1rem; }
.doc h2 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; padding-top: .4rem; border-top: 1px solid var(--border); }
.doc h3 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
.doc h4 { margin: 1.2rem 0 .5rem; }
.doc h1, .doc h2, .doc h3, .doc h4 { scroll-margin-top: 76px; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc img { border-radius: 8px; border: 1px solid var(--border); margin: 8px 0; }
.doc code { background: var(--band); padding: .1em .35em; border-radius: 4px; }
.doc pre code { background: none; padding: 0; }
.doc pre { font-size: .9rem; line-height: 1.5; }
.doc table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.doc th, .doc td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--band); }
.doc blockquote { margin: 1rem 0; padding: 4px 16px; border-left: 4px solid var(--accent); background: var(--band); border-radius: 0 8px 8px 0; }

/* feedback form */
.feedback h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
.feedback-form { max-width: 46rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; }
.feedback-form label { display: block; font-weight: 600; margin: 16px 0 6px; }
.feedback-form fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.feedback-form legend { font-weight: 600; margin-bottom: 6px; }
.feedback-form fieldset label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; }
.feedback-form input:not([type=radio]), .feedback-form select, .feedback-form textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.feedback-form textarea { resize: vertical; }
.feedback-form .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.feedback-form :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.feedback-form .hint { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.feedback-form .error { color: #d0302f; min-height: 1.2em; margin: 12px 0 0; }
.feedback-form button { cursor: pointer; font: inherit; }
.two-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
@media (max-width: 800px) { .two-fields { grid-template-columns: minmax(0, 1fr); } }

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

@media (max-width: 800px) {
  nav a:not(.button):not(.github) { display: none; }
  nav a.github span { display: none; }
  .pipeline { grid-template-columns: 1fr; }
  .arrow { transform: rotate(90deg); }
  .two { grid-template-columns: minmax(0, 1fr); }
  section { padding: 44px 0; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .doc-side { position: static; max-height: none; overflow: visible; }
  .doc-list { display: none; }
  .doc-menu { display: block; }
  .doc h1 { font-size: 1.7rem; }
}
