:root {
  --bg: #020e1a;
  --bg-2: #061a2e;
  --panel: #0a2440;
  --navy: #003060;
  --blue: #0b5087;
  --blue-2: #0060a8;
  --gold: #d89030;
  --gold-hi: #f0c060;
  --gold-lo: #c07818;
  --silver: #bbb7b5;
  --text: #ffffff;
  --muted: #a9b6c4;
  --line: rgba(216, 144, 48, 0.25);
  --line-soft: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --font: 'Montserrat', 'Cairo', system-ui, sans-serif;
}
[dir='rtl'] { --font: 'Cairo', 'Montserrat', system-ui, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; font-weight: 800; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.gold { color: var(--gold); }
.lead { font-size: 1.1rem; color: #dbe4ee; }
.kicker { color: var(--gold); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; margin: 0 0 0.5rem; }
.script { font-family: 'Dancing Script', 'Cairo', cursive; color: var(--gold); font-size: 1.6rem; margin: 0.2em 0; }
[dir='rtl'] .script { font-family: 'Cairo', sans-serif; font-weight: 700; font-style: normal; }
.empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(2, 14, 26, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand img { width: 44px; height: 44px; mix-blend-mode: screen; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: 'Montserrat', sans-serif; font-size: 0.95rem; letter-spacing: 0.02em; white-space: nowrap; }
.brand-name b { color: #4a90d0; font-weight: 900; }
.brand-name em { color: var(--gold); font-style: normal; font-weight: 900; }
.brand-role { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.06em; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a, .linklike { color: #e6edf5; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; }
.nav a:hover, .linklike:hover { background: var(--line-soft); text-decoration: none; }
.nav a[aria-current] { color: var(--gold); }
.nav .lang { border: 1px solid var(--line); }
.nav-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.linklike { background: none; border: 0; cursor: pointer; font-family: inherit; }
.inline { display: inline; margin: 0; }
.nav-toggle, .nav-burger { display: none; }
@media (max-width: 960px) {
  .nav-burger { display: flex; flex-direction: column; gap: 5px; margin-inline-start: auto; cursor: pointer; padding: 10px; }
  .nav-burger span { width: 24px; height: 2px; background: var(--gold); display: block; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 68px; flex-direction: column; align-items: stretch; background: var(--bg-2); padding: 12px 16px 20px; border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-sep { width: 100%; height: 1px; margin: 6px 0; }
  .nav a, .linklike { padding: 12px; text-align: start; width: 100%; }
  .brand-role { display: none; }
}
@media (max-width: 420px) { .brand-name { font-size: 0.78rem; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; border: 1px solid var(--gold);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: #1a1205; font-weight: 800; font-family: inherit; font-size: 1rem; cursor: pointer; text-decoration: none !important; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn-ghost { background: transparent; color: var(--gold-hi); }
.btn-sm { padding: 7px 14px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }

/* Hero */
.hero { background: radial-gradient(1000px 500px at 80% 10%, rgba(11, 80, 135, 0.45), transparent 60%), radial-gradient(700px 400px at 10% 90%, rgba(216, 144, 48, 0.12), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); padding: 48px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-family: 'Montserrat', 'Cairo', sans-serif; font-weight: 900; letter-spacing: 0.01em; }
.hero-art img { mix-blend-mode: screen; margin-inline: auto; width: min(460px, 100%); }
.rule-title { display: flex; align-items: center; gap: 12px; letter-spacing: 0.25em; font-weight: 600; font-size: 0.9rem; margin: 0 0 6px; }
[dir='rtl'] .rule-title { letter-spacing: 0.02em; font-size: 1rem; }
.rule-title span { height: 2px; width: 40px; background: var(--gold); }
.hero-script { font-size: 2rem; }
.services { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 32px; }
.service { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; color: var(--gold); text-transform: uppercase; text-align: center; }
.ring { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; background: radial-gradient(circle, var(--navy), var(--bg)); }
.ring img { width: 32px; height: 32px; }
@media (max-width: 800px) {
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: 220px; }
  .services { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .ring { width: 48px; height: 48px; }
  .ring img { width: 24px; height: 24px; }
  .service { font-size: 0.68rem; }
}

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.feature { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
.feature-cover img, .product-media img { border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line); }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature-cover { max-width: 240px; margin-inline: auto; } }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.2s; }
.card:hover { border-color: var(--line); }
.card-media { aspect-ratio: 16 / 10; background: var(--navy); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.1rem; margin: 8px 0 4px; }
.card-body h3 a { color: var(--text); }
.card-body p { margin: 0 0 12px; font-size: 0.92rem; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.price { color: var(--gold); font-weight: 800; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: rgba(11, 80, 135, 0.5); color: #cfe3f7; margin-inline-end: 6px; }
.badge-soon { background: rgba(216, 144, 48, 0.18); color: var(--gold-hi); }
.badge-muted { background: var(--line-soft); color: var(--muted); }
.is-soon .card-media img { filter: grayscale(0.5) brightness(0.8); }

/* Product */
.product { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
.product-media { position: sticky; top: 90px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } .product-media { position: static; max-width: 280px; margin-inline: auto; } }
.buybox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.buybox .btn { min-width: 200px; }
.price-lg { font-size: 1.8rem; font-weight: 900; color: var(--gold); margin-bottom: 10px; }
.paymethods { height: 28px; width: auto; margin-top: 8px; }
.prose p { color: #dbe4ee; }
.lessons { padding-inline-start: 1.4em; }
.lessons li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 10px; }
.lessons li.current a { color: var(--gold); font-weight: 800; }

/* Learn */
.learn { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
@media (max-width: 900px) { .learn { grid-template-columns: 1fr; } }
.player { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.player video, .player iframe { width: 100%; height: 100%; border: 0; }
.player-empty { display: grid; place-items: center; color: var(--muted); }
.learn-side { background: var(--panel); border-radius: var(--radius); padding: 18px; align-self: start; }

/* About */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
.about-photo { border-radius: 50%; width: 300px; height: 300px; object-fit: cover; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about-photo { width: 220px; height: 220px; margin-inline: auto; } }

/* Forms */
.card-panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; margin-bottom: 14px; }
.form .check { flex-direction: row; align-items: center; margin-top: 28px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid #23415f; border-radius: 9px; padding: 10px 12px; width: 100%; }
input[type=checkbox] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.row2, .row3 { display: grid; gap: 14px; }
.row2 { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) { .row2, .row3 { grid-template-columns: 1fr; } }
.uploader-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.uploader-row input[type=file] { width: auto; flex: 1; min-width: 200px; }
progress { width: 100%; accent-color: var(--gold); }
.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0; border: 1px solid; }
.flash-ok { border-color: #2e7d4f; background: rgba(46, 125, 79, 0.15); }
.flash-error { border-color: #b4483c; background: rgba(180, 72, 60, 0.15); }
.flash-info { border-color: var(--blue-2); background: rgba(0, 96, 168, 0.15); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); margin: 12px 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { background: var(--panel); color: var(--gold); font-weight: 700; }
.status { font-weight: 700; font-size: 0.8rem; padding: 2px 8px; border-radius: 6px; background: var(--line-soft); }
.status-paid, .status-published { color: #7fd6a2; }
.status-failed { color: #f19a8f; }
.status-pending, .status-coming_soon { color: var(--gold-hi); }

/* Account */
.owned { list-style: none; padding: 0; display: grid; gap: 12px; }
.owned-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; background: var(--panel); padding: 12px; border-radius: 12px; }
.owned-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-nav a { padding: 8px 14px; border-radius: 8px; background: var(--panel); color: var(--text); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line-soft); border-inline-start: 4px solid var(--gold); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.stat span { color: var(--muted); font-size: 0.85rem; }
.stat strong { font-size: 1.6rem; }
.mockpay { text-align: center; }
.mockpay form { margin-top: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #010a13; padding-top: 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 170px 1.2fr 1fr 1fr; gap: 28px; align-items: start; }
.footer-logo { mix-blend-mode: screen; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; }
.footer-contact h4 { color: var(--gold); margin: 0 0 6px; }
.footer-bottom { border-top: 1px solid var(--line-soft); margin-top: 20px; padding-top: 14px; padding-bottom: 20px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; text-align: center; } .footer-logo { margin-inline: auto; width: 130px; } }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }

/* Official social accounts */
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social-link { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none !important; transition: border-color 0.2s, background 0.2s; min-height: 48px; }
[dir='rtl'] .social-link { padding: 8px 8px 8px 14px; }
.social-link:hover, .social-link:focus-visible { border-color: var(--gold); background: #0d2c4d; }
.social-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.social-icon { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center; color: var(--gold); background: radial-gradient(circle, var(--navy), var(--bg)); }
.social-icon svg { width: 18px; height: 18px; }
.social-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.social-text strong { font-size: 0.95rem; }
.social-text span { font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.social-compact { flex-direction: column; gap: 6px; }
.social-compact .social-link { border: 0; background: none; padding: 2px 0; min-height: 40px; }
.social-compact .social-link:hover strong { color: var(--gold); }
.about .social { margin-top: 10px; }
.follow { border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(0, 48, 96, 0.55), rgba(2, 14, 26, 0.9)); padding: 28px 0; }
.follow-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.follow-copy { min-width: 0; }
.follow h2 { font-size: 1.25rem; margin: 0 0 4px; }
.follow-copy p { margin: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .follow-row { flex-direction: column; align-items: stretch; text-align: center; }
  .follow .social { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-social .social-compact { align-items: center; }
}
.lessons .badge { white-space: nowrap; align-self: center; flex: none; }
.about-points { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.about-points li { position: relative; padding-inline-start: 22px; color: #dbe4ee; }
.about-points li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.65em; width: 10px; height: 2px; background: var(--gold); }

/* Book offer (Gumroad), course plan, share bar — 2026-10-11 */
.badge-ready { background: rgba(46, 125, 79, 0.25); color: #8fe0b0; }
.btn-buy { min-width: 220px; font-size: 1.05rem; }
[dir='rtl'] .book-alt[dir='ltr'] { text-align: right; }
[dir='ltr'] .book-alt[dir='rtl'] { text-align: left; }
.book-alt { color: var(--silver); font-weight: 700; margin: -0.3em 0 0.8em; font-size: 1rem; }
.book-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.book-price-row .price-lg { margin: 0; }
.buybox-book .btn { width: 100%; max-width: 360px; }
.buybox-book p { margin: 10px 0 0; }
.learn-side .buybox-book { padding: 14px; }
.learn-side .buybox-book .price-lg { font-size: 1.4rem; }
.learn-side .buybox-book .btn { min-width: 0; }
.side-cover { width: 140px; border-radius: 6px; margin: 4px 0 8px; box-shadow: 0 0 0 1px var(--line); }
.checks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.checks li { position: relative; padding-inline-start: 26px; color: #dbe4ee; }
.checks li::before { content: '✓'; position: absolute; inset-inline-start: 0; top: 0; color: var(--gold); font-weight: 900; }
.toc td.wrap-cell { white-space: normal; }
.plain { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.related { margin-top: 28px; }
.mt { margin-top: 36px; }
.code { font-family: 'Montserrat', sans-serif; color: var(--gold); font-weight: 800; }
.course-hero { border-color: var(--line); background: linear-gradient(120deg, rgba(0, 48, 96, 0.6), var(--panel)); }
.module { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; margin-bottom: 10px; padding: 4px 16px; }
.module[open] { border-color: var(--line); }
.module summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.module-n { color: var(--gold); margin-inline-end: 6px; }
.module .lessons { margin-top: 0; }
.key-lesson { border-inline-start: 4px solid var(--gold); background: var(--panel); padding: 12px 16px; border-radius: 8px; margin: 0 0 20px; }
.player-poster { position: relative; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.22) blur(1px); }
.poster-note { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; }
.poster-note p { margin: 0; max-width: 460px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 22px; }
.share-label { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.share-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; text-decoration: none !important; }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--gold); color: var(--gold-hi); }
.share-btn[hidden] { display: none; }
.learn-main h1 .code { font-size: 0.8em; }
@media (max-width: 600px) { .btn-buy { width: 100%; } .actions .btn { flex: 1 1 100%; } }
