:root {
  --bg: #1e1f22;
  --surface: #2b2d31;
  --text: #f2f3f5;
  --muted: #b5bac1;
  --line: #3f4147;
  --accent: #5865f2;
  --accent-weak: #7983f5;
  --code: #383a40;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(30, 31, 34, 0.94);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-weak);
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.sidebar {
  position: sticky;
  top: 78px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sidebar h2 {
  margin: 0 0 14px;
  font-size: 15px;
}

.sidebar h3 {
  margin: 20px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a[aria-current="page"] {
  color: var(--accent-weak);
}

.content {
  min-width: 0;
}

.page-head {
  padding-bottom: 28px;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 52px);
}

h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.lead {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.cards,
.steps {
  display: grid;
  gap: 10px;
}

.command-row,
.card,
.step {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.card,
.step {
  grid-template-columns: 1fr;
}

.command-name {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--code);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.94em;
  overflow-wrap: anywhere;
}

.tag {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.tag.neutral {
  background: #383a40;
  color: #dbdee1;
}

.command-row p,
.card p,
.step p {
  margin: 0;
  color: var(--muted);
}

.button-link {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.image-note {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.screenshot-placeholder {
  min-height: 220px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #24262a;
  color: var(--muted);
  font-size: 14px;
}

.screenshot-placeholder strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.doc-figure {
  margin: 16px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #24262a;
  width: min(100%, 540px) !important;
  max-width: 540px !important;
}

.doc-figure img,
.doc-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.image-grid .doc-figure {
  width: min(100%, 480px) !important;
  max-width: 480px !important;
}

.doc-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.command-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.note {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--muted);
}

.updated {
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  padding-top: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--accent-weak);
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .layout,
  .command-row,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .doc-figure,
  .image-grid .doc-figure {
    width: min(100%, 810px) !important;
    max-width: 810px !important;
  }

  .sidebar {
    position: static;
    max-height: none;
  }
}
