
:root {
  --bg: #f7f7f7; --surface: #ffffff; --surface-2: #eef0f4; --fg: #2b2d30; --muted: #63666d; --line: #e1e3e8;
  --accent: #3d68db; --accent-fg: #ffffff; --accent-soft: #e8eefc;
  --ok: #1f7a4d; --warn: #9a6400; --warn-soft: #fbf1dc; --bad: #a33a2b; --bad-soft: #f8e4e0; --info-soft: #e6eef8;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417; --surface: #1c1d21; --surface-2: #26282d; --fg: #ececea; --muted: #a0a3aa; --line: #303238;
    --accent: #7d9cf0; --accent-fg: #0f1424; --accent-soft: #1c2440;
    --ok: #7cc39b; --warn: #e3b25e; --warn-soft: #33291a; --bad: #ec8b7c; --bad-soft: #3a211d; --info-soft: #1e2833;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
nav.main { display: flex; gap: 6px; align-items: center; margin-inline-start: auto; flex-wrap: wrap; }
nav.main a, nav.main button { color: var(--fg); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
nav.main a:hover, nav.main button:hover { background: var(--surface-2); }
nav.main form { margin: 0; }
main { padding: 32px 0 56px; }
footer.bottom { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 20px 0 32px; }
footer.bottom .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
h1 { font-size: clamp(26px, 4.5vw, 40px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; }
h2 { font-size: 21px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hero { padding: 24px 0 8px; max-width: 720px; }
.hero p.lead { font-size: 18px; color: var(--muted); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 20px 0 8px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; margin-bottom: 8px; }
.prompt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; }
ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding-inline-start: 26px; position: relative; margin-bottom: 8px; }
ul.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--accent); font-weight: 700; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--accent); color: var(--accent-fg); }
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 14px; }
.btn-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
form.inline { display: inline; margin: 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); font: inherit; }
input:focus, textarea:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { min-height: 140px; resize: vertical; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.row-form .field { margin: 0; flex: 1 1 200px; }
.narrow { max-width: 440px; margin: 0 auto; }
.alert { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: #e3f3ea; color: var(--ok); }
@media (prefers-color-scheme: dark) { .alert.ok { background: #1d3328; } }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: start; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.wrap-text { white-space: normal; min-width: 220px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge.running, .badge.active, .badge.succeeded, .badge.ok { background: #e3f3ea; color: var(--ok); }
@media (prefers-color-scheme: dark) { .badge.running, .badge.active, .badge.succeeded, .badge.ok { background: #1d3328; } }
.badge.failed, .badge.suspended, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.auto_stopped, .badge.waitlisted, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; background: var(--surface-2);
  border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; direction: ltr; text-align: left; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .code { flex: 1; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.kpi .l { color: var(--muted); font-size: 14px; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.funnel td:first-child { white-space: normal; }
.qr svg { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 8px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.legal h2 { margin-top: 24px; }
.legal ul { padding-inline-start: 22px; }
.legal li { margin-bottom: 6px; }
@media (max-width: 600px) { main { padding-top: 20px; } .card { padding: 16px; } }
