@font-face {
  font-family: 'OpenAI Sans';
  src: url('fonts/OpenAISans-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'OpenAI Sans';
  src: url('fonts/OpenAISans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'OpenAI Sans';
  src: url('fonts/OpenAISans-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'OpenAI Sans';
  src: url('fonts/OpenAISans-Semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'OpenAI Sans';
  src: url('fonts/OpenAISans-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-secondary: #fafafa;
  --bg-code: #f7f7f7;
  --bg-code-inline: #f2f2f2;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --text: #282828;
  --text-default: #282828;
  --text-secondary: #5d5d5d;
  --text-tertiary: #8e8e8e;
  --text-muted: #a3a3a3;
  --accent: #000000;
  --link: #282828;
  --link-hover: #000000;
  --active-bg: #f0f0f0;
  --card-hover-border: #282828;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  overflow-x: hidden;
}

body {
  font-family: 'OpenAI Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ====== Top navigation ====== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
}

.topnav-logo {
  display: flex;
  align-items: center;
  height: 24px;
  color: var(--text);
  text-decoration: none;
  margin-right: 24px;
  flex-shrink: 0;
}

.topnav-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.topnav-links {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.topnav-links li {
  margin: 0;
  position: relative;
}

.topnav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.15s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.topnav-links a .caret {
  width: 10px;
  height: 10px;
  display: inline-block;
  opacity: 0.6;
}

.topnav-links a .caret::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-top: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  min-width: 260px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
  z-index: 200;
}

.topnav-links li:hover .nav-dropdown,
.topnav-links li:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}

.nav-dropdown a:hover {
  background: var(--bg-secondary);
}

.nav-dropdown a .dd-title {
  display: block;
  font-weight: 500;
  color: var(--text);
  font-size: 13px;
}

.nav-dropdown a .dd-desc {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-weight: 400;
}

.topnav-links a:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.topnav-links a.current {
  background: #ededed;
  color: var(--text);
  border: none;
}

.topnav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  width: 220px;
  min-width: 120px;
  margin-right: 10px;
  cursor: pointer;
  flex-shrink: 1;
}

.topnav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
}

.theme-toggle {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 10px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.topnav-cta:hover {
  background: #333;
}

/* ====== Layout ====== */
.layout {
  /* Shell container; all children are position:fixed */
}

/* ====== Left sidebar ====== */
.sidebar {
  width: 240px;
  min-width: 240px;
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  padding: 12px 16px 24px 20px;
  background: var(--bg);
  font-size: 14px;
}

.sidebar-group {
  margin-bottom: 16px;
}

.sidebar-group h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-default);
  padding: 0;
  margin-bottom: 8px;
  margin-top: 24px;
  margin-left: 4px;
  letter-spacing: 0em;
  line-height: 1.4;
  user-select: none;
}

.sidebar-group:first-child h3 {
  margin-top: 0;
}

.sidebar-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-group li {
  margin: 0;
}

.sidebar-group li a {
  display: block;
  padding: 6px 12px;
  color: var(--text-default);
  text-decoration: none;
  font-size: 14px;
  border-radius: 10px;
  transition: all 0.15s;
  line-height: 1.25rem;
}

.sidebar-group li a:not(.active):hover {
  background: rgba(13,13,13,0.06);
  color: var(--text);
}

.sidebar-group li a.active {
  background: rgba(13,13,13,0.12);
  color: var(--text-default);
}

.sidebar-group li a:hover {
  color: var(--text);
  background: var(--bg-secondary);
}

.sidebar-group li a.active {
  background: var(--active-bg);
  color: var(--text);
  font-weight: 500;
}

.sidebar-group li span.disabled {
  color: var(--text-tertiary);
  cursor: default;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-group li span.disabled::after {
  content: "›";
  color: var(--text-muted);
  font-size: 14px;
}

/* ====== Sidebar collapsible groups (details/summary) ====== */
.sidebar-group details {
  border: none;
  background: none;
  margin: 0;
  border-radius: 0;
}

.sidebar-group details summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-default);
  font-size: 14px;
  font-weight: 400;
  transition: background 0.15s;
  line-height: 1.25rem;
}

.sidebar-group details summary::-webkit-details-marker { display: none; }
.sidebar-group details summary::marker { content: ""; }

.sidebar-group details summary:hover {
  background: rgba(13,13,13,0.06);
  color: var(--text);
}

.sidebar-group details summary .chev {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.15s;
}

.sidebar-group details[open] summary .chev {
  transform: rotate(90deg);
}

.sidebar-group details ul {
  margin-top: 4px;
  margin-left: 12px;
  padding-left: 0;
  max-width: calc(100% - 12px);
  gap: 2px;
}

.sidebar-group details ul li a {
  padding: 6px 12px;
  font-size: 14px;
}

/* ====== Copy Page button ====== */
.copy-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  margin: 8px 0 20px;
  font-family: inherit;
}

.copy-page-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-secondary);
}

.copy-page-btn::before {
  content: "⎘";
  font-size: 14px;
}

.copy-page-bottom {
  margin: 24px 0 0;
  float: right;
}

/* ====== YouTube video embed ====== */
.video-embed {
  position: relative;
  width: 448px;
  height: 252px;
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0 32px;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.video-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.video-title {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.video-channel {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #ccc;
}

.video-channel-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 700;
  font-size: 14px;
}

.video-play-btn {
  width: 68px;
  height: 48px;
  background: #ff0000;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.video-play-btn::after {
  content: "";
  border-left: 18px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 4px;
}

.video-big-title {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 12px rgba(0,0,0,0.6);
  white-space: nowrap;
}

/* ====== Tabs label ====== */
.tabs-label {
  display: block;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

/* ====== Main content ====== */
.main {
  position: fixed;
  top: 64px;
  left: 240px;
  right: 232px;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px 40px 80px 80px;
  word-break: break-word;
}

.main img, .main video, .main iframe {
  max-width: 100%;
  height: auto;
}

.main-no-toc {
  right: 0;
}

.main > * {
  max-width: 720px;
}

.main > .hero-section,
.main > .hero-cards,
.main > .steps,
.main > .card-grid {
  max-width: none;
}

/* ====== Right TOC ====== */
.toc {
  width: 200px;
  min-width: 200px;
  position: fixed;
  top: 96px;
  right: 32px;
  bottom: 0;
  overflow-y: auto;
  padding: 0 0 32px 0;
}

.toc-hidden {
  display: none;
}

.toc-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 12px;
  font-weight: 500;
}

.toc ul {
  list-style: none;
  border-left: 1px solid var(--border);
  padding: 0;
  margin: 0;
}

.toc li {
  margin: 0;
}

.toc li a {
  display: block;
  padding: 5px 12px;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 12px;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: all 0.15s;
  line-height: 1.5;
}

.toc li a:hover {
  color: var(--text);
}

.toc li a.active {
  color: var(--text);
  border-left-color: var(--text);
}

/* ====== Typography ====== */
h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  line-height: 1.5;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  scroll-margin-top: 72px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
  letter-spacing: -0.003em;
  scroll-margin-top: 72px;
}

h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 6px;
}

p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ====== Links ====== */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--text);
}

/* ====== Code ====== */
code {
  font-family: 'Söhne Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  background: var(--bg-code-inline);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 14px 0 20px;
  position: relative;
}

.code-block {
  position: relative;
}

.code-block pre {
  padding-right: 40px;
}

.code-block code {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  margin-right: 36px;
}

.copy-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.copy-btn:hover {
  color: var(--text);
  background: var(--bg-secondary);
  border-color: var(--border);
}

.copy-btn.copied {
  color: #22c55e;
}

.copy-btn.copied svg {
  display: none;
}

.copy-btn.copied::after {
  content: "\2713";
  font-size: 14px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.code-label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

/* ====== Lists ====== */
ul, ol {
  padding-left: 22px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 6px;
}

li::marker {
  color: var(--text-muted);
}

/* ====== Tables ====== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 24px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-secondary);
}

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

.cmd-table td:first-child {
  white-space: nowrap;
  font-family: 'Söhne Mono', 'SF Mono', Menlo, monospace;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ====== Callouts ====== */
.callout {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
}

.callout::before {
  content: "ⓘ";
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.callout.warning::before {
  content: "⚠";
  color: #d97706;
}

.callout-body {
  flex: 1;
}

/* ====== Feature card grid ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 20px 0 40px;
}

.card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}

.card:hover {
  border-color: var(--card-hover-border);
  text-decoration: none;
}

.card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}

.card p {
  font-size: 13.5px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.5;
}

/* ====== Step list ====== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
  list-style: none;
  padding: 0;
  align-items: start;
}

.steps > li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-right: 8px;
}

.steps h3 {
  display: inline;
  font-size: 16px;
  margin: 0;
}

.steps p {
  font-size: 14px;
  margin: 10px 0;
  color: var(--text-tertiary);
  line-height: 1.55;
}

.steps pre {
  margin: 10px 0;
  font-size: 13px;
  padding: 12px 14px;
}

.steps pre code {
  font-size: 13px;
}

/* ====== Tabs ====== */
.tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab {
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-tertiary);
  border: none;
  background: none;
  cursor: pointer;
}

.tab.active {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
}

.tab:hover:not(.active) {
  color: var(--text-secondary);
}

/* ====== Tags / badges ====== */
.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag.stable {
  background: #e8f5ee;
  color: #0f7b3a;
}

.tag.experimental {
  background: #fff3e0;
  color: #b45309;
}

/* ====== Pricing cards ====== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}

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

.pricing-card .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0;
  letter-spacing: -0.02em;
}

.pricing-card .price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.pricing-card p {
  font-size: 13.5px;
  color: var(--text-tertiary);
}

/* ====== FAQ details (main content, not sidebar) ====== */
.main details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}

.main details summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  font-size: 14.5px;
  list-style: none;
  position: relative;
}

.main details summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 14px;
  font-size: 18px;
  color: var(--text-tertiary);
}

.main details[open] summary::after { content: "−"; }

.main details[open] summary {
  border-bottom: 1px solid var(--border);
}

.main details > div {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ====== Page nav (prev/next) ====== */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav a {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.15s;
  max-width: 48%;
  flex: 1;
  color: var(--text);
}

.page-nav a:hover {
  border-color: var(--text);
}

.page-nav a.next {
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
}

.page-nav .label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.page-nav .title {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}

/* ====== Changelog ====== */
.changelog-entry {
  margin-bottom: 36px;
}

.changelog-date {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 6px;
}

.changelog-entry h3 {
  margin-top: 4px;
}

/* ====== Hero section (index overview) ====== */
.hero-section {
  margin-bottom: 32px;
}

.hero-content {
  display: flex;
  gap: 48px;
  align-items: center;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-text ul {
  padding-left: 20px;
}

.hero-text ul li {
  margin-bottom: 10px;
}

.hero-text ul li p {
  margin-bottom: 0;
}

.hero-image {
  flex-shrink: 0;
  width: 420px;
  align-self: center;
}

.hero-app-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  display: block;
}

.hero-app-img-dark {
  display: none;
}

html.dark .hero-app-img {
  display: none;
}

html.dark .hero-app-img-dark {
  display: block;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  margin-top: 8px;
  transition: background 0.15s;
}

.cta-btn:hover {
  background: #333;
  text-decoration: none !important;
}

html.dark .cta-btn {
  background: #f5f5f5;
  color: #171717 !important;
}

html.dark .cta-btn:hover {
  background: #d4d4d4;
}

.hero-cards {
  margin-top: 0;
}

.hero-cards .card-action {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

@media (max-width: 1200px) {
  .hero-image { width: 300px; }
}

@media (max-width: 900px) {
  .hero-content { flex-direction: column; }
  .hero-image { width: 100%; }
}

/* ====== Responsive ====== */
@media (max-width: 1200px) {
  .toc { display: none; }
  .main { right: 0; padding-left: 60px; padding-right: 32px; }
}

@media (max-width: 1000px) {
  .main { padding-left: 40px; padding-right: 24px; }
}

@media (max-width: 900px) {
  .topnav-links, .topnav-search { display: none; }
  .sidebar { display: none; }
  .main {
    left: 0 !important;
    right: 0;
    padding: 32px 20px 60px;
    overflow-x: hidden;
  }
  .card-grid, .steps { grid-template-columns: 1fr !important; }
  .topnav { padding: 0 16px; }
  .topnav-right .btn { font-size: 13px; padding: 6px 12px; }
  table { display: block; overflow-x: auto; }
  .prev-next { flex-direction: column; gap: 12px; }
  .prev-next a { width: 100%; }
}

@media (max-width: 600px) {
  .main { padding: 24px 16px 60px; }
  .topnav { padding: 0 12px; }
  .topnav-logo { margin-right: 12px; }
  .topnav-right .btn { font-size: 12px; padding: 5px 10px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 17px; }
  pre { padding: 12px 14px; font-size: 13px; }
  .callout { padding: 14px 16px; }
}

/* ====== Dark theme ====== */
html.dark {
  --bg: #171717;
  --bg-secondary: #1e1e1e;
  --bg-code: #1e1e1e;
  --bg-code-inline: #262626;
  --border: #2e2e2e;
  --border-strong: #404040;
  --text: #f5f5f5;
  --text-default: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;
  --text-muted: #525252;
  --accent: #ffffff;
  --link: #f5f5f5;
  --link-hover: #ffffff;
  --active-bg: #2e2e2e;
  --card-hover-border: #a3a3a3;
}

html.dark .topnav-links a.current {
  background: #2e2e2e;
}

html.dark .topnav-cta {
  background: #f5f5f5;
  color: #171717;
}

html.dark .topnav-cta:hover {
  background: #d4d4d4;
}

html.dark .sidebar-group li a:not(.active):hover {
  background: rgba(255,255,255,0.06);
}

html.dark .sidebar-group li a.active {
  background: rgba(255,255,255,0.1);
}

html.dark .sidebar-group details summary:hover {
  background: rgba(255,255,255,0.06);
}

html.dark .tag.stable {
  background: #0a3d1e;
  color: #4ade80;
}

html.dark .tag.experimental {
  background: #3d2500;
  color: #fbbf24;
}

html.dark .callout.warning::before {
  color: #fbbf24;
}

html.dark .topnav-logo img {
  filter: invert(1);
}

html.dark .theme-toggle svg {
  color: var(--text-secondary);
}

html.dark .video-placeholder {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}
