:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #111827;
  --ink-2: #3a3a44;
  --muted: #6e6e7a;
  --line: #e8e6e0;
  --line-strong: #d6d3cb;
  --accent: #f59e0b;
  --accent-ink: #111827;
  --accent-soft: #fef3c7;
  --accent-text: #b45309;
  --ok: #138a4f;
  --ok-soft: #e6f6ed;
  --warn: #a15c00;
  --warn-soft: #fff4e0;
  --err: #c62d2d;
  --err-soft: #fdecec;
  --info: #2952cc;
  --info-soft: #eaf0ff;
  --fb: #1877f2;
  --pin: #e60023;
  --tt: #111111;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 4px 16px rgba(20, 20, 30, .05);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e11;
    --surface: #17171c;
    --surface-2: #1c1c22;
    --ink: #f2f2f5;
    --ink-2: #c9c9d2;
    --muted: #9696a3;
    --line: #26262e;
    --line-strong: #34343e;
    --accent: #fbbf24;
    --accent-soft: #2b2109;
    --accent-text: #fbbf24;
    --ok: #4cc98a;
    --ok-soft: #12261b;
    --warn: #f0b04f;
    --warn-soft: #2a1f0e;
    --err: #ff7a7a;
    --err-soft: #2c1414;
    --info: #8aa7ff;
    --info-soft: #151c33;
    --tt: #f2f2f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.stack > * + * { margin-top: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Brand ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: -.03em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 600 14px var(--font); cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(90deg, #fbbf24, #fde047 50%, #fbbf24); border-color: #f59e0b; color: var(--accent-ink); box-shadow: 0 4px 14px rgba(251, 191, 36, .35); }
.btn-primary:hover { background: linear-gradient(90deg, #fbbf24, #fde047 50%, #fbbf24); filter: brightness(1.04); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink); opacity: .9; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--err); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-body { padding: 20px; }

/* ---------- Forms ---------- */
.field { display: block; }
.field > .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font: 15px var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check.disabled { opacity: .5; cursor: not-allowed; }

/* Switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }

/* Segmented control */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-scheduled { background: var(--info-soft); color: var(--info); }
.badge-publishing, .badge-processing, .badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-published { background: var(--ok-soft); color: var(--ok); }
.badge-partial { background: var(--warn-soft); color: var(--warn); }
.badge-failed { background: var(--err-soft); color: var(--err); }

.pf { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 800; flex: none; }
.pf-facebook { background: var(--fb); }
.pf-pinterest { background: var(--pin); }
.pf-tiktok { background: #111; box-shadow: inset 0 0 0 1.5px #25f4ee, 1.5px 1px 0 #fe2c55; }

.avatar { position: relative; width: 36px; height: 36px; flex: none; }
.avatar img, .avatar .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.avatar .ph { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.avatar .pf { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; font-size: 9px; border: 2px solid var(--surface); }
.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 48px; height: 48px; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -8px; }

/* Account chips (selectable) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .chip-body { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border: 1.5px solid var(--line); border-radius: 99px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.chip .chip-body:hover { border-color: var(--line-strong); }
.chip input:checked + .chip-body { border-color: var(--accent); background: var(--accent-soft); }
.chip input:focus-visible + .chip-body { box-shadow: 0 0 0 3px var(--accent-soft); }
.chip .name { font-weight: 600; font-size: 14px; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid transparent; }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-err { background: var(--err-soft); color: var(--err); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; background: var(--bg); }
.sidebar .logo { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; font-weight: 600; color: var(--muted); font-size: 14.5px; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar .spacer { flex: 1; }
.main { padding: 32px 40px 64px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar .nav { flex-direction: row; }
  .sidebar .nav a span { display: none; }
  .sidebar .spacer { display: none; }
  .main { padding: 20px 16px 48px; }
}

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat { padding: 16px 18px; }
.stat .num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); text-decoration: none; }
.post-list li:first-child .post-row { border-top: 0; }
.post-row:hover { background: var(--surface-2); }
.thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.post-row .meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.post-row .when { font-weight: 700; font-size: 13px; }
.empty { padding: 48px 20px; text-align: center; }
.empty .icon { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin: 0 auto 14px; }

/* ---------- Composer ---------- */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.compose .side { position: sticky; top: 24px; }
@media (max-width: 1000px) { .compose { grid-template-columns: 1fr; } .compose .side { position: static; } }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800; display: grid; place-items: center; }

.dropzone { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 28px; text-align: center; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; display: block; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { display: none; }
.media-preview { position: relative; border-radius: 12px; overflow: hidden; background: #000; max-height: 360px; display: grid; place-items: center; }
.media-preview img, .media-preview video { max-height: 360px; width: auto; margin: 0 auto; }
.media-preview .remove { position: absolute; top: 10px; right: 10px; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.platform-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.platform-panel .head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.platform-panel .body { padding: 18px; }
.subtle-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface-2); }
.declaration { font-size: 13px; color: var(--muted); }
.declaration a { color: var(--ink); font-weight: 600; }

.preview-card .preview-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.preview-card .preview-media { background: var(--surface-2); aspect-ratio: 1 / 1; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.preview-card .preview-media img, .preview-card .preview-media video { width: 100%; height: 100%; object-fit: cover; }
.preview-card .preview-text { padding: 14px 16px; white-space: pre-wrap; word-break: break-word; font-size: 14px; }

/* ---------- Detail ---------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.target { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: flex-start; }
.target:first-child { border-top: 0; }

/* ---------- Accounts ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1000px) { .platform-grid { grid-template-columns: 1fr; } }
.account-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.account-item:first-child { border-top: 0; }
.pf-big { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }

/* ---------- Public site: dark, cinematic, Arabic-first ---------- */
body.x-site {
  --bg: #07070a; --surface: #111116; --surface-2: #16161d; --ink: #f5f5f7; --ink-2: #c9c9d1; --muted: #8b8b97;
  --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .14);
  --amber: #fbbf24; --amber-2: #fde047; --accent-text: #fbbf24; --accent-soft: rgba(251, 191, 36, .12);
  --xfont: "Readex Pro", "Inter", ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark; background: var(--bg); color: var(--ink); font-family: var(--xfont); font-size: 16px;
}
body.x-site a { color: inherit; }
.x-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }
.x-narrow { max-width: 820px; }
.x-center { text-align: center; }

/* Logo */
.x-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.x-logo-mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #111; display: grid; place-items: center; font: 800 14px var(--xfont); letter-spacing: -.03em; box-shadow: 0 0 24px rgba(251, 191, 36, .35); }
.x-logo-text { font: 700 20px var(--xfont); letter-spacing: -.02em; color: #fff; }

/* Nav */
.x-nav { position: sticky; top: 0; z-index: 30; background: rgba(7, 7, 10, .72); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.x-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.x-nav-links { display: flex; gap: 26px; margin-inline-start: 12px; }
.x-nav-links a, .x-nav-login { text-decoration: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; transition: color .15s; }
.x-nav-links a:hover, .x-nav-login:hover { color: #fff; }
.x-nav-actions { display: flex; align-items: center; gap: 16px; margin-inline-start: auto; }
.x-lang { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 99px; padding: 5px 12px; }
.x-lang:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }

/* Buttons */
.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: 99px; font: 600 16px var(--xfont); text-decoration: none; transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap; }
.x-btn:active { transform: scale(.98); }
.x-btn-primary { background: linear-gradient(90deg, var(--amber), var(--amber-2)); color: #0b0b0b !important; box-shadow: 0 0 0 1px rgba(253, 224, 71, .4), 0 10px 40px -8px rgba(251, 191, 36, .55); }
.x-btn-primary:hover { box-shadow: 0 0 0 1px rgba(253, 224, 71, .6), 0 14px 50px -6px rgba(251, 191, 36, .75); }
.x-btn-ghost { border: 1px solid var(--line-strong); color: #fff !important; background: rgba(255, 255, 255, .03); }
.x-btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.x-btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }

/* Hero */
.x-hero { position: relative; overflow: hidden; padding: 96px 0 64px; }
.x-glow { position: absolute; inset-inline: 0; top: -280px; height: 760px; pointer-events: none; background: radial-gradient(closest-side, rgba(251, 191, 36, .26), rgba(251, 191, 36, .08) 45%, transparent 75%); filter: blur(10px); }
.x-glow-bottom { top: auto; bottom: -420px; }
.x-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 99px; border: 1px solid rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .08); color: #fde68a; font-size: 14px; font-weight: 500; }
.x-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.x-h1 { margin: 26px auto 0; max-width: 980px; font-size: clamp(42px, 7.2vw, 92px); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; color: #fff; }
.x-h1 .x-accent { display: block; background: linear-gradient(90deg, var(--amber), var(--amber-2) 55%, #fff7cc); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.x-lead { margin: 24px auto 0; max-width: 720px; font-size: clamp(17px, 2vw, 20px); line-height: 1.75; color: var(--ink-2); font-weight: 300; }
.x-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* Agent chat stage */
.x-stage { margin: 64px auto 0; max-width: 820px; padding: 1px; border-radius: 28px; background: linear-gradient(180deg, rgba(251, 191, 36, .45), rgba(255, 255, 255, .06) 40%, rgba(255, 255, 255, .02)); box-shadow: 0 40px 120px -30px rgba(251, 191, 36, .25); text-align: start; }
.x-chat { border-radius: 27px; background: linear-gradient(180deg, #121218, #0b0b0f); padding: 28px; display: grid; gap: 18px; }
.x-msg { max-width: 86%; padding: 16px 18px; border-radius: 20px; font-size: 15.5px; line-height: 1.7; }
.x-msg p { margin: 0; }
.x-who { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.x-msg-user { justify-self: end; background: #1d1d25; border: 1px solid var(--line); border-end-end-radius: 6px; color: #fff; }
.x-msg-agent { justify-self: start; background: rgba(251, 191, 36, .06); border: 1px solid rgba(251, 191, 36, .22); border-end-start-radius: 6px; color: var(--ink); }
.x-spark { color: var(--amber); }
.x-drafts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.x-draft { border-radius: 16px; border: 1px solid var(--line); background: #0e0e13; overflow: hidden; }
.x-draft-media { height: 120px; display: grid; place-items: center; font-size: 40px; }
.x-media-a { background: radial-gradient(circle at 30% 30%, #fe2c55 0, transparent 55%), radial-gradient(circle at 70% 70%, #25f4ee 0, transparent 55%), #15151c; }
.x-media-b { background: radial-gradient(circle at 60% 40%, #f59e0b 0, transparent 60%), #1a1410; }
.x-draft-meta { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); }
.x-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.x-chip-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: #fff; }
.x-chip-primary { background: linear-gradient(90deg, var(--amber), var(--amber-2)); border-color: transparent; color: #111; }

/* Platforms strip */
.x-platforms { padding: 28px 0 72px; }
.x-kicker { color: var(--muted); font-size: 14px; letter-spacing: .02em; margin: 0 0 18px; }
.x-plist { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.x-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .03); font-size: 14.5px; font-weight: 500; color: #fff; }
.x-pill-soon { color: var(--muted); border-style: dashed; }
.x-pill-soon em { font-style: normal; font-size: 11px; font-weight: 600; color: #fde68a; background: rgba(251, 191, 36, .1); border-radius: 99px; padding: 2px 8px; }

/* Sections */
.x-section { padding: 110px 0; position: relative; }
.x-section-alt { background: linear-gradient(180deg, #0b0b10, #07070a); border-block: 1px solid var(--line); }
.x-head { max-width: 720px; margin-bottom: 48px; }
.x-head.x-center { margin-inline: auto; }
.x-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--amber); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.x-tag { font-size: 11.5px; font-weight: 600; color: #111; background: var(--amber); border-radius: 99px; padding: 3px 10px; }
.x-h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; color: #fff; margin: 0; }
.x-h2-xl { font-size: clamp(38px, 6vw, 76px); }
.x-p { font-size: 18px; line-height: 1.75; color: var(--ink-2); font-weight: 300; margin: 16px 0 0; }
.x-p a { color: var(--amber); font-weight: 500; }

.x-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.x-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.x-card { position: relative; padding: 28px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, #121218, #0d0d12); transition: border-color .2s, transform .2s; overflow: hidden; }
.x-card:hover { border-color: rgba(251, 191, 36, .35); transform: translateY(-3px); }
.x-card-wide { grid-row: span 2; display: flex; flex-direction: column; }
.x-card-hot { background: radial-gradient(120% 80% at 100% 0%, rgba(251, 191, 36, .16), transparent 60%), linear-gradient(180deg, #14141a, #0d0d12); border-color: rgba(251, 191, 36, .25); }
.x-card-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); margin-bottom: 18px; }
.x-card h3 { font-size: 19px; font-weight: 600; color: #fff; margin: 0; }
.x-card p { font-size: 15px; line-height: 1.75; color: var(--muted); margin: 10px 0 0; }
.x-code { margin-top: auto; padding: 14px 16px; border-radius: 14px; background: #08080b; border: 1px solid var(--line); font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-2); text-align: left; overflow-x: auto; white-space: nowrap; }
.x-card-wide .x-code { margin-top: 28px; }
.c-k { color: #fde68a; }
.c-s { color: #86efac; }

.x-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.x-step { padding: 32px 28px; border-radius: 24px; border: 1px solid var(--line); background: #0e0e13; }
.x-step-n { display: inline-block; font-size: 44px; font-weight: 700; line-height: 1; background: linear-gradient(180deg, var(--amber), rgba(251, 191, 36, .2)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 18px; }
.x-step h3 { font-size: 20px; font-weight: 600; color: #fff; margin: 0; }
.x-step p { color: var(--muted); line-height: 1.75; margin: 10px 0 0; font-size: 15px; }

.x-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.x-ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.x-ticks li { display: flex; align-items: center; gap: 12px; font-size: 16.5px; color: var(--ink); }
.x-tick { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #111; background: var(--amber); }
.x-control { border-radius: 24px; border: 1px solid var(--line-strong); background: #0f0f14; padding: 6px 24px 20px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.x-control-head { display: flex; align-items: center; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: #fff; }
.x-control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.x-select { padding: 6px 14px; border-radius: 10px; border: 1px solid var(--line-strong); color: #fff; font-size: 14px; }
.x-toggle { width: 40px; height: 24px; border-radius: 99px; background: #2a2a33; position: relative; flex: none; }
.x-toggle::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: inset .2s; }
.x-toggle.on { background: var(--amber); }
.x-toggle.on::after { inset-inline-start: 19px; }
.x-note { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

.x-faq { display: grid; gap: 12px; }
.x-faq details { border-radius: 18px; border: 1px solid var(--line); background: #0e0e13; padding: 0 22px; transition: border-color .2s; }
.x-faq details[open] { border-color: rgba(251, 191, 36, .3); }
.x-faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-size: 17px; font-weight: 500; color: #fff; display: flex; justify-content: space-between; gap: 16px; }
.x-faq summary::-webkit-details-marker { display: none; }
.x-faq summary::after { content: "+"; color: var(--amber); font-size: 24px; line-height: 1; }
.x-faq details[open] summary::after { content: "−"; }
.x-faq details p { margin: 0; padding: 0 0 20px; color: var(--ink-2); line-height: 1.8; font-weight: 300; }

.x-final { position: relative; overflow: hidden; padding: 130px 0; border-top: 1px solid var(--line); }

/* Footer */
.x-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; background: #050507; }
.x-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.x-footer-tag { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.x-footer-links { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: flex-start; }
.x-footer-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.x-footer-links a:hover { color: var(--amber); }
.x-footer-copy { max-width: 1200px; margin: 32px auto 0; padding: 20px 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* Legal pages in the dark theme */
body.x-site .prose { font-family: var(--xfont); }
body.x-site .prose h1, body.x-site .prose h2 { color: #fff; }
body.x-site .prose a { color: var(--amber); }
body.x-site .prose code { background: rgba(255, 255, 255, .06); padding: 1px 6px; border-radius: 6px; }

@media (max-width: 960px) {
  .x-nav-links { display: none; }
  .x-nav-login { display: none; }
  .x-bento, .x-grid4 { grid-template-columns: 1fr 1fr; }
  .x-card-wide { grid-row: auto; grid-column: span 2; }
  .x-steps, .x-split { grid-template-columns: 1fr; }
  .x-split { gap: 36px; }
  .x-section { padding: 80px 0; }
}
@media (max-width: 600px) {
  .x-hero { padding: 64px 0 40px; }
  .x-bento, .x-grid4 { grid-template-columns: 1fr; }
  .x-card-wide { grid-column: auto; }
  .x-drafts { grid-template-columns: 1fr; }
  .x-msg { max-width: 100%; }
  .x-chat { padding: 18px; }
  .x-cta .x-btn { width: 100%; }
  .x-nav-inner { gap: 12px; }
  .x-nav-actions { gap: 10px; }
}

.prose { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.prose h1 { margin-bottom: 6px; }
.prose h2 { margin: 32px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: 100%; max-width: 400px; }

/* Arabic needs taller lines (dots and descenders below the baseline). */
[dir="rtl"] .x-h1 { line-height: 1.32; max-width: 1120px; font-size: clamp(40px, 6.4vw, 84px); }
[dir="rtl"] .x-h1 .x-accent { padding-bottom: .22em; margin-bottom: -.12em; }
[dir="rtl"] .x-h2 { line-height: 1.35; }
[dir="rtl"] .x-step-n { padding-bottom: .1em; }
.x-bento > .x-card:last-child { grid-column: span 2; }
.x-code { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 960px) { .x-bento > .x-card:last-child { grid-column: span 2; } }
@media (max-width: 600px) { .x-bento > .x-card:last-child { grid-column: auto; } }
