/* ==========================================================================
   Wapify Docs — generated shell + content system
   Tokens mirror website/styles.css so the docs and the marketing site read as
   one product. This file is standalone on purpose: the docs chrome (sidebar,
   search, TOC) has nothing in common with the marketing page layout, and
   sharing a stylesheet between them only creates specificity fights.
   ========================================================================== */

:root {
  --brand: #17a45e;
  --brand-strong: #0f8a4c;
  --brand-tint: #e9faf1;
  --brand-tint-2: #d3f5e2;
  --brand-ring: rgba(23, 164, 94, 0.22);

  --ai: #5e6ad2;
  --ai-tint: #f1f1ff;
  --ai-tint-2: #e4e4ff;

  --info: #2f7de1;
  --info-tint: #eaf3ff;

  --warn: #b9740a;
  --warn-tint: #fff6e6;
  --crit: #d13c3c;
  --crit-tint: #fdecec;

  --orange: #e8632c;
  --orange-tint: #fdece2;

  --bg-0: #ffffff;
  --bg-1: #fbfafa;
  --bg-2: #f5f4f5;
  --bg-3: #efeef0;
  --bg-inverse: #0a0b0d;

  --border-1: #ebeaec;
  --border-2: #e2e0e3;
  --border-3: #d3d1d5;

  --text-1: #0c0d10;
  --text-2: rgba(12, 13, 16, 0.68);
  --text-3: rgba(12, 13, 16, 0.48);
  --text-4: rgba(12, 13, 16, 0.32);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-ar: "IBM Plex Sans Arabic", "Inter", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-6: 6px;
  --r-8: 8px;
  --r-12: 12px;
  --r-16: 16px;
  --r-20: 20px;
  --r-full: 9999px;

  --shadow-low: 0 1px 2px rgba(12, 13, 16, 0.05), 0 1px 1px rgba(12, 13, 16, 0.04);
  --shadow-med: 0 4px 16px rgba(12, 13, 16, 0.07), 0 1px 3px rgba(12, 13, 16, 0.05);
  --shadow-high: 0 16px 48px rgba(12, 13, 16, 0.14), 0 4px 12px rgba(12, 13, 16, 0.06);

  --header-h: 60px;
  --side-w: 282px;
  --toc-w: 216px;
  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

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

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

body {
  font-family: var(--font-sans);
  font-feature-settings: "cv01", "ss03";
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--brand-tint-2); }

/* ==========================================================================
   Header
   ========================================================================== */

.docs-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-1);
}

.side-toggle { display: none; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: var(--r-8); color: var(--text-2); }
.side-toggle:hover { background: var(--bg-2); }
.side-toggle svg { width: 20px; height: 20px; }

.docs-brand { display: flex; align-items: center; gap: 8px; font-weight: 620; letter-spacing: -0.02em; flex: none; }
.docs-brand img { width: 26px; height: 26px; border-radius: 7px; }
.docs-brand em {
  font-style: normal; font-size: 11px; font-weight: 590; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-tint); border: 1px solid var(--brand-tint-2);
  padding: 2px 7px; border-radius: var(--r-full);
}

.search-open {
  flex: 1; max-width: 380px; margin-inline-start: 12px;
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 10px;
  border: 1px solid var(--border-2); border-radius: var(--r-8);
  background: var(--bg-1); color: var(--text-3); font-size: 14px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.search-open:hover { border-color: var(--border-3); background: var(--bg-0); }
.search-open svg { width: 16px; height: 16px; flex: none; }
.search-open span { flex: 1; text-align: start; }
.search-open kbd, .search-field kbd {
  font-family: var(--font-sans); font-size: 11px; font-weight: 540;
  color: var(--text-3); background: var(--bg-0);
  border: 1px solid var(--border-2); border-radius: 5px; padding: 2px 6px;
}

.docs-header-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.docs-header-nav a:hover { color: var(--text-1); }
.btn-install {
  background: var(--text-1); color: #fff !important; padding: 8px 15px; border-radius: var(--r-8);
  font-weight: 540; font-size: 13.5px;
}
.btn-install:hover { background: #24262c; }

@media (max-width: 1000px) {
  .docs-header-nav a:not(.btn-install) { display: none; }
}
@media (max-width: 860px) {
  .side-toggle { display: flex; }
  .search-open span { display: none; }
  .search-open kbd { display: none; }
  .search-open { max-width: 36px; padding: 0; justify-content: center; margin-inline-start: auto; }
  .docs-header-nav { margin-inline-start: 0; }
}
@media (max-width: 520px) {
  .docs-brand span { display: none; }
  .btn-install { padding: 8px 12px; }
}

/* ==========================================================================
   Shell
   ========================================================================== */

.docs-shell { display: flex; align-items: flex-start; }

.docs-side {
  position: sticky; top: var(--header-h);
  width: var(--side-w); flex: none;
  height: calc(100vh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  border-inline-end: 1px solid var(--border-1);
  background: var(--bg-1);
}
.side-inner { padding: 26px 18px 60px; }

.side-group + .side-group { margin-top: 24px; }
.side-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 620; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-3); padding: 0 10px 8px;
}
.side-ico { display: grid; place-items: center; width: 18px; height: 18px; color: var(--text-4); }
.side-ico svg { width: 14px; height: 14px; }

.docs-side ul { list-style: none; }
.docs-side li a {
  display: block; padding: 6px 10px; margin-bottom: 1px;
  font-size: 14px; font-weight: 450; color: var(--text-2);
  border-radius: var(--r-6); line-height: 1.45;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.docs-side li a:hover { background: var(--bg-3); color: var(--text-1); }
.docs-side li a.is-active { background: var(--brand-tint); color: var(--brand-strong); font-weight: 590; }

.side-scrim { display: none; }

@media (max-width: 860px) {
  .docs-side {
    position: fixed; inset-block: var(--header-h) 0; inset-inline-start: 0;
    z-index: 55; width: min(320px, 86vw);
    transform: translateX(-102%); transition: transform .28s var(--ease);
    box-shadow: var(--shadow-high);
  }
  body.side-open .docs-side { transform: none; }
  .side-scrim {
    display: block; position: fixed; inset: var(--header-h) 0 0; z-index: 54;
    background: rgba(12, 13, 16, .38); opacity: 0; pointer-events: none;
    transition: opacity .28s var(--ease);
  }
  body.side-open .side-scrim { opacity: 1; pointer-events: auto; }
}

.docs-main {
  flex: 1; min-width: 0;
  display: flex; gap: 40px;
  justify-content: center;
  padding: 44px 40px 80px;
}
.docs-article { flex: 1; min-width: 0; max-width: 760px; }
.docs-toc { width: var(--toc-w); flex: none; }

@media (max-width: 1240px) { .docs-toc { display: none; } }
@media (max-width: 860px) { .docs-main { padding: 32px 22px 64px; } }
@media (max-width: 520px) { .docs-main { padding: 26px 16px 56px; } }

/* ── TOC ─────────────────────────────────────────────────────────────────── */

.toc { position: sticky; top: calc(var(--header-h) + 44px); }
.toc-title { font-size: 11.5px; font-weight: 620; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.toc ul { list-style: none; border-inline-start: 1.5px solid var(--border-2); }
.toc li a {
  display: block; padding: 5px 0 5px 14px; margin-inline-start: -1.5px;
  border-inline-start: 1.5px solid transparent;
  font-size: 13.5px; line-height: 1.45; color: var(--text-3);
  transition: color .12s var(--ease), border-color .12s var(--ease);
}
.toc li a:hover { color: var(--text-1); }
.toc li a.is-current { color: var(--brand-strong); border-inline-start-color: var(--brand); font-weight: 540; }

/* ==========================================================================
   Page header
   ========================================================================== */

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--brand-strong); }
.crumbs span:not(:last-child) { color: var(--text-4); }

.page-hero { margin-bottom: 34px; }
.page-hero h1 {
  font-size: clamp(30px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.033em; font-weight: 620;
}
.page-hero .lede { margin-top: 12px; font-size: 17.5px; line-height: 1.55; color: var(--text-2); }

/* ==========================================================================
   Content typography
   ========================================================================== */

.docs-article h2 {
  font-size: 25px; line-height: 1.22; letter-spacing: -0.026em; font-weight: 620;
  margin: 52px 0 14px; scroll-margin-top: calc(var(--header-h) + 20px);
}
.docs-article h2:first-of-type { margin-top: 42px; }
.docs-article h3 {
  font-size: 18.5px; line-height: 1.3; letter-spacing: -0.018em; font-weight: 590;
  margin: 34px 0 10px; scroll-margin-top: calc(var(--header-h) + 20px);
}
.docs-article h4 { font-size: 15.5px; font-weight: 590; margin: 24px 0 8px; letter-spacing: -0.01em; }

.docs-article p { margin: 0 0 16px; color: var(--text-2); }
.docs-article p strong, .docs-article li strong { color: var(--text-1); font-weight: 590; }

.docs-article ul, .docs-article ol { margin: 0 0 18px; padding-inline-start: 22px; color: var(--text-2); }
.docs-article li { margin-bottom: 7px; }
.docs-article li::marker { color: var(--text-4); }
.docs-article ul ul, .docs-article ol ol, .docs-article ul ol, .docs-article ol ul { margin: 7px 0 0; }

.docs-article a:not(.btn-brand):not(.btn-ghost):not(.pager-card):not(.hub-card):not(.pillar):not(.card-link) {
  color: var(--brand-strong); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--brand-ring); text-underline-offset: 2.5px;
  transition: text-decoration-color .15s var(--ease);
}
.docs-article a:not(.btn-brand):not(.btn-ghost):not(.pager-card):not(.hub-card):not(.pillar):not(.card-link):hover {
  text-decoration-color: var(--brand);
}

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

code {
  font-family: var(--font-mono); font-size: .875em;
  background: var(--bg-2); border: 1px solid var(--border-1);
  padding: 1.5px 5px; border-radius: 5px; color: var(--text-1);
  white-space: nowrap;
}
pre {
  background: var(--bg-inverse); color: #e8e9ec;
  padding: 16px 18px; border-radius: var(--r-12); overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6; margin: 0 0 18px;
}
pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; }

.lead-note { font-size: 16.5px; color: var(--text-2); }

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--border-1); border-radius: var(--r-12); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead th {
  text-align: start; font-weight: 590; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3); background: var(--bg-1); padding: 11px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--border-1);
}
tbody td { padding: 12px 14px; border-top: 1px solid var(--border-1); color: var(--text-2); vertical-align: top; }
tbody tr:first-child td { border-top: 0; }
tbody td:first-child { color: var(--text-1); font-weight: 500; }
tbody td code { white-space: nowrap; }

/* ==========================================================================
   Callouts
   ========================================================================== */

.note {
  position: relative; margin: 0 0 22px; padding: 14px 18px 14px 44px;
  border: 1px solid var(--border-1); border-radius: var(--r-12);
  background: var(--bg-1); font-size: 14.5px; line-height: 1.55; color: var(--text-2);
}
.note::before {
  content: "i"; position: absolute; left: 16px; top: 15px;
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; font-style: italic;
  background: var(--info); color: #fff;
}
.note > *:last-child { margin-bottom: 0; }
.note p { color: inherit; margin-bottom: 10px; }
.note strong { color: var(--text-1); }

.note.tip { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.note.tip::before { content: "★"; background: var(--brand); font-style: normal; font-size: 10px; }
.note.warn { background: var(--warn-tint); border-color: #f4e2c0; }
.note.warn::before { content: "!"; background: var(--warn); font-style: normal; }
.note.crit { background: var(--crit-tint); border-color: #f6d5d5; }
.note.crit::before { content: "!"; background: var(--crit); font-style: normal; }
.note.ai { background: var(--ai-tint); border-color: var(--ai-tint-2); }
.note.ai::before { content: "✦"; background: var(--ai); font-style: normal; font-size: 10px; }

/* Plan requirement ribbon */
.plan-req {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 24px; padding: 11px 14px;
  border: 1px solid var(--border-2); border-radius: var(--r-12); background: var(--bg-1);
  font-size: 13.5px; color: var(--text-2);
}
.plan-req b { color: var(--text-1); font-weight: 590; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 590; letter-spacing: -0.005em; white-space: nowrap;
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text-2);
}
.pill.free { background: var(--bg-2); }
.pill.basic { background: var(--info-tint); border-color: #cfe2fb; color: #1f5fae; }
.pill.growth { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand-strong); }
.pill.pro { background: var(--ai-tint); border-color: var(--ai-tint-2); color: #4149a8; }
.pill.own { background: var(--orange-tint); border-color: #f8d6c3; color: #b8481d; }
.pill.ai-tag { background: var(--ai-tint); border-color: var(--ai-tint-2); color: #4149a8; }
.pill.util { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand-strong); }
.pill.mktg { background: var(--orange-tint); border-color: #f8d6c3; color: #b8481d; }

/* ── Steps ───────────────────────────────────────────────────────────────── */

ol.steps { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: step; }
ol.steps > li {
  position: relative; padding-inline-start: 42px; padding-bottom: 22px; margin-bottom: 0;
  counter-increment: step;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 0; top: -1px;
  width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 620;
  background: var(--brand); color: #fff;
}
ol.steps > li::after {
  content: ""; position: absolute; inset-inline-start: 13px; top: 32px; bottom: 4px;
  width: 1.5px; background: var(--border-2);
}
ol.steps > li:last-child { padding-bottom: 0; }
ol.steps > li:last-child::after { display: none; }
ol.steps > li > strong { display: block; color: var(--text-1); font-weight: 590; margin-bottom: 3px; }
ol.steps > li > p:last-child, ol.steps > li > ul:last-child { margin-bottom: 0; }

/* ── Definition rows ─────────────────────────────────────────────────────── */

.specs { margin: 0 0 24px; border: 1px solid var(--border-1); border-radius: var(--r-12); overflow: hidden; }
.specs > div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 13px 16px; font-size: 14.5px; }
.specs > div + div { border-top: 1px solid var(--border-1); }
.specs dt, .specs .k { font-weight: 590; color: var(--text-1); }
.specs dd, .specs .v { color: var(--text-2); margin: 0; }
.specs .v > *:last-child { margin-bottom: 0; }
@media (max-width: 620px) { .specs > div { grid-template-columns: 1fr; gap: 3px; } }

/* ── Card grids ──────────────────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 0 0 24px; }
.card-link {
  display: block; padding: 16px 17px; border: 1px solid var(--border-1); border-radius: var(--r-12);
  background: var(--bg-0); box-shadow: var(--shadow-low);
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.card-link:hover { border-color: var(--border-3); transform: translateY(-2px); box-shadow: var(--shadow-med); }
.card-link h4 { margin: 0 0 5px; font-size: 15px; font-weight: 590; }
.card-link p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-3); }
.card-link .pill { margin-bottom: 9px; }

/* ==========================================================================
   Figures — "screenshots" drawn from code
   ========================================================================== */

.fig { margin: 0 0 26px; }
.fig-frame {
  border: 1px solid var(--border-2); border-radius: var(--r-16);
  background: var(--bg-1); padding: 26px 22px; overflow: hidden;
  box-shadow: var(--shadow-low);
}
.fig-frame.tight { padding: 18px 16px; }
.fig-frame.plain { background: var(--bg-0); }
.fig-frame.dark { background: #101115; border-color: #23252c; }
.fig-cap { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-3); text-align: center; }
.fig-cap b { color: var(--text-2); font-weight: 590; }

/* Hero art — the header image every feature page opens with */
.hero-art { margin: 0 0 34px; }
.hero-art .fig-frame {
  padding: 30px 24px;
  background:
    radial-gradient(120% 100% at 50% 0%, #ffffff 0%, var(--bg-1) 55%, var(--bg-2) 100%);
  position: relative;
}
.hero-art .fig-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(12,13,16,.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(12,13,16,.028) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
}
.hero-art .fig-frame > * { position: relative; z-index: 1; }

/* ── WhatsApp message mockup ─────────────────────────────────────────────── */

.wa {
  max-width: 348px; margin: 0 auto;
  background: #efe7dd;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.55) 0 1.4px, transparent 1.5px),
    radial-gradient(circle at 68% 62%, rgba(0,0,0,.028) 0 1.6px, transparent 1.7px);
  background-size: 34px 34px, 46px 46px;
  border: 1px solid #ddd3c7; border-radius: 16px;
  padding: 12px 10px 14px;
}
.wa.wide { max-width: 400px; }

.wa-top {
  display: flex; align-items: center; gap: 9px;
  margin: -12px -10px 12px; padding: 9px 12px;
  background: #f6f4f1; border-bottom: 1px solid #e2dbd2;
  border-radius: 15px 15px 0 0;
}
.wa-av {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 620;
  background: var(--brand);
}
.wa-who { min-width: 0; }
.wa-who b { display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 590; color: #111b21; }
.wa-who span { font-size: 11.5px; color: #667781; }
.wa-tick { width: 13px; height: 13px; flex: none; }

.wa-bubble {
  position: relative;
  background: #fff; border-radius: 8px 8px 8px 2px;
  padding: 8px 10px 6px; margin-bottom: 9px;
  box-shadow: 0 1px 1px rgba(11, 20, 26, .13);
  font-size: 13.6px; line-height: 1.48; color: #111b21;
  white-space: pre-wrap; word-break: break-word;
}
.wa-bubble.out { background: #d9fdd3; border-radius: 8px 8px 2px 8px; margin-inline-start: 44px; }
.wa-bubble.in { margin-inline-end: 44px; }
.wa-bubble b { font-weight: 620; }
.wa-bubble .wa-time { display: block; text-align: end; font-size: 10.5px; color: #667781; margin-top: 2px; }
.wa-bubble[dir="rtl"] { font-family: var(--font-ar); }

.wa-hdr-img {
  height: 108px; margin: -8px -10px 8px; border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, #dfe6ee, #c9d4e0);
  display: grid; place-items: center; color: #7b8794; font-size: 11.5px; font-weight: 540;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
/* Both sit inside a pre-wrap bubble alongside bare text nodes, so they have to
   declare their own line — inline would run them into the body copy. */
.wa-hdr-txt { display: block; font-weight: 620; font-size: 14px; margin-bottom: 5px; color: #111b21; }
.wa-foot { display: block; font-size: 11.5px; color: #667781; margin-top: 5px; }

.wa-btns { border-top: 1px solid #e9edef; margin: 7px -10px -6px; }
.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 6px; font-size: 13.5px; font-weight: 500; color: #027eb5;
  border-top: 1px solid #e9edef;
}
.wa-btn:first-child { border-top: 0; }
.wa-btn svg { width: 14px; height: 14px; }

.wa-quick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 9px; }
.wa-quick span {
  background: #fff; color: #027eb5; font-size: 13px; font-weight: 500;
  padding: 6px 16px; border-radius: var(--r-full);
  box-shadow: 0 1px 1px rgba(11, 20, 26, .13);
}

/* Carousel of product cards (upsell) */
.wa-carousel { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-inline-start: 0; }
.wa-card { flex: none; width: 132px; background: #fff; border-radius: 8px; box-shadow: 0 1px 1px rgba(11,20,26,.13); overflow: hidden; }
.wa-card .ph { height: 82px; background: linear-gradient(135deg, #e4ebf2, #cfd9e4); display: grid; place-items: center; color: #8b96a3; font-size: 10.5px; }
.wa-card p { font-size: 11.8px; line-height: 1.4; padding: 7px 8px 5px; margin: 0; color: #111b21; }
.wa-card .b { border-top: 1px solid #e9edef; text-align: center; padding: 6px; font-size: 12.5px; color: #027eb5; font-weight: 500; }

/* ── App UI mockup (Polaris-ish) ─────────────────────────────────────────── */

.ui {
  background: #fff; border: 1px solid #e3e3e3; border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
  font-size: 13.5px; color: #303030; overflow: hidden;
}
.ui + .ui { margin-top: 12px; }
.ui-pad { padding: 14px 16px; }
.ui-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ui-row.center { align-items: center; }
.ui h5 { font-size: 14px; font-weight: 650; color: #303030; margin: 0 0 3px; letter-spacing: -0.005em; }
.ui p { font-size: 13px; line-height: 1.45; color: #616161; margin: 0; }
.ui small { font-size: 12px; color: #8a8a8a; display: block; line-height: 1.45; }
.ui-div { height: 1px; background: #e3e3e3; }
.ui-sub { background: #f7f7f7; padding: 8px 16px; font-size: 11.5px; font-weight: 620; letter-spacing: .04em; text-transform: uppercase; color: #616161; }

.ui-toggle { width: 40px; height: 22px; border-radius: 11px; background: #c9cccf; position: relative; flex: none; transition: background .15s var(--ease); }
.ui-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s var(--ease); }
.ui-toggle.on { background: #303030; }
.ui-toggle.on::after { transform: translateX(18px); }

.ui-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.ui-pills span {
  padding: 3px 12px; border-radius: 20px; border: 1.5px solid #c9cccf;
  font-size: 12.5px; color: #616161; background: transparent; line-height: 1.5;
}
.ui-pills span.on { border-color: #005bd3; background: #ebf5ff; color: #005bd3; font-weight: 600; }

.ui-slider { height: 4px; border-radius: 2px; background: #e3e3e3; position: relative; margin: 14px 0 6px; }
.ui-slider i { position: absolute; inset-block: 0; inset-inline-start: 0; background: #303030; border-radius: 2px; }
.ui-slider b { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #303030; transform: translate(-50%, -50%); }

.ui-check { display: flex; gap: 9px; align-items: flex-start; }
.ui-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #8a8a8a; flex: none; margin-top: 2px; }
.ui-box.on { background: #303030; border-color: #303030; position: relative; }
.ui-box.on::after { content: ""; position: absolute; left: 4.4px; top: 1.4px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }

.ui-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 550; background: #e3e3e3; color: #303030; }
.ui-badge.warn { background: #ffd6a4; color: #5e4200; }
.ui-badge.ok { background: #cdfee1; color: #0c5132; }
.ui-badge.crit { background: #ffd6d6; color: #8e0b0b; }
.ui-badge.info { background: #d6e8ff; color: #00417e; }
.ui-badge.new { background: #e0d9ff; color: #3b2a80; }

.ui-tag { display: inline-block; padding: 2px 9px; border-radius: 7px; background: #e3e3e3; color: #303030; font-size: 12.5px; }

.ui-btn { display: inline-block; padding: 6px 13px; border-radius: 8px; background: #303030; color: #fff; font-size: 13px; font-weight: 550; }
.ui-btn.sec { background: #fff; color: #303030; border: 1px solid #d0d0d0; }

.ui-field { border: 1px solid #8a8a8a; border-radius: 8px; padding: 7px 11px; color: #8a8a8a; font-size: 13px; background: #fff; }
.ui-select { display: flex; align-items: center; justify-content: space-between; border: 1px solid #8a8a8a; border-radius: 8px; padding: 7px 11px; color: #303030; font-size: 13px; background: #fff; }
.ui-select::after { content: "⌄"; color: #616161; margin-top: -6px; }

.ui-tabs { display: flex; gap: 2px; padding: 6px 10px 0; border-bottom: 1px solid #e3e3e3; overflow-x: auto; }
.ui-tabs span { padding: 8px 11px; font-size: 13px; color: #616161; white-space: nowrap; border-bottom: 2px solid transparent; }
.ui-tabs span.on { color: #303030; font-weight: 600; border-bottom-color: #303030; }

.ui-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ui-table th { text-align: start; font-size: 11.5px; font-weight: 620; text-transform: uppercase; letter-spacing: .04em; color: #616161; background: #f7f7f7; padding: 8px 12px; white-space: nowrap; }
.ui-table td { padding: 9px 12px; border-top: 1px solid #e3e3e3; color: #303030; vertical-align: middle; }

.ui-grid { display: grid; gap: 10px; }
.ui-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.ui-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.ui-grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 620px) { .ui-grid.c3, .ui-grid.c4 { grid-template-columns: repeat(2, 1fr); } }

.ui-stat { border: 1px solid #e3e3e3; border-radius: 10px; padding: 11px 13px; background: #fff; }
.ui-stat span { display: block; font-size: 11.5px; color: #616161; margin-bottom: 3px; line-height: 1.35; }
.ui-stat b { font-size: 20px; font-weight: 640; letter-spacing: -0.02em; color: #303030; }
.ui-stat i { font-style: normal; font-size: 11.5px; color: #8a8a8a; display: block; margin-top: 2px; }

/* Inbox three-pane mockup */
.ui-inbox { display: grid; grid-template-columns: 168px 1fr 150px; min-height: 232px; }
.ui-inbox > div { min-width: 0; }
.ui-inbox .col-list { border-inline-end: 1px solid #e3e3e3; background: #fbfbfb; }
.ui-inbox .col-thread { display: flex; flex-direction: column; background: #fff; }
.ui-inbox .col-prof { border-inline-start: 1px solid #e3e3e3; background: #fbfbfb; padding: 11px; }
@media (max-width: 720px) { .ui-inbox { grid-template-columns: 1fr; } .ui-inbox .col-list, .ui-inbox .col-prof { display: none; } }

.chat-item { display: flex; gap: 8px; padding: 9px 10px; border-bottom: 1px solid #ededed; }
.chat-item.on { background: #f1f1f1; }
.chat-av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 620; }
.chat-meta { min-width: 0; flex: 1; }
.chat-meta b { display: block; font-size: 12.5px; font-weight: 590; color: #303030; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-meta small { font-size: 11px; color: #8a8a8a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: #005bd3; flex: none; margin-top: 8px; }

.thread-body { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 7px; background: #efe7dd; }
.tb { max-width: 78%; font-size: 11.8px; line-height: 1.4; padding: 6px 9px; border-radius: 8px; background: #fff; box-shadow: 0 1px 1px rgba(11,20,26,.1); color: #111b21; }
.tb.out { align-self: flex-end; background: #d9fdd3; }
.thread-composer { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-top: 1px solid #e3e3e3; color: #8a8a8a; font-size: 12.5px; }

/* Storefront widget mockups */
.sf { background: #fff; border: 1px solid var(--border-2); border-radius: var(--r-12); padding: 18px; }
.sf-btn { display: block; text-align: center; padding: 11px; border-radius: 8px; background: #111; color: #fff; font-size: 13.5px; font-weight: 560; }
.sf-btn.ghost { background: #fff; color: #111; border: 1.5px solid #111; }
.sf-stars { color: #f5a623; letter-spacing: 2px; font-size: 14px; }
.sf-review { border-top: 1px solid var(--border-1); padding-top: 12px; margin-top: 12px; }
.sf-review p { font-size: 13px; color: var(--text-2); margin: 5px 0 0; }
.sf-review b { font-size: 13px; }

/* Flow diagram (event → job → message) */
.flow { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow-step {
  flex: 1; min-width: 128px; background: #fff; border: 1px solid var(--border-2);
  border-radius: var(--r-12); padding: 12px 13px; text-align: center; box-shadow: var(--shadow-low);
}
.flow-step span { display: block; font-size: 10.5px; font-weight: 620; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); margin-bottom: 4px; }
.flow-step b { display: block; font-size: 13.5px; font-weight: 590; color: var(--text-1); line-height: 1.35; }
.flow-step small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }
.flow-arrow { display: grid; place-items: center; width: 26px; flex: none; color: var(--text-4); font-size: 15px; }
@media (max-width: 620px) {
  .flow { flex-direction: column; }
  .flow-arrow { width: auto; height: 22px; transform: rotate(90deg); }
}

/* ==========================================================================
   Pager + help
   ========================================================================== */

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 56px 0 0; }
.pager-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; border: 1px solid var(--border-1); border-radius: var(--r-12);
  background: var(--bg-0); box-shadow: var(--shadow-low);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.pager-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.pager-next { text-align: end; align-items: flex-end; }
.pager-dir { font-size: 11.5px; font-weight: 590; letter-spacing: .04em; text-transform: uppercase; color: var(--text-4); }
.pager-name { font-size: 15px; font-weight: 560; color: var(--text-1); }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { text-align: start; align-items: flex-start; } }

.help-box {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 26px; padding: 20px 22px;
  border: 1px solid var(--brand-tint-2); border-radius: var(--r-16); background: var(--brand-tint);
}
.help-box h3 { font-size: 16px; font-weight: 620; margin: 0 0 4px; }
.help-box p { font-size: 13.5px; line-height: 1.5; color: var(--text-2); margin: 0; max-width: 46ch; }

.btn-brand {
  display: inline-block; padding: 10px 18px; border-radius: var(--r-8);
  background: var(--brand); color: #fff !important; font-weight: 560; font-size: 14px;
  text-decoration: none !important; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(23,164,94,.3);
  transition: background .15s var(--ease);
}
.btn-brand:hover { background: var(--brand-strong); }
.btn-ghost {
  display: inline-block; padding: 10px 18px; border-radius: var(--r-8);
  border: 1px solid var(--border-3); color: var(--text-1) !important; font-weight: 540; font-size: 14px;
  text-decoration: none !important; background: var(--bg-0);
}
.btn-ghost:hover { border-color: var(--text-4); }

/* ==========================================================================
   Footer
   ========================================================================== */

.docs-footer { border-top: 1px solid var(--border-1); background: var(--bg-1); }
.docs-footer-in {
  max-width: 1180px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3);
}
.docs-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.docs-footer nav a:hover { color: var(--text-1); }

/* ==========================================================================
   Hub (docs home)
   ========================================================================== */

.hub-hero { padding: 8px 0 6px; }
.hub-hero .eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 620; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-strong); background: var(--brand-tint); border: 1px solid var(--brand-tint-2);
  padding: 4px 11px; border-radius: var(--r-full); margin-bottom: 18px;
}
.hub-hero h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.036em; font-weight: 620; }
.hub-hero .lede { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 62ch; }
.hub-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.hub-pillars { margin-top: 58px; }
.hub-pillars h2 { font-size: 22px; font-weight: 620; letter-spacing: -0.024em; margin-bottom: 16px; }
.pillar-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 780px) { .pillar-row { grid-template-columns: 1fr; } }
.pillar {
  padding: 18px; border: 1px solid var(--border-1); border-radius: var(--r-16);
  background: linear-gradient(180deg, #fff, var(--bg-1));
  box-shadow: var(--shadow-low);
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.pillar:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-med); }
.pillar-tag {
  display: inline-block; font-size: 12px; font-weight: 620; letter-spacing: -0.01em;
  color: var(--brand-strong); background: var(--brand-tint); border: 1px solid var(--brand-tint-2);
  padding: 3px 10px; border-radius: var(--r-full); margin-bottom: 10px;
}
.pillar p { font-size: 13.8px; line-height: 1.55; color: var(--text-2); margin: 0; }
.pillar-note { margin-top: 16px; font-size: 14px; color: var(--text-3); }
.pillar-note a { color: var(--brand-strong); font-weight: 500; }

.hub-grid-wrap { margin-top: 58px; }
.hub-grid-wrap h2 { font-size: 22px; font-weight: 620; letter-spacing: -0.024em; margin-bottom: 16px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 14px; }
.hub-card {
  padding: 18px; border: 1px solid var(--border-1); border-radius: var(--r-16); background: var(--bg-0);
  box-shadow: var(--shadow-low);
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.hub-card:hover { border-color: var(--border-3); transform: translateY(-2px); box-shadow: var(--shadow-med); }
.hub-ico {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--bg-2); color: var(--text-2); margin-bottom: 12px;
}
.hub-ico svg { width: 17px; height: 17px; }
.hub-card h3 { font-size: 15.5px; font-weight: 620; letter-spacing: -0.012em; margin-bottom: 5px; }
.hub-card > p { font-size: 13.2px; line-height: 1.5; color: var(--text-3); margin: 0 0 12px; }
.hub-card ul { list-style: none; border-top: 1px solid var(--border-1); padding-top: 10px; }
.hub-card li { font-size: 12.8px; color: var(--text-2); padding: 2.5px 0; }
.hub-card li.more { color: var(--text-4); }

body.is-hub .docs-article { max-width: 860px; }

/* ==========================================================================
   Search modal
   ========================================================================== */

.search-modal { position: fixed; inset: 0; z-index: 200; background: rgba(12,13,16,.4); backdrop-filter: blur(3px); padding: 12vh 20px 20px; }
.search-modal[hidden] { display: none; }
.search-panel {
  max-width: 620px; margin: 0 auto; background: var(--bg-0);
  border: 1px solid var(--border-2); border-radius: var(--r-16); box-shadow: var(--shadow-high);
  overflow: hidden; display: flex; flex-direction: column; max-height: 70vh;
}
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-1); }
.search-field svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search-field input { flex: 1; border: 0; outline: 0; font-size: 16px; font-family: inherit; color: var(--text-1); background: none; min-width: 0; }
.search-field input::placeholder { color: var(--text-4); }

.search-results { overflow-y: auto; padding: 8px; }
.search-results .empty { padding: 26px 16px; text-align: center; font-size: 14px; color: var(--text-3); }
.sr {
  display: block; padding: 10px 12px; border-radius: var(--r-8);
  transition: background .1s var(--ease);
}
.sr:hover, .sr.is-sel { background: var(--bg-2); }
.sr .sr-sec { font-size: 11px; font-weight: 590; letter-spacing: .04em; text-transform: uppercase; color: var(--text-4); }
.sr .sr-title { font-size: 14.5px; font-weight: 560; color: var(--text-1); margin-top: 1px; }
.sr .sr-snip { font-size: 12.8px; line-height: 1.45; color: var(--text-3); margin-top: 2px; }
.sr mark { background: var(--brand-tint-2); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ==========================================================================
   Arabic snippets
   ========================================================================== */

[dir="rtl"] { font-family: var(--font-ar); }
.ar-note { font-family: var(--font-ar); }
