/* "Glow" look (2026-11-11, his request, inspired by mymanager.com): starry night background, soft rounded glass cards,
   pill buttons with a light glow, gradient small titles, a glass header and a footer card.
   Brand colours only: black #07080C, red #E4002B, blue #1F6BFF, white. Font stays Cairo. Loaded LAST on every page.
   To go back to the old cut-corner look, remove the <link> to this file. */

:root {
  /* every card and pill used these cut shapes; now they become rounded */
  --cut: inset(0 round 22px);
  --lean: inset(0 round 999px);
  --panel: rgba(13,16,28,.78);
  --line: rgba(120,150,255,.14);
  --edge: inset 0 0 0 1px rgba(120,150,255,.16), inset 0 1px 0 rgba(var(--ink), .06);
  --glow-grad: linear-gradient(120deg, #E4002B 0%, #1F6BFF 100%);
}

/* ---------- starry background (sits above the moving aura, under the page) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(var(--ink), .55), transparent 70%),
    radial-gradient(1px 1px at 151px 97px, rgba(var(--ink), .35), transparent 70%),
    radial-gradient(1.4px 1.4px at 271px 213px, rgba(110,160,255,.7), transparent 70%),
    radial-gradient(1px 1px at 97px 263px, rgba(255,110,140,.55), transparent 70%),
    radial-gradient(1px 1px at 331px 31px, rgba(var(--ink), .4), transparent 70%),
    radial-gradient(1.2px 1.2px at 199px 331px, rgba(var(--ink), .45), transparent 70%);
  background-size: 360px 360px, 360px 360px, 470px 470px, 410px 410px, 520px 520px, 390px 390px;
  -webkit-mask-image: linear-gradient(#000, rgba(0,0,0,.55)); mask-image: linear-gradient(#000, rgba(0,0,0,.55));
}

/* ---------- header: no bar behind the logo (it sits on the page), logo on the right and the pages in one row beside it.
   The glass shows only once the page scrolls (footer.js adds .scrolled). No «القائمة» button. ---------- */
nav.hd { background: transparent; border-bottom: 1px solid transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .25s, border-color .25s; }
nav.hd.scrolled { background: rgba(var(--paper), .6); border-bottom-color: var(--line); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.hd .menu-btn { display: none !important; }
nav.hd .hd-top { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 20px; height: 84px; min-height: 0; max-width: 1760px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 48px); }
nav.hd .brand img { height: 60px; width: auto; background: none; }
.hd .links, .hd .links.open {
  display: flex; position: static; flex: 0 1 auto; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 2px; width: auto; min-width: 0;
  padding: 5px; border-radius: 999px; background: rgba(var(--ink), .04); box-shadow: inset 0 0 0 1px var(--line);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hd .links::-webkit-scrollbar { display: none; }
.hd .links a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--soft, #C9D0DB); transition: color .2s, background .2s; }
.hd .links a + a { border-top: 0; }
.hd .links a::after { display: none; }
.hd .links a:hover { color: var(--fg); background: rgba(var(--ink), .07) !important; }
.hd .links a[aria-current] { color: #fff; background: var(--glow-grad) !important; box-shadow: 0 6px 18px rgba(31,107,255,.3); }
.hd .who { flex: none; margin-inline-start: auto; }
@media (max-width: 1100px) { .hd .links a { padding: 7px 11px; font-size: 13px; } }
/* phones: the row goes under the logo and slides sideways with the finger */
@media (max-width: 760px) {
  nav.hd .hd-top { flex-wrap: wrap; height: auto; gap: 0; padding-block: 6px 10px; }
  nav.hd .brand img { height: 52px; }
  .hd .links, .hd .links.open { order: 3; flex-basis: 100%; margin-top: 6px; }
}

/* ---------- section titles: gradient label, soft line ---------- */
.kicker { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.kicker::before { width: 26px; height: 3px; border-radius: 3px; transform: none; background: var(--glow-grad); box-shadow: none; }
.sec-no { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; letter-spacing: 2px;
  color: #fff; background: linear-gradient(120deg, rgba(228,0,43,.22), rgba(31,107,255,.22)); box-shadow: inset 0 0 0 1px rgba(120,150,255,.25); }
.sec-head { border-bottom: 0; position: relative; }
.sec-head::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(31,107,255,.45), rgba(228,0,43,.45), transparent); }
h1 em::before { transform: none; border-radius: .3em; background: var(--glow-grad); box-shadow: 0 .2em .6em rgba(31,107,255,.3); }

/* ---------- cards: glass with a thin blue edge and a soft drop ---------- */
.empty, .rows, .money, .mkc, .vs, .nwc, .ofc, .vdc, .lb, .bank, .slip, .chart-card, .tile, .how div {
  background: linear-gradient(135deg, rgba(18,22,40,.86), rgba(7,9,18,.84));
}
a.mkc, a.nwc, a.vdc, a.bank, .ofc, .slip { transition: transform .25s ease, box-shadow .25s ease; }
a.mkc:hover, a.nwc:hover, a.vdc:hover, a.bank:hover, .ofc:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px rgba(31,107,255,.45), inset 0 1px 0 rgba(var(--ink), .08);
}
.nw-img, .vd-img, .nw-ph { border-radius: 16px; }
.ticket { border-radius: 22px; }

/* ---------- buttons and pills ---------- */
.btn, .btn.sm, .more { border-radius: 999px; transition: background .2s, transform .2s, box-shadow .2s; }
.btn.red, button.btn.red {
  clip-path: none; border-radius: 999px; background: var(--glow-grad); color: #fff;
  box-shadow: 0 14px 34px rgba(31,107,255,.32), 0 6px 18px rgba(228,0,43,.25);
}
.btn.red:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 18px 44px rgba(31,107,255,.42), 0 8px 22px rgba(228,0,43,.3); }
.btn:not(.red) { box-shadow: inset 0 0 0 1px rgba(120,150,255,.25); }
.btn:not(.red):hover { background: rgba(31,107,255,.16); }
.more { box-shadow: inset 0 0 0 1px rgba(120,150,255,.2); }
.more:hover { background: rgba(31,107,255,.16); }
.chip.on { background: #fff; color: #07080C; }

/* ---------- newsletter: the big call-to-action panel ---------- */
.nl {
  clip-path: none; border-radius: 28px;
  background:
    radial-gradient(600px 260px at 90% 0%, rgba(228,0,43,.20), transparent 70%),
    radial-gradient(600px 260px at 10% 100%, rgba(31,107,255,.22), transparent 70%),
    linear-gradient(135deg, rgba(18,22,40,.9), rgba(7,9,18,.88));
  box-shadow: inset 0 0 0 1px rgba(120,150,255,.22), 0 30px 80px rgba(3,6,24,.55);
}
.nl-row input { border-radius: 999px; padding: 0 20px; }
.nl-row input:focus { box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 4px rgba(31,107,255,.18); outline: 0; }

/* ---------- footer: a rounded card ---------- */
#site-footer { background: transparent; border-top: 0; box-shadow: none; }
#site-footer .sf {
  max-width: calc(1760px - 2 * clamp(16px, 3vw, 48px)); margin-inline: clamp(16px, 3vw, 48px); padding: 30px clamp(18px, 3vw, 36px);
  border-radius: 28px; background: linear-gradient(135deg, rgba(18,22,40,.86), rgba(7,9,18,.84));
  box-shadow: inset 0 0 0 1px rgba(120,150,255,.16), 0 24px 60px rgba(3,6,24,.45);
}
@media (min-width: 1856px) { #site-footer .sf { margin-inline: auto; } }

@media (prefers-reduced-motion: reduce) {
  a.mkc:hover, a.nwc:hover, a.vdc:hover, a.bank:hover, .ofc:hover, .btn.red:hover { transform: none; }
}

/* ---------- «كيفاش نلعبو» on the home page: a short teaser, the full lesson stays on /lesson/<id> (2026-11-11) ---------- */
.mks.home .mkc-ex { display: none; }
.mks.home .mkc p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mks.home .mkc em { margin-top: auto; }
.mks.home .mkc-img { aspect-ratio: 21 / 9; }
.mks.home + .more.wide { display: flex !important; } /* only a few lessons show now, so the "all lessons" button shows on every screen */

/* ---------- /record numbers: separate glass cards (like the metric cards on mymanager.com) ---------- */
.tiles { gap: 12px; border-block: 0; }
.tile, .tile.w, .tile.l {
  position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(18,22,40,.86), rgba(7,9,18,.84));
  box-shadow: inset 0 0 0 1px rgba(120,150,255,.16), inset 0 1px 0 rgba(var(--ink), .06), 0 18px 36px rgba(3,6,24,.4);
}
.tile + .tile, .tile:nth-child(n) { border: 0; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, rgba(var(--ink), .25), transparent); }
.tile.w::before { background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.tile.l::before { background: linear-gradient(90deg, transparent, var(--red), transparent); }
.tile span { display: block; margin-top: 2px; line-height: 1.5; }
@media (max-width: 760px) { .tiles { gap: 8px; } .tile, .tile.w, .tile.l { padding: 14px 12px 12px; border-radius: 16px; } }

/* ---------- home hero: the profit card has no box (it sits on the page) and its graph is animated ---------- */
.money.wl, .money.wl.down { background: transparent !important; box-shadow: none; clip-path: none; padding-inline: 4px; }
.money.wl .wl-row { border-top: 1px solid var(--line); }
.sp-wrap { position: relative; }
.sp-wrap svg { display: block; overflow: visible; }
.sp-wrap .sp-line { filter: drop-shadow(0 0 6px currentColor); }
.motion #spark.drawn { animation: spDraw 1.6s cubic-bezier(.3,.6,.2,1) both; }
.motion #spark.drawn .sp-area { animation: spFade 1.2s .6s both; }
@keyframes spDraw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes spFade { from { opacity: 0; } to { opacity: 1; } }
.sp-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c, var(--blue)); box-shadow: 0 0 0 0 var(--c, var(--blue)); pointer-events: none; }
.sp-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--c, var(--blue)); opacity: 0; }
.motion .sp-dot { animation: spFade .3s 1.5s both; }
.motion .sp-dot::after { animation: spPulse 1.8s 1.6s ease-out infinite; }
@keyframes spPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #spark.drawn, #spark.drawn .sp-area, .sp-dot, .sp-dot::after { animation: none !important; } }

/* ---------- privacy / terms: inside the site (header, footer, background), text in glass cards ---------- */
body.legal main { max-width: 860px; padding-top: 36px; }
body.legal main > section {
  margin-top: 18px; padding: 26px clamp(18px, 4vw, 34px) 28px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(18,22,40,.86), rgba(7,9,18,.84));
  box-shadow: inset 0 0 0 1px rgba(120,150,255,.16), inset 0 1px 0 rgba(var(--ink), .06), 0 24px 60px rgba(3,6,24,.45);
}
body.legal h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 4px; }
body.legal h2 { font-size: 20px; margin: 22px 0 4px; }
body.legal h2::before { display: none; }
body.legal hr { display: none; }
body.legal main a { color: #8FB4FF; }

/* ---------- page width (his request 2026-11-11, after the full-width try): content stops at 1040px with space on the right and left ---------- */
:root { --page: 1040px; --pad: clamp(16px, 4vw, 64px); }
.wrap, nav.hd .hd-top { max-width: calc(var(--page) + 2 * var(--pad)); padding-inline: var(--pad); margin-inline: auto; }
#site-footer .sf { max-width: var(--page); width: calc(100% - 2 * var(--pad)); margin-inline: auto; }
#site-footer .sf-end { max-width: calc(var(--page) + 2 * var(--pad)); padding-inline: var(--pad); }
/* with the narrower page all 10 links must still fit beside the logo */
nav.hd .hd-top { gap: 14px; }
.hd .links { gap: 0; padding: 4px; }
.hd .links a { padding: 7px 9px; font-size: 13px; }

/* ---------- phones (2026-11-11): the logo and the pages stay on ONE row, like on a computer.
   Smaller logo; the row slides sideways and fades at its left end so it's clear there are more pages. ---------- */
@media (max-width: 760px) {
  nav.hd .hd-top { flex-wrap: nowrap; height: 64px; gap: 10px; padding-block: 0; }
  nav.hd .brand img { height: 42px; }
  .hd .links, .hd .links.open { order: 0; flex: 1 1 auto; flex-basis: auto; margin-top: 0; padding: 3px;
    -webkit-mask-image: linear-gradient(to left, #000 90%, transparent); mask-image: linear-gradient(to left, #000 90%, transparent); }
  .hd .links a { padding: 6px 10px; font-size: 13px; }
  .hd .who { margin-inline-start: 0; }
}

/* ---------- phones, community page (account buttons in the header): logo + account on the first row, the pages on a full row under them,
   so the links never get squeezed (2026-11-11) ---------- */
@media (max-width: 760px) {
  nav.hd.has-who .hd-top { flex-wrap: wrap; height: auto; padding-block: 8px 10px; row-gap: 8px; }
  nav.hd.has-who .who { margin-inline-start: auto; gap: 6px; }
  nav.hd.has-who .links, nav.hd.has-who .links.open { order: 3; flex: 1 1 100%; }
}
/* on computers too: with the account buttons there is no room for all 10 pages beside the logo, so the pages take their own row */
nav.hd.has-who .hd-top { flex-wrap: wrap; height: auto; padding-block: 10px 12px; row-gap: 10px; }
nav.hd.has-who .who { margin-inline-start: auto; }
nav.hd.has-who .links, nav.hd.has-who .links.open { order: 3; flex: 1 1 100%; justify-content: flex-start; }
