@font-face {
  font-family: Inter;
  src: url("../fonts/inter/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("../fonts/inter/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f7fafb;
  --surface: #ffffff;
  --surface-2: #f1f6f7;
  --text: #162329;
  --muted: #5b6970;
  --soft: #dbe7ea;
  --line: #d7e4e8;
  --brand: #0093a5;
  --brand-dark: #006f7d;
  --orange: #f28d2f;
  --green: #2f9f6b;
  --blue: #3867d6;
  --red: #cf3b3b;
  --radius: 8px;
  --content: 760px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101719;
  --surface: #152023;
  --surface-2: #1c2a2e;
  --text: #eef6f7;
  --muted: #b4c4c9;
  --soft: #314246;
  --line: #2b3b40;
  --brand: #28b8c8;
  --brand-dark: #7ddce6;
  --orange: #f7aa55;
  --green: #65c995;
  --blue: #8da8ff;
  --red: #ff8d8d;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}

body.is_loading .article {
  opacity: 0.35;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.site_shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 250px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  overflow: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

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

.brand img {
  width: 148px;
}

.mobile_topbar {
  display: none;
}

.docs_tools {
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.sidebar_tools {
  margin: -8px 0 16px;
}

.tool_btn,
.menu_btn,
.docs_tools > button,
.docs_tools > a {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.tool_btn:hover,
.menu_btn:hover,
.docs_tools > button:hover,
.docs_tools > a:hover {
  background: var(--surface);
  color: var(--brand-dark);
  text-decoration: none;
}

[data-theme-toggle] {
  background: var(--brand) !important;
  color: white !important;
}

[data-theme-toggle]:hover {
  background: var(--brand-dark) !important;
  color: white !important;
}

.nav_search {
  width: 100%;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

.nav_group {
  margin: 18px 0;
}

.nav_group_title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.nav_link {
  display: block;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}

.nav_link:hover,
.nav_link.active {
  background: var(--surface-2);
  color: var(--brand-dark);
  text-decoration: none;
}

.doc_main {
  min-width: 0;
  padding: 56px 32px 80px;
}

.article {
  max-width: var(--content);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 46px 0 14px;
  padding-top: 12px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 26px 0 10px;
  font-size: 20px;
  letter-spacing: 0;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

ul,
ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

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

code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

pre {
  margin: 18px 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #10262c;
  color: #e8f6f7;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.lead {
  font-size: 19px;
  line-height: 1.72;
}

.hero_panel,
.callout,
.article_card,
.step,
.next_panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.hero_panel {
  margin: 28px 0 30px;
  overflow: hidden;
}

.hero_panel img {
  display: block;
  width: 100%;
}

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

.article_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 28px;
}

.article_card {
  display: block;
  padding: 18px;
  color: var(--text);
}

.article_card:hover {
  border-color: #a9dce4;
  text-decoration: none;
}

.article_card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.article_card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.callout {
  margin: 22px 0;
  padding: 18px;
  border-left: 4px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.callout.warning {
  border-left-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 12%, var(--surface));
}

.callout.success {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
}

.step_list {
  display: grid;
  gap: 12px;
  margin: 18px 0 26px;
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.step_num {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-weight: 800;
}

.step strong {
  display: block;
  margin-bottom: 4px;
}

.screenshot {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.screenshot img {
  display: block;
  width: 100%;
}

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

.pill_row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}

.pill {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.next_panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 52px;
  padding: 18px;
}

.next_panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.next_panel strong {
  display: block;
  margin-top: 4px;
}

.toc {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 56px 18px 24px;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
}

.toc_title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 13px;
}

.toc a.h3 {
  padding-left: 12px;
}

.toc a.active {
  color: var(--brand-dark);
  font-weight: 750;
}

.empty_search {
  display: none;
  color: var(--muted);
  font-size: 14px;
}

.kbd {
  padding: 2px 6px;
  border: 1px solid var(--soft);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .site_shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .site_shell {
    display: block;
  }

  .mobile_topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }

  .mobile_topbar img {
    width: 128px;
  }

  .sidebar {
    position: fixed;
    inset: 57px 0 auto 0;
    z-index: 30;
    display: none;
    height: calc(100vh - 57px);
  }

  .sidebar.open {
    display: block;
  }

  .sidebar .brand {
    display: none;
  }

  .doc_main {
    padding: 32px 18px 60px;
  }

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

  .next_panel {
    display: block;
  }

  .next_panel a + a {
    display: block;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
}
