/* ==========================================================
   Asha AI Gateway — Marketing site stylesheet (style.css)
   Design system mirrors ADMIN-DESIGN-SYSTEM.md (teal palette)
   ========================================================== */

:root {
  --primary: #078783;
  --primary-dark: #05605D;
  --primary-light: #59AFAC;
  --primary-soft: #E4F3F2;
  --text-main: #333333;
  --text-secondary: #5F7373;
  --text-tertiary: #8A9899;
  --bg-base: #F3F4F6;
  --surface: #FFFFFF;
  --line: #E3E9EC;
  --status-green-bg: #E6F6F5;
  --status-green-text: #05605D;
  --status-warn-bg: #FFF3E6;
  --status-warn-text: #B4690E;

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-blur: blur(18px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 32px 64px rgba(3, 70, 65, 0.16);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-soft: 0 1px 2px rgba(2, 40, 36, 0.05), 0 8px 24px rgba(2, 40, 36, 0.06);
  --shadow-lifted: 0 16px 40px rgba(3, 70, 65, 0.10);

  --font-sans: "Vazirmatn", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-main);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Pills & badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(7, 135, 131, 0.16);
}

.pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(7, 135, 131, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary { background: var(--surface); color: var(--text-main); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--primary-light); color: var(--primary-dark); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--primary-dark); }

.btn-inverse { background: #fff; color: var(--primary-dark); }
.btn-inverse:hover { background: var(--primary-soft); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 244, 246, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(7, 135, 131, 0.08);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark { border-radius: 10px; }

.brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.nav-desktop {
  display: flex;
  gap: 28px;
}

.nav-desktop a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-desktop a:hover { color: var(--primary-dark); }

.nav-desktop .nav-active {
  color: var(--primary-dark);
  font-weight: 700;
}

.nav-desktop .nav-active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--primary);
}

.nav-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.nav-actions .btn { padding: 10px 22px; }

.nav-mobile { display: none; }
.nav-login-mobile { display: none; }

/* ==========================================================
   Hero — pure CSS objects, no images
   ========================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.orb-a {
  width: 480px; height: 480px;
  top: -140px; inset-inline-end: -120px;
  background: radial-gradient(circle at 30% 30%, #59AFAC 0%, transparent 70%);
}

.orb-b {
  width: 420px; height: 420px;
  bottom: -160px; inset-inline-start: -120px;
  background: radial-gradient(circle at 60% 60%, rgba(7, 135, 131, 0.55) 0%, transparent 70%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.25;
  font-weight: 800;
  margin: 24px 0 20px;
  color: var(--text-main);
}

.hero-sub {
  font-size: 18px;
  line-height: 2;
  color: var(--text-secondary);
  max-width: 34em;
  margin-bottom: 36px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  color: var(--text-secondary);
  font-size: 14px;
}

.trust-line li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
  margin-inline-end: 7px;
}

/* ----- hero visual ----- */
.hero-visual {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-ring {
  position: absolute;
  width: 420px; height: 420px;
  border: 1px solid rgba(7, 135, 131, 0.18);
  border-radius: 50%;
  top: 50%; inset-inline-start: 50%;
  transform: translate(-50%, -50%);
}

.hero-ring::before {
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  border: 1px dashed rgba(7, 135, 131, 0.14);
  border-radius: 50%;
  top: 50%; inset-inline-start: 50%;
  transform: translate(-50%, -50%);
}

.code-card {
  position: relative;
  z-index: 2;
  width: min(420px, 92%);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 22px 24px;
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.code-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(7, 135, 131, 0.12);
}

.traffic { display: flex; gap: 6px; }
.traffic i { width: 10px; height: 10px; border-radius: 50%; background: #E3E9EC; }
.traffic i:nth-child(1) { background: #F4A261; }
.traffic i:nth-child(2) { background: #59AFAC; }
.traffic i:nth-child(3) { background: var(--primary); }

.code-card-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.code-body {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-main);
  padding: 16px 0 4px;
  white-space: pre;
  overflow-x: auto;
}

.code-card-divider {
  height: 1px;
  background: rgba(7, 135, 131, 0.12);
  margin: 8px 0 0;
}

.code-response { opacity: 0.85; }

.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-lifted);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.chip-status {
  top: 30px; inset-inline-end: 6%;
  animation: float 6s ease-in-out infinite 0.6s;
}

.chip-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2EB67D;
  box-shadow: 0 0 0 4px rgba(46, 182, 125, 0.2);
}

.chip-tokens {
  bottom: 40px; inset-inline-start: 2%;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary-dark);
  animation: float 6s ease-in-out infinite 1.4s;
}

/* ==========================================================
   Stats strip
   ========================================================== */
.stats {
  border-block: 1px solid rgba(7, 135, 131, 0.08);
  background: var(--surface);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat { text-align: center; }

.stat-value {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  direction: ltr;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ==========================================================
   Sections shared
   ========================================================== */
section { padding: clamp(72px, 9vw, 120px) 0; }

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
}

.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 2;
}

.section-footnote {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-tertiary);
}

.section-cta {
  text-align: center;
  margin-top: 36px;
}

/* ==========================================================
   Features
   ========================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lifted);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 700;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.feature-grid-spot {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 72px;
}

.feature-card.featured {
  position: relative;
  background: linear-gradient(165deg, #ffffff 0%, #EBF6F5 100%);
  border: 1px solid rgba(7, 135, 131, 0.16);
  padding-top: 28px;
}

.feature-card.featured::before {
  content: "";
  position: absolute;
  top: 0; inset-inline-start: 24px; inset-inline-end: 24px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.feature-card.featured .feature-icon {
  background: var(--primary);
  color: #fff;
}

.feature-badge {
  position: absolute;
  top: 20px; inset-inline-end: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--surface);
  border: 1px solid rgba(7, 135, 131, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ==========================================================
   Quickstart
   ========================================================== */
.quickstart { background: var(--surface); }
.quickstart .step h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step {
  position: relative;
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 36px 28px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.step p { font-size: 15px; color: var(--text-secondary); line-height: 1.9; }

.quickstart-cta { text-align: center; margin-top: 48px; }

/* ==========================================================
   Agents — connect your agentic tools
   ========================================================== */
.agents-panel {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 88px) clamp(28px, 5vw, 72px);
  text-align: center;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.agents-panel::before {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  filter: blur(40px);
  top: -120px; inset-inline-end: -80px;
  pointer-events: none;
}

.pill-light {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.agents-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.4;
  margin: 18px auto 14px;
  max-width: 18em;
}

.agents-sub {
  font-size: 17px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.9);
  max-width: 44em;
  margin: 0 auto 32px;
}

.tools-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.tool-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #A8E6E2;
}

.agents-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 32px;
}

.agents-cta { justify-content: center; margin: 0; }

/* ==========================================================
   Models
   ========================================================== */
.model-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.model-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.model-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lifted);
}

.model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.model-badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
}

.model-count {
  font-size: 12px;
  color: var(--text-tertiary);
  direction: ltr;
}

.model-list {
  display: grid;
  gap: 8px;
  padding-inline-start: 4px;
  border-inline-start: 2px solid rgba(7, 135, 131, 0.14);
}

.model-list li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
}

.model-more {
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  direction: ltr;
  text-align: start;
}

/* ==========================================================
   Docs / code block
   ========================================================== */
.docs { background: var(--surface); }

.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.docs-copy .pill { margin-bottom: 16px; }
.docs-copy .section-title { margin-bottom: 16px; }
.docs-copy .section-sub { margin-bottom: 32px; }

.code-block {
  background: #0E2E2C;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lifted);
}

.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7FD2CE;
}

.code-block pre {
  padding: 24px;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: #D6EAE8;
}

.code-filename { color: rgba(255, 255, 255, 0.45); }

/* ==========================================================
   Pricing
   ========================================================== */
.pricing-table {
  max-width: 880px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.pt-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}

.pt-row:last-child { border-bottom: none; }

.pt-row:nth-child(odd):not(.pt-head) { background: var(--bg-base); }

.pt-head {
  background: var(--primary-dark) !important;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.pt-head span { color: #fff; font-family: var(--font-sans); }

.pt-model { font-weight: 700; color: var(--text-main); }

.pt-row span[dir="ltr"] {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================
   Plan cards & compare (plans.html)
   ========================================================== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 28px 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lifted);
}

.plan-featured {
  border: 1.5px solid var(--primary);
  background: linear-gradient(165deg, #ffffff 0%, #EBF6F5 100%);
}

.plan-badge {
  position: absolute;
  top: -14px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

.plan-head { margin-bottom: 20px; }

.plan-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.plan-tagline {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-tertiary);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--line);
}

.plan-amount {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--primary-dark);
  direction: ltr;
  font-family: var(--font-sans);
}

.plan-currency {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.plan-billing {
  flex: 1;
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.plan-billing li {
  font-size: 13.5px;
  color: var(--text-secondary);
  padding-inline-start: 20px;
  position: relative;
}

.plan-billing li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--primary);
  font-weight: 700;
}

.plan-billing li b {
  color: var(--text-main);
  font-weight: 700;
}

.plan-foot .btn { justify-content: center; }

.plan-org {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.plan-org-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  min-width: 220px;
}

.plan-org .plan-price {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  margin-top: 12px;
}

.plan-org .plan-amount { font-size: 24px; }

.plan-org .plan-billing {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 22px;
  margin-bottom: 0;
  min-width: 280px;
}

.plan-org-foot {
  flex-shrink: 0;
  margin-inline-start: auto;
}

@media (max-width: 991px) {
  .plan-org { flex-direction: column; align-items: stretch; }
  .plan-org .plan-billing { grid-template-columns: repeat(2, 1fr); }
  .plan-org-foot { margin-inline-start: 0; }
}

@media (max-width: 767px) {
  .plan-org .plan-billing { grid-template-columns: 1fr; }
}

.plans-compare {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.compare-table {
  max-width: 960px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.compare-table .pt-row {
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  text-align: center;
}

.compare-table .pt-row > span:first-child { text-align: start; }

.compare-table .pt-head {
  background: var(--primary-dark) !important;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.compare-table .pt-head span {
  color: #fff;
  font-family: var(--font-sans);
}

.pt-yes {
  color: var(--primary);
  font-weight: 800;
  font-size: 16px;
}

.pt-no {
  color: var(--text-tertiary);
  font-weight: 600;
}

.compare-table .pt-row span[dir="ltr"] {
  font-family: var(--font-sans);
}

/* ==========================================================
   FAQ
   ========================================================== */
.faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 24px;
  transition: border-color 0.18s ease;
}

.faq-item[open] { border-color: var(--primary-light); }

.faq-item summary {
  padding: 18px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  padding: 0 0 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* ==========================================================
   Final CTA band
   ========================================================== */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: 0;
  text-align: center;
  color: #fff;
}

.cta-band .container { padding-block: clamp(64px, 8vw, 104px); }

.cta-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 12px;
}

.cta-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
}

.cta-band .hero-cta { justify-content: center; margin: 0; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 72px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
}

.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: rgba(255, 255, 255, 0.5); }

.footer-tagline {
  margin-top: 16px;
  font-size: 14px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.65);
  max-width: 30em;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col ul { display: grid; gap: 10px; }

.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.15s ease;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-chip {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.footer-social {
  margin-inline-start: auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .feature-grid, .feature-grid-spot { grid-template-columns: repeat(2, 1fr); }
  .model-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .docs-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-desktop, .nav-actions { display: none; }
  .nav-mobile {
    display: block;
    margin-inline-start: 0;
    position: relative;
  }
  .nav-login-mobile {
    display: inline-flex;
    align-items: center;
    margin-inline-start: auto;
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-secondary);
  }
  .nav-login-mobile:hover { color: var(--primary-dark); border-color: var(--primary-light); }
  .nav-mobile summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
  }
  .nav-mobile summary::-webkit-details-marker { display: none; }
  .burger, .burger::before, .burger::after {
    content: "";
    display: block;
    width: 20px; height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    position: relative;
  }
  .burger::before { position: absolute; top: -6px; }
  .burger::after { position: absolute; top: 6px; }
  .mobile-menu {
    position: absolute;
    top: 100%;
    inset-inline-end: 0;
    width: 264px;
    display: grid;
    gap: 4px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lifted);
  }
  .mobile-menu a:not(.btn) {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-secondary);
  }
  .mobile-menu a:not(.btn):hover { background: var(--primary-soft); color: var(--primary-dark); }
  .mobile-menu .btn { margin-top: 8px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .feature-grid, .feature-grid-spot { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .pt-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pt-head span:last-child, .pt-row span:last-child { display: none; }
  .stats { padding: 40px 0; }
}

@media (max-width: 480px) {
  .container { padding-inline: 16px; }
  .nav-row { gap: 12px; height: 64px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 18px; }
  .model-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { justify-content: center; }
  .footer-social { margin-inline-start: 0; }
}

/* ==========================================================
   Models page (models.html) — directory hero + filterable table
   ========================================================== */
.models-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0 40px;
}

.models-hero-head {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto 56px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.models-hero-head .hero-sub { max-width: 40em; }

.models-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-soft);
}

.directory { padding-top: 8px; }

/* ----- filter bar ----- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}

.filter-search {
  flex: 1 1 280px;
  position: relative;
}

.search-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-main);
  background: var(--bg-base);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 135, 131, 0.14);
  background: var(--surface);
}

.filter-search input::placeholder { color: var(--text-tertiary); }

.filter-select { display: grid; gap: 6px; }

.filter-select span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.filter-select select {
  height: 46px;
  min-width: 170px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
}

.filter-select select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 135, 131, 0.14);
}

.filter-count {
  margin-inline-start: auto;
  align-self: center;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ----- table ----- */
.table-wrap {
  margin-top: 16px;
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }

.models-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
}

.models-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  padding: 14px 20px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.models-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid #EFF3F4;
  color: var(--text-main);
  white-space: nowrap;
}

.models-table tbody tr:last-child td { border-bottom: none; }
.models-table tbody tr:hover td { background: #F5F8F8; }

.c-model { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }

.c-provider { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-secondary); }

.c-ctx { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-tertiary); }

.c-price { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--primary-dark); }

.cat-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.cat-chat { background: var(--primary-soft); color: var(--primary-dark); }
.cat-image { background: var(--status-warn-bg); color: var(--status-warn-text); }
.cat-audio { background: #EDF2FF; color: #3B5BDB; }
.cat-embed { background: #EEF0F2; color: #5F7373; }
.cat-video { background: #FDF0E7; color: #C05621; }

@media (max-width: 768px) {
  .models-hero-stats { grid-template-columns: repeat(2, 1fr); padding: 24px; }
  .filter-count { margin-inline-start: 0; }
  .filter-select select { min-width: 140px; }
}

/* ==========================================================
   SDK demo (models.html) — animated two-step code show
   ========================================================== */
.sdk-demo { padding: clamp(64px, 8vw, 112px) 0; }

.sdk-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.sdk-code { min-width: 0; }

.sdk-code-body {
  display: grid;
  min-height: 320px;
}

.sdk-pane {
  grid-area: 1 / 1;
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: #D6EAE8;
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.45s ease, transform 0.55s ease;
  pointer-events: none;
}

.sdk-pane.sdk-pane-active { opacity: 1; transform: none; pointer-events: auto; }
.sdk-pane.sdk-pane-leave { opacity: 0; transform: translateX(-36px); }

.cursor {
  display: inline-block;
  width: 0.58ch;
  height: 1.1em;
  vertical-align: text-bottom;
  background: #9BE3E0;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.sdk-steps { position: relative; min-height: 248px; }

.sdk-step {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 14px;
  align-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.sdk-step.sdk-step-active { opacity: 1; transform: none; }

.sdk-step-title { font-size: 26px; font-weight: 800; color: var(--text-main); margin: 0; }

.sdk-step-text { font-size: 16px; line-height: 2; color: var(--text-secondary); margin: 0; }

.sdk-progress { margin: 28px 0 18px; }

.sdk-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-base);
  border: 1px solid var(--line);
  overflow: hidden;
}

.sdk-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light));
}

.sdk-restart {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.sdk-restart:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 900px) {
  .sdk-demo-grid { grid-template-columns: 1fr; gap: 32px; }
  .sdk-steps { min-height: 220px; }
}

/* ==========================================================
   Model detail drawer (models.html) — slides in from left
   ========================================================== */
.models-table tbody tr { cursor: pointer; }

.no-scroll { overflow: hidden; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 36, 34, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.model-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  width: min(560px, 94vw);
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  box-shadow: var(--shadow-lifted);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.26, 1);
  visibility: hidden;
}

.model-drawer.open {
  transform: none;
  visibility: visible;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.drawer-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.drawer-title { font-size: 22px; line-height: 1.5; font-weight: 800; color: var(--text-main); margin: 0; }

.drawer-model {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-tertiary);
  word-break: break-all;
}

.drawer-close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.drawer-close:hover { border-color: var(--primary); color: var(--primary); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px;
  overscroll-behavior: contain;
}

.drawer-desc {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 2;
  color: var(--text-secondary);
}

.meta-list { margin: 0; }

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid #EFF3F4;
  font-size: 13.5px;
}

.meta-row:last-child { border-bottom: none; }

.meta-row dt {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.meta-row dd { margin: 0; color: var(--text-main); font-weight: 500; text-align: end; }

.meta-row dd .mono, dd.mono { font-family: var(--font-mono); font-size: 12.5px; direction: ltr; }

.meta-row .mono-ltr { font-family: var(--font-mono); font-size: 12px; direction: ltr; }

.arch-fa { display: block; font-weight: 600; color: var(--text-main); font-size: 13.5px; }
.arch-arrow { color: var(--primary); padding: 0 4px; }
.arch-raw { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); opacity: 0.85; }

.info-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  margin-inline-start: 8px;
  border-radius: 50%;
  border: 1px solid var(--primary-light);
  background: var(--surface);
  color: var(--primary-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.info-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline-start: 0;
  width: 280px;
  max-width: 70vw;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0E2E2C;
  color: #EFF8F7;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.9;
  font-weight: 400;
  text-align: right;
  box-shadow: var(--shadow-lifted);
  opacity: 0;
  transform: translateY(5px) scale(0.97);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 5;
}

.info-btn.active .info-pop { opacity: 1; transform: none; }

.drawer-h {
  margin: 26px 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.cap-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.cap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.cap-on { background: #E6F6EC; border-color: #C9ECD4; color: #167A41; }
.cap-off { background: var(--bg-base); color: var(--text-tertiary); }

.endpoint-list { display: flex; flex-direction: column; gap: 8px; }

.endpoint-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}

.endpoint-method {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 2px 8px;
}

.drawer-head { text-align: left; }

.price-grid {
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 16px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #EFF3F4;
  font-size: 13.5px;
  color: var(--text-main);
}

.price-row:last-child { border-bottom: none; }

.price-row .mono { color: var(--primary-dark); font-weight: 600; font-size: 13px; }

.param-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.param-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
}

@media (min-width: 1100px) {
  .model-drawer { width: min(46vw, 640px); }
}

/* ==========================================================
   Blog (blog.html + article.html) — article index & single post
   ========================================================== */
.blog-hero,
.article-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0 64px;
}

.blog-hero-head {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 64px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.blog-hero-head .hero-sub { max-width: 40em; }

/* ----- featured article (first, large) ----- */
.featured-post {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-post:hover { box-shadow: var(--shadow-lifted); transform: translateY(-3px); }

.featured-post .post-thumb { min-height: 300px; }

.featured-post-copy { display: grid; gap: 14px; }

.featured-post-copy h2 { font-size: 26px; font-weight: 800; line-height: 1.6; color: var(--text-main); }
.featured-post-copy h2 a:hover { color: var(--primary-dark); }
.featured-post-copy p { font-size: 15px; line-height: 2; color: var(--text-secondary); }

/* ----- article grid ----- */
.post-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.post-card:hover { box-shadow: var(--shadow-lifted); transform: translateY(-4px); }

.post-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(165deg, #EAF6F5 0%, #D6ECEA 100%);
  border-bottom: 1px solid rgba(7, 135, 131, 0.12);
}

.post-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.post-thumb::before,
.post-thumb::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(7, 135, 131, 0.4);
}

.post-thumb::before { width: 62%; aspect-ratio: 1; }
.post-thumb::after { width: 36%; aspect-ratio: 1; border: 1.5px solid rgba(7, 135, 131, 0.28); }

.post-thumb-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  opacity: 0.75;
}

.post-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 26px; flex: 1; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-pill {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tag-pill.tag-news { background: var(--status-warn-bg); color: var(--status-warn-text); }
.tag-pill.tag-tips { background: #EEF0FF; color: #3B5BDB; }

.post-title { font-size: 18px; font-weight: 700; line-height: 1.7; color: var(--text-main); }
.post-title a:hover { color: var(--primary-dark); }

.post-excerpt { font-size: 14px; line-height: 1.9; color: var(--text-secondary); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #EFF3F4;
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.post-meta span { display: inline-flex; align-items: center; gap: 6px; }

.post-meta .meta-dot { color: var(--primary-light); }

/* ----- blog newsletter strip ----- */
.blog-newsletter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-top: 72px;
  padding: clamp(40px, 6vw, 64px);
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 24px auto 0;
}

.newsletter-form input {
  flex: 1;
  height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-main);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 135, 131, 0.14);
  background: var(--surface);
}

/* ==========================================================
   Article page (article.html) — single post
   ========================================================== */
.article-hero { padding-bottom: 40px; }

.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.article-title {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.5;
  font-weight: 800;
  color: var(--text-main);
  max-width: 17em;
  margin: 0 auto 16px;
}

.article-sub {
  font-size: 17px;
  line-height: 2;
  color: var(--text-secondary);
  max-width: 38em;
  margin: 0 auto 28px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.article-byline .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.article-byline .dot { color: var(--primary-light); }

/* ----- main image placeholder (21/9 hero frame) ----- */
.article-cover {
  position: relative;
  z-index: 1;
  aspect-ratio: 21 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #EAF6F5 0%, #CCE4E1 100%);
  border: 1px solid rgba(7, 135, 131, 0.14);
  box-shadow: var(--shadow-soft);
}

.article-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.article-cover::before {
  content: "";
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(7, 135, 131, 0.38);
}

.article-cover::after {
  content: "";
  position: absolute;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(7, 135, 131, 0.26);
}

.article-cover-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  opacity: 0.8;
}

/* ----- article prose ----- */
.article-body {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 56px;
}

.article-body > p {
  font-size: 17px;
  line-height: 2.15;
  color: var(--text-main);
  margin-bottom: 24px;
}

.article-body > p + p { margin-top: 0; }

.article-body h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin: 48px 0 18px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-body h2::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
}

.article-body h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin: 32px 0 12px;
}

.article-body ul {
  list-style: none;
  margin: 0 0 26px;
  display: grid;
  gap: 12px;
}

.article-body ul li {
  position: relative;
  padding-inline-start: 26px;
  font-size: 16px;
  line-height: 2;
  color: var(--text-secondary);
}

.article-body ul li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  color: var(--primary);
  font-weight: 700;
}

.article-body ol {
  list-style: none;
  counter-reset: step;
  margin: 0 0 26px;
  display: grid;
  gap: 14px;
}

.article-body ol li {
  position: relative;
  padding-inline-start: 44px;
  font-size: 16px;
  line-height: 2;
  color: var(--text-main);
  counter-increment: step;
}

.article-body ol li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.article-body blockquote {
  margin: 32px 0;
  padding: 20px 26px;
  border-inline-start: 4px solid var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 2;
  color: var(--primary-dark);
}

.article-body .code-block { margin: 28px 0; }
.article-body .code-block pre { padding: 20px 22px; }

.article-body strong { color: var(--text-main); }

.article-note {
  display: block;
  padding: 18px 20px;
  border: 1px solid rgba(7, 135, 131, 0.2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14.5px;
  line-height: 2;
  color: var(--text-secondary);
  margin: 28px 0;
}

.article-note:has(.note-mark) {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.article-note .note-mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* ----- inline screenshot placeholder (article figures) ----- */
.article-figure {
  margin: 28px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.article-figure .figure-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(165deg, #EAF6F5 0%, #D6ECEA 100%);
  border: 1px solid rgba(7, 135, 131, 0.14);
}

.article-figure .figure-frame::before,
.article-figure .figure-frame::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(7, 135, 131, 0.4);
}

.article-figure .figure-frame::before { width: 40%; aspect-ratio: 1; }
.article-figure .figure-frame::after { width: 22%; aspect-ratio: 1; border: 1.5px solid rgba(7, 135, 131, 0.28); }

.figure-frame-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  opacity: 0.75;
}

.article-figure figcaption {
  padding: 12px 6px 2px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.9;
}

.article-figure figcaption b { color: var(--text-secondary); }

/* ----- article end: author + share + related ----- */
.article-end {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 56px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.article-author { display: flex; gap: 12px; align-items: center; }
.article-author .avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; }
.article-author b { display: block; font-size: 14px; color: var(--text-main); }
.article-author span { font-size: 12.5px; color: var(--text-tertiary); }

.share-row { display: flex; gap: 10px; align-items: center; }
.share-row .share-label { font-size: 13px; color: var(--text-secondary); }

.share-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.share-btn:hover { border-color: var(--primary); color: var(--primary-dark); }

.related-posts { margin-top: 64px; }
.related-posts .section-title { font-size: 24px; margin-bottom: 32px; }

/* ----- responsive: blog ----- */
@media (max-width: 1024px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .post-thumb { min-height: auto; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .post-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .article-body { padding-top: 40px; }
}

/* ----- responsive: plans ----- */
@media (max-width: 1024px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .plan-grid { grid-template-columns: 1fr; }
  .compare-table { overflow-x: auto; }
  .compare-table .pt-row { min-width: 640px; }
}

/* ==========================================================
   Docs page (docs.html) — sidebar layout + prose + code tabs
   ========================================================== */
.docs-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 80px) 0 32px;
}

.docs-hero-head {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-bottom: clamp(72px, 8vw, 112px);
}

.docs-toc-btn { display: none; }
.docs-scrim { display: none; }

.docs-sidebar {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 18px 14px 10px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}

.docs-sidebar::-webkit-scrollbar { width: 8px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 8px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }

.docs-nav-title {
  padding: 6px 10px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
}

/* ——— main groups: clear separation ——— */
.docs-group {
  border-bottom: 1px solid #EFF3F4;
  padding-bottom: 4px;
}
.docs-group:last-child { border-bottom: none; }

.docs-group + .docs-group {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #E7EDEF;
  border-bottom: none;
}

/* nested groups belong to their parent's branch, no extra separation */
.docs-group-nested {
  border: none;
  padding: 0;
  position: relative;
}

.docs-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 10px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.docs-group > summary::-webkit-details-marker { display: none; }

.docs-group > summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}

.docs-group[open] > summary::after { transform: rotate(180deg); }

.docs-group > summary:hover { background: var(--primary-soft); color: var(--primary-dark); }

.docs-group-nested > summary {
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 10px;
}

.docs-group-nested .docs-list {
  /* align nested branch with parent connector */
  padding-inline-start: 12px;
}

/* ——— tree lines: trunk + per-item connectors ——— */
.docs-list {
  position: relative;
  display: grid;
  gap: 0;
  padding: 6px 0 14px;
}

.docs-list::before {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  inset-block-start: 2px;
  inset-block-end: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--docs-branch, #D8E0E3);
  opacity: 0.85;
}

.docs-list > li {
  position: relative;
  padding-inline-start: 22px;
}

.docs-list > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  inset-block-start: 1.25em;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--docs-branch, #D8E0E3);
  opacity: 0.85;
}

/* nested branch line continues inside the group */
.docs-group-nested::before {
  content: "";
  position: absolute;
  inset-inline-start: -17px;
  inset-block-start: 1.6em;
  inset-block-end: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--docs-branch, #D8E0E3);
  opacity: 0.85;
}

.docs-link {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
  margin-block: 1px;
}

.docs-link:hover { background: var(--primary-soft); color: var(--primary-dark); }

.docs-link.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
}

/* ----- docs API method branches (POST / GET) ----- */
.docs-link.docs-method {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}

.docs-link.docs-method.active {
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
}

.docs-method-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 5px;
  transition: background 0.15s ease, color 0.15s ease;
}

.docs-method-post .docs-method-badge {
  background: rgba(37, 99, 235, 0.18);
  color: #3b82f6;
}

.docs-method-post.active .docs-method-badge {
  background: #3b82f6;
  color: #0b0b0f;
}

.docs-method-get .docs-method-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
}

.docs-method-get.active .docs-method-badge {
  background: #10b981;
  color: #0b0b0f;
}

.docs-subtitle {
  padding: 12px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-tertiary);
}

.docs-group-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-tertiary);
}

.soon-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--status-warn-text);
  background: var(--status-warn-bg);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ----- docs content ----- */
.docs-content { min-width: 0; }

.docs-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  width: fit-content;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
}

.docs-breadcrumb b {
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 2px 12px;
  border-radius: 999px;
  font-weight: 700;
}

@media (max-width: 480px) {
  .docs-breadcrumb {
    width: 100%;
    border-radius: var(--radius-sm);
  }
}

/* ----- responsive: docs body content (prose, tables, code) ----- */
@media (max-width: 767px) {
  .docs-prose { max-width: 100%; }

  /* long words / URLs / inline code never break the layout */
  .docs-prose p,
  .docs-prose li,
  .docs-prose td,
  .docs-prose th {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .inline-code {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* wide tables become horizontally scrollable instead of clipping or crushing */
  .docs-prose .docs-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
  }
  .docs-prose .docs-table th,
  .docs-prose .docs-table td {
    padding: 10px 12px;
  }

  .docs-prose .code-block pre { padding: 18px 14px; }
  .docs-prose .code-block code { font-size: 12.5px; }
  .code-block-head { flex-wrap: wrap; row-gap: 6px; }

  .docs-title { font-size: 26px; }
  .docs-lead { font-size: 15.5px; margin-bottom: 28px; }

  .docs-prose h2 { font-size: 22px; margin: 40px 0 14px; }
  .docs-prose h3 { font-size: 17.5px; margin: 28px 0 10px; }
  .docs-prose p { font-size: 15px; line-height: 2; }
  .docs-prose ul li { padding-inline-start: 22px; }

  .article-note { padding: 15px 16px; font-size: 13.5px; }

  .code-tab-pane pre { padding: 16px 14px; overflow-x: auto; }
  .code-tab-pane pre,
  .code-tab-pane code { font-size: 12px; }
}

.docs-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 16px;
}

.docs-lead {
  font-size: 17px;
  line-height: 2;
  color: var(--text-secondary);
  max-width: 44em;
  margin-bottom: 36px;
}

.docs-prose { max-width: 860px; }

.docs-prose h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin: 48px 0 16px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 12px;
}

.docs-prose h2::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
}

.docs-prose h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin: 32px 0 12px;
}

.docs-prose p {
  font-size: 16px;
  line-height: 2.1;
  color: var(--text-main);
  margin-bottom: 22px;
}

.docs-prose a { color: var(--primary); font-weight: 600; }

.docs-prose ul {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
}

.docs-prose ul li {
  position: relative;
  padding-inline-start: 24px;
  font-size: 15.5px;
  line-height: 2;
  color: var(--text-secondary);
}

.docs-prose ul li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  color: var(--primary);
  font-weight: 700;
}

.docs-prose .code-block { margin: 24px 0; }
.docs-prose .article-note { margin: 24px 0; }

/* ----- docs tables ----- */
.docs-prose .docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 14px;
}

.docs-prose .docs-table th {
  background: var(--primary-dark);
  color: #fff;
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
  white-space: nowrap;
}

.docs-prose .docs-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  line-height: 1.9;
  vertical-align: top;
}

.docs-prose .docs-table tbody tr:nth-child(odd) td { background: var(--bg-base); }

.docs-prose .docs-table td:first-child,
.docs-prose .docs-table th:first-child {
  font-family: var(--font-mono);
  font-size: 12.5px;
  direction: ltr;
  text-align: left;
  color: var(--primary-dark);
}

.docs-prose .docs-table code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--primary-dark);
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* ----- docs pager (prev / next) ----- */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 56px 0 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.docs-pager a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.docs-pager a:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lifted); transform: translateY(-2px); }

.docs-pager .pager-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
}

.docs-pager .pager-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
}

.pager-prev { text-align: right; }
.pager-next { text-align: left; }

@media (max-width: 560px) {
  .docs-pager { grid-template-columns: 1fr; }
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 8px;
  color: var(--primary-dark);
}

/* ----- code tabs ----- */
.code-tabs {
  background: #0E2E2C;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lifted);
  margin: 24px 0;
}

.code-tabs-head {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.code-tab-btn {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(214, 234, 232, 0.6);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.code-tab-btn:hover { color: #fff; }
.code-tab-btn.active { color: #9BE3E0; border-bottom-color: #9BE3E0; }

.code-tab-pane { display: none; }
.code-tab-pane.active { display: block; }

.code-tab-pane pre { padding: 22px 24px; overflow-x: auto; margin: 0; }

.code-tab-pane code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: #D6EAE8;
}

.code-tab-pane p {
  margin: 0 0 10px;
  color: #D6EAE8;
  font-size: 14px;
  line-height: 1.9;
}

.code-tab-pane .article-note,
.code-tab-pane .article-note p {
  direction: rtl;
  text-align: right;
  color: var(--text-main);
}

.code-tab-pane .article-note code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: inherit;
  color: var(--primary-dark);
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 8px;
}

.code-tab-pane .article-note a {
  color: var(--primary);
  font-weight: 600;
}

/* ----- responsive: docs (off-canvas drawer, overlays the page) ----- */
@media (max-width: 767px) {
  .docs-layout { grid-template-columns: 1fr; gap: 16px; }

  /* Dimmed backdrop under the drawer (sits below the sticky header z-50 so the
     header menu stays visible & clickable and never overlaps the drawer) */
  .docs-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(11, 17, 19, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .docs-scrim.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .docs-sidebar {
    position: fixed;
    top: 76px;
    bottom: 0;
    inset-inline-start: 0;
    z-index: 46;
    width: min(320px, 88vw);
    max-height: none;
    margin: 0;
    border: 1px solid var(--line);
    border-inline-start: none;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    border-start-end-radius: 14px;
    border-end-end-radius: 14px;
    box-shadow: var(--shadow-lifted);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
  }
  .docs-sidebar.open {
    transform: translateX(0);
    visibility: visible;
  }

  @media (max-width: 480px) {
    .docs-sidebar { top: 64px; }
  }

  body.docs-drawer-open { overflow: hidden; }

  .docs-toc-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
  }
  .docs-toc-btn::after {
    content: "▾";
    color: var(--primary);
    transition: transform 0.2s ease;
  }
  .docs-toc-btn.open::after { transform: rotate(180deg); }
}