@font-face{font-family:'Plex Arabic';font-style:normal;font-weight:400;font-display:swap;src:url(../assets/fonts/plex-arabic-400-arabic.woff2) format('woff2');unicode-range:U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;}
@font-face{font-family:'Plex Arabic';font-style:normal;font-weight:400;font-display:swap;src:url(../assets/fonts/plex-arabic-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Plex Arabic';font-style:normal;font-weight:500;font-display:swap;src:url(../assets/fonts/plex-arabic-500-arabic.woff2) format('woff2');unicode-range:U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;}
@font-face{font-family:'Plex Arabic';font-style:normal;font-weight:500;font-display:swap;src:url(../assets/fonts/plex-arabic-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Plex Arabic';font-style:normal;font-weight:700;font-display:swap;src:url(../assets/fonts/plex-arabic-700-arabic.woff2) format('woff2');unicode-range:U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;}
@font-face{font-family:'Plex Arabic';font-style:normal;font-weight:700;font-display:swap;src:url(../assets/fonts/plex-arabic-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
/* ============================================================
   مقياس موطن الابتكار — الواجهة 0.2
   فاتحة وهادئة ومركزة: خلفية ورقية دافئة، حبر نيلي، بنفسجي الهوية،
   ولون ثابت لكل عامل. خط IBM Plex Sans Arabic مضمن (يعمل بلا إنترنت).
   ============================================================ */
:root {
  --paper: #F7F6F3; --paper2: #EFEDE7; --surface: #FFFFFF;
  --ink: #14172B; --ink2: #3A3F58; --mute: #6B7088; --line: #E3E0D8; --line2: #D3CFC4;
  --brand: #6D4AFF; --brand-d: #4F2FE0; --brand-t: #EEEAFF;
  --cyan: #38D9E8; --mint: #7EF0C1;
  --good: #0E9F6E; --good-t: #E3F6EE; --warn: #B25E00; --warn-t: #FFF3DD; --bad: #C2334D; --bad-t: #FCE9EC;
  --fr: #6D4AFF; --kn: #E08A00; --qr: #0FA38F; --vs: #2F6FED; --wm: #E0457B;
  --r: 18px; --r-sm: 12px;
  --sh1: 0 1px 2px rgba(20, 23, 43, .05), 0 1px 1px rgba(20, 23, 43, .03);
  --sh2: 0 2px 4px rgba(20, 23, 43, .04), 0 12px 32px -8px rgba(20, 23, 43, .12);
  --font: 'Plex Arabic', 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.75; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 24px 48px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.num, .qn, .facts b, .lvl-num { font-variant-numeric: tabular-nums; }

/* ---------- الرأس ---------- */
.top { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; width: 100%; margin: 0 auto; padding: 18px 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { height: 40px; width: auto; }
.brand b { display: block; font-size: 16px; line-height: 1.3; }
.brand small { display: block; font-size: 13px; color: var(--mute); line-height: 1.3; }
.badge { font-size: 12.5px; color: var(--ink2); background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; border-radius: 99px; }
body[data-screen="test"] .top, body[data-screen="test"] .foot { display: none; }
.foot { text-align: center; color: var(--mute); font-size: 13px; padding: 24px; }

/* ---------- الشاشات ---------- */
.screen { display: none; }
.screen.on { display: block; animation: rise .35s ease both; }
.narrow { max-width: 600px; margin: 0 auto; padding-top: 4vh; }
.wide { max-width: 980px; margin: 0 auto; }
.center { text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 14px; padding: 13px 24px; font-weight: 700; font-size: 16.5px; cursor: pointer; text-decoration: none; transition: background .15s, transform .08s, box-shadow .15s; min-height: 52px; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 6px 18px -6px rgba(20, 23, 43, .45); }
.btn.primary:hover { background: #262A45; }
.btn.primary:disabled { background: var(--line2); color: #fff; box-shadow: none; cursor: not-allowed; }
.btn.lg { font-size: 18px; padding: 15px 30px; min-height: 58px; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line2); font-weight: 500; }
.btn.ghost:hover { border-color: var(--ink2); }
.btn.danger { color: var(--bad); }
.btn .svgi { width: 20px; height: 20px; }
.block-btn { width: 100%; margin-top: 28px; }
.btn .ic { display: inline-grid; } .btn .ic svg { width: 20px; height: 20px; }
.link { background: none; border: 0; color: var(--ink2); cursor: pointer; padding: 6px 0; font-size: 15px; }
.link:hover { color: var(--ink); text-decoration: underline; }

/* ---------- الصفحة الأولى ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 5vh 0 7vh; }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--brand-d); margin-bottom: 10px; }
h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.2; margin-bottom: 18px; }
.hl { background: linear-gradient(100deg, var(--brand) 0%, #2FB8E0 60%, #36D3A6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--ink2); max-width: 520px; }
.facts { list-style: none; display: flex; gap: 12px; padding: 0; margin: 28px 0 30px; flex-wrap: wrap; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 16px; display: flex; align-items: baseline; gap: 8px; box-shadow: var(--sh1); }
.facts b { font-size: 22px; } .facts span { color: var(--mute); font-size: 14.5px; }
.fine { color: var(--mute); font-size: 14px; margin-top: 12px; }
.returning { background: var(--brand-t); color: var(--brand-d); border-radius: var(--r-sm); padding: 12px 16px; font-size: 15px; margin-bottom: 18px; max-width: 520px; }
.returning b { color: var(--ink); }

.hero-art { position: relative; min-height: 420px; display: flex; align-items: center; justify-content: center; }
.hero-art::before { content: ''; position: absolute; inset: 6% 4%; border-radius: 40px; background: radial-gradient(60% 60% at 30% 30%, rgba(124, 92, 255, .18), transparent 70%), radial-gradient(50% 50% at 75% 75%, rgba(56, 217, 232, .2), transparent 70%), radial-gradient(40% 40% at 70% 20%, rgba(126, 240, 193, .22), transparent 70%); filter: blur(4px); }
.px { position: absolute; border-radius: 4px; opacity: .85; animation: float 6s ease-in-out infinite; }
.px:nth-child(2n) { animation-delay: -2s; } .px:nth-child(3n) { animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px); } }
.demo-card { position: relative; background: var(--surface); border-radius: 24px; box-shadow: var(--sh2); padding: 18px 18px 16px; width: min(380px, 100%); border: 1px solid var(--line); }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px; }
.demo-head span { font-weight: 700; } .demo-head small { color: var(--mute); font-size: 12.5px; }
.demo-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; font-size: 12.5px; color: var(--ink2); }
.demo-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--c); margin-inline-end: 6px; }

.block { padding: 28px 0; border-top: 1px solid var(--line); }
.sec-title { font-size: 24px; margin-bottom: 20px; }
.fgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.fitem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh1); }
.fitem .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); margin-bottom: 14px; }
.fitem .fi svg { width: 24px; height: 24px; }
.fitem b { display: block; font-size: 16.5px; }
.fitem p { color: var(--mute); font-size: 14px; line-height: 1.6; margin-top: 4px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.steps li { padding: 4px 0; }
.steps span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.steps b { display: block; font-size: 17px; }
.steps p { color: var(--mute); font-size: 14.5px; line-height: 1.65; }
.disclaimer { color: var(--mute); font-size: 13.5px; text-align: center; padding: 24px 0 0; border-top: 1px solid var(--line); }

/* ---------- التعريف ---------- */
.wizard-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; min-height: 36px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 28px; height: 6px; border-radius: 99px; background: var(--line2); transition: background .2s, width .2s; }
.dots i.on { background: var(--ink); width: 40px; }
.dots i.done { background: var(--ink2); }
.wstep { display: none; }
.wstep.on { display: block; animation: rise .3s ease both; }
.ask { font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; }
.sub { color: var(--mute); font-size: 16px; }
.big-input { display: block; width: 100%; margin-top: 26px; font: inherit; font-size: 26px; font-weight: 500; padding: 16px 20px; border: 2px solid var(--line2); background: var(--surface); border-radius: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.big-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-t); }
.big-input::placeholder { color: #B8B5AC; font-weight: 400; }
.age-row { display: flex; align-items: center; gap: 14px; }
.age-row .age { max-width: 180px; text-align: center; font-size: 34px; }
.age-row span { margin-top: 26px; font-size: 20px; color: var(--ink2); }
.age::-webkit-outer-spin-button, .age::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.age { -moz-appearance: textfield; }
.err { color: var(--bad); font-size: 15px; margin-top: 10px; }
.check-card { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; padding: 16px 18px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.check-card:has(input:checked) { border-color: var(--ink); background: #FBFAF8; }
.check-card input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.check-card b { display: block; font-size: 16.5px; }
.check-card span { color: var(--ink2); font-size: 15px; line-height: 1.6; }
.pledge { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.pledge li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--paper2); border-radius: 14px; }
.pledge .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; color: var(--ink); }
.pledge .ic svg { width: 20px; height: 20px; }
.pledge b { display: block; }
.pledge span { color: var(--ink2); font-size: 15px; line-height: 1.6; }

/* ---------- التعليمات ---------- */
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0 22px; }
.rules div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--sh1); }
.rules .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-t); color: var(--brand-d); margin-bottom: 10px; }
.rules .ic svg { width: 22px; height: 22px; }
.rules b { display: block; font-size: 16.5px; }
.rules p { color: var(--mute); font-size: 14.5px; line-height: 1.6; margin-top: 2px; }

/* ---------- شاشة السؤال (وضع التركيز) ---------- */
#test { max-width: 1040px; margin: 0 auto; padding-top: 18px; }
.testbar { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.segs { flex: 1; display: flex; gap: 3px; }
.segs i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); transition: background .25s; }
.segs i.done { background: var(--ink); }
.segs i.cur { background: var(--brand); }
.segs.practice i { background: var(--line); }
.qn { font-size: 15px; color: var(--ink2); white-space: nowrap; min-width: 64px; text-align: end; }
.qcard { background: var(--surface); border-radius: 24px; box-shadow: var(--sh2); border: 1px solid var(--line); padding: 28px 32px 30px; }
.qcard.enter { animation: qin .28s ease both; }
@keyframes qin { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.qhead { margin-bottom: 20px; }
.ftag { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--c, var(--ink2)); background: color-mix(in srgb, var(--c, #6B7088) 11%, #fff); padding: 3px 12px 3px 10px; border-radius: 99px; margin-bottom: 10px; }
.ftag svg { width: 16px; height: 16px; }
.ftag.practice { --c: #B25E00; }
#qtitle { font-size: clamp(22px, 2.6vw, 28px); }
.hint { color: var(--ink2); font-size: 16px; margin-top: 4px; max-width: 760px; }
.qbody { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.qbody.solo .optwrap { max-width: 720px; margin: 0 auto; width: 100%; }
.qbody.solo { grid-template-columns: 1fr; }
.stage { background: #FAFAF8; border: 1px solid var(--line); border-radius: 18px; padding: 22px; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #0F172A; position: relative; overflow: hidden; }
.stage.empty { display: none; }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.opts.n3 { grid-template-columns: repeat(3, 1fr); }
.opts button { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; min-height: 92px; padding: 14px 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 18px; color: #0F172A; transition: border-color .12s, background .12s, transform .08s, box-shadow .12s; box-shadow: var(--sh1); }
.opts button:hover { border-color: var(--ink2); }
.opts button:active { transform: scale(.98); }
.opts button .key { position: absolute; top: 7px; inset-inline-start: 9px; font-size: 12px; font-weight: 700; color: var(--mute); width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--paper); }
.opts button.picked { border-color: var(--brand); background: var(--brand-t); box-shadow: 0 0 0 4px rgba(109, 74, 255, .15); }
.opts button.picked .key { background: var(--brand); color: #fff; }
.opts button.right { border-color: var(--good); background: var(--good-t); }
.opts button.right .key { background: var(--good); color: #fff; }
.opts button.wrong { border-color: var(--bad); background: var(--bad-t); }
.opts[data-locked] button:not(.picked):not(.right) { opacity: .55; }
.opts.opt-text button { font-size: 17px; min-height: 68px; line-height: 1.55; padding: 14px 34px 14px 16px; }
.opts.opt-num button { min-height: 76px; }
.opts.opt-seq { grid-template-columns: 1fr 1fr; }
.opts.opt-seq button { min-height: 70px; padding: 14px 40px 14px 14px; }
.opts .chain { flex-wrap: nowrap; gap: 5px; }
.opts .num { font-size: 24px; font-weight: 700; }
.opts .num + small { color: var(--mute); font-size: 15px; }
.fb { margin-top: 14px; padding: 16px 18px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 16px; animation: rise .25s ease both; }
.fb b { display: block; }
.fb.good { background: var(--good-t); } .fb.bad { background: var(--warn-t); }
.fb .btn { flex: none; }
.keyhint { text-align: center; color: var(--mute); font-size: 13px; margin-top: 14px; }

/* عرض الذاكرة: عد تنازلي ثم شريط مدة العرض */
.memo-ready { text-align: center; }
.memo-ready b { display: block; font-size: 20px; }
.memo-ready span { color: var(--mute); font-size: 15px; }
.cd { width: 92px; height: 92px; margin: 0 auto 14px; position: relative; }
.cd svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cd circle { fill: none; stroke-width: 7; }
.cd .c0 { stroke: var(--line); } .cd .c1 { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 251; animation: cd var(--d, 1.6s) linear both; }
@keyframes cd { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 251; } }
.expo { position: absolute; bottom: 0; inset-inline: 0; height: 5px; background: var(--line); }
.expo i { display: block; height: 100%; background: var(--brand); animation: expo var(--d) linear both; transform-origin: right; }
@keyframes expo { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.memo-gone { color: var(--mute); font-size: 16px; }

/* ---------- المثيرات (يولدها gen.js) ---------- */
.matrix { display: grid; grid-template-columns: repeat(3, 96px); gap: 8px; }
.mcell { width: 96px; height: 96px; background: #fff; border: 1px solid #DAD7CF; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.mcell.q { font-size: 42px; color: var(--brand); font-weight: 700; background: var(--brand-t); border: 2px dashed rgba(109, 74, 255, .45); }
.chain { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; direction: rtl; }
.chip { min-width: 52px; padding: 8px 12px; text-align: center; background: #fff; border: 1px solid #DAD7CF; border-radius: 12px; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.opts .chip { font-size: 18px; min-width: 34px; padding: 2px 7px; border-radius: 8px; }
.arr { color: #9A968B; font-size: 18px; }
.opts .arr { font-size: 13px; }
.problem { font-size: 21px; line-height: 1.95; max-width: 560px; text-align: center; font-weight: 500; }
.hint-stage { color: #475569; font-size: 14px; }
.scales { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.scale { width: 260px; height: 120px; }
.qline { font-size: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.qc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 520px; }
.qc div { background: #fff; border: 1px solid #DAD7CF; border-radius: 14px; padding: 16px 12px; text-align: center; font-size: 22px; }
.qc b { display: block; color: var(--brand-d); font-size: 14px; margin-bottom: 4px; }
.cards { display: flex; align-items: center; gap: 14px; } .plus { font-size: 30px; color: #6B7088; }
svg.card { background: #fff; border: 1px solid #DAD7CF; border-radius: 12px; }
.target { background: #fff; border: 1px dashed #A8A496; border-radius: 12px; padding: 10px; }
.target .fig { width: 140px; height: 140px; }
.nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: center; }
.navgrid { width: 230px; height: 230px; }
.moves { display: flex; flex-wrap: wrap; gap: 8px; max-width: 260px; direction: rtl; justify-content: center; }
.mv { position: relative; width: 40px; height: 40px; background: #fff; border: 1px solid #DAD7CF; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #2563EB; }
.mv i { position: absolute; top: -9px; inset-inline-start: -6px; font-style: normal; font-size: 10px; background: var(--ink); color: #fff; border-radius: 99px; min-width: 17px; height: 17px; line-height: 17px; text-align: center; }
.cmds { font-size: 18px; margin: 0; padding-inline-start: 22px; line-height: 1.9; }
.flash { font-size: 84px; font-weight: 700; color: var(--ink); min-height: 120px; display: flex; align-items: center; font-variant-numeric: tabular-nums; }
.flash.sm { font-size: 26px; font-weight: 500; } .flash.sm b { color: var(--brand); font-size: 38px; margin-inline-start: 10px; }
.flash.dim { color: #D3CFC4; }

/* ---------- التقرير ---------- */
.rhero { display: grid; grid-template-columns: 1fr 400px; grid-template-areas: 'info chart' 'act chart'; gap: 0 32px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 32px 36px; box-shadow: var(--sh2); position: relative; overflow: hidden; }
.rinfo { grid-area: info; align-self: end; } .rchart { grid-area: chart; } .ractions { grid-area: act; align-self: start; }
.rlogo { height: 72px; margin-bottom: 18px; }
.rtitle { font-size: 15px; color: var(--brand-d); font-weight: 500; margin-bottom: 4px; }
.rname { font-size: clamp(30px, 4vw, 42px); line-height: 1.25; }
.rmeta { color: var(--mute); font-size: 14.5px; margin-top: 6px; }
.rsum { font-size: 19px; line-height: 1.8; color: var(--ink2); margin-top: 22px; max-width: 520px; }
.rsum b { color: var(--ink); }
.rlegend { display: flex; gap: 16px; justify-content: center; font-size: 13px; color: var(--mute); margin-top: 4px; flex-wrap: wrap; }
.rlegend span::before { content: ''; display: inline-block; width: 16px; height: 0; border-top: 2px dashed var(--c); vertical-align: middle; margin-inline-end: 6px; }
.rlegend .lg-you::before { border-top: 3px solid var(--brand); }
.ractions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.radar { width: 100%; height: auto; overflow: visible; }
.radar .rg { fill: none; stroke: #E8E5DD; stroke-width: 1; }
.radar .rg.outer { stroke: #D3CFC4; fill: #FCFBF9; }
.radar .rx { stroke: #E8E5DD; stroke-width: 1; }
.radar .rshape { fill: rgba(109, 74, 255, .16); stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; }
.radar .rmean { fill: none; stroke: #E0A33A; stroke-width: 1.6; stroke-dasharray: 5 4; }
.radar .rprev { fill: none; stroke: #8E93A8; stroke-width: 1.6; stroke-dasharray: 3 4; }
.radar .rdot { stroke: #fff; stroke-width: 2.5; }
.radar .rl { font-family: var(--font); font-size: 13.5px; font-weight: 500; fill: var(--ink2); }
.radar .rv { font-family: var(--font); font-size: 14px; font-weight: 700; }

.alert { display: flex; gap: 14px; align-items: flex-start; background: var(--warn-t); border: 1px solid #F1D29A; border-radius: 18px; padding: 16px 20px; margin-top: 18px; color: #6B3D00; }
.alert .ic { flex: none; } .alert svg { width: 22px; height: 22px; }

.rsec { margin-top: 40px; }
.rsec > h3 { font-size: 24px; margin-bottom: 6px; }
.rsec > .sub { margin-bottom: 18px; }
.fcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; }
.fcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh1); display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--c); }
.fcard .fh { display: flex; align-items: center; gap: 10px; }
.fcard .fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); flex: none; }
.fcard .fi svg { width: 20px; height: 20px; }
.fcard .fn { font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.fcard .fen { color: var(--mute); font-size: 11.5px; letter-spacing: .3px; display: block; font-weight: 400; }
.lvl { display: flex; align-items: baseline; gap: 8px; }
.lvl-num { font-size: 34px; font-weight: 700; line-height: 1; }
.lvl-name { color: var(--ink2); font-size: 15px; }
.meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; direction: rtl; }
.meter i { height: 8px; border-radius: 99px; background: var(--paper2); position: relative; overflow: hidden; }
.meter i b { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--c); border-radius: 99px; }
.ftags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 26px; }
.tag { font-size: 12.5px; padding: 2px 10px; border-radius: 99px; background: var(--paper2); color: var(--ink2); }
.tag.up { background: #E3F6EE; color: #0B6E4D; } .tag.down { background: var(--warn-t); color: #8A4B00; }
.dl { font-size: 12.5px; color: var(--mute); } .dl.up { color: #0B6E4D; } .dl.down { color: #8A4B00; }
.scale-note { color: var(--mute); font-size: 13.5px; margin-top: 12px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pcol h4 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 12px; }
.pcol h4 svg { width: 22px; height: 22px; }
.pcol.up h4 { color: #0B6E4D; } .pcol.down h4 { color: #8A4B00; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sh1); border-inline-start: 4px solid var(--c); }
.pcard + .pcard { margin-top: 12px; }
.pcard .pn { font-weight: 700; font-size: 17px; }
.pcard .what { color: var(--mute); font-size: 14.5px; line-height: 1.65; margin-top: 2px; }
.pcard .say { margin-top: 10px; font-size: 16px; }
.pcard ul { padding-inline-start: 20px; margin: 10px 0 0; font-size: 15.5px; line-height: 1.7; }
.pcard li + li { margin-top: 4px; }

.weeks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: w; }
.week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh1); position: relative; }
.week .wn { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--mute); margin-bottom: 8px; }
.week .wn i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-style: normal; font-size: 14px; }
.week .wf { font-weight: 700; font-size: 15.5px; color: var(--c, var(--ink)); margin-bottom: 4px; }
.week p { font-size: 15px; line-height: 1.65; color: var(--ink2); }
.transfer { color: var(--mute); font-size: 14px; margin-top: 14px; }

.howto { background: var(--paper2); border-radius: var(--r); padding: 20px 24px; }
.howto h3 { font-size: 18px; margin-bottom: 6px; }
.howto p { color: var(--ink2); font-size: 15px; line-height: 1.8; }

.manage { border-top: 1px solid var(--line); padding-top: 28px; }
.manage h3 { font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.raw { margin-top: 16px; color: var(--mute); font-size: 14px; }
.raw summary { cursor: pointer; }
.raw pre { direction: ltr; text-align: left; max-height: 300px; overflow: auto; background: var(--surface); border: 1px solid var(--line); padding: 12px; border-radius: 12px; font-size: 11px; }

/* ---------- الاستراحة ---------- */
.ring { width: 150px; height: 150px; margin: 0 auto 24px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .r0 { stroke: var(--line); }
.ring .r1 { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 163.5; animation: half 1s ease both; }
@keyframes half { from { stroke-dashoffset: 327; } }
.ring b { position: absolute; inset: 0; display: grid; place-content: center; font-size: 38px; line-height: 1.1; }
.ring small { font-size: 14px; color: var(--mute); font-weight: 400; }
#break .btn { margin-top: 28px; }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 12px; padding-top: 3vh; }
  .hero-art { min-height: 360px; order: 2; }
  .fgrid { grid-template-columns: repeat(2, 1fr); }
  .fgrid .fitem:last-child { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; gap: 18px; }
  .qbody { grid-template-columns: 1fr; gap: 18px; }
  .rhero { grid-template-columns: 1fr; grid-template-areas: 'info' 'chart' 'act'; padding: 26px 22px; gap: 18px; }
  .ractions { margin-top: 0; } .ractions .btn { flex: 1 1 100%; }
  .rhero .rchart { max-width: 360px; margin: 0 auto; width: 100%; }
  .weeks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 4px 16px 32px; }
  .top { padding: 14px 16px; }
  .brand img { height: 34px; }
  .lead { font-size: 17px; }
  .facts { gap: 8px; } .facts li { flex: 1; flex-direction: column; align-items: center; gap: 0; padding: 8px 6px; text-align: center; } .facts b { font-size: 21px; line-height: 1.3; } .facts span { font-size: 13px; }
  .btn.lg { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  #test { padding-top: 10px; }
  .testbar { margin-bottom: 12px; }
  .qcard { padding: 18px 16px 20px; border-radius: 20px; }
  .qhead { margin-bottom: 14px; }
  .stage { padding: 14px 10px; min-height: 0; border-radius: 14px; }
  .opts { gap: 10px; }
  .opts button { min-height: 80px; }
  .opts.opt-text, .opts.opt-seq { grid-template-columns: 1fr; }
  .opts.n3 { grid-template-columns: repeat(2, 1fr); }
  .matrix { grid-template-columns: repeat(3, 80px); gap: 6px; } .mcell { width: 80px; height: 80px; } .mcell svg { width: 70px; height: 70px; }
  .scale { width: 230px; height: 106px; }
  .flash { font-size: 66px; }
  .keyhint { display: none; }
  .two { grid-template-columns: 1fr; }
  .weeks { grid-template-columns: 1fr; }
  .fcards { grid-template-columns: 1fr 1fr; }
  .lvl-num { font-size: 28px; }
}
@media (hover: none) { .keyhint { display: none; } }

/* ---------- الطباعة / PDF ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 12.5pt; display: block; }
  .top, .foot, .ractions, .manage, .screen:not(#report) { display: none !important; }
  #report { display: block !important; animation: none; }
  main { padding: 0; max-width: none; }
  .rhero, .fcard, .pcard, .week { box-shadow: none; break-inside: avoid; }
  .rhero { border: 1px solid #ddd; grid-template-columns: 1fr 290px; grid-template-areas: 'info chart'; padding: 22px 26px; }
  .rhero .rchart { max-width: none; }
  .fcards { grid-template-columns: repeat(5, 1fr); gap: 8px; } .fcard { padding: 12px; } .lvl-num { font-size: 26px; }
  .weeks { grid-template-columns: repeat(4, 1fr); }
  .rsec { margin-top: 22px; break-inside: avoid-page; }
  .howto { background: #f4f3ef; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
