:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --ink: #17202a;
  --muted: #5d6875;
  --line: #d9ded7;
  --panel: #ffffff;
  --soft: #eef4f0;
  --teal: #0f766e;
  --teal-strong: #0d9488;
  --blue: #2563eb;
  --amber: #a15c07;
  --rose: #be123c;
  --code: #10151c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: var(--teal);
}

img {
  max-width: 100%;
}

code,
pre {
  font-family:
    "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.docs-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100svh;
}

.docs-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100svh;
  padding: 20px 18px;
  overflow-y: auto;
  background: color-mix(in srgb, var(--panel) 84%, var(--soft));
  border-right: 1px solid var(--line);
  box-shadow: 14px 0 38px rgba(23, 32, 42, 0.04);
}

.docs-content {
  min-width: 0;
}

.docs-main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
}

.docs-nav,
.page-toc {
  display: grid;
  gap: 3px;
}

.docs-nav {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.docs-nav a,
.page-toc a,
.github-link {
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.docs-nav a {
  padding: 8px 10px;
  font-weight: 760;
}

.docs-nav a:hover,
.docs-nav a[aria-current="page"] {
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-toc {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.page-toc strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-toc a {
  padding: 4px 8px;
  font-size: 0.93rem;
}

.page-toc a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--soft) 70%, white);
}

.github-link {
  padding: 8px 10px;
  font-weight: 760;
  box-shadow: inset 0 0 0 1px var(--line);
}

.github-link:hover {
  color: var(--ink);
  background: #ffffff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100svh - 72px);
  padding: 56px 0 42px;
}

.hero h1,
.page-hero h1,
section h2,
.release-widget h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 12ch;
  font-size: 4.8rem;
}

.page-hero {
  padding: 58px 0 34px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 780px;
  font-size: 3.4rem;
}

.lead {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  background: var(--teal);
  color: #ffffff;
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
}

.button:hover {
  transform: translateY(-1px);
}

.release-widget,
.note-panel,
.content-card,
.page-card,
.callout,
.tool-table,
.setting-table,
.screenshot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(23, 32, 42, 0.08);
}

.screenshot {
  overflow: hidden;
  margin: 0;
  border-radius: 14px;
}

.screenshot img {
  display: block;
  width: 100%;
  border-radius: 14px;
}

.screenshot figcaption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.94rem;
  border-top: 1px solid var(--line);
}

.screenshot.hero-shot {
  box-shadow: 0 26px 70px rgba(23, 32, 42, 0.16);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 42px 0 58px;
}

.gallery .screenshot {
  box-shadow: 0 12px 28px rgba(23, 32, 42, 0.08);
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--code);
  color: #f8fafc;
  font-size: 0.92rem;
}

.release-band,
.split-section,
.content-grid,
.card-grid,
.doc-section {
  display: grid;
  gap: 24px;
  padding: 54px 0;
}

.release-band {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

section h2 {
  margin-bottom: 16px;
  font-size: 2.45rem;
}

h3 {
  margin: 22px 0 10px;
  font-size: 1.25rem;
}

.release-widget,
.note-panel,
.content-card,
.page-card,
.callout {
  padding: 24px;
}

.release-widget h3,
.note-panel h3,
.content-card h3,
.page-card h3,
.callout h3 {
  margin-top: 0;
}

.download-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.download-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.download-item span {
  color: var(--muted);
  white-space: nowrap;
}

.release-link {
  font-weight: 750;
}

.content-grid,
.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-body {
  min-width: 0;
}

.doc-section {
  padding: 20px 0 48px;
  border-bottom: 1px solid var(--line);
}

.doc-section:first-child {
  padding-top: 0;
}

.doc-section:last-child {
  border-bottom: 0;
}

.split-section {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}

.split-section.reverse {
  grid-template-columns: 380px minmax(0, 1fr);
}

.note-panel,
.callout {
  border-top: 4px solid var(--teal);
}

.callout.warning {
  border-top-color: var(--amber);
}

.callout.danger {
  border-top-color: var(--rose);
}

.page-card {
  color: var(--ink);
  text-decoration: none;
}

.page-card p {
  color: var(--muted);
}

.page-card:hover {
  transform: translateY(-2px);
}

.tool-table,
.setting-table {
  width: 100%;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--soft);
  font-weight: 800;
}

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

dt {
  margin-top: 14px;
  font-weight: 800;
}

dd {
  margin: 4px 0 0;
  color: var(--muted);
}

p code,
li code,
dd code,
td code,
th code,
dt code {
  padding: 0.13em 0.35em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #eef1ec;
}

ol,
ul {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 6px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 980px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero,
  .release-band,
  .content-grid,
  .split-section,
  .split-section.reverse,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-toc {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-toc strong {
    grid-column: 1 / -1;
  }

  .hero h1 {
    max-width: none;
    font-size: 3.2rem;
  }

  .page-hero h1 {
    font-size: 2.7rem;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .docs-main {
    width: min(100% - 28px, 1180px);
  }

  .docs-nav,
  .page-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .page-hero h1 {
    font-size: 2.2rem;
  }

  section h2 {
    font-size: 1.9rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .download-item {
    align-items: flex-start;
    flex-direction: column;
  }

  th,
  td {
    display: block;
    width: 100%;
  }

  th {
    border-bottom: 0;
  }
}
