:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --bg-3: #1a1a1d;
  --line: #2a2a2e;
  --text: #ece8df;
  --muted: #a39f95;
  --gold: #c9a54a;
  --gold-2: #e2c574;
  --gold-dim: #8a7232;
  --ok: #5fb37a;
  --warn: #d9a441;
  --bad: #d46a5f;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, Tahoma, "Noto Kufi Arabic", "Noto Sans Arabic", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { width: min(1120px, 92vw); margin-inline: auto; }
.hidden { display: none !important; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(10,10,11,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: .08em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border: 1.5px solid var(--gold); border-radius: 8px; display: grid; place-items: center; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 0; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; align-items: center; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-3); text-decoration: none; }
.lang-btn { background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); border-radius: 8px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 14px; }
.lang-btn:hover { border-color: var(--gold); }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; margin-inline-start: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font: inherit; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .nav.open { display: flex; }
}

/* type */
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 19px; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; font-weight: 600; }

/* layout */
section { padding: 64px 0; }
.hero { padding: 96px 0 72px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% -20%, rgba(201,165,74,.14), transparent 60%); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 640px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.gold-edge { border-color: var(--gold-dim); }
.card h3 { color: var(--text); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-weight: 700; }
.price { font-size: 42px; font-weight: 800; color: var(--gold); }
.price.text { font-size: 28px; line-height: 1.3; margin: 8px 0; }
.price small { font-size: 16px; color: var(--muted); font-weight: 400; }
ul.check { list-style: none; padding: 0; margin: 12px 0; }
ul.check li { padding: 4px 0; padding-inline-start: 24px; position: relative; }
ul.check li::before { content: "✓"; color: var(--gold); position: absolute; inset-inline-start: 0; }
ul.dot li { margin: 4px 0; }

/* buttons & forms */
.btn { display: inline-block; background: var(--gold); color: #111; border: 1px solid var(--gold); padding: 11px 22px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--gold-2); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: rgba(201,165,74,.08); }
.btn.sm { padding: 6px 12px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(201,165,74,.12); }
input.ltr { direction: ltr; text-align: start; }
textarea { min-height: 110px; resize: vertical; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: var(--text); font-size: 15px; }
.check-row input { width: auto; margin-top: 5px; }
.form-card { max-width: 520px; margin-inline: auto; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* notices */
.notice { border: 1px solid var(--line); border-inline-start: 3px solid var(--gold); background: var(--bg-2); padding: 14px 16px; border-radius: 8px; margin: 14px 0; }
.notice.ok { border-inline-start-color: var(--ok); }
.notice.warn { border-inline-start-color: var(--warn); }
.notice.bad { border-inline-start-color: var(--bad); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: rgba(95,179,122,.4); }
.badge.warn { color: var(--warn); border-color: rgba(217,164,65,.4); }
.badge.bad { color: var(--bad); border-color: rgba(212,106,95,.4); }
.badge.gold { color: var(--gold); border-color: var(--gold-dim); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 14px; margin-top: 40px; }
.site-footer .risk { max-width: 820px; }

/* academy */
.course { margin-bottom: 18px; }
.lesson-list { list-style: none; padding: 0; margin: 12px 0 0; }
.lesson-list li { border-top: 1px solid var(--line); padding: 10px 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.lesson-view { white-space: pre-wrap; }
.video-wrap { position: relative; padding-top: 56.25%; margin: 14px 0; border-radius: 8px; overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.signal-post { border-top: 1px solid var(--line); padding: 16px 0; white-space: pre-wrap; }

/* admin */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
.admin-side { border-inline-end: 1px solid var(--line); padding: 18px 12px; background: var(--bg-2); }
.admin-side button { display: block; width: 100%; text-align: start; background: none; border: 0; color: var(--muted); padding: 10px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.admin-side button.active, .admin-side button:hover { background: var(--bg-3); color: var(--text); }
.admin-side .count { float: inline-end; color: var(--gold); }
.admin-main { padding: 24px; overflow-x: auto; }
@media (max-width: 860px) { .admin-shell { grid-template-columns: 1fr; } .admin-side { display: flex; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); } .admin-side button { white-space: nowrap; width: auto; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 26px; color: var(--gold); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th, table.data td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: 13px; }
table.data tr:hover td { background: rgba(255,255,255,.015); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select, .toolbar input { width: auto; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--bg-2); border: 1px solid var(--gold-dim); border-radius: var(--radius); padding: 22px; width: min(720px, 100%); max-height: 90vh; overflow: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.copy-box { display: flex; gap: 8px; margin-top: 10px; }
.copy-box input { direction: ltr; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
pre.details { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: 12.5px; color: var(--muted); direction: ltr; text-align: left; }
.toast { position: fixed; bottom: 20px; inset-inline-start: 20px; background: var(--bg-3); border: 1px solid var(--gold-dim); padding: 12px 16px; border-radius: 8px; z-index: 60; max-width: 420px; }
[dir="rtl"] .kv dd.mono, [dir="rtl"] td.mono { text-align: right; }
.captcha-box { margin-top: 14px; min-height: 0; }
details.card summary { cursor: pointer; color: var(--gold); }
details summary { cursor: pointer; }
.check-row label.check-row { margin: 0 0 0 14px; }

/* brand & home */
.brand-sub { color: var(--gold); font-weight: 600; letter-spacing: .04em; }
@media (max-width: 420px) { .site-header .brand-sub { display: none; } }
.trust { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.trust li { border-inline-start: 2px solid var(--gold-dim); padding-inline-start: 14px; }
.trust b { display: block; color: var(--text); }
.trust span { color: var(--muted); font-size: 14.5px; }
.band { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }
.cta-card { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-top: 24px; border-color: var(--gold-dim); background: radial-gradient(ellipse at 0% 0%, rgba(201,165,74,.12), transparent 60%), var(--bg-2); }
.cta-card .btn-row { margin-top: 0; }
.notice p { margin: 6px 0 0; }

/* footer */
.footer-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; margin-bottom: 20px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { color: var(--text); margin: 0 0 8px; font-size: 15px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 4px 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold-2); }
.grid + .card, .card + .card:not(.grid > .card) { margin-top: 18px; }
