/* ==========================================================================
   ThinkPHP Docs Template — Design System
   Brand green sampled from thinkphp.cn/doc: #009E3C
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --brand-700: #00752C;
  --brand-600: #009E3C;
  --brand-500: #0BB84C;
  --brand-400: #35C96A;
  --brand-100: #D6F3E0;
  --brand-50: #EDFAF1;

  --ink: #131B16;
  --ink-2: #3A4740;
  --ink-3: #66756C;
  --ink-4: #93A09A;

  --line: #E4E9E5;
  --line-strong: #D3DAD5;

  --bg: #F6F8F6;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FBFCFB;

  --warn: #B4690E;
  --warn-bg: #FFF7E6;
  --info: #1D5FBF;
  --info-bg: #EEF4FF;

  --shadow-xs: 0 1px 2px rgba(16, 34, 24, .06);
  --shadow-sm: 0 2px 8px -2px rgba(16, 34, 24, .08), 0 1px 2px rgba(16, 34, 24, .04);
  --shadow-md: 0 12px 28px -12px rgba(16, 34, 24, .18), 0 2px 6px rgba(16, 34, 24, .05);
  --shadow-lg: 0 30px 70px -30px rgba(16, 34, 24, .35);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --header-h: 64px;
  --container: 1200px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="dark"] {
  --brand-700: #16A34A;
  --brand-600: #2ECC71;
  --brand-500: #3EE383;
  --brand-400: #6BF0A3;
  --brand-100: #14351F;
  --brand-50: #10271A;

  --ink: #EAF0EB;
  --ink-2: #C2CEC6;
  --ink-3: #93A39A;
  --ink-4: #6C7C73;

  --line: #232D27;
  --line-strong: #2E3A33;

  --bg: #0B100D;
  --bg-elevated: #101713;
  --surface: #121A15;
  --surface-2: #0F1612;

  --warn: #F0B45E;
  --warn-bg: #2A2113;
  --info: #8FB8FF;
  --info-bg: #131E30;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, .5);
  --shadow-md: 0 14px 30px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .8);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: -.01em;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
kbd { font-family: var(--font-sans); }

::selection { background: var(--brand-100); color: var(--ink); }

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
    border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(0, 158, 60, .8);
}
.btn-primary:hover { background: var(--brand-700); }
[data-theme="dark"] .btn-primary { color: #05130B; }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.icon-btn:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(16, 34, 24, .5);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 10px -4px rgba(0, 117, 44, .6);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink-4);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}
.main-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.main-nav a:hover { color: var(--ink); background: var(--brand-50); }
.main-nav a.is-active { color: var(--brand-700); font-weight: 600; }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-600);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.search-trigger:hover { border-color: var(--line-strong); background: var(--surface); }
.search-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }
.search-trigger .kbd {
  display: inline-flex;
  gap: 2px;
  margin-left: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-elevated);
  font-size: 11px;
  color: var(--ink-4);
}

.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 128px;
  background:
    radial-gradient(1200px 420px at 50% -140px, rgba(255, 255, 255, .28), transparent 70%),
    linear-gradient(135deg, #00772E 0%, #009E3C 46%, #0CB94F 100%);
  color: #fff;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  opacity: .9;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -160px;
  top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 62%);
  filter: blur(10px);
  z-index: -1;
  animation: floaty 14s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-30px, 30px, 0) scale(1.06); }
}

.hero-inner { max-width: 780px; }

[data-theme="dark"] .hero {
  background:
    radial-gradient(1200px 420px at 50% -140px, rgba(255, 255, 255, .08), transparent 70%),
    linear-gradient(135deg, #03331B 0%, #055C2A 52%, #077033 100%);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 12.5px;
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
}
.hero-eyebrow .dot {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--brand-700);
  font-size: 10px;
  font-weight: 800;
}

.hero h1 {
  max-width: 15em;
  margin: 22px 0 0;
  color: #fff;
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero-line { display: block; text-wrap: balance; }
.narrow-only { display: none; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, .62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 34em;
  margin-top: 16px;
  color: rgba(255, 255, 255, .84);
  font-size: 16px;
  line-height: 1.75;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  height: 56px;
  margin-top: 32px;
  padding: 0 8px 0 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(0, 56, 22, .6);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  cursor: text;
}
.hero-search:hover { transform: translateY(-1px); box-shadow: 0 22px 48px -18px rgba(0, 56, 22, .7); }
.hero-search svg { width: 18px; height: 18px; color: var(--ink-4); flex-shrink: 0; }
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.hero-search input::placeholder { color: var(--ink-4); }
.hero-search .btn { flex-shrink: 0; }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}
.hero-tags a {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 12.5px;
  transition: background-color .18s var(--ease);
}
.hero-tags a:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Stats strip ---------- */
.stats {
  position: relative;
  z-index: 2;
  margin-top: -64px;
  margin-bottom: 8px;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  box-shadow: var(--shadow-md);
}
.stat {
  padding: 22px 26px;
  background: var(--surface);
}
.stat b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat b span { font-size: 14px; font-weight: 600; color: var(--brand-600); margin-left: 2px; }
.stat p { margin-top: 2px; font-size: 13px; color: var(--ink-3); }

/* ---------- Home layout ---------- */
.layout-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  padding-block: 56px 80px;
  align-items: start;
}

.section + .section { margin-top: 56px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  letter-spacing: -.02em;
}
.section-head h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
}
.section-head p {
  margin-top: 6px;
  margin-left: 14px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color .18s var(--ease), gap .18s var(--ease);
}
.section-more:hover { color: var(--brand-700); gap: 8px; }

/* ---------- Doc cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
    border-color .22s var(--ease);
  overflow: hidden;
}
.doc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(0, 158, 60, .55), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .22s var(--ease);
  pointer-events: none;
}
.doc-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-500) 45%, var(--line));
  box-shadow: var(--shadow-md);
}
.doc-card:hover::after { opacity: 1; }
.doc-card:hover .doc-card-arrow { opacity: 1; transform: translate(0, 0); }

.doc-card h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.015em;
}
.doc-card h3 a { display: inline-block; }
.doc-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.doc-card p {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.doc-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 12px;
  color: var(--ink-4);
}
.doc-card-arrow {
  position: absolute;
  right: 18px;
  top: 20px;
  opacity: 0;
  transform: translate(-4px, 4px);
  color: var(--brand-600);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  z-index: 2;
}
.doc-card-arrow svg { width: 15px; height: 15px; }

.card-rule {
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand-600);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
}
.doc-card > .tag { align-self: flex-start; }
[data-theme="dark"] .tag { color: var(--brand-500); }
.tag--muted { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.tag--new::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* feature card */
.doc-card--feature {
  grid-column: span 2;
  background:
    radial-gradient(520px 200px at 92% -30%, rgba(0, 158, 60, .14), transparent 70%),
    var(--surface);
}
.doc-card--feature h3 { font-size: 18px; }
.doc-card--feature p { -webkit-line-clamp: 2; }

/* ---------- Home aside ---------- */
.home-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 16px;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-head h3 { font-size: 14.5px; letter-spacing: -.01em; }
.panel-head a { font-size: 12px; color: var(--ink-4); }
.panel-head a:hover { color: var(--brand-700); }

.steps { display: grid; gap: 14px; counter-reset: step; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  grid-row: 1 / span 3;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-600);
  padding-top: 2px;
}
.step b { grid-column: 2; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.step p { grid-column: 2; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.step .code-inline { grid-column: 2; min-width: 0; }

.code-inline {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.news-list { display: grid; gap: 11px; }
.news-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.news-list a {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
  transition: color .18s var(--ease);
}
.news-list a:hover { color: var(--brand-700); }
.news-list a::before {
  content: "·";
  color: var(--brand-500);
  font-weight: 800;
  flex-shrink: 0;
}
.news-list time { flex-shrink: 0; font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }

.panel--promo {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 0;
  background:
    radial-gradient(360px 160px at 90% 0%, rgba(255, 255, 255, .28), transparent 60%),
    linear-gradient(150deg, #0B7A35, #009E3C 60%, #12B554);
  color: rgba(255, 255, 255, .86);
}
.panel--promo h3 { color: #fff; font-size: 15px; }
.panel--promo p { margin: 8px 0 16px; font-size: 12.5px; line-height: 1.65; }
.panel--promo .btn {
  background: rgba(255, 255, 255, .95);
  color: var(--brand-700);
  height: 34px;
  font-size: 12.5px;
}
.panel--promo .btn:hover { background: #fff; }
.panel--promo .promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 11px;
  color: #fff;
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  margin: 0 0 72px;
  padding: 44px 48px;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: rgba(255, 255, 255, .78);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
[data-theme="dark"] .cta-band { background: #0E1712; border: 1px solid var(--line); }
.cta-band::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  right: 8%;
  top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 158, 60, .55), transparent 65%);
}
.cta-band h2 { color: #fff; font-size: 24px; letter-spacing: -.02em; }
.cta-band p { margin-top: 8px; font-size: 14px; max-width: 46ch; }
.cta-actions { display: flex; gap: 10px; flex-shrink: 0; position: relative; }
.cta-band .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
}
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p {
  margin-top: 14px;
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-3);
}
.footer-col h4 { font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 14px; }
.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: var(--ink-3);
  transition: color .18s var(--ease);
}
.footer-col a:hover { color: var(--brand-700); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-4);
}
.footer-bottom nav { display: flex; gap: 18px; }
.footer-bottom a:hover { color: var(--ink-2); }

/* ---------- Doc page: breadcrumb bar ---------- */
.doc-topbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}
.doc-topbar .container {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  font-size: 13px;
  color: var(--ink-3);
  overflow-x: auto;
  scrollbar-width: none;
}
.doc-topbar .container::-webkit-scrollbar { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--brand-700); }
.crumbs svg { width: 12px; height: 12px; color: var(--ink-4); flex-shrink: 0; }
.crumbs [aria-current] { color: var(--ink); font-weight: 550; }

.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ---------- Doc layout ---------- */
.doc-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 212px;
  gap: 44px;
  padding-block: 32px 96px;
  align-items: start;
}

/* Sidebar tree */
.doc-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow: auto;
  padding-right: 6px;
  font-size: 13.5px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.doc-sidebar::-webkit-scrollbar { width: 6px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.sidebar-search {
  position: relative;
  margin-bottom: 18px;
}
.sidebar-search svg {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--ink-4);
}
.sidebar-search input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  outline: 0;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.sidebar-search input:focus { border-color: var(--brand-500); background: var(--surface); }
.sidebar-search input::placeholder { color: var(--ink-4); }

.nav-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.nav-title .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-50);
}

.nav-group { margin-bottom: 6px; }
.nav-group > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--brand-50); color: var(--ink); }
.nav-group > summary svg {
  width: 12px; height: 12px;
  color: var(--ink-4);
  transition: transform .2s var(--ease);
  flex-shrink: 0;
}
.nav-group[open] > summary svg { transform: rotate(90deg); }
.nav-group ul { margin: 2px 0 8px; padding-left: 14px; border-left: 1px solid var(--line); margin-left: 12px; }
.nav-group ul a {
  display: block;
  padding: 5.5px 10px;
  border-radius: 6px;
  color: var(--ink-3);
  line-height: 1.5;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.nav-group ul a:hover { color: var(--ink); background: var(--surface-2); }
.nav-group ul a.is-active {
  position: relative;
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}
[data-theme="dark"] .nav-group ul a.is-active { color: var(--brand-500); }
.nav-group ul a.is-active::before {
  content: "";
  position: absolute;
  left: -15px; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--brand-600);
}

/* Article */
.doc-article { min-width: 0; max-width: 820px; }

.article-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-head h1 {
  font-size: clamp(28px, 3.4vw, 36px);
  letter-spacing: -.03em;
  line-height: 1.2;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-4);
}
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.article-meta svg { width: 13px; height: 13px; }
.article-lead {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-3);
}

.article-body { padding-top: 8px; }
.article-body > section { scroll-margin-top: calc(var(--header-h) + 20px); }

.article-body h2 {
  margin: 40px 0 14px;
  font-size: 22px;
  letter-spacing: -.02em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article-body h3 {
  margin: 32px 0 12px;
  font-size: 17px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article-body h2 + p, .article-body h3 + p { margin-top: 0; }
.article-body p { margin: 12px 0; line-height: 1.85; }
.article-body a:not(.btn) {
  color: var(--brand-700);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand-500) 40%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color .18s var(--ease);
}
[data-theme="dark"] .article-body a:not(.btn) { color: var(--brand-500); }
.article-body a:not(.btn):hover { text-decoration-color: currentColor; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body ul, .article-body ol { margin: 12px 0 12px 4px; display: grid; gap: 8px; }
.article-body ul li { position: relative; padding-left: 18px; line-height: 1.75; }
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: .72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-500);
}
.article-body ol { counter-reset: ol; }
.article-body ol li { position: relative; padding-left: 26px; counter-increment: ol; line-height: 1.75; }
.article-body ol li::before {
  content: counter(ol) ".";
  position: absolute;
  left: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
}

code {
  padding: .18em .42em;
  border-radius: 5px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-family: var(--font-mono);
  font-size: .86em;
  border: 1px solid color-mix(in srgb, var(--brand-500) 14%, transparent);
  white-space: nowrap;
}
[data-theme="dark"] code { color: var(--brand-500); }

/* Tables */
.table-wrap {
  margin: 16px 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--surface);
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 480px;
}
.doc-table th,
.doc-table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.doc-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .01em;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table tbody tr { transition: background-color .15s var(--ease); }
.doc-table tbody tr:hover { background: color-mix(in srgb, var(--brand-50) 55%, transparent); }
.doc-table td:first-child { color: var(--ink); font-weight: 500; }
.doc-table td code { white-space: nowrap; }
.doc-table .col-key { width: 26%; }

/* Callout */
.callout {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand-500) 26%, var(--line));
  border-left: 3px solid var(--brand-500);
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.callout svg { width: 18px; height: 18px; color: var(--brand-600); margin-top: 1px; }
.callout b { color: var(--ink); }
.callout--warn {
  border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
  border-left-color: var(--warn);
  background: var(--warn-bg);
}
.callout--warn svg { color: var(--warn); }

/* Code block */
.code-block {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0F1713;
  overflow: hidden;
}
.code-block .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
}
.code-block .code-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11px;
}
.code-block .code-lang::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, .65);
  font-size: 11.5px;
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.copy-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.copy-btn.is-done { color: var(--brand-400); border-color: rgba(53, 201, 106, .4); }
.copy-btn svg { width: 13px; height: 13px; }
.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.75;
  color: #D5E3DA;
  tab-size: 2;
}
.code-block code {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}
.tok-key { color: #7DD3A0; }
.tok-str { color: #E5C07B; }
.tok-com { color: #5B6D63; font-style: italic; }
.tok-num { color: #8FB8FF; }

/* Tabs (dark code surface) */
.tabs {
  margin: 18px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0F1713;
}
.tab-list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  overflow-x: auto;
}
.tab-list button[role="tab"] {
  padding: 8px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: rgba(255, 255, 255, .5);
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.tab-list button[role="tab"]:hover { color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .05); }
.tab-list button[role="tab"][aria-selected="true"] {
  color: #fff;
  border-bottom-color: var(--brand-500);
  background: rgba(255, 255, 255, .06);
}
.tab-list .copy-btn { margin-left: auto; flex-shrink: 0; margin-bottom: 6px; }
.tab-panel { padding: 16px 18px; }
.tab-panel[hidden] { display: none; }
.tab-panel pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.75;
  color: #D5E3DA;
}
.tab-panel pre code {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

/* Article footer */
.article-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 13.5px;
  color: var(--ink-3);
}
.feedback-actions { display: flex; gap: 8px; margin-left: auto; }
.feedback button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease), background-color .16s var(--ease);
}
.feedback button:hover { border-color: var(--brand-500); color: var(--brand-700); }
.feedback button[aria-pressed="true"] {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--brand-700);
}
.feedback svg { width: 14px; height: 14px; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.pager a {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.pager a:hover { border-color: var(--brand-500); transform: translateY(-2px); }
.pager a.next { text-align: right; }
.pager .pager-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-4);
}
.pager a.next .pager-label { justify-content: flex-end; }
.pager .pager-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.pager svg { width: 13px; height: 13px; }

/* TOC */
.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 13px;
}
.toc-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.doc-toc ul {
  display: grid;
  gap: 1px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.doc-toc a {
  display: block;
  padding: 5px 10px;
  margin-left: -11px;
  border-left: 2px solid transparent;
  color: var(--ink-3);
  line-height: 1.55;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.doc-toc a:hover { color: var(--ink); }
.doc-toc a.is-active {
  color: var(--brand-700);
  border-left-color: var(--brand-600);
  font-weight: 600;
}
[data-theme="dark"] .doc-toc a.is-active { color: var(--brand-500); }
.doc-toc .toc-sub { padding-left: 12px; }
.doc-toc .toc-sub a { font-size: 12.5px; }

.toc-card {
  margin-top: 22px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--brand-50);
  border: 1px solid color-mix(in srgb, var(--brand-500) 18%, transparent);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.toc-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--brand-700);
  font-weight: 600;
}

/* Reading progress */
.progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 90;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-400));
  transition: width .1s linear;
  pointer-events: none;
}

/* ---------- Search modal ---------- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(10, 18, 13, .45);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), visibility .2s;
}
.search-modal.is-open { opacity: 1; visibility: visible; }
.search-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px) scale(.99);
  transition: transform .2s var(--ease);
}
.search-modal.is-open .search-dialog { transform: none; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.search-field svg { width: 18px; height: 18px; color: var(--ink-4); flex-shrink: 0; }
.search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.search-field .esc {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
  color: var(--ink-4);
}
.search-results {
  overflow-y: auto;
  padding: 8px;
  display: grid;
  gap: 2px;
}
.search-group-label {
  padding: 8px 10px 4px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.search-item:hover, .search-item.is-active { background: var(--brand-50); color: var(--ink); }
.search-item .si-icon {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
}
.search-item .si-icon svg { width: 13px; height: 13px; }
.search-item small {
  display: block;
  font-size: 11.5px;
  color: var(--ink-4);
  font-weight: 400;
}
.search-item mark {
  background: var(--brand-100);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.search-empty {
  padding: 36px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-4);
}
.search-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--ink-4);
}
.search-foot kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-elevated);
  font-size: 10.5px;
}

/* ---------- Drawer (mobile nav) ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  visibility: hidden;
}
.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 13, .45);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.drawer-panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform .28s var(--ease);
  overflow: hidden;
}
.drawer-panel:focus { outline: none; }
.drawer.is-open { visibility: visible; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-body { padding: 16px; overflow-y: auto; }
.drawer-body .main-nav--vertical { display: grid; gap: 2px; margin: 0 0 16px; }
.drawer-body .main-nav--vertical a {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.drawer-body .main-nav--vertical a.is-active::after { display: none; }
.drawer-body .doc-sidebar {
  display: block;
  position: static;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.drawer-body .nav-title { margin-top: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 150;
  transform: translate(-50%, 12px);
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Sidebar simple list ---------- */
.nav-simple {
  display: grid;
  gap: 1px;
  margin: 0 0 8px;
}
.nav-simple a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--ink-3);
  font-size: 13.5px;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.nav-simple a:hover { color: var(--ink); background: var(--surface-2); }

.nav-group--sub { margin: 0; }
.nav-group--sub > summary { font-size: 12.8px; padding: 5px 8px; }
.nav-group--sub ul { margin: 0 0 2px 10px; padding-left: 10px; }
.nav-group--sub ul a { font-size: 12.8px; padding: 4.5px 9px; }

/* ---------- Demo banner ---------- */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 18px 22px;
  border: 1px dashed color-mix(in srgb, var(--brand-500) 40%, var(--line));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(100deg, var(--brand-50), transparent 70%),
    var(--surface);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.demo-banner:hover {
  transform: translateY(-2px);
  border-color: var(--brand-500);
  box-shadow: var(--shadow-sm);
}
.demo-banner-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(0, 117, 44, .9);
}
.demo-banner-text { display: grid; gap: 2px; min-width: 0; }
.demo-banner-text b { font-size: 14px; color: var(--ink); font-weight: 650; }
.demo-banner-text span { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.demo-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
  white-space: nowrap;
}
[data-theme="dark"] .demo-banner-cta { color: var(--brand-500); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .doc-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 36px; }
  .doc-toc { display: none; }
}

@media (max-width: 1024px) {
  .layout-home { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .home-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-aside .panel--promo { grid-column: span 2; }
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .container { padding-inline: 18px; }
  .header-actions > .btn { display: none; }
  .brand small { display: none; }
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .hero { padding: 48px 0 112px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 14.5px; }
  .hero-search { height: 50px; padding-left: 14px; }
  .hero-search .btn { height: 38px; padding: 0 14px; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat { padding: 16px 18px; }
  .stat b { font-size: 22px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-card--feature { grid-column: span 1; }
  .home-aside { grid-template-columns: minmax(0, 1fr); }
  .home-aside .panel--promo { grid-column: span 1; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .search-trigger span, .search-trigger .kbd { display: none; }
  .search-trigger { width: 38px; padding: 0; justify-content: center; }
  .article-head h1 { font-size: 27px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .feedback { flex-wrap: wrap; }
  .feedback-actions { margin-left: 0; }
  .doc-topbar .container { height: 42px; }
  .topbar-actions .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .doc-sidebar, .doc-toc, .doc-topbar, .article-foot,
  .search-modal, .drawer, .progress, .toast, .hero-tags { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .doc-layout { display: block; padding: 0; }
  .doc-article { max-width: none; }
  .table-wrap { break-inside: avoid; }
  .code-block { break-inside: avoid; border-color: #ddd; }
}
