/* =====================================================================
   Shared Development — Design System (2026)
   Palette "Iris Editorial" · light + dark · EN/AR (RTL) · no framework
   ---------------------------------------------------------------------
   Sections
   01 Tokens            08 Cards & bento        15 FAQ
   02 Reset & base      09 Hero                 16 CTA band
   03 Typography        10 Product cards        17 Footer
   04 i18n / RTL        11 Metrics & steps      18 Forms
   05 Layout            12 Tabs                 19 Mockup kit
   06 Header & nav      13 Feature tour         20 Motion
   07 Buttons & chips   14 Marquee              21 Utilities
   ===================================================================== */

/* ---------------------------------------------------------------------
   01 · Tokens
   --------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* surfaces */
  --bg: #fafafc;
  --bg-2: #f5f4fa;
  --surface: #ffffff;
  --surface-2: #f3f2f8;
  --surface-3: #ebe9f4;
  --border: #e6e4ef;
  --border-strong: #d4d1e3;

  /* text */
  --text: #0e0c1b;
  --text-2: #4a4760;
  --text-muted: #6b6782;

  /* brand */
  --brand: #8b7cf6;
  --accent: #5b47e0;
  --accent-hover: #4a36cc;
  --accent-contrast: #ffffff;
  --accent-text: #5b47e0;
  --accent-soft: #eeebfe;
  --accent-ink: #4330c2;
  --accent-border: rgba(91, 71, 224, .28);
  --accent-glow: rgba(139, 124, 246, .18);

  /* data + product sub-accents */
  --cyan: #0e7490;
  --cyan-soft: #e3f4f8;
  --gold: #b7791f;
  --gold-ink: #8a5a0b;
  --gold-soft: #fbf1df;
  --coral: #d9534f;

  /* status */
  --success: #047857;
  --success-soft: #e3f5ee;
  --warning: #b45309;
  --warning-soft: #fdf1e2;
  --danger: #b91c1c;
  --danger-soft: #fde8e8;

  /* chart series */
  --s1: #5b47e0;
  --s2: #0e9fb8;
  --s3: #e0794f;
  --s4: #a78bfa;
  --s5: #d6a12c;
  --s6: #34a374;

  /* atmosphere */
  --aurora-1: rgba(201, 193, 255, .55);
  --aurora-2: rgba(191, 212, 255, .55);
  --aurora-3: rgba(184, 240, 236, .45);
  --grid-line: rgba(14, 12, 27, .06);
  --grain-opacity: .035;
  --glass: rgba(250, 250, 252, .72);

  /* elevation */
  --shadow-sm: 0 1px 2px rgba(14, 12, 27, .06);
  --shadow: 0 1px 2px rgba(14, 12, 27, .04), 0 8px 24px -8px rgba(14, 12, 27, .10);
  --shadow-lg: 0 24px 64px -24px rgba(40, 30, 120, .25), 0 2px 6px rgba(14, 12, 27, .04);
  --inner-hi: inset 0 1px 0 rgba(255, 255, 255, .6);

  /* contrast band (agentic / dark panels that stay dark in light mode) */
  --band-bg: #0f0d24;
  --band-surface: #17153a;
  --band-border: #2a2756;
  --band-text: #f3f2fa;
  --band-muted: #a9a5c8;

  /* type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display-ar: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* shape */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* layout */
  --container: 1200px;
  --container-wide: 1320px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 68px;
  --section-y: clamp(72px, 10vw, 128px);

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dir: 1;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a12;
  --bg-2: #0d0d17;
  --surface: #12121c;
  --surface-2: #181826;
  --surface-3: #20202f;
  --border: #23223a;
  --border-strong: #2e2d4a;
  --text: #f3f2fa;
  --text-2: #b4b1c9;
  --text-muted: #8c89a6;
  --brand: #8b7cf6;
  --accent: #8b7cf6;
  --accent-hover: #a497fa;
  --accent-contrast: #0a0a12;
  --accent-text: #a497fa;
  --accent-soft: #1f1b3d;
  --accent-ink: #c9c1ff;
  --accent-border: rgba(164, 151, 250, .35);
  --accent-glow: rgba(139, 124, 246, .35);
  --cyan: #22d3ee;
  --cyan-soft: #0f2a33;
  --gold: #f2c14e;
  --gold-ink: #f2c14e;
  --gold-soft: #2e2512;
  --coral: #f7907c;
  --success: #34d399;
  --success-soft: #0f2b22;
  --warning: #fbbf24;
  --warning-soft: #2e2410;
  --danger: #f87171;
  --danger-soft: #331717;
  --s1: #8b7cf6;
  --s2: #22d3ee;
  --s3: #f7907c;
  --s4: #c4b5fd;
  --s5: #f5c451;
  --s6: #7ddc8f;
  --aurora-1: rgba(91, 71, 224, .45);
  --aurora-2: rgba(59, 75, 219, .38);
  --aurora-3: rgba(14, 116, 144, .38);
  --grid-line: rgba(255, 255, 255, .055);
  --grain-opacity: .06;
  --glass: rgba(10, 10, 18, .7);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02);
  --inner-hi: inset 0 1px 0 rgba(255, 255, 255, .04);
  --band-bg: #0d0b20;
  --band-surface: #151331;
  --band-border: #2a2756;
}

/* No-JS fallback: follow the OS until the visitor chooses */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0a12; --bg-2: #0d0d17; --surface: #12121c; --surface-2: #181826; --surface-3: #20202f;
    --border: #23223a; --border-strong: #2e2d4a;
    --text: #f3f2fa; --text-2: #b4b1c9; --text-muted: #8c89a6;
    --accent: #8b7cf6; --accent-hover: #a497fa; --accent-contrast: #0a0a12; --accent-text: #a497fa;
    --accent-soft: #1f1b3d; --accent-ink: #c9c1ff; --accent-border: rgba(164, 151, 250, .35); --accent-glow: rgba(139, 124, 246, .35);
    --cyan: #22d3ee; --cyan-soft: #0f2a33; --gold: #f2c14e; --gold-ink: #f2c14e; --gold-soft: #2e2512; --coral: #f7907c;
    --success: #34d399; --success-soft: #0f2b22; --warning: #fbbf24; --warning-soft: #2e2410; --danger: #f87171; --danger-soft: #331717;
    --s1: #8b7cf6; --s2: #22d3ee; --s3: #f7907c; --s4: #c4b5fd; --s5: #f5c451; --s6: #7ddc8f;
    --aurora-1: rgba(91, 71, 224, .45); --aurora-2: rgba(59, 75, 219, .38); --aurora-3: rgba(14, 116, 144, .38);
    --grid-line: rgba(255, 255, 255, .055); --grain-opacity: .06; --glass: rgba(10, 10, 18, .7);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .8); --inner-hi: inset 0 1px 0 rgba(255, 255, 255, .04);
  }
}

/* Product sub-accent: set on <body> or any section */
.theme-datagage { --pa: var(--cyan); --pa-soft: var(--cyan-soft); --pa-ink: var(--cyan); }
.theme-ams { --pa: var(--gold); --pa-soft: var(--gold-soft); --pa-ink: var(--gold-ink); }

/* ---------------------------------------------------------------------
   02 · Reset & base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .3s var(--ease-in-out), color .3s var(--ease-in-out);
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
::selection { background: var(--accent); color: var(--accent-contrast); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------------
   03 · Typography
   --------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--text);
}
p { text-wrap: pretty; }

.display {
  font-size: clamp(2.6rem, 1.3rem + 5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 650;
}
.h1 { font-size: clamp(2.3rem, 1.2rem + 4vw, 4.25rem); line-height: 1.05; letter-spacing: -0.035em; }
.h2 { font-size: clamp(1.9rem, 1.15rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.25; letter-spacing: -0.015em; }
.h4 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.01em; }

.lead { font-size: clamp(1.075rem, 1rem + .35vw, 1.25rem); line-height: 1.6; color: var(--text-2); }
.body-2 { color: var(--text-2); }
.small { font-size: .875rem; }
.xsmall { font-size: .78rem; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow .num { color: var(--text-muted); }
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.eyebrow.no-rule::before { display: none; }

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--brand) 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.theme-ams .gradient-text, .gradient-text.gold {
  background-image: linear-gradient(100deg, var(--accent) 0%, var(--brand) 50%, var(--gold) 100%);
}

.prose p + p { margin-top: 1em; }
.prose h2 { margin: 1.8em 0 .6em; font-size: 1.5rem; }
.prose h3 { margin: 1.5em 0 .5em; font-size: 1.2rem; }
.prose ul, .prose ol { padding-inline-start: 1.25em; margin: .8em 0; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

kbd {
  font-family: var(--font-mono);
  font-size: .72em;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-2);
}

/* ---------------------------------------------------------------------
   04 · i18n / RTL
   Content is authored in pairs: <span class="t-en">…</span><span class="t-ar">…</span>
   The head script sets <html lang dir> before first paint.
   --------------------------------------------------------------------- */
html:not([lang="ar"]) .t-ar,
html[lang="ar"] .t-en { display: none !important; }

[dir="rtl"] { --dir: -1; }

html[lang="ar"] body {
  font-family: var(--font-ar);
  font-size: 1.125rem;
  line-height: 1.85;
}
html[lang="ar"] :is(h1, h2, h3, h4, h5, .display, .h1, .h2, .h3, .h4) {
  letter-spacing: 0;
  line-height: 1.35;
}
html[lang="ar"] :is(h1, h2, .display, .h1, .h2) {
  font-family: var(--font-display-ar);
  font-weight: 700;
}
html[lang="ar"] .display { font-size: clamp(2.3rem, 1.2rem + 4.2vw, 4.6rem); line-height: 1.3; }
html[lang="ar"] .h1 { line-height: 1.32; }
html[lang="ar"] .eyebrow {
  font-family: var(--font-ar);
  font-size: .875rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}
html[lang="ar"] .eyebrow .num { font-family: var(--font-mono); font-size: .78rem; }
html[lang="ar"] .lead { line-height: 1.85; }
html[lang="ar"] * { letter-spacing: 0 !important; }
html[lang="ar"] .mono-keep, html[lang="ar"] code, html[lang="ar"] kbd, html[lang="ar"] .ltr { font-family: var(--font-mono); }

/* Things that always read left-to-right (phones, code, SQL, URLs) */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
html[lang="ar"] .ltr:not(code):not(.mono) { font-family: var(--font-sans); }

/* Directional icons flip in RTL */
[dir="rtl"] .i-dir { transform: scaleX(-1); }

/* ---------------------------------------------------------------------
   05 · Layout
   --------------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.container-narrow { max-width: calc(820px + var(--gutter) * 2); }

.section { position: relative; padding-block: var(--section-y); }
.section-sm { padding-block: clamp(48px, 7vw, 80px); }
.section-alt { background: var(--bg-2); }
.section + .section:not(.section-alt):not(.band):not(.no-rule)::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: max(var(--gutter), calc((100% - var(--container-wide)) / 2));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 + p, .section-head .h2 + p { margin-top: 18px; }
.section-head.split {
  max-width: none;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px 64px;
  align-items: end;
}
@media (max-width: 860px) { .section-head.split { grid-template-columns: 1fr; } }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.stack > * + * { margin-top: var(--stack, 16px); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); align-items: center; }
.center { text-align: center; }

/* ---------------------------------------------------------------------
   06 · Header & navigation
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
/* The glass blur lives on a pseudo-element: a backdrop-filter on the header
   itself would make it the containing block for the fixed mobile menu,
   clipping the menu to the header's height. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.site-header.is-scrolled, .menu-open .site-header { border-bottom-color: var(--border); }
.site-header.is-scrolled::before, .menu-open .site-header::before {
  opacity: 1;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
}
.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand img { width: 30px; height: 30px; }
html[lang="ar"] .brand { font-family: var(--font-sans); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: 12px;
  list-style: none;
  padding: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  font-size: .925rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
html[lang="ar"] .nav-link { font-size: 1rem; }
.nav-link:hover, .nav-link[aria-current="page"], .nav-dd[open] > .nav-link { color: var(--text); background: var(--surface-2); }
.nav-link .i { width: 14px; height: 14px; transition: transform .2s; }
.nav-dd[open] > .nav-link .i { transform: rotate(180deg); }

/* Products dropdown (details/summary — works without JS) */
.nav-dd { position: relative; }
.nav-dd > summary { list-style: none; cursor: pointer; }
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd-panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: -12px;
  width: min(560px, 90vw);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: dd-in .18s var(--ease-out);
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } }
.nav-dd-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  transition: background-color .15s;
}
.nav-dd-item:hover { background: var(--surface-2); }
.nav-dd-item strong { display: flex; align-items: center; gap: 8px; font-size: .98rem; }
.nav-dd-item span { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.nav-dd-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pa, var(--accent)); }

.nav-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 10px;
  border-radius: var(--radius-full);
  color: var(--text-2);
  border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.icon-btn .i { width: 18px; height: 18px; }
.lang-btn { font-weight: 600; font-size: .9rem; }
.lang-btn .t-en { font-family: var(--font-ar); font-size: 1rem; }
.lang-btn .t-ar { font-family: var(--font-sans); }

/* theme icon swap */
.theme-btn .i-sun { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }
[data-theme="dark"] .theme-btn .i-moon { display: none; }

.menu-btn { display: none; }
.menu-btn .i-close { display: none; }
.menu-open .menu-btn .i-close { display: block; }
.menu-open .menu-btn .i-menu { display: none; }

@media (max-width: 1240px) {
  .nav-actions .btn-header { display: none; }
}
@media (max-width: 1120px) {
  .menu-btn { display: inline-grid; }
  .nav-menu {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    margin: 0;
    padding: 20px var(--gutter) 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--bg);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .menu-open .nav-menu { visibility: visible; opacity: 1; transform: none; }
  .menu-open body { overflow: hidden; }
  .nav-link { font-size: 1.15rem; padding: 14px 12px; border-radius: var(--radius); justify-content: space-between; }
  .nav-dd-panel { position: static; width: 100%; grid-template-columns: 1fr; box-shadow: none; margin-top: 6px; animation: none; }
}
.nav-menu .btn-mobile { display: none; }
@media (max-width: 1120px) { .nav-menu .btn-mobile { display: flex; margin-top: 16px; } }

/* ---------------------------------------------------------------------
   07 · Buttons, pills, chips
   --------------------------------------------------------------------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding-inline: 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .2s, transform .15s;
}
html[lang="ar"] .btn { font-size: 1rem; }
.btn .i { width: 17px; height: 17px; transition: transform .2s var(--ease-out); }
.btn:hover .i-dir, .link-arrow:hover .i-dir { transform: translateX(calc(3px * var(--dir))) scaleX(var(--dir)); }
.btn:active { transform: translateY(1px); }
.btn-sm { --btn-h: 36px; padding-inline: 14px; font-size: .875rem; }
.btn-lg { --btn-h: 52px; padding-inline: 26px; font-size: 1rem; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--inner-hi), 0 1px 2px rgba(14, 12, 27, .12), 0 8px 24px -10px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); }
[data-theme="dark"] .btn-primary { box-shadow: 0 0 0 1px var(--accent-border), 0 8px 32px -8px var(--accent-glow); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--text-muted); background: var(--surface-2); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-on-band { background: #fff; color: #0e0c1b; }
.btn-on-band:hover { background: #ecebff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent-text);
}
.link-arrow .i { width: 16px; height: 16px; transition: transform .2s var(--ease-out); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  font-size: .85rem;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s;
}
[dir="rtl"] .pill { padding: 5px 6px 5px 14px; }
.pill:hover { border-color: var(--accent-border); }
.pill .pill-tag {
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: .75rem;
}
.pill .i { width: 14px; height: 14px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
html[lang="ar"] .chip { font-size: .85rem; }
.chip .i { width: 13px; height: 13px; }
.chip-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.chip-cyan { background: var(--cyan-soft); border-color: transparent; color: var(--cyan); }
.chip-gold { background: var(--gold-soft); border-color: transparent; color: var(--gold-ink); }
.chip-success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.chip-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.chip-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }

/* The AI signature: sparkle + accent-soft + gradient hairline */
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}
.ai-chip .i { width: 12px; height: 12px; }
html[lang="ar"] .ai-chip { font-family: var(--font-ar); font-size: .78rem; }

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
html[lang="ar"] .product-tag { font-family: var(--font-ar); font-size: .8rem; text-transform: none; }
html[lang="ar"] .tool-chip:has(.t-ar):not(.ltr) { direction: rtl; font-family: var(--font-ar); font-size: 11px; }
.product-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pa, var(--accent)); }

/* ---------------------------------------------------------------------
   08 · Cards & bento
   --------------------------------------------------------------------- */
.card {
  position: relative;
  padding: clamp(22px, 2.4vw, 30px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .2s, transform .25s var(--ease-out), box-shadow .25s;
}
.card-hover:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
[data-glow]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--accent-glow), transparent 45%);
}
@media (hover: hover) { [data-glow]:hover::before { opacity: 1; } }

.card h3, .card .h4 { margin-bottom: 8px; }
.card p { color: var(--text-2); }
.card .card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.card .card-icon .i { width: 20px; height: 20px; }
.card .card-icon.pa { background: var(--pa-soft); color: var(--pa-ink); }
.card-num { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); }

/* AI card: gradient hairline */
.ai-border { border-color: transparent; background:
  linear-gradient(var(--surface), var(--surface)) padding-box,
  linear-gradient(135deg, var(--accent-border), var(--border) 40%, var(--border) 60%, color-mix(in oklab, var(--cyan) 40%, transparent)) border-box; }

.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(190px, auto);
}
.bento > * { grid-column: span 2; }
.bento > .b-2 { grid-column: span 2; }
.bento > .b-3 { grid-column: span 3; }
.bento > .b-4 { grid-column: span 4; }
.bento > .b-6 { grid-column: span 6; }
.bento > .b-tall { grid-row: span 2; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > * { grid-column: span 1 !important; grid-row: auto !important; }
  .bento > .b-4, .bento > .b-6, .bento > .b-3 { grid-column: span 2 !important; }
}
@media (max-width: 600px) { .bento > * { grid-column: span 2 !important; } }
.bento .card { display: flex; flex-direction: column; }
.bento .card .viz { margin-top: auto; padding-top: 18px; }

.check-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.check-list li .i { width: 18px; height: 18px; margin-top: 4px; color: var(--accent-text); }
html[lang="ar"] .check-list li .i { margin-top: 7px; }
.check-list.pa li .i { color: var(--pa); }

/* ---------------------------------------------------------------------
   09 · Hero & atmosphere
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 96px);
  isolation: isolate;
  overflow: clip;
}
.hero-inner { position: relative; text-align: center; max-width: 960px; margin-inline: auto; }
.hero-inner.start { text-align: start; margin-inline: 0; }
.hero .pill { margin-bottom: 28px; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { max-width: 680px; margin-inline: auto; }
.hero-inner.start .lead { margin-inline: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }
.hero-inner.start .hero-actions { justify-content: flex-start; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 28px;
  font-size: .85rem;
  color: var(--text-muted);
}
.hero-meta span, .hero-meta li { display: inline-flex; align-items: center; gap: 7px; }
ul.hero-meta { list-style: none; padding: 0; }
.hero-meta .i { width: 15px; height: 15px; color: var(--accent-text); }
.hero-visual { position: relative; margin-top: clamp(48px, 6vw, 80px); }

.aurora {
  position: absolute;
  inset: -10% -10% auto;
  height: min(900px, 120%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 28% 38%, var(--aurora-1), transparent 70%),
    radial-gradient(34% 42% at 72% 30%, var(--aurora-2), transparent 70%),
    radial-gradient(30% 40% at 52% 72%, var(--aurora-3), transparent 70%);
  filter: blur(40px);
}
.theme-ams .aurora { --aurora-3: color-mix(in oklab, var(--gold) 32%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .aurora { animation: aurora-drift 26s var(--ease-in-out) infinite alternate; }
}
@keyframes aurora-drift {
  to { transform: translate3d(2%, 3%, 0) scale(1.06) rotate(2deg); }
}
.bg-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 25%, transparent 75%);
}
.bg-dots {
  background-image: radial-gradient(var(--grid-line) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}

/* Breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--text); }
.crumbs .i { width: 14px; height: 14px; }

/* ---------------------------------------------------------------------
   10 · Product cards (home)
   --------------------------------------------------------------------- */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .2s, transform .3s var(--ease-out), box-shadow .3s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.product-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 70%;
  z-index: -1;
  background: radial-gradient(50% 60% at 50% 100%, color-mix(in oklab, var(--pa) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.product-card .product-name {
  font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 16px 0 12px;
}
html[lang="ar"] .product-card .product-name { font-family: var(--font-sans); letter-spacing: -0.035em !important; }
.product-card .product-visual { margin-top: 28px; }

/* ---------------------------------------------------------------------
   11 · Metrics, steps, roadmap
   --------------------------------------------------------------------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  border-block: 1px solid var(--border);
}
.metric { padding: 28px 24px; }
.metric + .metric { border-inline-start: 1px solid var(--border); }
.metric-value {
  display: block;
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-sans);
}
.metric-label { display: block; margin-top: 10px; font-size: .9rem; color: var(--text-muted); }
@media (max-width: 760px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(odd) { border-inline-start: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--border); }
}

.steps {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
  position: relative;
}
.step {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.step-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--accent-text);
}
.step-num b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  font-weight: 600;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: .95rem; color: var(--text-2); }
.steps.connected::before {
  content: "";
  position: absolute;
  top: 39px;
  inset-inline: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-border), var(--border-strong), var(--accent-border));
  z-index: 0;
}
.steps.connected .step { background: color-mix(in oklab, var(--surface) 94%, transparent); }
@media (max-width: 1024px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps.connected::before { display: none; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* Vertical timeline */
.timeline { position: relative; display: grid; gap: 28px; padding-inline-start: 36px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 11px; width: 1px; background: var(--border-strong); }
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -30px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}
.timeline-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.timeline-item p { color: var(--text-2); font-size: .95rem; }

/* ---------------------------------------------------------------------
   12 · Tabs
   --------------------------------------------------------------------- */
.tab-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
html[lang="ar"] .tab { font-size: .98rem; }
.tab .i { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.tab-panel { margin-top: 32px; }
.tab-panel[hidden] { display: none; }
.tab-panel.is-in { animation: panel-in .45s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 680px) {
  .tab-list { display: flex; flex-wrap: nowrap; overflow-x: auto; border-radius: var(--radius); scrollbar-width: none; }
  .tab { flex-shrink: 0; }
}

/* ---------------------------------------------------------------------
   13 · Feature tour (sticky visual)
   --------------------------------------------------------------------- */
.tour { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 72px); }
.tour-steps { display: grid; gap: 0; }
.tour-step {
  padding-block: clamp(36px, 9vh, 96px);
  opacity: .42;
  transition: opacity .35s;
}
.tour-step:first-child { padding-top: 12px; }
.tour-step.is-active { opacity: 1; }
.tour-step .eyebrow { margin-bottom: 14px; }
.tour-step h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.025em; margin-bottom: 12px; }
.tour-step p { color: var(--text-2); }
.tour-step .check-list { margin-top: 18px; }
.tour-visual-wrap { position: relative; }
.tour-visual {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  height: min(600px, calc(100vh - var(--nav-h) - 64px));
}
.tour-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.tour-panel > * { width: 100%; }
.tour-panel.is-active { opacity: 1; transform: none; pointer-events: auto; }
.tour-step-visual { display: none; }
@media (max-width: 960px) {
  .tour { grid-template-columns: 1fr; }
  .tour-visual-wrap { display: none; }
  .tour-step { opacity: 1; padding-block: 28px; }
  .tour-step-visual { display: block; margin-top: 24px; }
}

/* ---------------------------------------------------------------------
   14 · Marquee
   --------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
}
.marquee-item .i { width: 16px; height: 16px; color: var(--accent-text); }

/* ---------------------------------------------------------------------
   15 · FAQ
   --------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.075rem;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { width: 20px; height: 20px; color: var(--text-muted); transition: transform .25s var(--ease-out); flex-shrink: 0; }
.faq details[open] summary .i { transform: rotate(45deg); color: var(--accent-text); }
.faq .faq-a { padding: 0 0 24px; color: var(--text-2); max-width: 72ch; }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { height: 0; overflow: clip; transition: height .3s var(--ease-out), content-visibility .3s allow-discrete; }
  .faq details[open]::details-content { height: auto; }
}

/* ---------------------------------------------------------------------
   16 · CTA band & contrast band
   --------------------------------------------------------------------- */
.cta-band {
  position: relative;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 72px);
  border-radius: var(--radius-xl);
  background: var(--band-bg);
  color: var(--band-text);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.cta-band .aurora { inset: -30% -10%; height: auto; opacity: .95;
  --aurora-1: rgba(91, 71, 224, .7); --aurora-2: rgba(59, 75, 219, .5); --aurora-3: rgba(14, 116, 144, .5); }
.theme-ams .cta-band .aurora { --aurora-3: rgba(183, 121, 31, .45); }
.cta-band .bg-grid { --grid-line: rgba(255, 255, 255, .07); }
.cta-band h2 { color: #fff; max-width: 820px; margin-inline: auto; }
.cta-band p { color: var(--band-muted); max-width: 640px; margin: 18px auto 0; }
.cta-band .hero-actions { margin-top: 32px; }
.cta-band .btn-secondary { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
.cta-band .btn-secondary:hover { background: rgba(255, 255, 255, .12); }
.cta-band .btn-primary { background: #fff; color: #0e0c1b; box-shadow: 0 8px 40px -8px rgba(139, 124, 246, .7); }
.cta-band .btn-primary:hover { background: #ecebff; }

/* A section that stays dark in both themes (agentic showcase) */
.band {
  background: var(--band-bg);
  color: var(--band-text);
  isolation: isolate;
  overflow: clip;
  --text: var(--band-text);
  --text-2: var(--band-muted);
  --text-muted: #8f8bb3;
  --surface: var(--band-surface);
  --surface-2: #1c1a42;
  --surface-3: #24214f;
  --border: var(--band-border);
  --border-strong: #3a3670;
  --accent: #8b7cf6;
  --accent-hover: #a497fa;
  --accent-contrast: #0a0a12;
  --accent-text: #b3a8ff;
  --accent-soft: #241f4d;
  --accent-ink: #d0c9ff;
  --accent-border: rgba(164, 151, 250, .35);
  --accent-glow: rgba(139, 124, 246, .35);
  --grid-line: rgba(255, 255, 255, .06);
  --cyan: #22d3ee; --cyan-soft: #0f2a33;
  --gold: #f2c14e; --gold-ink: #f2c14e; --gold-soft: #2e2512;
  --success: #34d399; --success-soft: #0f2b22;
  --warning: #fbbf24; --warning-soft: #2e2410;
  --s1: #8b7cf6; --s2: #22d3ee; --s3: #f7907c; --s4: #c4b5fd; --s5: #f5c451; --s6: #7ddc8f;
  color-scheme: dark;
}
.band h2, .band h3 { color: #fff; }

/* ---------------------------------------------------------------------
   17 · Footer
   --------------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: var(--section-y);
  padding-top: clamp(56px, 7vw, 88px);
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}
.footer-brand p { margin-top: 14px; max-width: 300px; color: var(--text-muted); font-size: .92rem; }
.footer-col h4 {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
html[lang="ar"] .footer-col h4 { font-family: var(--font-ar); font-size: .9rem; text-transform: none; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a, .footer-col li { font-size: .92rem; color: var(--text-2); }
.footer-col a:hover { color: var(--text); }
.footer-col a.ltr { white-space: nowrap; }
@media (max-width: 420px) {
  .site-header .brand > span { display: none; }
  .nav-actions { gap: 2px; }
}
.footer-social { display: flex; gap: 8px; margin-top: 20px; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  transition: color .15s, border-color .15s, background-color .15s;
}
.footer-social a:hover { color: var(--text); border-color: var(--text-muted); background: var(--surface); }
.footer-social .i { width: 16px; height: 16px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 56px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
  font-size: .84rem;
  color: var(--text-muted);
}
.footer-bottom a:hover { color: var(--text); }
.footer-toggles { display: flex; gap: 6px; }
.wordmark {
  display: block;
  margin-top: 8px;
  margin-bottom: -0.2em;
  font-family: var(--font-sans);
  font-size: clamp(3rem, 12.4vw, 13.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: .9;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, var(--border-strong) 0%, transparent 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  direction: ltr;
}
html[lang="ar"] .wordmark { letter-spacing: -0.055em !important; font-family: var(--font-sans); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------
   18 · Forms
   --------------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: .875rem; font-weight: 600; color: var(--text); }
.field .hint { font-size: .8rem; color: var(--text-muted); }
.input, .field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field 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='%238c89a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%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"] .field select { background-position: left 14px center; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.field ::placeholder { color: var(--text-muted); opacity: .8; }
.form .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------------
   19 · Mockup kit — product UI recreated in DOM
   Rules: aria-hidden="true" on the visual, fictional data only,
   tokens only (so mockups follow light/dark).
   --------------------------------------------------------------------- */
.mock {
  position: relative;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  text-align: start;
}
html[lang="ar"] .mock { font-family: var(--font-ar); font-size: 13.5px; line-height: 1.6; }
.mock-glow { position: relative; }
.mock-glow::before {
  content: "";
  position: absolute;
  inset: 8% 6% -6%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);
  filter: blur(30px);
}
.mock-tilt { transform: perspective(1800px) rotateX(7deg); transform-origin: 50% 0; transition: transform .9s var(--ease-out); }
.mock-tilt.is-in { transform: none; }
.mock-fade { -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }

.mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.mock-dots { display: flex; gap: 6px; direction: ltr; }
.mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-dots i:nth-child(1) { background: #ff5f57; }
.mock-dots i:nth-child(2) { background: #febc2e; }
.mock-dots i:nth-child(3) { background: #28c840; }
.mock-url {
  flex: 1;
  max-width: 340px;
  margin-inline: auto;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-app { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 420px; }
.mock-app.no-side { grid-template-columns: 1fr; }
.mock-side {
  padding: 14px 10px;
  border-inline-end: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mock-logo { display: flex; align-items: center; gap: 8px; padding: 4px 8px 14px; font-weight: 700; font-size: 13.5px; font-family: var(--font-sans); }
.mock-logo .mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--pa, var(--cyan))); display: grid; place-items: center; color: #fff; }
.mock-logo .mark .i { width: 13px; height: 13px; }
.mock-side-label { padding: 12px 8px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
html[lang="ar"] .mock-side-label { font-size: 11.5px; text-transform: none; }
.mock-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 12.5px;
  white-space: nowrap;
}
.mock-nav-item .i { width: 15px; height: 15px; opacity: .85; }
.mock-nav-item.active { background: var(--accent); color: var(--accent-contrast); }
.mock-nav-item.active .i { opacity: 1; }
.mock-nav-item .ai-dot { margin-inline-start: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }
.mock-main { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; background: var(--bg); }
.mock-top { display: flex; align-items: center; gap: 10px; }
.mock-title { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.mock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11.5px;
  min-width: 150px;
}
.mock-search .i { width: 13px; height: 13px; }
.mock-search kbd { margin-inline-start: auto; font-size: 10px; padding: 0 5px; }
.mock-avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.mock-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.mock-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.mock-grid { display: grid; gap: 10px; }
.mock-grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mock-grid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mock-grid.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mock-grid.c21 { grid-template-columns: 2fr 1fr; }

/* KPI tile */
.mock-kpi {
  position: relative;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.mock-kpi .k-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-kpi .k-value { margin-top: 4px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; font-family: var(--font-sans); }
.mock-kpi .k-delta { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; font-size: 10.5px; font-weight: 600; color: var(--success); font-family: var(--font-sans); }
.mock-kpi .k-delta.down { color: var(--danger); }
.mock-kpi .k-delta, .mock-kpi .k-value, .hbar b { direction: ltr; unicode-bidi: isolate; }
.mock-kpi.filled { border: 0; color: #fff; background: linear-gradient(135deg, var(--k1, #5b47e0), var(--k2, #8b7cf6)); }
.mock-kpi.filled .k-label, .mock-kpi.filled .k-delta { color: rgba(255, 255, 255, .85); }

/* Bars (CSS) — set --h on each <i> */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; direction: ltr; }
.bars i {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, color-mix(in oklab, var(--bar, var(--s1)) 70%, transparent), var(--bar, var(--s1)));
  transform-origin: bottom;
}
.bars i.hl { --bar: var(--pa, var(--s2)); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--bar); }
.bars-labels { display: flex; gap: 6px; margin-top: 6px; direction: ltr; font-size: 10px; color: var(--text-muted); font-family: var(--font-sans); }
.bars-labels span { flex: 1; text-align: center; }
[data-animate-seq].is-in .bars i, .is-in > .bars i, .is-active .bars i { animation: bar-grow .9s var(--ease-out) both; }
.bars i:nth-child(2) { animation-delay: .05s !important; } .bars i:nth-child(3) { animation-delay: .1s !important; }
.bars i:nth-child(4) { animation-delay: .15s !important; } .bars i:nth-child(5) { animation-delay: .2s !important; }
.bars i:nth-child(6) { animation-delay: .25s !important; } .bars i:nth-child(7) { animation-delay: .3s !important; }
.bars i:nth-child(8) { animation-delay: .35s !important; } .bars i:nth-child(n+9) { animation-delay: .4s !important; }
@keyframes bar-grow { from { transform: scaleY(0); } }

/* Horizontal bars */
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 90px 1fr 42px; align-items: center; gap: 8px; font-size: 11.5px; }
.hbar .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; width: var(--w, 50%); border-radius: inherit; background: var(--bar, var(--s1)); }
.hbar b { font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; font-family: var(--font-sans); }

/* SVG line/area charts: use stroke="var(--s1)" etc. */
.chart-svg { width: 100%; height: auto; overflow: visible; direction: ltr; }
.chart-svg .grid-l { stroke: var(--border); stroke-width: 1; }
.chart-svg .line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .area { opacity: .16; }
.is-in .chart-svg .draw, .is-active .chart-svg .draw { stroke-dasharray: 1000; animation: draw 1.6s var(--ease-out) both; }
@keyframes draw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

/* Donut: conic gradient, set --p1..--p3 as % */
.donut {
  --p1: 45%; --p2: 30%;
  width: 92px; height: 92px; border-radius: 50%;
  background: conic-gradient(var(--s1) 0 var(--p1), var(--s2) var(--p1) calc(var(--p1) + var(--p2)), var(--s3) calc(var(--p1) + var(--p2)) 100%);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%);
  mask: radial-gradient(circle, transparent 54%, #000 55%);
}

/* Data table */
.mock-table { width: 100%; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mock-table th { text-align: start; font-weight: 600; color: var(--text-muted); padding: 7px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.mock-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.mock-table tr:last-child td { border-bottom: 0; }
.mock-table .num { text-align: end; font-family: var(--font-sans); }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.55; }
html[lang="ar"] .msg { font-size: 13px; line-height: 1.75; }
.msg-user { align-self: flex-end; background: var(--accent); color: var(--accent-contrast); border-end-end-radius: 4px; }
.msg-ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-end-start-radius: 4px; color: var(--text); }
.msg-ai .msg-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 11px; font-weight: 600; color: var(--accent-text); }
.msg-ai .msg-head .i { width: 13px; height: 13px; }
.msg-full { max-width: 100%; align-self: stretch; }
.ai-avatar {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--brand) 60%, var(--cyan));
  color: #fff; flex-shrink: 0;
}
.ai-avatar .i { width: 14px; height: 14px; }
.chat-input {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-muted); font-size: 12px;
}
[dir="rtl"] .chat-input { padding: 8px 12px 8px 8px; }
.chat-input .send { margin-inline-start: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-contrast); }
.chat-input .send .i { width: 14px; height: 14px; }
.suggests { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest { padding: 5px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 11px; color: var(--text-2); }

/* Tool / step chips for agent runs */
.tool-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2);
  direction: ltr;
}
.tool-chip .i { width: 12px; height: 12px; color: var(--success); }
.agent-steps { list-style: none; padding: 0; display: grid; gap: 7px; }
.agent-steps li { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-2); }
.agent-steps li .st {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); flex-shrink: 0;
}
.agent-steps li .st .i { width: 11px; height: 11px; }
.agent-steps li[data-state="done"] .st { background: var(--success); border-color: var(--success); color: #fff; }
.agent-steps li[data-state="running"] .st { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
.agent-steps li[data-state="running"] { color: var(--text); font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }

/* AI insight callout */
.ai-callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(120deg, var(--brand), var(--cyan)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px -12px var(--accent-glow);
  font-size: 12px;
}
.ai-callout .i { width: 15px; height: 15px; color: var(--accent-text); margin-top: 2px; }
.ai-callout b { display: block; font-size: 11px; color: var(--accent-text); margin-bottom: 2px; }
.float-chip { position: absolute; z-index: 2; box-shadow: var(--shadow-lg); }

/* Score ring: set --v (0-100) */
.score-ring {
  --v: 75;
  display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: conic-gradient(var(--pa, var(--accent)) calc(var(--v) * 1%), var(--surface-2) 0);
  font-weight: 700; font-size: 14px; font-family: var(--font-sans);
}
.score-ring span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); }

.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: var(--w, 50%); border-radius: inherit; background: var(--bar, var(--accent)); }

.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Skeleton shimmer (AI thinking) */
.skeleton { height: 9px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Code / SQL block */
.code {
  padding: 10px 12px; border-radius: 10px;
  background: #0f0d24; color: #d9d6f5;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.6;
  direction: ltr; text-align: left; white-space: pre-wrap; overflow: hidden;
}
.code .k { color: #b3a8ff; } .code .s { color: #7ddc8f; } .code .n { color: #f5c451; } .code .c { color: #6f6b96; }

@media (max-width: 720px) {
  .mock-app { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .mock-grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock-grid.c21, .mock-grid.k3 { grid-template-columns: 1fr; }
  .mock-search { display: none; }
}

/* ---------------------------------------------------------------------
   20 · Motion
   --------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }

/* Children appear one after another once the parent is in view.
   Works for chat transcripts, agent steps, lists. */
[data-animate-seq] > * { opacity: 0; transform: translateY(8px); }
[data-animate-seq].is-in > * { animation: seq-in .5s var(--ease-out) forwards; }
[data-animate-seq].is-in > :nth-child(1) { animation-delay: .1s; }
[data-animate-seq].is-in > :nth-child(2) { animation-delay: .6s; }
[data-animate-seq].is-in > :nth-child(3) { animation-delay: 1.1s; }
[data-animate-seq].is-in > :nth-child(4) { animation-delay: 1.6s; }
[data-animate-seq].is-in > :nth-child(5) { animation-delay: 2.1s; }
[data-animate-seq].is-in > :nth-child(6) { animation-delay: 2.6s; }
[data-animate-seq].is-in > :nth-child(7) { animation-delay: 3.1s; }
[data-animate-seq].is-in > :nth-child(8) { animation-delay: 3.6s; }
[data-animate-seq].is-in > :nth-child(n+9) { animation-delay: 4.1s; }
[data-animate-seq="fast"].is-in > :nth-child(2) { animation-delay: .25s; }
[data-animate-seq="fast"].is-in > :nth-child(3) { animation-delay: .4s; }
[data-animate-seq="fast"].is-in > :nth-child(4) { animation-delay: .55s; }
[data-animate-seq="fast"].is-in > :nth-child(5) { animation-delay: .7s; }
[data-animate-seq="fast"].is-in > :nth-child(6) { animation-delay: .85s; }
[data-animate-seq="fast"].is-in > :nth-child(7) { animation-delay: 1s; }
[data-animate-seq="fast"].is-in > :nth-child(8) { animation-delay: 1.15s; }
[data-animate-seq="fast"].is-in > :nth-child(n+9) { animation-delay: 1.3s; }
@keyframes seq-in { to { opacity: 1; transform: none; } }

/* Inside an inactive tour panel, keep sequences replayable */
.tour-panel:not(.is-active) [data-animate-seq] > * { animation: none; opacity: 0; }
.tour-panel.is-active [data-animate-seq] > * { animation: seq-in .5s var(--ease-out) forwards; }

.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success); opacity: 0; animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.typing { display: inline-flex; gap: 3px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, [data-animate-seq] > * { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .mock-tilt { transform: none; }
}
@media print {
  .site-header, .site-footer .wordmark, body::after, .aurora, .bg-grid { display: none !important; }
  .reveal, [data-animate-seq] > * { opacity: 1 !important; transform: none !important; }
}

/* ---------------------------------------------------------------------
   20b · Human / AI Agent view
   --------------------------------------------------------------------- */
.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.view-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 10px;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
html[lang="ar"] .view-opt { font-size: .85rem; }
.view-opt .i { width: 15px; height: 15px; }
.view-opt:hover { color: var(--text); }
.view-opt[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.view-opt[data-view-set="agent"][aria-pressed="true"] { background: var(--accent); color: var(--accent-contrast); box-shadow: none; }
@media (max-width: 1240px) { .nav-actions .view-opt .view-label { display: none; } .nav-actions .view-opt { padding-inline: 8px; } }
.nav-menu .view-li { display: none; }
@media (max-width: 640px) {
  .nav-actions .view-switch { display: none; }
  .nav-menu .view-li { display: flex; justify-content: center; margin-top: 12px; }
  .nav-menu .view-li .view-opt { height: 40px; padding-inline: 16px; font-size: .95rem; }
}

/* Agent mode: hide the designed page, show the text rendering */
html[data-view="agent"] body > :not(#agent-view):not(#sd-icon-sprite):not(script) { display: none !important; }
html[data-view="agent"] body::after { display: none; }
html[data-view="agent"] body { background: var(--bg); }
.agent-view[hidden] { display: none; }
.agent-view { max-width: 980px; margin-inline: auto; padding: 0 var(--gutter) 64px; }
.agent-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-block: 14px;
  margin-bottom: 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.agent-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .8rem; color: var(--text-2); }
html[lang="ar"] .agent-badge { font-family: var(--font-ar); font-size: .9rem; }
.agent-badge .i { width: 18px; height: 18px; color: var(--accent-text); }
.agent-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.agent-btn {
  height: 36px;
  padding-inline: 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}
.agent-btn:hover { background: var(--surface-2); }
.agent-copy.is-done { border-color: var(--success); color: var(--success); }
.agent-md {
  margin: 0;
  padding: 24px 0;
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  tab-size: 2;
}
html[lang="ar"] .agent-md { font-family: var(--font-ar), var(--font-mono); font-size: 1rem; line-height: 1.95; }
.agent-md:focus-visible { outline-offset: 8px; }

/* ---------------------------------------------------------------------
   21 · Utilities
   --------------------------------------------------------------------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-fill { fill: currentColor; stroke: none; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; } .mt-6 { margin-top: 64px; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.w-full { width: 100%; }
.hide-sm { } @media (max-width: 720px) { .hide-sm { display: none !important; } }
.show-sm { display: none !important; } @media (max-width: 720px) { .show-sm { display: initial !important; } }
.divider { height: 1px; background: var(--border); border: 0; margin-block: 32px; }
.text-accent { color: var(--accent-text); }
.text-pa { color: var(--pa-ink, var(--accent-text)); }
.nowrap { white-space: nowrap; }
