:root{--teal:#079B9C;--teal-dark:#057a7a;--ink:#183b3b;--muted:#6a8585;--bg:#f2f8f8;--border:#dbe8e7;--soft:#dff5f3;--white:#fff;--red:#b63b3b;--gold:#b47320}*{box-sizing:border-box}html{min-height:100%;scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Tajawal,"Noto Sans Arabic",Tahoma,Arial,sans-serif;line-height:1.75}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}a{color:var(--teal-dark)}.hidden{display:none!important}.masthead{background:#079b9c;color:#fff;padding:15px max(16px,calc((100% - 940px)/2));display:flex;align-items:center;justify-content:space-between;gap:10px;box-shadow:0 4px 22px #0a4b4b18}.brand{display:flex;align-items:center;gap:10px}.brand-icon{height:43px;width:43px;border:1px solid #ffffff82;border-radius:14px;display:grid;place-items:center;background:#ffffff26;font-size:26px;font-weight:800}.brand b{display:block;font-size:20px;line-height:1.4}.brand small{display:block;opacity:.88;font-size:12px;line-height:1.2}.shell{max-width:940px;padding:18px 16px 45px;margin:0 auto}.trial-banner{padding:8px 12px;text-align:center;border-radius:10px;background:#ffefcf;color:#765117;font-size:12px;font-weight:700;margin-bottom:16px}.message{border-radius:11px;background:#e5f4f3;color:#096d6b;margin:10px 0;padding:12px 14px;font-size:14px;white-space:pre-wrap}.message-error{background:#ffece8;color:#a12323}.warning{background:#fff3dd;color:#715019}.card{border:1px solid var(--border);border-radius:22px;background:var(--white);padding:22px;margin:14px 0;box-shadow:0 8px 35px #164e4e0a}.screen{animation:enter .2s ease-out}@keyframes enter{from{opacity:.6;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.eyebrow{font-size:13px;color:var(--teal-dark);font-weight:800}.eyebrow.light{color:#d1ffff}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(24px,5vw,34px);line-height:1.6;margin-bottom:7px}h2{font-size:21px;line-height:1.55}p{margin-bottom:8px}.muted{color:var(--muted);font-size:14px}.hero{padding:14px 2px 20px}.hero h1{color:#144848}.form-card{max-width:490px;margin:auto}.form-card h2{margin-bottom:0}label{display:block;font-size:14px;font-weight:700;margin:16px 0 7px}input{display:block;width:100%;padding:13px 14px;border:1px solid #c5d6d6;border-radius:12px;background:#fff;font-size:16px;color:var(--ink)}input:focus{outline:3px solid #06999a2a;border-color:var(--teal)}input[dir="ltr"]{text-align:left}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:12px 20px;font-weight:800;min-height:46px;text-align:center}.btn.primary{background:var(--teal);color:#fff}.btn.light{background:#fff;color:#086c6e}.btn.outline{background:#fff;color:var(--teal-dark);border:1px solid var(--teal)}.full{width:100%}.form-card .btn{margin-top:22px}.help,.fine{font-size:12px;color:#789090;line-height:1.8}.fine{padding:0 4px}.center{text-align:center}.center-card{text-align:center;padding:70px 20px}.spinner{width:26px;height:26px;border:3px solid #d5eceb;border-top-color:var(--teal);border-radius:50%;animation:spin .8s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.text-button{border:0;background:none;color:inherit;text-decoration:underline;text-underline-offset:4px;padding:8px 4px;font-size:14px}.welcome{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;padding:14px 3px}.welcome h1{margin-bottom:0}.membership{border-radius:99px;padding:7px 13px;background:#eaf3f3;color:#476c6c;font-weight:bold;font-size:13px}.membership.active{background:#e0f4e7;color:#14763d}.membership.inactive{background:#fff0df;color:#9a6520}.section-heading{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:22px 0 12px}.section-heading h2{margin:0}.section-heading span{font-size:12px;color:var(--muted)}.course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.course-card{text-align:right;border:1px solid var(--border);border-radius:20px;background:#fff;color:var(--ink);padding:20px 16px;display:flex;flex-direction:column;gap:4px;min-height:165px;box-shadow:0 8px 35px #164e4e09;transition:transform .15s,box-shadow .15s}.course-card:hover,.course-card:focus-visible{transform:translateY(-2px);box-shadow:0 10px 30px #164e4e1d}.tile-icon{width:43px;height:43px;border-radius:13px;background:var(--soft);display:grid;place-items:center;color:var(--teal-dark);font-size:24px;font-weight:bold;margin-bottom:7px}.course-card strong{font-size:17px}.course-card small{font-size:12px;color:var(--muted)}.small-link{color:var(--teal-dark);font-weight:700;font-size:12px;margin-top:auto}.exam-card{background:linear-gradient(125deg,#079b9c,#07565e);border-radius:22px;padding:24px;color:white;margin-top:16px}.exam-card h2{margin:7px 0}.exam-card p{color:#d3f9f8}.exam-card .btn{margin-top:10px}.history-card{padding:18px}.history-card .section-heading{margin:0 0 15px}.history-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--border);font-size:14px}.history-row small{color:var(--muted)}.quiz-header{position:relative;padding:17px 20px}.top-line{display:flex;align-items:center;gap:10px;justify-content:space-between}.tag{border-radius:9px;background:#dff5f3;color:#057a7a;padding:3px 10px;font-weight:700;font-size:12px}.clock{background:#fff1e4;color:#ad601c;font-size:17px;font-weight:900;border-radius:11px;padding:3px 10px;font-variant-numeric:tabular-nums}.quiz-stats{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding-top:5px}.quiz-stats h2{margin:8px 0 16px;font-size:19px}.progress-track{height:9px;border-radius:20px;background:#eaf2f2;overflow:hidden}.progress-track>div{width:0%;height:100%;border-radius:20px;background:var(--teal);transition:width .2s}.question-card{padding:24px}.question-card h2{font-size:clamp(19px,4vw,25px);line-height:1.8;margin:12px 0 24px}.answers{display:grid;gap:10px}.answer{display:flex;align-items:center;gap:14px;width:100%;text-align:right;padding:13px;border-radius:13px;background:#fff;border:1px solid #d4e4e4;color:var(--ink)}.answer .letter{flex:0 0 34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#eff7f7;color:var(--teal-dark);font-weight:900}.answer.selected{background:#e1f5f2;border-color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal)}.answer.selected .letter{background:var(--teal);color:#fff}.actions{display:flex;gap:10px;justify-content:space-between}.actions .btn{min-width:115px}.result-card{text-align:center;max-width:560px;margin:10px auto 25px}.score{font-size:66px;font-weight:900;color:var(--teal-dark);line-height:1.3;padding:12px 0}.result-card h1{margin-top:0}.result-card .btn{margin-top:18px}.review-list{display:grid;gap:12px}.review-item{background:#fff;border:1px solid var(--border);border-radius:15px;padding:18px}.review-item h3{font-size:16px;margin-bottom:10px}.review-item p{font-size:14px;line-height:1.7}.review-item.good{border-right:4px solid #20a46d}.review-item.bad{border-right:4px solid #c97544}.setup-card{max-width:650px;margin:5vh auto}.setup-card .btn{margin-top:20px}.footer{text-align:center;color:#7b9191;font-size:12px;padding:17px;line-height:2.1}.footer a{color:#6f9695}@media(max-width:420px){.masthead{padding:12px 16px}.shell{padding:16px 12px 35px}.card{padding:16px;border-radius:19px}.course-card{padding:16px 11px;min-height:160px}.course-card strong{font-size:15px}.brand b{font-size:17px}.question-card{padding:18px}}

/* Protection messaging, per-learner watermark and ordinary copy deterrents. */
.content-notice{display:flex;align-items:flex-start;gap:14px;background:#fff9e9;border:1px solid #f0d8a5;border-radius:16px;padding:16px;margin:8px 0 20px;color:#644a19}
.content-notice strong{display:block;font-size:16px;margin-bottom:5px}
.content-notice p{font-size:14px;margin-bottom:3px}
.content-notice small{font-size:12px;color:#86682e}
.content-notice-icon{font-size:25px;line-height:1.4}
.learner-id{display:inline-block;margin-top:5px;border-radius:8px;background:#edf7f7;border:1px solid #d5e9e9;padding:2px 10px;color:#267676;font-size:12px;font-weight:700;letter-spacing:.2px}
.learner-id b{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.result-identity{margin:5px auto 10px;display:block;width:max-content;max-width:100%}
.question-card,.review-item{position:relative;overflow:hidden}
.watermark-layer{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:space-around;pointer-events:none;z-index:4;transform:rotate(-14deg) scale(1.15);opacity:.11;color:#046f71;font-size:12px;font-weight:900;white-space:nowrap;user-select:none;-webkit-user-select:none;direction:rtl}
.watermark-layer span{display:block;line-height:1.6}
.review-watermark{font-size:10px;opacity:.11}
#quiz,#result{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.warning-overlay{position:fixed;inset:0;background:#082b2ba8;z-index:3000;display:flex;align-items:center;justify-content:center;padding:16px;overflow-y:auto}
.warning-dialog{width:min(100%,530px);background:#fff;border-radius:23px;padding:24px;box-shadow:0 14px 65px #001b1b60;color:#173c3c;max-height:calc(100dvh - 32px);overflow-y:auto}
.warning-badge{font-size:29px;background:#fff1dc;border-radius:14px;display:inline-grid;place-items:center;width:53px;height:53px;margin-bottom:10px}
.warning-dialog h2{margin:0 0 4px;font-size:23px}
.warning-lead{color:#668484;font-size:14px}
.warning-terms{background:#fff8ec;border:1px solid #f3ddae;padding:14px;border-radius:13px;line-height:1.9;font-size:14px}
.warning-terms strong{color:#815314}
.warning-terms p{margin:8px 0 5px}
.warning-terms small{font-size:12px;color:#7c6e56}
.warning-approval{display:flex;gap:10px;align-items:flex-start;margin:18px 0 20px;font-weight:700;font-size:14px;cursor:pointer}
.warning-approval input{width:19px;height:19px;flex:0 0 19px;margin:3px 0 0;accent-color:var(--teal)}
.warning-actions{display:flex;gap:10px;justify-content:stretch}
.warning-actions .btn{flex:1}
@media(max-width:420px){.warning-dialog{padding:18px;border-radius:18px}.warning-dialog h2{font-size:20px}.warning-terms{font-size:13px}.watermark-layer{font-size:10px}.warning-actions .btn{font-size:13px;padding:9px}}
@media print{#quiz,#result{display:none!important}body::before{content:'الطباعة معطلة أثناء الاختبار';font-size:30px;text-align:center;display:block}}

/* Legal-use notice: compact readable terms on mobile. */
.warning-terms p{margin:9px 0 5px}.warning-terms b{font-weight:800}.warning-disclosure{font-size:11px;line-height:1.6;color:#6f8888;margin:-10px 0 15px}.warning-dialog{overscroll-behavior:contain}

/* Strong rights reminder: visible above the course cards and in the consent modal. */
.content-notice{border-color:#dbb278;background:#fff7e9}
.content-notice strong{font-size:17px;line-height:1.8;color:#714116}
.warning-terms .warning-no-waiver{padding:9px 11px;background:#ffede3;border-right:3px solid #c77742;color:#833a25;border-radius:7px;margin:10px 0}
@media(max-width:420px){.content-notice strong{font-size:15px}.content-notice .notice-emphasis{font-size:13px}}

/* Approval update: concise homepage notice; legible three-point watermark. */
.content-notice p{font-size:15px;line-height:1.85;margin:0;font-weight:600}
.watermark-layer{opacity:.11}
.review-watermark{opacity:.11}
@media(max-width:420px){.content-notice p{font-size:14px}}

/* Full Arabic confirmation modal: avoids native dialogs that expose an English hostname. */
body.modal-confirm-open{overflow:hidden}
.confirmation-dialog{width:min(100%,440px);background:#fff;color:var(--ink);border-radius:23px;padding:26px 22px;box-shadow:0 18px 65px #001b1b55;text-align:right}
.confirmation-icon{width:46px;height:46px;border-radius:14px;background:#fff0dc;color:#98601d;display:grid;place-items:center;font-size:26px;font-weight:900;margin-bottom:12px}
.confirmation-dialog h2{font-size:23px;margin:0 0 12px}
.confirmation-dialog p{font-size:16px;line-height:1.9;color:#496565;margin:0 0 24px}
.confirmation-actions{display:flex;gap:10px;flex-wrap:wrap}
.confirmation-actions .btn{flex:1 1 145px;min-width:0}
.btn.confirm-danger{background:#ae4545;color:#fff}
@media(max-width:420px){.confirmation-dialog{padding:22px 18px}.confirmation-dialog h2{font-size:21px}.confirmation-dialog p{font-size:15px}.confirmation-actions .btn{font-size:14px}}

/* Official Daleelak brand assets. Does not affect Supabase or exams. */
.brand-icon.brand-logo{height:49px;width:49px;flex:0 0 49px;border:1px solid #ffffffbd;border-radius:15px;display:grid;place-items:center;background:#fff;box-shadow:0 2px 10px #00393b1c;overflow:hidden}
.brand-logo img{display:block;width:auto;height:43px;max-width:100%;object-fit:contain}
.login-brand{display:flex;justify-content:center;align-items:center;margin:0 auto 10px;padding:2px 0 6px}
.login-brand img{display:block;max-width:178px;width:44%;min-width:132px;height:auto;object-fit:contain}
@media(max-width:420px){.brand-icon.brand-logo{width:45px;height:45px;flex-basis:45px;border-radius:13px}.brand-logo img{height:40px}.login-brand img{max-width:162px;min-width:130px}}

/* ثلاث بطاقات تدريب دون بطاقة التدريب الشامل القديمة */
@media (min-width:760px){.course-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:759px){.course-grid>.course-card:last-child{grid-column:1/-1}}
.exam-mix{font-weight:700;font-size:13px;line-height:1.8;opacity:.95;margin:8px 0}

/* Text refinement: a clearer mobile homepage with compact simulation panel. */
.exam-card { padding:20px 22px; }
.exam-card h2 { margin:0 0 8px; }
.exam-card .exam-summary { margin:0 0 5px; font-weight:700; font-size:clamp(14px,3vw,16px); line-height:1.65; }
.exam-card .exam-mix { margin:0; font-weight:500; font-size:clamp(12px,2.8vw,14px); line-height:1.7; }
.exam-card .btn { margin-top:16px; }
.usage-limits { margin:10px 3px 17px; font-size:12px; color:#6a8585; line-height:1.75; }

/* Account subscription gate; actual access is always enforced by the server. */
.subscription-gate{display:flex;align-items:center;flex-wrap:wrap;gap:14px;background:#fff;border:1px solid #cfe5e3;border-radius:20px;box-shadow:0 8px 25px #164e4e0a;margin:12px 0 22px;padding:18px 20px}
.subscription-gate-icon{width:48px;height:48px;border-radius:14px;background:#eaf5f3;display:grid;place-items:center;font-size:24px}
.subscription-gate-copy{flex:1 1 210px}
.subscription-gate-copy h2{font-size:18px;margin:0 0 4px;color:#174646}
.subscription-gate-copy p{font-size:14px;margin:0 0 3px;color:#345d5b}
.subscription-gate-copy small{color:#779091;font-size:12px}
.subscription-cta{white-space:nowrap;text-decoration:none;min-width:120px}
.course-card.is-locked{opacity:1;cursor:not-allowed;background:#f8fbfb}
.course-card.is-locked .small-link{color:#966e36}
.exam-locked{background:#ffffff23;border-radius:12px;color:#fff!important;font-weight:700;font-size:14px;padding:10px 14px;display:inline-block;margin-top:12px}
@media(max-width:520px){.subscription-cta{width:100%}}

/* Clarify rolling attempt limits under the comprehensive simulation card. */
.usage-limits strong { color:#186a68; font-weight:800; }
@media(max-width:520px){.usage-limits{font-size:12.5px;line-height:1.9;}}
