:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #18212f;
  --muted: #647184;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #dff5f1;
  --blue: #2563eb;
  --blue-soft: #e7efff;
  --amber: #a16207;
  --amber-soft: #fff4d6;
  --red: #b42318;
  --red-soft: #ffe8e5;
  --green: #16703c;
  --green-soft: #e7f7ed;
  --shadow: 0 18px 48px rgba(24, 33, 47, 0.08);
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent 320px),
    var(--bg);
  letter-spacing: 0;
}

a {
  color: inherit;
}

.doc-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.doc-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  overflow: auto;
  background: #101827;
  color: #eef4fb;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #14b8a6;
  color: #062a26;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.brand p {
  margin: 3px 0 0;
  color: #a8b5c7;
  font-size: 12px;
}

.sidebar-title {
  margin: 22px 0 8px;
  color: #a8b5c7;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-nav {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  color: #e5ecf5;
  text-decoration: none;
  border-radius: 7px;
  font-size: 13px;
}

.side-nav a:hover,
.side-nav a:focus {
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.side-note {
  margin-top: 14px;
  color: #c9d3e1;
  font-size: 12px;
  line-height: 1.55;
}

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

.doc-topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(246, 247, 249, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.button-link.primary {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.button-link:hover,
.button-link:focus {
  border-color: #b7c0ce;
  outline: none;
}

.button-link.primary:hover,
.button-link.primary:focus {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.doc-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.hero {
  padding: 26px;
  margin-bottom: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.03;
}

.hero p {
  max-width: 900px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.chip.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.chip.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.chip.green {
  color: var(--green);
  background: var(--green-soft);
}

.section {
  margin: 26px 0 36px;
  scroll-margin-top: 88px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p {
  max-width: 680px;
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

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

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

.card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(24, 33, 47, 0.04);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card p,
.card li {
  color: #2f3a49;
  line-height: 1.58;
  font-size: 14px;
}

.card p {
  margin: 0;
}

.card ul,
.card ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.stack {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e9f0;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #475569;
  background: #fbfcfe;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  color: #2f3a49;
  line-height: 1.55;
}

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

.feature-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-group {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-group h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.feature-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list a,
.feature-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fbfcfe;
  border: 1px solid #e5e9f0;
  color: #2f3a49;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
}

.feature-list a:hover,
.feature-list a:focus {
  border-color: rgba(15, 118, 110, 0.48);
  background: #eef7f5;
  outline: none;
}

.status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.template-note {
  padding: 14px;
  border: 1px solid rgba(161, 98, 7, 0.25);
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: #6f4a04;
  font-size: 13px;
  line-height: 1.55;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef2f7;
  color: #243044;
  font-size: 0.92em;
}

pre {
  margin: 12px 0 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid #e5e9f0;
  border-radius: var(--radius);
  background: #0f172a;
  color: #e5edf7;
  line-height: 1.6;
  font-size: 13px;
  tab-size: 2;
}

pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  white-space: pre;
}

.code-card {
  padding: 0;
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.code-head h3 {
  margin: 0;
}

.code-head span {
  flex: 0 1 auto;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.code-card pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

  .doc-sidebar {
    position: static;
    height: auto;
  }

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

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

@media (max-width: 760px) {
  .doc-topbar {
    position: static;
    justify-content: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .doc-content {
    padding: 18px 12px 36px;
  }

  .grid,
  .grid.three,
  .feature-index,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .code-head {
    align-items: start;
    flex-direction: column;
  }

  .code-head span {
    text-align: left;
  }
}
