/* ==========================================================================
   NFatoora — design system
   Logical properties everywhere so RTL (Arabic) and LTR (English) both work.
   ========================================================================== */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/assets/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/assets/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url(/assets/fonts/inter-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }

:root {
  --green: #0B6E4F; --green-600: #095C42; --green-50: #E7F4EF; --green-100: #CDEBDF;
  --teal: #14B8A6; --teal-300: #5EEAD4;
  --navy: #0F1E3D; --navy-900: #0A1428; --navy-800: #13244A; --navy-700: #1C3260;
  --gold: #C9A227; --gold-100: #F7EDCC;
  --wa: #25D366;
  --bg: #F7F9F8; --bg-alt: #EFF4F2; --surface: #FFFFFF; --surface-2: #F9FBFA;
  --text: #111827; --text-2: #374151; --muted: #6B7280; --faint: #9CA3AF;
  --border: #E3E9E6; --border-strong: #D3DCD8;
  --ring: rgba(11, 110, 79, .25);
  --ai: linear-gradient(135deg, #14B8A6 0%, #0B6E4F 50%, #0F1E3D 100%);
  --ai-soft: linear-gradient(135deg, rgba(20,184,166,.14), rgba(11,110,79,.10) 50%, rgba(15,30,61,.06));
  --shadow-sm: 0 1px 2px rgba(15,30,61,.06), 0 1px 1px rgba(15,30,61,.04);
  --shadow: 0 1px 2px rgba(15,30,61,.05), 0 8px 24px -8px rgba(15,30,61,.12);
  --shadow-lg: 0 2px 4px rgba(15,30,61,.04), 0 24px 56px -16px rgba(15,30,61,.22);
  --shadow-glow: 0 0 0 1px rgba(20,184,166,.25), 0 18px 50px -12px rgba(20,184,166,.35);
  --radius-sm: 10px; --radius: 16px; --radius-lg: 20px; --radius-xl: 28px;
  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
html[lang="ar"] { --font: "Plex Arabic", "Inter", system-ui, Tahoma, sans-serif; }

html.dark {
  --bg: #0A1428; --bg-alt: #0D1931; --surface: #101D36; --surface-2: #13223F;
  --text: #E8EEF7; --text-2: #C7D2E1; --muted: #94A3B8; --faint: #64748B;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.14);
  --green-50: rgba(11,110,79,.18); --green-100: rgba(11,110,79,.3); --gold-100: rgba(201,162,39,.16);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 56px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
html[lang="ar"] body { line-height: 1.85; font-size: 16.5px; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
html[lang="ar"] :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }
::selection { background: rgba(20,184,166,.25); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.num { font-family: "Inter", var(--font); font-feature-settings: "tnum"; direction: ltr; unicode-bidi: isolate; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 860px; }
.section { padding-block: clamp(72px, 10vw, 120px); position: relative; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding-block: clamp(48px, 6vw, 72px); }

/* ── Typography ─────────────────────────────────────────────────────────── */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--green); background: var(--green-50); border: 1px solid var(--green-100); letter-spacing: .01em; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(20,184,166,.2); animation: pulse 2s infinite; }
.display { font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
html[lang="ar"] .display { font-weight: 700; line-height: 1.3; letter-spacing: 0; font-size: clamp(36px, 5.6vw, 62px); }
.h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.03em; }
html[lang="ar"] .h2 { font-weight: 700; }
.h3 { font-size: 20px; font-weight: 700; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); line-height: 1.7; }
.muted { color: var(--muted); }
.text-gradient, .display em, .h2 em { font-style: normal; background: linear-gradient(120deg, #5EEAD4 0%, #14B8A6 35%, #22C08A 70%, #C9A227 110%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head { max-width: 720px; margin-inline: auto; text-align: center; display: grid; gap: 16px; justify-items: center; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.start { margin-inline: 0; text-align: start; justify-items: start; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding-inline: 22px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { --h: 40px; padding-inline: 16px; font-size: 14px; border-radius: 10px; }
.btn-lg { --h: 56px; padding-inline: 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #0E8A63 0%, var(--green) 55%, #0A5F45 100%); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 20px -6px rgba(11,110,79,.55); }
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 14px 28px -8px rgba(11,110,79,.6); }
.btn-dark { color: #fff; background: var(--navy); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-glass { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255,255,255,.14); }
.btn-wa { color: #fff; background: #0F7A40; box-shadow: 0 8px 20px -6px rgba(37,211,102,.5); }
.btn-gold { color: var(--navy); background: linear-gradient(135deg, #E3C04F, var(--gold)); }
.btn-link { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-link:hover { gap: 10px; }
.btn-link .icon { transition: transform .2s; }
.play-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.play-dot .icon { width: 12px; height: 12px; fill: currentColor; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; transition: background .3s, border-color .3s, box-shadow .3s; border-bottom: 1px solid transparent; }
.site-header.on-dark { color: #fff; }
.site-header.scrolled, .site-header:not(.on-dark) { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom-color: var(--border); color: var(--text); }
.site-header.on-dark.scrolled { background: rgba(10,20,40,.72); color: #fff; border-bottom-color: rgba(255,255,255,.08); }
.header-inner { display: flex; align-items: center; gap: 28px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand small { display: block; font-size: 10px; font-weight: 600; opacity: .6; letter-spacing: .06em; margin-top: -4px; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; }
.nav > a, .nav-drop > button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; opacity: .82; background: none; border: 0; cursor: pointer; transition: opacity .2s, background .2s; }
.nav > a:hover, .nav-drop > button:hover, .nav > a.active { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.nav-drop { position: relative; }
.nav-drop .icon { width: 16px; height: 16px; transition: transform .2s; }
.nav-drop:hover .icon, .nav-drop:focus-within .icon { transform: rotate(180deg); }
.mega { position: absolute; top: calc(100% + 10px); inset-inline-start: -16px; width: 640px; padding: 12px; border-radius: 20px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s var(--ease); }
.mega::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
.nav-drop:hover .mega, .nav-drop:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; gap: 12px; padding: 12px; border-radius: 14px; transition: background .15s; }
.mega a:hover { background: var(--bg-alt); }
.mega .mi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--ai-soft); color: var(--green); flex-shrink: 0; }
.mega strong { display: block; font-size: 14.5px; }
.mega span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.mega .mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding: 14px 16px; border-radius: 14px; background: var(--ai-soft); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); background: transparent; cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.icon-btn .icon { width: 18px; height: 18px; }
.lang-btn { font-weight: 600; font-size: 14px; padding-inline: 12px; height: 40px; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; opacity: .85; }
.lang-btn:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.lang-btn .icon { width: 16px; height: 16px; }
.login-link { font-weight: 600; font-size: 15px; padding: 8px 12px; opacity: .85; }
.login-link:hover { opacity: 1; }
.theme-sun { display: none; }
html.dark .theme-sun { display: block; } html.dark .theme-moon { display: none; }
.menu-toggle { display: none; }
.mobile-nav { display: none; }

@media (max-width: 1200px) {
  .nav, .header-actions .login-link, .header-actions .hide-m { display: none; }
  .menu-toggle { display: grid; }
  .mobile-nav { position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: var(--bg); color: var(--text); padding: 24px; overflow-y: auto; display: grid; align-content: start; gap: 4px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s var(--ease); }
  .mobile-nav.open { opacity: 1; visibility: visible; transform: none; }
  .mobile-nav a { padding: 14px 8px; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
  .mobile-nav .btn { margin-top: 16px; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; margin-top: calc(var(--header-h) * -1); padding-top: calc(var(--header-h) + clamp(40px, 7vw, 88px)); padding-bottom: clamp(64px, 8vw, 110px); background: radial-gradient(1200px 600px at 70% -10%, #13325A 0%, transparent 60%), linear-gradient(180deg, #0A1428 0%, #0B1830 100%); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; pointer-events: none; animation: float 14s ease-in-out infinite; }
.orb-1 { width: 520px; height: 520px; background: #0B6E4F; top: -140px; inset-inline-end: -80px; }
.orb-2 { width: 380px; height: 380px; background: #14B8A6; bottom: -160px; inset-inline-start: 8%; opacity: .35; animation-delay: -5s; }
.orb-3 { width: 260px; height: 260px; background: #C9A227; top: 30%; inset-inline-start: 45%; opacity: .16; animation-delay: -9s; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.hero .eyebrow { color: #A7F3D0; background: rgba(20,184,166,.12); border-color: rgba(94,234,212,.25); }
.hero .lead { color: #B6C3D6; max-width: 580px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.reassure { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: #93A4BD; }
.reassure span { display: inline-flex; align-items: center; gap: 6px; }
.reassure .icon { width: 16px; height: 16px; color: var(--teal-300); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { max-width: 420px; margin-inline: auto; } }

/* Phone mockup with animated WhatsApp chat */
.hero-visual { position: relative; }
.phone { position: relative; width: min(340px, 100%); margin-inline: auto; aspect-ratio: 340 / 690; border-radius: 48px; padding: 12px; background: linear-gradient(145deg, #2A3A5C, #0B1426); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 50px 100px -30px rgba(0,0,0,.7), 0 0 80px -10px rgba(20,184,166,.35); }
.phone::after { content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #05080F; z-index: 3; }
.phone-screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: #0B141A; display: flex; flex-direction: column; }
.wa-top { display: flex; align-items: center; gap: 10px; padding: 52px 16px 12px; background: #1F2C34; color: #E9EDEF; }
.wa-top .av { width: 34px; height: 34px; border-radius: 50%; background: var(--ai); display: grid; place-items: center; }
.wa-top .av svg { width: 20px; height: 20px; }
.wa-top strong { font-size: 14px; display: block; line-height: 1.3; }
.wa-top small { font-size: 11.5px; color: #8696A0; }
.wa-body { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; background-color: #0B141A; background-image: radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px); background-size: 14px 14px; font-size: 13px; }
.bubble { max-width: 86%; padding: 7px 10px 6px; border-radius: 10px; color: #E9EDEF; line-height: 1.5; box-shadow: 0 1px 1px rgba(0,0,0,.3); opacity: 0; transform: translateY(10px) scale(.98); }
.bubble.out { align-self: flex-end; background: #005C4B; border-start-end-radius: 2px; }
.bubble.in { align-self: flex-start; background: #1F2C34; border-start-start-radius: 2px; }
[dir="rtl"] .bubble.out { align-self: flex-start; } [dir="rtl"] .bubble.in { align-self: flex-end; }
.bubble .time { display: block; font-size: 10px; color: rgba(233,237,239,.55); text-align: end; margin-top: 2px; }
.voice { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.voice .play { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.voice .play svg { width: 12px; height: 12px; fill: #E9EDEF; }
.wave { display: flex; align-items: center; gap: 2px; height: 22px; flex: 1; }
.wave i { width: 3px; border-radius: 3px; background: #7FD1B9; height: 30%; animation: wave 1.1s ease-in-out infinite; }
.voice-caption { font-size: 11.5px; color: rgba(233,237,239,.7); margin-top: 4px; font-style: italic; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8696A0; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.ai-line { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #5EEAD4; }
.ai-line svg { width: 14px; height: 14px; }
.mini-inv { background: #fff; color: #111827; border-radius: 8px; padding: 10px; font-size: 11px; line-height: 1.5; margin-bottom: 4px; }
.mini-inv .row { display: flex; justify-content: space-between; gap: 8px; }
.mini-inv .head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed #D1D5DB; padding-bottom: 6px; margin-bottom: 6px; font-weight: 700; color: var(--navy); }
.mini-inv .tot { border-top: 1px solid #E5E7EB; margin-top: 6px; padding-top: 6px; font-weight: 700; color: var(--green); }
.mini-inv .qr { width: 44px; height: 44px; }
.pdf-chip { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06); border-radius: 8px; padding: 8px; }
.pdf-chip .pdf-ic { width: 32px; height: 38px; border-radius: 4px; background: #E53E3E; color: #fff; font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.cleared { display: inline-flex; align-items: center; gap: 4px; color: #5EEAD4; font-size: 11.5px; font-weight: 600; }
.cleared svg { width: 14px; height: 14px; }
.wa-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px 18px; background: #0B141A; }
.wa-input div { flex: 1; height: 36px; border-radius: 18px; background: #1F2C34; }
.wa-input span { width: 36px; height: 36px; border-radius: 50%; background: #00A884; display: grid; place-items: center; }
.wa-input svg { width: 18px; height: 18px; color: #fff; }
.chat-play .bubble { animation: bubbleIn .45s var(--ease) forwards; }
.float-card { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(16,29,54,.75); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.12); color: #fff; font-size: 13px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); animation: float 7s ease-in-out infinite; }
.float-card .fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ai); }
.float-card .fi svg { width: 18px; height: 18px; }
.float-card strong { display: block; font-size: 13.5px; }
.float-card small { color: #93A4BD; font-size: 11.5px; }
.fc-1 { top: 62%; inset-inline-start: -96px; }
.fc-2 { bottom: 4%; inset-inline-end: -28px; animation-delay: -3s; }
@media (max-width: 520px) { .fc-1 { inset-inline-start: 0; } .fc-2 { inset-inline-end: 0; } }

/* Trust strip */
.trust { border-block: 1px solid var(--border); background: var(--surface); }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; padding-block: 22px; }
.trust-item { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--text-2); }
.trust-item .ti { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--green-50); color: var(--green); }
.trust-item .ti .icon { width: 17px; height: 17px; }

/* ── Cards & grids ──────────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(3, 1fr); } .g-4 { grid-template-columns: repeat(4, 1fr); } .g-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1020px) { .g-4, .g-5 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g-2, .g-3, .g-4, .g-5 { grid-template-columns: 1fr; } }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-glow { isolation: isolate; }
.card-glow::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(20,184,166,.6), transparent 40%, transparent 60%, rgba(201,162,39,.5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; z-index: -1; }
.card-glow:hover::before { opacity: 1; }
.f-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--ai-soft); color: var(--green); border: 1px solid var(--green-100); margin-bottom: 18px; }
.f-icon .icon { width: 22px; height: 22px; }
.card h3 { font-size: 18px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card p { color: var(--muted); font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gold-100); color: #8A6B0B; }
html.dark .badge { color: #E3C04F; }
.badge-green { background: var(--green-50); color: var(--green); }
html.dark .badge-green { color: #5EEAD4; }
.badge-gray { background: var(--bg-alt); color: var(--muted); }
.badge-red { background: #FDECEC; color: #B42318; }
.badge-blue { background: #E8F0FE; color: #1D4ED8; }
.badge-amber { background: #FEF3C7; color: #92400E; }
html.dark .badge-red { background: rgba(180,35,24,.2); color: #FCA5A5; }
html.dark .badge-blue { background: rgba(29,78,216,.2); color: #93C5FD; }
html.dark .badge-amber { background: rgba(146,64,14,.25); color: #FCD34D; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; top: 52px; inset-inline: 16%; height: 2px; background: linear-gradient(90deg, transparent, var(--green-100) 15%, var(--green-100) 85%, transparent); background-size: 12px 2px; }
.step { text-align: center; padding: 0 12px; position: relative; }
.step-num { width: 104px; height: 104px; margin: 0 auto 24px; border-radius: 28px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; }
.step-num .icon { width: 36px; height: 36px; color: var(--green); }
.step-num::after { counter-increment: s; content: counter(s); position: absolute; top: -10px; inset-inline-end: -10px; width: 30px; height: 30px; border-radius: 50%; background: var(--ai); color: #fff; font-family: Inter; font-weight: 700; font-size: 13px; display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(11,110,79,.6); }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .steps::before { display: none; } }

/* Bento features (home) */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.bento .card { grid-column: span 2; }
.bento .card.wide { grid-column: span 3; }
.bento .card.feature-xl { grid-column: span 4 !important; grid-row: span 2; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--navy) 0%, #0D2A40 60%, #0B4A3A 100%); color: #fff; border-color: transparent; overflow: hidden; }
.bento .card.feature-xl p { color: #B6C3D6; }
.bento .card.feature-xl .f-icon { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #5EEAD4; }
.xl-visual { margin-top: auto; padding-top: 24px; display: grid; gap: 10px; }
.xl-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.xl-row .icon { color: #5EEAD4; width: 18px; height: 18px; }
.xl-row span { margin-inline-start: auto; font-size: 12px; color: #5EEAD4; font-weight: 600; }
@media (max-width: 1020px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento .card, .bento .card.wide { grid-column: span 1 !important; } .bento .card.feature-xl { grid-column: span 2 !important; grid-row: auto; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .bento .card.feature-xl { grid-column: span 1 !important; } }

/* Interactive demo */
.demo-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 960px) { .demo-wrap { grid-template-columns: minmax(0, 1fr); } }
.demo-wrap > * { min-width: 0; }
@media (max-width: 520px) { .demo-input { padding: 20px; } }
.demo-input { padding: 28px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; gap: 16px; }
.ai-field { position: relative; border-radius: 16px; padding: 2px; background: var(--ai); }
.ai-field textarea { width: 100%; min-height: 120px; resize: vertical; border: 0; border-radius: 14px; padding: 16px; background: var(--surface); font-size: 16px; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 13px; cursor: pointer; transition: all .2s; text-align: start; }
.chip:hover { border-color: var(--green); color: var(--green); }
.demo-note { font-size: 13px; color: var(--faint); display: flex; gap: 6px; align-items: center; }
.demo-note .icon { width: 15px; height: 15px; }
.thinking { display: none; align-items: center; gap: 10px; color: var(--green); font-weight: 600; font-size: 14px; }
.thinking.on { display: flex; }
.spark { width: 18px; height: 18px; animation: spin 2.2s linear infinite; }

/* Invoice document (demo + showcase) */
.invoice { background: #fff; color: #1F2937; border-radius: 18px; border: 1px solid #E5E7EB; box-shadow: var(--shadow-lg); overflow: hidden; font-size: 13.5px; transition: opacity .35s, transform .35s var(--ease); }
.invoice.building { opacity: .35; transform: scale(.985); }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 24px 18px; background: linear-gradient(135deg, #F3FAF7, #fff 60%); border-bottom: 1px solid #EEF2F1; }
.inv-brand { display: flex; align-items: center; gap: 10px; }
.inv-brand .lg { width: 40px; height: 40px; border-radius: 12px; background: var(--ai); display: grid; place-items: center; color: #fff; font-weight: 800; }
.inv-brand strong { display: block; font-size: 15px; color: var(--navy); }
.inv-brand small { color: #6B7280; font-size: 12px; }
.inv-type { text-align: end; }
.inv-type strong { display: block; color: var(--green); font-size: 15px; }
.inv-type small { color: #6B7280; font-size: 12px; }
.inv-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px 24px; border-bottom: 1px solid #EEF2F1; }
.inv-meta small { display: block; color: #9CA3AF; font-size: 11.5px; }
.inv-meta strong { font-size: 13.5px; color: #111827; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th { text-align: start; font-size: 11.5px; color: #6B7280; font-weight: 600; padding: 10px 24px; background: #F9FAFB; }
.inv-table td { padding: 12px 24px; border-bottom: 1px solid #F3F4F6; }
.inv-table td:not(:first-child), .inv-table th:not(:first-child) { text-align: end; }
.inv-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 18px 24px 22px; }
.inv-qr { width: 88px; height: 88px; padding: 6px; border-radius: 10px; border: 1px solid #E5E7EB; background: #fff; }
.inv-qr svg { width: 100%; height: 100%; }
.inv-sign { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.inv-totals { display: grid; gap: 6px; min-width: 220px; }
.inv-totals div { display: flex; justify-content: space-between; gap: 20px; color: #4B5563; }
.inv-totals .grand { border-top: 2px solid var(--green); padding-top: 8px; margin-top: 4px; color: var(--navy); font-weight: 800; font-size: 16px; }
.inv-stamp { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #E7F4EF; color: var(--green); font-size: 11.5px; font-weight: 700; }
.inv-stamp .icon { width: 14px; height: 14px; }
.inv-note { padding: 10px 24px; font-size: 11.5px; color: #9CA3AF; background: #FAFAFA; border-top: 1px solid #F3F4F6; display: flex; justify-content: space-between; gap: 8px; }
.inv-credit .inv-type strong { color: #B42318; }
.inv-credit .inv-totals .grand { border-color: #B42318; }

/* Showcase tabs */
.tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-inline: auto; }
.tab { border: 0; background: transparent; padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); transition: all .2s; }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
html.dark .tab[aria-selected="true"] { background: var(--green); }
.tab-panel[hidden] { display: none; }
.showcase { display: grid; justify-items: center; gap: 32px; }
.showcase .invoice { width: min(680px, 100%); }
.showcase-stage { position: relative; width: 100%; display: grid; justify-items: center; }
.showcase-stage::before { content: ""; position: absolute; inset: 10% 15%; background: var(--ai); filter: blur(80px); opacity: .18; z-index: 0; border-radius: 50%; }
.showcase-stage > * { position: relative; z-index: 1; }

/* Segments */
.segment { text-align: center; padding: 28px 20px; }
.segment .f-icon { margin-inline: auto; }
.segment h3 { justify-content: center; }

/* Stats */
.stats-band { background: linear-gradient(135deg, var(--navy-900), #0D2A40 60%, #0B4A3A); color: #fff; border-radius: var(--radius-xl); padding: clamp(32px, 5vw, 56px); position: relative; overflow: hidden; }
.stats-band::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; }
.stat { text-align: center; position: relative; z-index: 1; }
.stat-val { font-family: Inter; font-size: clamp(40px, 5vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1; background: linear-gradient(180deg, #fff, #9DE7D3); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; }
.stat p { color: #B6C3D6; margin-top: 10px; font-size: 15px; }

/* Testimonials */
.quote { display: grid; gap: 18px; }
.quote .stars { display: flex; gap: 2px; color: var(--gold); }
.quote .stars .icon { width: 16px; height: 16px; fill: currentColor; }
.quote blockquote { margin: 0; font-size: 16px; color: var(--text-2); }
.quote .who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ai); color: #fff; display: grid; place-items: center; font-weight: 700; }
.quote .who strong { display: block; font-size: 15px; }
.quote .who small { color: var(--muted); }

/* ── Pricing ────────────────────────────────────────────────────────────── */
.billing-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.billing-toggle button { border: 0; background: none; padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.billing-toggle button[aria-pressed="true"] { background: var(--navy); color: #fff; }
html.dark .billing-toggle button[aria-pressed="true"] { background: var(--green); }
.save-pill { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--gold-100); color: #8A6B0B; font-weight: 700; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; margin-top: 40px; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.plan { display: flex; flex-direction: column; gap: 20px; padding: 32px; }
.plan h3 { font-size: 22px; }
.plan .tagline { color: var(--muted); font-size: 14.5px; min-height: 44px; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price .amt { font-family: Inter; font-size: 48px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price .cur { font-weight: 700; font-size: 16px; color: var(--muted); }
.price .per { color: var(--muted); font-size: 14px; }
.price-sub { font-size: 13px; color: var(--faint); min-height: 20px; margin-top: -12px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li .icon { width: 18px; height: 18px; color: var(--green); margin-top: 4px; }
.plan li.off { color: var(--faint); }
.plan li.off .icon { color: var(--faint); }
.plan .btn { margin-top: auto; }
.plan.popular { background: linear-gradient(170deg, #0F1E3D 0%, #102B47 55%, #0B4A3A 120%); color: #fff; border-color: transparent; box-shadow: 0 30px 60px -20px rgba(11,110,79,.45), 0 0 0 1px rgba(94,234,212,.25); transform: scale(1.03); }
.plan.popular .tagline, .plan.popular .price .per, .plan.popular .price .cur, .plan.popular .price-sub { color: #9FB0C8; }
.plan.popular li .icon { color: #5EEAD4; }
.plan.popular .pop-badge { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #E3C04F, var(--gold)); color: var(--navy); font-size: 12.5px; font-weight: 800; padding: 5px 14px; border-radius: 999px; box-shadow: 0 8px 18px -6px rgba(201,162,39,.6); white-space: nowrap; }
[dir="rtl"] .plan.popular .pop-badge { transform: translateX(50%); }
@media (max-width: 960px) { .plan.popular { transform: none; } }
.vat-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 24px; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; font-size: 15px; }
.compare th, .compare td { padding: 14px 20px; border-bottom: 1px solid var(--border); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: start; }
.compare thead th { background: var(--surface-2); font-size: 15px; }
.compare .grp td { background: var(--bg-alt); font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.compare .yes { color: var(--green); font-weight: 700; }
.compare .no { color: var(--faint); }
.compare .pop-col { background: color-mix(in srgb, var(--green) 5%, transparent); }
.table-scroll { overflow-x: auto; border-radius: var(--radius-lg); }
.callout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
@media (max-width: 760px) { .callout-row { grid-template-columns: 1fr; } }
.callout-card { display: flex; gap: 16px; align-items: flex-start; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--green-100); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 600; font-size: 16.5px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 20px; height: 20px; color: var(--muted); transition: transform .25s var(--ease); flex-shrink: 0; }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--green); }
.faq .answer { padding: 0 24px 22px; color: var(--muted); }

/* CTA band */
.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-xl); padding: clamp(40px, 7vw, 80px); background: radial-gradient(800px 400px at 85% 0%, rgba(20,184,166,.35), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(201,162,39,.18), transparent 60%), linear-gradient(135deg, #0A1428, #0F1E3D 50%, #0B3B33); color: #fff; text-align: center; display: grid; justify-items: center; gap: 20px; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.cta-band .lead { color: #B6C3D6; max-width: 560px; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }

/* ── Sub-page hero ──────────────────────────────────────────────────────── */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 64px); text-align: center; background: radial-gradient(700px 300px at 50% 0%, rgba(20,184,166,.14), transparent 70%), var(--bg); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000, transparent 70%); }
.page-hero .inner { display: grid; justify-items: center; gap: 18px; max-width: 780px; margin-inline: auto; }
.page-hero.dark { background: radial-gradient(900px 400px at 50% -10%, #13325A 0%, transparent 70%), linear-gradient(180deg, #0A1428, #0B1830); color: #fff; margin-top: calc(var(--header-h) * -1); padding-top: calc(var(--header-h) + clamp(56px, 8vw, 96px)); }
.page-hero.dark .lead { color: #B6C3D6; }
.page-hero.dark .eyebrow { color: #A7F3D0; background: rgba(20,184,166,.12); border-color: rgba(94,234,212,.25); }
.breadcrumbs { display: flex; gap: 8px; justify-content: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--green); }

/* Features page */
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.cat-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; font-weight: 600; transition: all .2s; }
.cat-nav a:hover { border-color: var(--green); color: var(--green); }
.cat-nav .icon { width: 16px; height: 16px; }
.cat-block { display: grid; grid-template-columns: 340px 1fr; gap: 40px; padding-block: 56px; border-top: 1px solid var(--border); }
.cat-block:first-child { border-top: 0; }
.cat-intro { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; display: grid; gap: 14px; }
.cat-intro .f-icon { width: 56px; height: 56px; margin: 0; }
@media (max-width: 960px) { .cat-block { grid-template-columns: 1fr; } .cat-intro { position: static; } }

/* ZATCA page */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .ck { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--green-50); color: var(--green); flex-shrink: 0; margin-top: 2px; }
.check-list .ck .icon { width: 15px; height: 15px; }
.req-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .req-grid { grid-template-columns: repeat(2, 1fr); } }
.req-item { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 14.5px; }
.req-item .icon { color: var(--green); width: 20px; height: 20px; }
.flow-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.flow-table th, .flow-table td { padding: 16px 20px; text-align: start; border-bottom: 1px solid var(--border); }
.flow-table th { background: var(--surface-2); font-size: 13.5px; color: var(--muted); }
.flow-table tr:last-child td { border-bottom: 0; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; align-content: start; }
.field label { font-weight: 600; font-size: 14px; color: var(--text-2); }
.field label .req { color: #DC2626; }
.field .hint { font-size: 12.5px; color: var(--faint); }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); transition: border-color .2s, box-shadow .2s; font-size: 15px; }
.textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 40px; }
[dir="rtl"] .select { background-position: left 14px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--ring); }
.input[type="file"] { padding: 10px; height: auto; }
.hp { position: absolute !important; inset-inline-start: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14.5px; border: 1px solid; }
.alert .icon { width: 20px; height: 20px; margin-top: 2px; }
.alert-success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
html.dark .alert-success { background: rgba(6,95,70,.25); border-color: rgba(167,243,208,.2); color: #A7F3D0; }
html.dark .alert-error { background: rgba(153,27,27,.25); border-color: rgba(254,202,202,.2); color: #FECACA; }
html.dark .alert-info { background: rgba(30,64,175,.25); border-color: rgba(191,219,254,.2); color: #BFDBFE; }
.contact-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 28px; align-items: start; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { padding: clamp(24px, 4vw, 40px); }
.channel { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: border-color .2s; }
.channel:hover { border-color: var(--green); }
.channel .f-icon { margin: 0; width: 44px; height: 44px; }
.channel small { display: block; color: var(--muted); font-size: 13px; }
.channel strong { font-size: 15px; }

/* ── Prose (markdown content) ───────────────────────────────────────────── */
.prose { font-size: 17px; color: var(--text-2); line-height: 1.85; }
html[lang="ar"] .prose { font-size: 17.5px; line-height: 2; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; margin-top: 1.8em; color: var(--text); }
.prose h3 { font-size: 21px; margin-top: 1.5em; color: var(--text); }
.prose a { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: 14px; border: 1px solid var(--border); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--bg-alt); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.prose pre { background: #0B1426; color: #E2E8F0; padding: 18px 20px; border-radius: 14px; overflow-x: auto; direction: ltr; text-align: left; font-size: 14px; line-height: 1.7; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose blockquote { margin-inline: 0; padding: 14px 20px; border-inline-start: 4px solid var(--green); background: var(--green-50); border-radius: 0 12px 12px 0; color: var(--text); }
[dir="rtl"] .prose blockquote { border-radius: 12px 0 0 12px; }
.prose .callout-tip { border-color: var(--teal); }
.prose .callout-warning { border-color: var(--gold); background: var(--gold-100); }
.prose .callout-important { border-color: #DC2626; background: #FEF2F2; }
html.dark .prose .callout-important { background: rgba(220,38,38,.12); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: start; }
.prose th { background: var(--surface-2); }
.prose tr:last-child td { border-bottom: 0; }
.embed { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Blog ───────────────────────────────────────────────────────────────── */
.blog-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.pill-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-nav a { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--border-strong); background: var(--surface); }
.pill-nav a.active, .pill-nav a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
html.dark .pill-nav a.active { background: var(--green); border-color: var(--green); }
.search-box { position: relative; min-width: 280px; }
.search-box .icon { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; width: 18px; height: 18px; color: var(--faint); }
.search-box .input { padding-inline-start: 42px; }
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-cover { aspect-ratio: 16/9; background: var(--ai); position: relative; overflow: hidden; display: grid; place-items: center; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-cover .ph { color: rgba(255,255,255,.9); }
.post-cover .ph .icon { width: 48px; height: 48px; }
.post-cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 14px 14px; }
.post-cover:has(img)::after { display: none; }
.post-body { padding: 22px 24px 26px; display: grid; gap: 10px; flex: 1; align-content: start; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.post-body h3 { font-size: 19px; line-height: 1.4; }
.post-body p { color: var(--muted); font-size: 15px; }
.post-featured { display: grid; grid-template-columns: 1.2fr 1fr; padding: 0; overflow: hidden; margin-bottom: 28px; }
.post-featured .post-cover { aspect-ratio: auto; min-height: 320px; }
.post-featured .post-body { padding: 36px; align-content: center; }
.post-featured h3 { font-size: 28px; }
@media (max-width: 860px) { .post-featured { grid-template-columns: 1fr; } .post-featured .post-cover { min-height: 220px; } }
.article-head { display: grid; gap: 18px; justify-items: center; text-align: center; max-width: 820px; margin-inline: auto; }
.article-cover { max-width: 1000px; margin: 40px auto 0; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
.article-layout { display: grid; grid-template-columns: 1fr 240px; gap: 56px; max-width: 1080px; margin-inline: auto; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: 1fr; } .article-aside { display: none; } }
.article-aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 24px; }
.toc { font-size: 14px; display: grid; gap: 4px; }
.toc strong { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.toc a { color: var(--muted); padding: 4px 0; padding-inline-start: 12px; border-inline-start: 2px solid var(--border); }
.toc a.l3 { padding-inline-start: 24px; }
.toc a:hover, .toc a.active { color: var(--green); border-color: var(--green); }
.share { display: flex; gap: 8px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--bg-alt); color: var(--text-2); }

/* ── Docs ───────────────────────────────────────────────────────────────── */
.docs-search { max-width: 640px; width: 100%; margin-inline: auto; position: relative; }
.docs-search .input { height: 60px; border-radius: 16px; padding-inline-start: 52px; font-size: 17px; box-shadow: var(--shadow); }
.docs-search .icon { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 18px; width: 22px; height: 22px; color: var(--muted); }
.doc-sec-card { display: grid; gap: 12px; }
.doc-sec-card ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.doc-sec-card li a { color: var(--muted); font-size: 14.5px; display: inline-flex; gap: 6px; align-items: center; }
.doc-sec-card li a:hover { color: var(--green); }
.doc-sec-card li .icon { width: 14px; height: 14px; }
.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 48px; padding-block: 40px 96px; }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: 240px minmax(0, 1fr); } .docs-layout .article-aside { display: none; } }
@media (max-width: 820px) { .docs-layout { grid-template-columns: 1fr; } .docs-nav { position: static !important; } }
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; display: grid; gap: 22px; font-size: 14.5px; }
.docs-nav h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
html[lang="ar"] .docs-nav h4 { text-transform: none; letter-spacing: 0; font-size: 14px; }
.docs-nav h4 .icon { width: 16px; height: 16px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-inline-start: 1px solid var(--border); }
.docs-nav li a { display: block; padding: 6px 14px; color: var(--text-2); border-inline-start: 2px solid transparent; margin-inline-start: -1px; }
.docs-nav li a:hover { color: var(--green); }
.docs-nav li a.active { color: var(--green); border-color: var(--green); font-weight: 600; }
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.doc-pager a { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); display: grid; gap: 4px; transition: border-color .2s; }
.doc-pager a:hover { border-color: var(--green); }
.doc-pager a.next { text-align: end; grid-column: 2; }
.doc-pager small { color: var(--muted); font-size: 13px; }
.feedback { margin-top: 40px; padding: 20px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.feedback .btns { display: flex; gap: 8px; }
.help-box { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px; border-radius: 16px; background: var(--ai-soft); border: 1px solid var(--green-100); }
.search-results { display: grid; gap: 12px; max-width: 820px; margin-inline: auto; }
.search-results a { display: block; padding: 18px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.search-results a:hover { border-color: var(--green); }
.search-results small { color: var(--green); font-weight: 600; font-size: 13px; }
.search-results p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* Changelog */
.timeline { max-width: 820px; margin-inline: auto; display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 160px 1fr; gap: 32px; padding-block: 32px; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border: 0; }
.tl-date { color: var(--muted); font-size: 14px; display: grid; gap: 6px; align-content: start; }
.tl-date strong { color: var(--text); font-family: Inter; }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; gap: 10px; } }

/* ── Support portal ─────────────────────────────────────────────────────── */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 1000px; margin-inline: auto; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } }
.portal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.ticket-list { display: grid; gap: 10px; }
.ticket-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 18px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s; }
.ticket-row:hover { border-color: var(--green); }
.ticket-row .no { font-family: Inter; font-weight: 700; color: var(--muted); font-size: 13.5px; }
.ticket-row small { color: var(--muted); }
@media (max-width: 700px) { .ticket-row { grid-template-columns: 1fr auto; } .ticket-row .no, .ticket-row .when { display: none; } }
.thread { display: grid; gap: 16px; }
.msg { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.msg.agent { background: var(--green-50); border-color: var(--green-100); }
.msg.internal { background: #FFFBEB; border-color: #FDE68A; }
html.dark .msg.internal { background: rgba(253,230,138,.08); border-color: rgba(253,230,138,.2); }
.msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.msg-head strong { color: var(--text); }
.msg-body { white-space: pre-wrap; word-wrap: break-word; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.attachments a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.attachments .icon { width: 14px; height: 14px; }
.ticket-side { display: grid; gap: 14px; font-size: 14.5px; }
.ticket-side div { display: flex; justify-content: space-between; gap: 12px; }
.ticket-side span { color: var(--muted); }
.ticket-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } }
.rating { display: flex; gap: 6px; flex-direction: row; }
.rating button { border: 1px solid var(--border-strong); background: var(--surface); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.rating button:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: #08111F; color: #A8B5C8; padding-top: 72px; font-size: 15px; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(94,234,212,.4), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand { display: grid; gap: 18px; align-content: start; }
.footer-brand .brand { color: #fff; }
.footer-brand p { max-width: 340px; }
.site-footer h4, .site-footer .fh { color: #fff; font-size: 14px; margin-bottom: 16px; font-weight: 700; line-height: 1.4; } .site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 16px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: #fff; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); transition: background .2s; }
.socials a:hover { background: rgba(255,255,255,.12); }
.socials .icon { width: 17px; height: 17px; }
.newsletter { display: flex; gap: 8px; max-width: 380px; }
.newsletter .input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; height: 44px; }
.newsletter .input::placeholder { color: #6E7E96; }
.footer-contact { display: grid; gap: 10px; }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: 10px; }
.footer-contact .icon { width: 16px; height: 16px; color: var(--teal); }
.footer-bottom { margin-top: 56px; padding-block: 24px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13.5px; color: #6E7E96; }
.footer-bottom .legal-ids { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-wordmark { font-family: Inter; font-weight: 800; font-size: clamp(72px, 16vw, 220px); letter-spacing: -.06em; line-height: .8; text-align: center; margin-top: 40px; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0)); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; direction: ltr; }

/* Floating WhatsApp + cookie banner */
.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 45; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -6px rgba(37,211,102,.6); transition: transform .2s; }
.wa-float:hover { transform: scale(1.07); }
.wa-float .icon { width: 30px; height: 30px; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: ring 2.4s infinite; }

.cookie { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 60; max-width: 420px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; gap: 14px; font-size: 14.5px; }
[dir="rtl"] .cookie { inset-inline-start: auto; inset-inline-end: 20px; }
.cookie .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cookie a { color: var(--green); font-size: 13.5px; }
@media (max-width: 520px) { .cookie { inset-inline: 12px !important; bottom: 12px; max-width: none; } }

/* Error page */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 80px; }
.error-code { font-family: Inter; font-size: clamp(96px, 18vw, 180px); font-weight: 800; letter-spacing: -.06em; line-height: 1; background: var(--ai); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Motion ─────────────────────────────────────────────────────────────── */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(0, -18px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(20,184,166,.5); } 70% { box-shadow: 0 0 0 8px rgba(20,184,166,0); } }
@keyframes wave { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes bubbleIn { to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .bubble { opacity: 1; transform: none; }
}
@media print { .site-header, .site-footer, .wa-float, .cookie { display: none !important; } }

/* Toast */
.toast { position: fixed; top: calc(var(--header-h) + 14px); left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; transition: opacity .4s; max-width: calc(100% - 32px); }
.toast .icon { color: #5EEAD4; }
.toast-error .icon { color: #FCA5A5; }
[dir="rtl"] .text-gradient, [dir="rtl"] .display em, [dir="rtl"] .h2 em { background-image: linear-gradient(240deg, #5EEAD4 0%, #14B8A6 35%, #22C08A 70%, #C9A227 110%); }

/* ── v1.1 Resources ───────────────────────────────────────────────────── */
.mega-end { inset-inline-start: auto; inset-inline-end: -16px; }
.nav > a, .nav-drop > button, .login-link, .lang-btn { white-space: nowrap; }
@media (max-width: 1360px) { .nav { gap: 0; margin-inline-start: 4px; } .nav > a, .nav-drop > button { padding: 8px 9px; font-size: 14.5px; } .header-actions { gap: 6px; } }
.filter-nav { justify-content: center; }
.filter-nav button { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font-family: inherit; transition: all .15s; }
.filter-nav button.active, .filter-nav button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
html.dark .filter-nav button.active { background: var(--green); border-color: var(--green); }
[hidden] { display: none !important; }
.tut-card { display: grid; gap: 12px; align-content: start; }
.tut-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tut-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.tut-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tut-meta .icon { width: 15px; height: 15px; }
.tut-layout { padding-block: 40px 96px; }
.tut-body ol { counter-reset: st; list-style: none; padding-inline-start: 0; }
.tut-body ol > li { counter-increment: st; position: relative; padding-inline-start: 46px; margin-bottom: 14px; min-height: 32px; }
.tut-body ol > li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ai-soft); color: var(--green); font-weight: 700; font-size: 14px; }
.int-card { display: grid; gap: 8px; align-content: start; }
.int-card p { margin: 4px 0 0; }

/* Developers */
.dev-hero .base-urls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.base-urls span { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.base-urls b { color: var(--muted); font-weight: 600; }
.base-urls code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.qs-card { display: grid; gap: 10px; align-content: start; position: relative; }
.qs-num { position: absolute; inset-inline-end: 22px; top: 18px; font-size: 40px; font-weight: 800; line-height: 1; color: var(--muted); opacity: 1; }
.dev-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding-block: 40px 96px; }
@media (max-width: 960px) { .dev-layout { grid-template-columns: minmax(0, 1fr); } .dev-nav { display: none !important; } }
.dev-nav li a { display: flex; align-items: center; gap: 8px; }
.dev-guide { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
.dev-guide > .h2 { margin-bottom: 16px; }
.dev-ref-title { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dev-group { font-size: 22px; margin: 40px 0 8px; padding-top: 8px; scroll-margin-top: calc(var(--header-h) + 16px); }
.api-ep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
@media (max-width: 1180px) { .api-ep { grid-template-columns: minmax(0, 1fr); } }
.api-doc .h3 { margin-bottom: 10px; }
.api-path { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.api-path code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; font-weight: 600; }
.api-doc .prose { font-size: 15px; }
.api-doc .prose table { font-size: 13.5px; }
.mbadge { display: inline-block; min-width: 50px; text-align: center; padding: 2px 6px; border-radius: 6px; font: 700 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; flex-shrink: 0; }
.m-get { background: #E0F2FE; color: #0369A1; } .m-post { background: var(--green-50); color: var(--green); } .m-patch, .m-put { background: #FEF3C7; color: #92400E; } .m-delete { background: #FDECEC; color: #B42318; }
html.dark .m-get { background: rgba(3,105,161,.25); color: #7DD3FC; } html.dark .m-post { color: #5EEAD4; } html.dark .m-patch, html.dark .m-put { background: rgba(146,64,14,.3); color: #FCD34D; } html.dark .m-delete { background: rgba(180,35,24,.25); color: #FCA5A5; }
.api-code { display: grid; gap: 14px; align-content: start; position: sticky; top: calc(var(--header-h) + 16px); align-self: start; text-align: left; }
@media (max-width: 1180px) { .api-code { position: static; } }
.code-panel { background: #0B1426; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
.code-tabs { display: flex; gap: 2px; overflow-x: auto; }
.code-tabs button { background: none; border: 0; color: #94A3B8; font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; padding: 7px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.code-tabs button[aria-selected="true"] { color: #fff; background: rgba(255,255,255,.08); }
.code-label { color: #94A3B8; font-size: 12.5px; font-weight: 600; }
.code-copy { background: none; border: 0; color: #94A3B8; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-size: 12px; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.code-copy:hover { color: #fff; background: rgba(255,255,255,.08); } .code-copy.done { color: #5EEAD4; }
.code-copy .icon { width: 15px; height: 15px; }
.code-panel pre { margin: 0; padding: 16px 18px; color: #E2E8F0; font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: auto; max-height: 460px; direction: ltr; text-align: left; tab-size: 2; }
.t-k { color: #7DD3FC; } .t-s { color: #A7F3D0; } .t-n { color: #FCD34D; } .t-b { color: #F9A8D4; }

/* Glossary */
.glossary { display: grid; gap: 0; margin: 0; }
.gl-item { padding: 22px 0; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
.gl-item:target { background: var(--ai-soft); margin-inline: -16px; padding-inline: 16px; border-radius: 12px; }
.gl-item dt { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.gl-item dt small { font-weight: 500; color: var(--muted); font-size: 14px; margin-inline-start: 8px; }
.gl-item dd { margin: 0; color: var(--text-2); line-height: 1.75; }

/* Status */
.status-banner { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 18px; margin-bottom: 20px; font-size: 18px; }
.status-banner .icon { width: 30px; height: 30px; flex-shrink: 0; }
.status-banner small { display: block; font-size: 13px; opacity: .8; font-weight: 500; }
.tone-ok.status-banner { background: var(--green); color: #fff; } .tone-warn.status-banner { background: #B45309; color: #fff; } .tone-bad.status-banner { background: #B42318; color: #fff; } .tone-info.status-banner { background: #1D4ED8; color: #fff; }
.status-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.status-list li:last-child { border-bottom: 0; }
.st-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.st-pill.tone-ok { color: var(--green); } .st-pill.tone-warn { color: #B45309; } .st-pill.tone-bad { color: #B42318; } .st-pill.tone-info { color: #1D4ED8; }
html.dark .st-pill.tone-ok { color: #5EEAD4; } html.dark .st-pill.tone-warn { color: #FCD34D; } html.dark .st-pill.tone-bad { color: #FCA5A5; } html.dark .st-pill.tone-info { color: #93C5FD; }
.incidents { display: grid; gap: 14px; }
.incident { display: grid; gap: 8px; }
.inc-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

/* VAT tool */
.vat-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .vat-grid { grid-template-columns: 1fr; } }
.input-xl { height: 64px; font-size: 28px; font-weight: 700; }
.seg { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.seg legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.seg label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); cursor: pointer; font-size: 14.5px; }
.seg label:has(input:checked) { border-color: var(--green); background: var(--ai-soft); }
.seg input { accent-color: var(--green); }
.vat-out { margin: 22px 0 0; display: grid; gap: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.vat-out div { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.vat-out div:last-child { border-bottom: 0; }
.vat-out dt { color: var(--muted); }
.vat-out dd { margin: 0; font-weight: 700; font-size: 18px; }
.vat-out .total { background: var(--navy); color: #fff; } .vat-out .total dt { color: rgba(255,255,255,.75); } .vat-out .total dd { font-size: 24px; }
.vatno-result { min-height: 24px; margin: 10px 0 4px; font-weight: 600; }
.vatno-result.ok { color: var(--green); } .vatno-result.bad { color: #B42318; }
html.dark .vatno-result.ok { color: #5EEAD4; } html.dark .vatno-result.bad { color: #FCA5A5; }
.cta-mini { display: grid; gap: 12px; justify-items: start; background: var(--ai-soft); }
.dev-main, .api-doc, .api-code { min-width: 0; }
/* Small-phone fixes (home showcase/demo) */
.showcase { grid-template-columns: minmax(0, 1fr); }
.showcase-stage, .tab-panel { min-width: 0; max-width: 100%; }
@media (max-width: 520px) { .tabs { max-width: 100%; overflow-x: auto; display: flex; } .tabs .tab { white-space: nowrap; padding-inline: 10px; } }

/* ── Invoice card: mobile (fix totals overflow, tighten padding) ──────────── */
@media (max-width: 560px) {
  .invoice { font-size: 13px; }
  .inv-head { padding: 18px 16px 14px; gap: 12px; }
  .inv-brand { gap: 9px; }
  .inv-brand .lg { width: 34px; height: 34px; border-radius: 10px; }
  .inv-brand strong { font-size: 14px; }
  .inv-brand small, .inv-type small { font-size: 11px; }
  .inv-type strong { font-size: 14px; }
  .inv-meta { padding: 14px 16px; gap: 10px 12px; }
  .inv-meta strong { font-size: 13px; }
  .inv-meta strong.num { white-space: nowrap; }      /* keep INV-no and date on one line */
  .inv-table th { padding: 9px 16px; font-size: 11px; }
  .inv-table td { padding: 11px 16px; }
  /* stack the footer so the totals get the full card width instead of overflowing */
  .inv-foot { flex-direction: column-reverse; align-items: stretch; gap: 16px; padding: 16px 16px 20px; }
  .inv-totals { min-width: 0; width: 100%; }
  .inv-totals div { gap: 16px; }
  .inv-sign { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; gap: 14px; }
  .inv-qr { width: 72px; height: 72px; }
  .inv-note { padding: 10px 16px; gap: 12px; }
}
@media (max-width: 360px) {
  .inv-meta { grid-template-columns: 1fr 1fr; }       /* customer drops to its own row on very small phones */
  .inv-meta > div:nth-child(3) { grid-column: 1 / -1; }
}
