/* ============================================================
   Tangra AI — Help center styles
   On-brand with tangra.link: Poppins, pink→orange gradient,
   dark by default (matches the product), light theme optional.
   Hand-written, framework-free. (c) Tangra.
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --brand-start: #e8056d;
  --brand-end: #fb6e00;
  --brand-gradient: linear-gradient(90deg, #e8056d 0%, #fb6e00 100%);
  --brand-gradient-50: linear-gradient(90deg, #e8056d 0%, #fb6e00 50%);
  --action: #d01a62;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1320px;
  --sidebar-w: 286px;
  --toc-w: 232px;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 113px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --transition: .2s ease;
}

/* Dark is the default to match the live product */
:root,
[data-theme='dark'] {
  --bg: #000000;
  --bg-elev: #0e0e10;
  --bg-elev-2: #161618;
  --surface: #1b1b1f;
  --surface-hover: #232328;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, .64);
  --text-faint: rgba(255, 255, 255, .42);
  /* product (globals.css) token aliases — resolve per active theme */
  --foreground: var(--text);
  --background: var(--bg);
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .18);
  --code-bg: #121214;
  --link: #ff5fa2;
  --glow: radial-gradient(900px 400px at 80% -10%, rgba(232, 5, 109, .18), transparent 60%),
          radial-gradient(700px 360px at 0% 0%, rgba(251, 110, 0, .12), transparent 55%);
}

[data-theme='light'] {
  --bg: #ffffff;
  --bg-elev: #fbfbfc;
  --bg-elev-2: #f4f4f6;
  --surface: #ffffff;
  --surface-hover: #f6f6f8;
  --text: #16161a;
  --text-muted: rgba(20, 20, 26, .66);
  --text-faint: rgba(20, 20, 26, .45);
  --border: rgba(20, 20, 26, .12);
  --border-strong: rgba(20, 20, 26, .2);
  --code-bg: #f5f4f7;
  --link: #c20f5e;
  --glow: radial-gradient(900px 400px at 80% -10%, rgba(232, 5, 109, .08), transparent 60%),
          radial-gradient(700px 360px at 0% 0%, rgba(251, 110, 0, .07), transparent 55%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image: var(--glow);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Brand helpers ---------- */
.gradient-text {
  background: var(--brand-gradient-50);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Links ---------- */
a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand-gradient); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Header — replicates the product's globals.css header/menu
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100; width: 100%;   /* .header */
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.header-menu {                                            /* .header-menu (globals.css) */
  display: flex; flex-wrap: wrap; width: 100%;
  padding: 10px 77px 20px; align-items: center; gap: 16px;
}
.site-header .brand { display: flex; align-items: center; flex: 0 0 auto; }
.logo { width: 83px; height: 83px; cursor: pointer; display: block; }
/* theme-swapped logo (globals.css uses w.png on light, b.png on dark) */
.logo-dark { display: none; }
[data-theme='dark'] .logo-light { display: none; }
[data-theme='dark'] .logo-dark { display: block; }

.top-nav { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; }
.top-menu {                                               /* .top-menu (globals.css) */
  background: none; color: var(--foreground);
  font-size: 24px; line-height: 36px; text-align: left;
  border: 0; margin-left: 24px; font-weight: 300;
  border-bottom: 1px solid transparent; text-decoration: none; cursor: pointer;
}
.top-menu:hover, .top-menu-selected { border-bottom: 1px solid white; text-decoration: none; }
.get-started {                                            /* .get-started (globals.css) */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; gap: 10px; border-radius: 12px; height: 60px;
  background: linear-gradient(90deg, #E8056D 0%, #FB6E00 100%);
}
.get-started:hover { border-bottom: 1px solid transparent; }

/* docs-only header utilities (the marketing site has no search / theme toggle) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--foreground);
  transition: background var(--transition), border-color var(--transition);
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.icon-btn svg { width: 22px; height: 22px; }
.theme-toggle .moon { display: none; }
[data-theme='dark'] .theme-toggle .moon { display: block; }
[data-theme='dark'] .theme-toggle .sun { display: none; }

/* generic gradient button (hero CTAs, pager) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 500; font-size: 15px; line-height: 1;
  padding: 11px 18px; border-radius: 12px; border: 0; cursor: pointer;
  color: #fff; background: var(--brand-gradient);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(232, 5, 109, .35); text-decoration: none; color: #fff; }
.btn.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn.btn-ghost:hover { background: var(--surface-hover); box-shadow: none; }
.btn.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Search ---------- */
.search { position: relative; flex: 0 1 320px; max-width: 340px; }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px;
  background: var(--surface); color: var(--text); font-family: var(--font); font-size: 14.5px;
  border: 1px solid var(--border); border-radius: 12px; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { border-color: var(--brand-start); box-shadow: 0 0 0 3px rgba(232, 5, 109, .18); }
.search .search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-faint); pointer-events: none; }
.search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font); font-size: 11px; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; background: var(--bg-elev);
}
.search-results {
  position: absolute; top: 50px; left: 0; right: 0;
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; max-height: 60vh; overflow-y: auto; display: none; z-index: 120;
}
.search-results.open { display: block; }
.search-results a {
  display: block; padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text);
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.active { background: var(--surface-hover); text-decoration: none; }
.search-results .sr-title { font-weight: 500; font-size: 14.5px; }
.search-results .sr-crumb { font-size: 12.5px; color: var(--text-faint); }
.search-results .sr-empty { padding: 16px; color: var(--text-faint); font-size: 14px; }
.search-results mark { background: rgba(251, 110, 0, .28); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ============================================================
   Layout
   ============================================================ */
.layout {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 40px; padding: 0 24px;
  align-items: start;
}
.layout.no-toc { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto; padding: 26px 8px 60px 0;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.nav-group { margin-bottom: 22px; }
.nav-group > .nav-title {
  font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 8px 14px;
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; margin: 1px 0; border-radius: 10px;
  color: var(--text-muted); font-size: 14.5px; font-weight: 400;
  border-left: 2px solid transparent;
}
.nav-list a:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
.nav-list a.active {
  color: var(--text); font-weight: 500;
  background: linear-gradient(90deg, rgba(232, 5, 109, .16), rgba(251, 110, 0, .05));
  border-left: 2px solid var(--brand-start);
}
.nav-list a .nav-ico { width: 18px; height: 18px; flex: 0 0 auto; opacity: .9; }
.nav-list a.active .nav-ico { color: var(--brand-start); }

/* ---------- Content ---------- */
.content { min-width: 0; padding: 34px 0 90px; }
.breadcrumb { font-size: 13.5px; color: var(--text-faint); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: .5; }

.content h1 {
  font-size: clamp(30px, 4vw, 44px); line-height: 1.12; font-weight: 600;
  margin: 6px 0 14px; letter-spacing: -.5px;
}
.content .lead { font-size: 18.5px; color: var(--text-muted); line-height: 1.6; margin: 0 0 26px; max-width: 70ch; }
.content h2 {
  font-size: 27px; font-weight: 600; margin: 52px 0 16px; padding-top: 10px; letter-spacing: -.3px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.content h3 { font-size: 20px; font-weight: 600; margin: 32px 0 12px; scroll-margin-top: calc(var(--header-h) + 16px); }
.content h2 + p, .content h3 + p { margin-top: 0; }
.content p { margin: 0 0 16px; color: var(--text); }
.content p, .content li { color: var(--text); }
.content strong { font-weight: 600; }
.content ul, .content ol { margin: 0 0 18px; padding-left: 22px; }
.content li { margin: 6px 0; }
.content hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

/* Anchor link on headings */
.heading-anchor {
  opacity: 0; margin-left: 8px; font-size: .7em; color: var(--text-faint);
  text-decoration: none; transition: opacity var(--transition);
}
h2:hover .heading-anchor, h3:hover .heading-anchor { opacity: 1; }

/* ---------- Hero (home) ---------- */
.hero {
  text-align: center; padding: 50px 20px 22px; position: relative;
}
.hero .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.05; font-weight: 700; margin: 0 0 18px; letter-spacing: -1px; }
.hero p { font-size: clamp(17px, 2.4vw, 21px); color: var(--text-muted); max-width: 62ch; margin: 0 auto 30px; }
.hero .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-search { max-width: 560px; margin: 28px auto 0; }
.hero-search .search { flex: 1 1 100%; max-width: none; }
.hero-search .search input { height: 54px; font-size: 16px; border-radius: 14px; }
.hero-search .search .search-ico { left: 18px; width: 20px; height: 20px; }
.hero-search .search-results { top: 62px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 26px 0; }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.doc-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative; overflow: hidden;
}
.doc-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); text-decoration: none; color: var(--text); background: var(--bg-elev-2); }
.doc-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand-gradient);
  opacity: 0; transition: opacity var(--transition);
}
.doc-card:hover::before { opacity: 1; }
.doc-card .card-ico {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(232, 5, 109, .16), rgba(251, 110, 0, .12));
  color: var(--brand-start); margin-bottom: 6px;
}
.doc-card .card-ico svg { width: 25px; height: 25px; }
.doc-card h3 { margin: 0; font-size: 18.5px; font-weight: 600; }
.doc-card p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.doc-card .card-arrow { margin-top: auto; padding-top: 10px; color: var(--brand-start); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Feature list grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin: 22px 0; }
.feature {
  padding: 18px 20px; border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--border);
}
.feature h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.feature h4 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gradient); flex: 0 0 auto; }
.feature p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.55; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 24px 0; padding: 0; }
.steps > li {
  position: relative; padding: 0 0 24px 56px; margin: 0;
}
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; color: #fff; background: var(--brand-gradient);
  box-shadow: 0 4px 14px rgba(232, 5, 109, .35);
}
.steps > li::after {
  content: ''; position: absolute; left: 18px; top: 44px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--border-strong), transparent);
}
.steps > li:last-child::after { display: none; }
.steps > li .step-title { font-weight: 600; font-size: 17px; margin: 6px 0 4px; }
.steps > li .step-body { color: var(--text-muted); font-size: 15px; }

/* ---------- Callouts ---------- */
.callout {
  display: flex; gap: 14px; padding: 16px 18px; margin: 22px 0; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--brand-start);
}
.callout .callout-ico { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; color: var(--brand-start); }
.callout .callout-body { font-size: 14.5px; color: var(--text); }
.callout .callout-body strong { display: block; margin-bottom: 2px; }
.callout.tip { border-left-color: #fb6e00; }
.callout.tip .callout-ico { color: #fb6e00; }
.callout.note { border-left-color: #4aa3ff; }
.callout.note .callout-ico { color: #4aa3ff; }
.callout.warn { border-left-color: #ffb300; }
.callout.warn .callout-ico { color: #ffb300; }

/* ---------- Figures / screenshots ---------- */
figure.shot { margin: 26px 0; }
figure.shot .frame {
  border-radius: 14px; border: 1px solid var(--border-strong); overflow: hidden;
  background: var(--bg-elev-2); box-shadow: var(--shadow); position: relative;
}
figure.shot .frame .browser-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
figure.shot .frame .browser-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
figure.shot .frame .browser-bar .url {
  margin-left: 10px; font-size: 12.5px; color: var(--text-faint); background: var(--bg);
  padding: 4px 12px; border-radius: 8px; flex: 1 1 auto; max-width: 460px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
figure.shot .frame img { display: block; width: 100%; cursor: zoom-in; }
figure.shot .placeholder {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-faint); text-align: center; padding: 20px;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255, 255, 255, .015) 12px, rgba(255, 255, 255, .015) 24px),
    linear-gradient(135deg, rgba(232, 5, 109, .07), rgba(251, 110, 0, .05));
}
figure.shot .placeholder svg { width: 38px; height: 38px; opacity: .5; }
figure.shot figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-faint); text-align: center; }
figure.shot figcaption .num { color: var(--brand-start); font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: 12px; }
table.doc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 440px; }
table.doc-table th, table.doc-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.doc-table thead th { background: var(--bg-elev); font-weight: 600; color: var(--text); white-space: nowrap; }
table.doc-table tbody tr:last-child td { border-bottom: 0; }
table.doc-table tbody tr:hover td { background: var(--surface-hover); }
table.doc-table td code { white-space: nowrap; }

/* ---------- Pills / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.chip {
  font-size: 13px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-muted);
}
.chip.brand { border-color: transparent; color: #fff; background: var(--brand-gradient); }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg-elev-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge.credit { color: #fff; background: linear-gradient(90deg, rgba(232,5,109,.85), rgba(251,110,0,.85)); border-color: transparent; }

/* ---------- Code / prompt examples ---------- */
code { font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace; font-size: .88em; background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.prompt-box {
  position: relative; margin: 18px 0; padding: 16px 48px 16px 18px; border-radius: 12px;
  background: var(--code-bg); border: 1px solid var(--border); font-size: 14.5px; line-height: 1.6;
}
.prompt-box .prompt-label { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; font-weight: 600; }
.prompt-box .copy-btn {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted);
}
.prompt-box .copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.prompt-box .copy-btn svg { width: 15px; height: 15px; }
.prompt-box .copy-btn.copied { color: #3ddc84; border-color: #3ddc84; }

/* ---------- FAQ accordion ---------- */
.faq { margin: 22px 0; }
.faq details {
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: var(--bg-elev); overflow: hidden;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 50px 16px 18px; font-weight: 500; font-size: 16px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 18px; top: 20px; width: 11px; height: 11px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); transition: transform var(--transition);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--brand-start); }
.faq .faq-body { padding: 0 18px 18px; color: var(--text-muted); font-size: 15px; }

/* ---------- On-page TOC ---------- */
.toc { position: sticky; top: var(--header-h); align-self: start; padding: 34px 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.toc .toc-title { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); margin: 0 0 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a {
  display: block; padding: 5px 0 5px 16px; margin-left: -1px; font-size: 13.5px; color: var(--text-faint);
  border-left: 2px solid transparent; line-height: 1.4;
}
.toc li a:hover { color: var(--text); text-decoration: none; }
.toc li a.active { color: var(--brand-start); border-left-color: var(--brand-start); font-weight: 500; }
.toc li.sub a { padding-left: 28px; font-size: 13px; }

/* ---------- Next / prev ---------- */
.pager { display: flex; gap: 16px; margin-top: 56px; }
.pager a {
  flex: 1 1 0; display: flex; flex-direction: column; gap: 3px; padding: 16px 20px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}
.pager a:hover { border-color: var(--brand-start); background: var(--bg-elev-2); text-decoration: none; }
.pager a.next { text-align: right; align-items: flex-end; }
.pager .pager-label { font-size: 12.5px; color: var(--text-faint); }
.pager .pager-title { font-weight: 600; font-size: 15.5px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .9);
  display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 80px rgba(0, 0, 0, .6); }
.lightbox .lb-close { position: absolute; top: 20px; right: 26px; color: #fff; font-size: 34px; cursor: pointer; line-height: 1; opacity: .8; }
.lightbox .lb-close:hover { opacity: 1; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--brand-gradient); color: #fff; border: 0; box-shadow: 0 8px 24px rgba(232, 5, 109, .4);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all var(--transition);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 22px; height: 22px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 40px; padding: 40px 24px;
  background: var(--bg-elev);
}
.site-footer .footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.site-footer .socials { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.site-footer .socials a { color: var(--text-muted); }
.site-footer .socials a:hover { color: var(--brand-start); }
.site-footer .socials svg { width: 22px; height: 22px; }
.site-footer .footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.site-footer .footer-links a { color: var(--text-muted); font-size: 14.5px; }
.site-footer .footer-links a:hover { color: var(--text); }
.site-footer .footer-meta { color: var(--text-faint); font-size: 13.5px; line-height: 1.7; }
.site-footer .footer-meta a { color: var(--text-muted); }

/* ============================================================
   Mobile
   ============================================================ */
.menu-toggle { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 1024px) {
  :root { --header-h: 72px; }
  .header-menu { padding: 8px 18px; gap: 10px; }
  .logo { width: 46px; height: 46px; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 18px; }
  .menu-toggle { display: inline-flex; }
  .top-menu.hide-sm { display: none; }
  .top-menu { font-size: 18px; line-height: 28px; margin-left: 14px; }
  .get-started { height: 44px; padding: 8px 16px; }
  .search { flex: 1 1 auto; max-width: none; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw; z-index: 130;
    height: 100vh; background: var(--bg-elev); border-right: 1px solid var(--border-strong);
    padding: 22px 14px; transform: translateX(-105%); transition: transform .26s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 125; opacity: 0; visibility: hidden; transition: opacity var(--transition); }
  .sidebar-backdrop.open { display: block; opacity: 1; visibility: visible; }
  .content { padding-top: 24px; }
  .hero { padding-top: 30px; }
}

@media (max-width: 560px) {
  .header-menu { padding: 8px 12px; }
  .search kbd { display: none; }
}

/* ---------- Inline icon sizing ---------- */
.btn svg { width: 18px; height: 18px; }
.card-arrow svg { width: 15px; height: 15px; }
.nav-list a .nav-ico { width: 18px; height: 18px; }

/* ---------- Screenshot placeholder toggle ---------- */
figure.shot .placeholder { display: none; }
figure.shot.noshot .frame img { display: none; }
figure.shot.noshot .placeholder { display: flex; }

/* ---------- Print ---------- */
@media print {
  .site-header, .sidebar, .toc, .back-to-top, .pager, .search, .menu-toggle { display: none !important; }
  .layout { display: block; }
  body { background: #fff; color: #000; }
}
