@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'Noto Sans Arabic', Tahoma, sans-serif;
  color: #173c3a;
  background: #f6f8f1;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #173c3a;
  --muted: #526d65;
  --teal: #176b62;
  --teal-deep: #14574f;
  --mint: #dceee2;
  --mint-strong: #b7d9c4;
  --paper: #fffef9;
  --line: #dce5da;
  --coral: #df8468;
  --gold: #e4bb58;
  --shadow: 0 22px 55px rgba(29, 74, 64, 0.09);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 11% 8%, rgba(231, 239, 215, 0.72), transparent 26rem), #f6f8f1; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #d69558; outline-offset: 3px; }
[hidden] { display: none !important; }
.site-shell { width: min(1140px, calc(100% - 52px)); margin-inline: auto; }
.topbar { height: 94px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(23, 60, 58, .09); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 45px; height: 45px; background: #e4f0e4; color: var(--teal); border-radius: 15px 15px 15px 5px; transform: rotate(-4deg); }
.brand-mark svg { width: 35px; height: 35px; transform: rotate(4deg); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-family: 'Alexandria', sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -.5px; }
.brand-copy small { color: var(--muted); font-size: 11px; }
.topbar-note { display: flex; align-items: center; gap: 9px; color: #476760; font-size: 13px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; background: #7cae8f; border-radius: 50%; box-shadow: 0 0 0 4px #e5f0e6; }
.note-divider { color: #a9b9ac; }
.screen { animation: appear .42s ease both; }
.landing-screen { min-height: 530px; display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 28px; padding: 42px 0 22px; }
.hero-copy { padding-inline-start: 23px; position: relative; z-index: 1; }
.eyebrow { color: #68877b; text-transform: none; letter-spacing: .15px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.eyebrow-spark { color: #d69e41; font-size: 15px; }
h1, h2, p { margin-top: 0; }
.hero-copy h1 { font-family: 'Alexandria', sans-serif; color: var(--ink); font-size: clamp(40px, 5vw, 59px); line-height: 1.28; letter-spacing: -2.1px; margin: 17px 0 14px; }
.hero-copy h1 span { color: var(--teal); position: relative; white-space: nowrap; }
.hero-copy h1 span::after { content: ''; height: 7px; position: absolute; right: 3px; left: 1px; bottom: -4px; z-index: -1; border-radius: 100%; background: #d4e6ce; transform: rotate(-1deg); }
.hero-description { font-size: 17px; color: #5d7770; line-height: 1.9; max-width: 490px; margin-bottom: 20px; }
.hero-facts { display: flex; gap: 29px; margin: 18px 0 24px; }
.fact { display: flex; align-items: center; gap: 10px; }
.fact-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 13px; font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 13px; }
.fact-icon-mint { color: #357765; background: #e2efe1; }
.fact-icon-peach { color: #b7664b; background: #f9e7dc; font-size: 22px; }
.fact strong, .fact small { display: block; }
.fact strong { font-size: 13px; margin-bottom: 2px; }
.fact small { color: #82938c; font-size: 11px; }
.primary-button { border: 0; background: var(--teal); color: white; border-radius: 15px; padding: 14px 22px; font-weight: 800; font-size: 15px; box-shadow: 0 8px 17px rgba(23, 107, 98, .16); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.primary-button:hover:not(:disabled) { background: var(--teal-deep); transform: translateY(-2px); box-shadow: 0 11px 21px rgba(23, 107, 98, .21); }
.primary-button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.start-button { min-width: 175px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.start-button span, .next-button span { font-size: 19px; line-height: 1; }
.hero-caption { margin: 13px 0 0; color: #8b9a8e; font-size: 12px; }
.hero-caption span { font-size: 18px; color: #d8a755; vertical-align: -2px; margin-inline-end: 4px; }
.hero-visual { height: 408px; position: relative; display: grid; place-items: center; isolation: isolate; }
.hero-visual::before { content: ''; position: absolute; width: 82%; height: 79%; right: 7%; top: 12%; background: #e7efe0; border-radius: 44% 56% 62% 38% / 42% 39% 61% 58%; transform: rotate(-6deg); z-index: -2; }
.hero-art { width: 94%; height: 82%; object-fit: cover; border-radius: 47% 53% 47% 53% / 48% 43% 57% 52%; mix-blend-mode: multiply; filter: saturate(.85); }
.visual-label { position: absolute; display: flex; align-items: center; gap: 8px; background: rgba(255, 254, 249, .92); padding: 10px 15px; border-radius: 12px; color: #57756a; font-size: 12px; box-shadow: 0 7px 23px rgba(41, 74, 55, .09); }
.visual-label i { font-style: normal; color: #d1a648; font-size: 17px; }
.visual-label-top { top: 29px; right: -7px; transform: rotate(4deg); }
.visual-label-bottom { bottom: 36px; left: -10px; transform: rotate(-4deg); }
.visual-label-bottom i { color: var(--coral); }
.orbit { position: absolute; width: 12px; height: 12px; background: #e7b95d; border-radius: 50%; opacity: .8; }
.orbit-one { right: 15%; bottom: 49px; }
.orbit-two { left: 18%; top: 51px; width: 8px; height: 8px; background: #d98568; }
.identity-strip { grid-column: 1 / -1; min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 21px; margin-top: 2px; padding: 17px 22px; background: rgba(255, 254, 249, .84); border: 1px solid #e4e9dd; border-radius: 18px; box-shadow: 0 9px 25px rgba(29, 74, 64, .035); }
.identity-heading { display: flex; align-items: center; gap: 9px; color: #7b8d84; font-size: 12px; white-space: nowrap; }
.school-seal { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #347663; border: 1px solid #b8d2bb; font-family: 'Alexandria', sans-serif; font-weight: 800; }
.identity-detail { display: grid; gap: 5px; padding-inline-start: 20px; border-right: 1px solid #e5e8de; }
.identity-label { color: #87978d; font-size: 11px; }
.identity-detail strong { font-size: 13px; font-weight: 700; color: var(--ink); }
.school-name { min-width: 250px; }
.domain-catalog { padding: 36px 0 48px; border-top: 1px solid rgba(23, 60, 58, .08); }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.catalog-heading h2 { margin: 7px 0 5px; font-family: 'Alexandria', sans-serif; font-size: clamp(22px, 3vw, 29px); color: var(--ink); }
.catalog-heading p { margin: 0; color: #74887d; font-size: 13px; }
.catalog-note { padding: 9px 12px; border: 1px solid #dce7db; border-radius: 999px; background: #f9fbf6; color: #678274; font-size: 11px; white-space: nowrap; }
.domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: stretch; }
.domain-card { display: flex; flex-direction: column; min-height: 224px; padding: 19px; background: rgba(255, 254, 249, .92); border: 1px solid #e1e8de; border-radius: 19px; box-shadow: 0 11px 28px rgba(29, 74, 64, .045); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.domain-card:hover { transform: translateY(-3px); border-color: #b8d3bd; box-shadow: 0 16px 32px rgba(29, 74, 64, .075); }
.domain-card.is-nafs { background: linear-gradient(145deg, #fffdf4, #fff8e9); border-color: #ead9aa; }
.domain-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.domain-symbol { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px 14px 14px 5px; background: #e8f1e6; color: #377968; font-family: 'Alexandria', sans-serif; font-size: 17px; font-weight: 800; }
.is-nafs .domain-symbol { background: #f7edcf; color: #9a7731; }
.domain-question-count { color: #829389; font-size: 10px; }
.domain-card h3 { margin: 13px 0 6px; font-family: 'Alexandria', sans-serif; font-size: 17px; line-height: 1.6; color: var(--ink); }
.domain-card-description { margin: 0 0 11px; color: #74867c; font-size: 12px; line-height: 1.75; }
.domain-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.domain-topic-chip { padding: 4px 8px; border-radius: 99px; background: #f0f5ed; color: #668073; font-size: 10px; }
.is-nafs .domain-topic-chip { background: #f8f0d9; color: #927844; }
.domain-card-button { width: 100%; min-height: 41px; margin-top: auto; border: 1px solid #cfe0d0; border-radius: 11px; background: #f4f8f1; color: #397260; font-size: 12px; font-weight: 800; transition: background .18s ease, color .18s ease; }
.domain-card-button:hover { background: var(--teal); color: #fff; }
.is-nafs .domain-card-button { border-color: #e5d5a8; background: #fbf5e4; color: #856a2d; }
.is-nafs .domain-card-button:hover { background: #a38443; color: #fff; }
.catalog-source-note { margin: 15px 2px 0; color: #9aa59a; font-size: 10px; line-height: 1.7; }
.source-details { margin-top: 13px; padding: 12px 14px; border: 1px solid #e1e8de; border-radius: 13px; background: rgba(255, 254, 249, .72); color: #708277; }
.source-details summary { cursor: pointer; color: #527466; font-size: 11px; font-weight: 800; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 12px; }
.source-item { min-width: 0; padding-top: 9px; border-top: 1px solid #e8eee5; }
.source-item a { color: #327566; font-size: 11px; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.source-item p { margin: 4px 0 0; color: #87958a; font-size: 10px; line-height: 1.7; }
.site-footer { min-height: 67px; display: flex; justify-content: space-between; align-items: center; color: #819087; font-size: 11px; border-top: 1px solid rgba(23, 60, 58, .08); }
.site-footer > span:first-child span { color: #d4a64d; margin-inline: 4px; }
.site-footer strong { color: #56766c; }
.setup-screen { max-width: 780px; min-height: calc(100vh - 162px); margin-inline: auto; padding: 31px 0 42px; }
.back-to-catalog { margin-bottom: 12px; }
.setup-card { padding: 30px clamp(20px, 5vw, 42px) 35px; border: 1px solid #e1e8de; border-radius: 23px; background: var(--paper); box-shadow: var(--shadow); }
.setup-card h1 { margin: 9px 0; font-family: 'Alexandria', sans-serif; font-size: clamp(25px, 4vw, 33px); color: var(--ink); }
.setup-description { margin-bottom: 13px; color: #71857b; font-size: 14px; line-height: 1.8; }
.setup-topics { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 21px; }
.setup-field { display: grid; gap: 7px; color: #536f62; font-size: 12px; font-weight: 800; }
.setup-field small { color: #8a9b8f; font-size: 10px; font-weight: 500; }
.setup-field b { color: var(--coral); }
.setup-field input { width: 100%; height: 48px; border: 1px solid #d9e4d8; border-radius: 12px; background: #fff; padding: 0 13px; color: var(--ink); }
.setup-field select { width: 100%; min-height: 48px; border: 1px solid #d9e4d8; border-radius: 12px; background: #fff; padding: 8px 13px; color: var(--ink); }
.quiz-setup-form { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(145px, .7fr); gap: 13px; align-items: end; }
.setup-note { grid-column: 1 / -1; margin: -2px 0 0; color: #88978c; font-size: 11px; }
.begin-quiz-button { grid-column: 1 / -1; justify-self: start; min-width: 190px; }
.active-domain-label { margin: 0; color: #8a9a8f; font-size: 11px; }
.question-visual { width: min(100%, 600px); margin: 0 auto 18px; padding: 10px; border: 1px solid #e2e9de; border-radius: 15px; background: #f8faf4; text-align: center; }
.question-visual img { display: block; max-width: 100%; max-height: 270px; margin: 0 auto; object-fit: contain; border-radius: 8px; }
.question-visual figcaption { margin-top: 7px; color: #87968c; font-size: 10px; line-height: 1.6; }
.result-domain-label { margin: -5px 0 12px; color: #839186; font-size: 11px; }
.certificate-offer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 auto 18px; padding: 13px 15px; border: 1px solid #e6d4a1; border-radius: 15px; background: #fff9e8; text-align: right; }
.certificate-offer-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: #f3e6bd; color: #aa8435; font-size: 22px; }
.certificate-offer strong { color: #715c2d; font-size: 12px; }
.certificate-offer p { margin: 3px 0 0; color: #8e7c55; font-size: 10px; line-height: 1.6; }
.certificate-button { padding: 10px 13px; font-size: 11px; white-space: nowrap; }
.certificate-document { display: none; }

.quiz-screen { max-width: 860px; min-height: calc(100vh - 162px); margin-inline: auto; padding: 44px 0 35px; }
.quiz-heading-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 27px; }
.quiz-heading-row h1 { font-family: 'Alexandria', sans-serif; font-size: 29px; letter-spacing: -.7px; margin: 9px 0 0; }
.quiz-heading-row h1 span { color: var(--teal); }
.quiz-tools { display: flex; align-items: center; gap: 10px; }
.sound-toggle { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; border: 1px solid #dce7dc; border-radius: 14px; background: rgba(255, 254, 249, .82); color: #527568; font-size: 11px; font-weight: 700; transition: background .18s ease, border-color .18s ease; }
.sound-toggle:hover { background: #edf4e9; border-color: #b9d2bd; }
.sound-toggle[aria-pressed="false"] { color: #89958d; background: #f2f3ed; }
.sound-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.sound-wave { transition: opacity .18s ease; }
.sound-toggle[aria-pressed="false"] .sound-wave { opacity: .18; }
.sound-label { white-space: nowrap; }
.score-chip { background: #edf3e9; display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 10px 15px; }
.score-chip-icon { color: #c39a3e; font-size: 23px; }
.score-chip small, .score-chip strong { display: block; }
.score-chip small { color: #82938a; font-size: 10px; }
.score-chip strong { margin-top: 1px; color: var(--teal); font-family: 'Alexandria', sans-serif; font-size: 16px; }
.progress-block { margin-bottom: 19px; }
.progress-copy { display: flex; justify-content: space-between; color: #71867d; font-size: 12px; margin-bottom: 8px; }
.progress-track { height: 8px; border-radius: 99px; overflow: hidden; background: #e6ebe1; }
.progress-track span { display: block; height: 100%; width: 10%; border-radius: inherit; background: linear-gradient(90deg, #8cbb8f, var(--teal)); transition: width .35s ease; }
.step-dots { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.step-dot { width: 9px; height: 9px; border-radius: 50%; background: #dce5d9; transition: transform .2s ease, background .2s ease; }
.step-dot.current { background: #398273; transform: scale(1.35); box-shadow: 0 0 0 4px #e1eee3; }
.step-dot.done { background: #82b48d; }
.question-card { min-height: 380px; background: var(--paper); border: 1px solid #e4e9df; box-shadow: var(--shadow); border-radius: 23px; padding: 29px 34px 23px; }
.question-meta { display: flex; justify-content: space-between; align-items: center; }
.type-pill { border-radius: 20px; padding: 7px 12px; background: #e8f1e6; color: #4c7965; font-size: 11px; font-weight: 700; }
.point-note { color: #9aa79d; font-size: 11px; }
.question-prompt { font-family: 'Alexandria', sans-serif; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.8; margin: 19px 0 20px; color: var(--ink); }
.answer-area { min-height: 140px; }
.option-list { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.answer-option { min-height: 57px; border: 1px solid #dfe7dd; background: #fff; border-radius: 13px; color: #35554d; padding: 11px 15px; text-align: right; display: flex; align-items: center; gap: 11px; transition: border .18s ease, background .18s ease, transform .18s ease; }
.answer-option:hover:not(:disabled) { border-color: #82b49a; background: #f5faf3; transform: translateY(-1px); }
.answer-option:disabled { cursor: default; }
.option-letter { flex: 0 0 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; color: #628278; background: #edf3e9; font-size: 12px; font-weight: 800; }
.answer-option.is-correct { border-color: #79b38c; background: #eff8ef; color: #246b4f; }
.answer-option.is-wrong { border-color: #e3a28e; background: #fff2ec; color: #a25545; }
.answer-option.is-correct .option-letter { color: #fff; background: #65a27b; }
.answer-option.is-wrong .option-letter { color: #fff; background: #d57b63; }
.tf-list { display: flex; gap: 12px; }
.tf-list .answer-option { flex: 1; justify-content: center; font-weight: 700; }
.fill-wrap { display: flex; gap: 10px; align-items: center; max-width: 510px; }
.fill-input { flex: 1; height: 52px; border: 1px solid #dce5da; background: #fff; border-radius: 12px; padding: 0 15px; color: var(--ink); }
.fill-input::placeholder { color: #a7b3a9; }
.check-button { height: 50px; padding: 0 18px; border: 0; border-radius: 12px; background: #e5f0e4; color: #317160; font-weight: 800; }
.check-button:hover { background: #d8e9d8; }
.match-list { display: grid; gap: 10px; }
.match-row { display: grid; grid-template-columns: minmax(120px, .72fr) 28px minmax(170px, 1.28fr); align-items: center; gap: 9px; }
.match-term { padding: 11px 13px; border-radius: 11px; background: #f0f4e9; color: #31584d; font-weight: 700; font-size: 13px; }
.match-link { height: 1px; border-top: 1px dashed #a8bbaa; position: relative; }
.match-link::after { content: '•'; color: #7ba68b; position: absolute; top: -11px; left: calc(50% - 4px); font-size: 18px; }
.match-select { min-height: 45px; width: 100%; border-radius: 11px; border: 1px solid #dce5da; background: white; color: #405d54; padding: 8px 10px; }
.match-select.correct-select { border-color: #75ad85; background: #f0f8ee; }
.match-select.wrong-select { border-color: #dfa08c; background: #fff2ec; }
.match-submit { margin-top: 12px; }
.feedback { border-radius: 13px; padding: 12px 15px; margin-top: 16px; line-height: 1.75; font-size: 13px; animation: appear .25s ease both; }
.feedback.good { color: #286a4d; background: #eef7ed; border: 1px solid #d6ead8; }
.feedback.try-again { color: #87523e; background: #fff5ef; border: 1px solid #f0dfd5; }
.feedback strong { display: block; margin-bottom: 2px; }
.feedback p { margin: 0; }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; border-top: 1px solid #edf0e8; padding-top: 17px; }
.text-button { background: transparent; color: #5d7e71; border: 0; padding: 9px 4px; font-weight: 700; font-size: 13px; }
.text-button:disabled { color: #bdc7bc; cursor: not-allowed; }
.previous-button span { margin-inline-end: 5px; }
.next-button { padding: 11px 17px; border-radius: 12px; font-size: 13px; }
.keyboard-hint { color: #a0aaa0; font-size: 11px; }
.quiz-footnote { text-align: center; margin-top: 16px; color: #89978e; font-size: 12px; }
.quiz-footnote span { color: #d5a750; font-size: 17px; margin-inline-end: 4px; }

.results-screen { max-width: 780px; min-height: calc(100vh - 162px); display: grid; place-items: center; margin-inline: auto; padding: 35px 0; }
.result-card { width: 100%; text-align: center; background: var(--paper); border: 1px solid #e4e9df; box-shadow: var(--shadow); border-radius: 25px; padding: 35px 42px 29px; position: relative; overflow: hidden; }
.result-card::before, .result-card::after { content: '✦'; position: absolute; color: #e3bd60; font-size: 27px; opacity: .65; }
.result-card::before { top: 22px; right: 27px; transform: rotate(-12deg); }
.result-card::after { bottom: 26px; left: 31px; color: #d98970; font-size: 19px; }
.result-star { width: 58px; height: 58px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 19px 19px 19px 6px; transform: rotate(-4deg); background: #f7efd7; color: #cb9c39; font-size: 29px; }
.result-card .eyebrow { justify-content: center; }
.result-card h1 { font-family: 'Alexandria', sans-serif; font-size: clamp(24px, 4vw, 33px); margin: 13px 0 9px; }
.result-card h1 span { color: var(--teal); }
.result-message { color: #71857b; margin-bottom: 17px; }
.score-display { color: var(--teal); display: flex; gap: 7px; align-items: baseline; justify-content: center; direction: ltr; }
.score-display strong { font-family: 'Alexandria', sans-serif; font-size: 69px; line-height: 1.1; letter-spacing: -4px; }
.score-display span { color: #94a499; font-weight: 700; font-size: 18px; }
.result-stats { width: min(380px, 100%); margin: 17px auto 18px; display: grid; grid-template-columns: 1fr 1fr; background: #f3f6ee; border-radius: 15px; padding: 13px; }
.result-stats div + div { border-right: 1px solid #dfe7db; }
.result-stats strong, .result-stats span { display: block; }
.result-stats strong { font-family: 'Alexandria', sans-serif; font-size: 19px; color: #43836a; }
.result-stats span { font-size: 11px; color: #829187; margin-top: 3px; }
.review-list { width: min(520px, 100%); margin: 0 auto 18px; text-align: right; padding: 14px 16px; border-radius: 14px; background: #faf7ed; color: #64766d; font-size: 12px; line-height: 1.8; }
.review-list strong { display: block; color: #536f62; margin-bottom: 4px; }
.review-list ul { margin: 0; padding-inline-start: 18px; }
.report-actions { width: min(490px, 100%); margin: 0 auto 17px; display: grid; grid-template-columns: minmax(150px, 1fr) auto; align-items: end; gap: 10px; text-align: right; }
.report-name-field { display: grid; gap: 6px; color: #62786c; font-size: 11px; font-weight: 700; }
.report-name-field small { color: #98a59a; font-size: 10px; font-weight: 500; }
.report-name-field input { width: 100%; height: 43px; border: 1px solid #dce5da; background: #fff; border-radius: 11px; padding: 0 12px; color: var(--ink); }
.report-name-field input::placeholder { color: #a7b3a9; }
.report-button { min-height: 43px; padding: 10px 15px; border-radius: 11px; font-size: 12px; white-space: nowrap; }
.report-button span { margin-inline-start: 5px; font-size: 17px; }
.report-help { grid-column: 1 / -1; margin: -2px 0 0; text-align: center; color: #8a9a8e; font-size: 10px; }
.pdf-report { display: none; }
.retry-button { min-width: 175px; }
.retry-button span { font-size: 19px; vertical-align: -1px; margin-inline-start: 6px; }
.result-signoff { color: #a0aaa0; font-size: 11px; margin: 14px 0 0; }

@media print {
  @page { size: A4 portrait; margin: 13mm; }
  html, body { min-width: 0 !important; min-height: 0 !important; width: auto !important; background: #fff !important; color: #263f39 !important; }
  body.printing-performance-report .topbar,
  body.printing-performance-report #landing,
  body.printing-performance-report #quiz,
  body.printing-performance-report .result-card,
  body.printing-performance-report .site-footer { display: none !important; }
  body.printing-performance-report .site-shell,
  body.printing-performance-report #main-content,
  body.printing-performance-report #results { display: block !important; width: auto !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff !important; box-shadow: none !important; border: 0 !important; }
  body.printing-performance-report #pdf-report { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; color: #263f39 !important; background: #fff !important; font-family: 'Noto Sans Arabic', Tahoma, sans-serif !important; direction: rtl !important; }
  .pdf-report-header { padding: 0 0 13px; text-align: center; border-bottom: 2px solid #4f8370; }
  .pdf-report-brand { margin: 0 0 4px; color: #176b62; font-family: 'Alexandria', sans-serif; font-size: 22px; font-weight: 800; }
  .pdf-report-subtitle { margin: 0; color: #6d8075; font-size: 12px; }
  .pdf-report-meta { margin: 13px 0; padding: 10px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 15px; background: #f2f6ef !important; border: 1px solid #dce7da; border-radius: 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pdf-meta-item { display: flex; gap: 5px; align-items: baseline; font-size: 11px; }
  .pdf-meta-label { color: #788b80; }
  .pdf-meta-value { color: #284b41; font-weight: 700; }
  .pdf-score-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 15px; padding: 10px 14px; background: #eaf3e9 !important; border-right: 4px solid #47836b; border-radius: 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pdf-score-main { color: #245c4b; font-size: 20px; font-weight: 800; }
  .pdf-score-caption { display: block; margin-top: 2px; color: #6b8175; font-size: 10px; font-weight: 500; }
  .pdf-score-note { max-width: 57%; color: #506d5e; font-size: 11px; line-height: 1.7; text-align: left; }
  .pdf-section-title { margin: 15px 0 9px; color: #234b40; font-family: 'Alexandria', sans-serif; font-size: 14px; }
  .pdf-question-list { display: grid; gap: 8px; }
  .pdf-question { break-inside: avoid; page-break-inside: avoid; padding: 9px 11px; border: 1px solid #e0e7dc; border-radius: 8px; }
  .pdf-question-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 7px; }
  .pdf-question-title { margin: 0; color: #294d42; font-size: 11px; line-height: 1.7; }
  .pdf-question-number { color: #668174; white-space: nowrap; }
  .pdf-status { flex: 0 0 auto; padding: 3px 7px; border-radius: 99px; color: #276849; background: #eaf4e8 !important; font-size: 9px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pdf-status.needs-review { color: #9a6045; background: #fff1e8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pdf-answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .pdf-answer-item { min-width: 0; font-size: 10px; line-height: 1.7; }
  .pdf-answer-label { display: block; color: #64766d; font-size: 9px; }
  .pdf-answer-value { color: #364f46; overflow-wrap: anywhere; }
  .pdf-explanation { margin: 6px 0 0; padding-top: 5px; border-top: 1px dashed #e3e9df; color: #52685d; font-size: 9px; line-height: 1.75; }
  .pdf-report-footer { margin-top: 12px; padding-top: 7px; border-top: 1px solid #dce5da; text-align: center; color: #5c7064; font-size: 9px; }
  @page certificate { size: A4 landscape; margin: 12mm; }
  body.printing-certificate { page: certificate; }
  body.printing-certificate .topbar,
  body.printing-certificate #landing,
  body.printing-certificate #domain-catalog,
  body.printing-certificate #setup,
  body.printing-certificate #quiz,
  body.printing-certificate .result-card,
  body.printing-certificate #pdf-report,
  body.printing-certificate .site-footer { display: none !important; }
  body.printing-certificate .site-shell,
  body.printing-certificate #main-content,
  body.printing-certificate #results { display: block !important; width: auto !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff !important; box-shadow: none !important; border: 0 !important; }
  body.printing-certificate #certificate-document { display: block !important; width: 100% !important; min-height: 174mm; padding: 10mm; color: #24483f !important; background: #fffef8 !important; border: 2px solid #4e806d !important; outline: 1px solid #d7c182; outline-offset: -5mm; direction: rtl !important; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .certificate-seal { display: grid; place-items: center; width: 23mm; height: 23mm; margin: 0 auto 5mm; border: 2px solid #b39245; border-radius: 50%; color: #9c7d37; font-family: 'Alexandria', sans-serif; font-size: 23px; font-weight: 800; }
  .certificate-school { margin: 0 0 3mm; color: #708479; font-size: 12px; }
  .certificate-title { margin: 0; color: #246457; font-family: 'Alexandria', sans-serif; font-size: 32px; font-weight: 800; }
  .certificate-kicker { margin: 3mm 0 7mm; color: #9a7e40; font-size: 14px; }
  .certificate-body { margin: 0 auto; max-width: 220mm; color: #52695d; font-size: 15px; line-height: 2; }
  .certificate-student { display: inline-block; min-width: 70mm; margin: 0 3mm; padding: 0 5mm 1mm; border-bottom: 1px solid #bfa458; color: #1c5c50; font-family: 'Alexandria', sans-serif; font-size: 23px; font-weight: 800; }
  .certificate-achievement { margin: 5mm 0 0; color: #345f51; font-size: 13px; }
  .certificate-signatures { display: flex; justify-content: space-around; gap: 20mm; margin: 11mm auto 0; max-width: 230mm; }
  .certificate-signature { min-width: 50mm; padding-top: 3mm; border-top: 1px solid #d8e2d8; color: #52695d; font-size: 11px; }
  .certificate-signature strong { display: block; margin-top: 2mm; color: #24483f; font-size: 12px; }
  .certificate-date { margin-top: 7mm; color: #607267; font-size: 10px; }
}

@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes celebrate { 0%, 100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-6px) rotate(-4deg); } }
.result-star.celebrate { animation: celebrate .7s ease; }

@media (max-width: 820px) {
  .site-shell { width: min(100% - 36px, 700px); }
  .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-screen { grid-template-columns: 1fr .83fr; gap: 4px; padding-top: 35px; }
  .hero-copy { padding-inline-start: 5px; }
  .hero-copy h1 { font-size: clamp(36px, 6vw, 49px); }
  .hero-description { font-size: 15px; }
  .hero-visual { height: 340px; }
  .identity-strip { gap: 13px; padding: 15px; }
  .identity-detail { padding-inline-start: 12px; }
  .school-name { min-width: 170px; }
  .identity-detail strong { font-size: 11px; }
}
@media (max-width: 620px) {
  .site-shell { width: calc(100% - 30px); }
  .domain-catalog { padding: 27px 0 35px; }
  .catalog-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .catalog-note { align-self: flex-start; }
  .source-list { grid-template-columns: 1fr; }
  .domain-grid { grid-template-columns: 1fr; gap: 11px; }
  .domain-card { min-height: 0; padding: 16px; }
  .domain-card h3 { font-size: 16px; }
  .setup-screen { min-height: calc(100vh - 133px); padding: 22px 0 30px; }
  .setup-card { padding: 23px 18px 27px; border-radius: 19px; }
  .quiz-setup-form { grid-template-columns: 1fr; }
  .setup-note, .begin-quiz-button { grid-column: 1; }
  .begin-quiz-button { width: 100%; }
  .certificate-offer { grid-template-columns: auto 1fr; }
  .certificate-button { grid-column: 1 / -1; width: 100%; }
  .topbar { height: 75px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 13px 13px 13px 5px; }
  .brand-mark svg { width: 32px; height: 32px; }
  .brand-copy strong { font-size: 14px; }
  .topbar-note { font-size: 11px; gap: 7px; }
  .landing-screen { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 28px 0 22px; }
  .hero-copy { padding-inline: 2px; }
  .hero-copy h1 { font-size: clamp(39px, 11vw, 54px); margin-top: 14px; }
  .hero-description { font-size: 14px; line-height: 1.9; margin-bottom: 14px; }
  .hero-facts { gap: 20px; margin: 13px 0 18px; }
  .fact-icon { width: 37px; height: 37px; }
  .fact strong { font-size: 12px; }
  .fact small { font-size: 10px; }
  .start-button { padding: 13px 19px; }
  .hero-caption { margin-top: 10px; }
  .hero-visual { height: min(69vw, 310px); min-height: 230px; margin-top: 4px; }
  .hero-visual::before { width: 83%; height: 86%; right: 8%; top: 5%; }
  .hero-art { width: 95%; height: 87%; }
  .visual-label-top { top: 10px; right: 0; }
  .visual-label-bottom { bottom: 12px; left: 0; }
  .identity-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin-top: 8px; padding: 16px; }
  .identity-heading { grid-column: 1 / -1; border-bottom: 1px solid #e5e8de; padding-bottom: 10px; }
  .identity-detail { padding-inline-start: 10px; }
  .identity-detail:nth-child(2) { border: 0; }
  .school-name { min-width: 0; }
  .school-name strong { line-height: 1.5; }
  .site-footer { min-height: 58px; font-size: 10px; gap: 9px; }
  .site-footer > span { max-width: 52%; }
  .quiz-screen, .results-screen { min-height: calc(100vh - 133px); padding: 28px 0 25px; }
  .quiz-heading-row { margin-bottom: 22px; }
  .quiz-heading-row h1 { font-size: 25px; }
  .quiz-tools { gap: 6px; }
  .sound-toggle { min-height: 40px; padding: 7px 9px; gap: 5px; }
  .sound-toggle .sound-label { font-size: 10px; }
  .score-chip { padding: 8px 11px; }
  .score-chip-icon { font-size: 20px; }
  .score-chip small { font-size: 9px; }
  .score-chip strong { font-size: 14px; }
  .question-card { padding: 21px 17px 17px; min-height: 390px; border-radius: 19px; }
  .question-prompt { font-size: 18px; line-height: 1.8; margin: 15px 0 17px; }
  .option-list { grid-template-columns: 1fr; gap: 9px; }
  .answer-option { min-height: 51px; padding: 9px 11px; font-size: 13px; }
  .tf-list { gap: 8px; }
  .fill-wrap { flex-direction: column; align-items: stretch; }
  .fill-input { flex: auto; width: 100%; }
  .check-button { align-self: flex-start; }
  .match-row { grid-template-columns: minmax(95px, .8fr) 15px minmax(138px, 1.2fr); gap: 6px; }
  .match-term { padding: 10px 8px; font-size: 11px; }
  .match-select { padding: 7px; font-size: 11px; }
  .question-actions { gap: 5px; margin-top: 14px; padding-top: 13px; }
  .next-button { padding: 10px 11px; font-size: 11px; }
  .text-button { font-size: 11px; }
  .keyboard-hint { display: none; }
  .result-card { padding: 27px 17px 24px; border-radius: 20px; }
  .result-card h1 { font-size: 23px; }
  .result-message { font-size: 14px; line-height: 1.7; }
  .score-display strong { font-size: 59px; }
  .report-actions { grid-template-columns: 1fr; align-items: stretch; gap: 9px; }
  .report-button { justify-self: stretch; }
  .report-help { grid-column: 1; line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media screen {
  body { font-size: 16px; line-height: 1.7; }
  .topbar-note, .identity-heading, .identity-label, .identity-detail strong,
  .catalog-heading p, .catalog-note, .domain-question-count, .domain-card-description,
  .domain-topic-chip, .domain-card-button, .catalog-source-note, .source-details summary,
  .source-item a, .source-item p, .setup-description, .setup-field,
  .setup-field small, .setup-note, .active-domain-label, .progress-copy,
  .type-pill, .point-note, .question-prompt, .answer-option, .fill-input,
  .match-term, .match-select, .check-button, .feedback, .text-button,
  .keyboard-hint, .quiz-footnote, .result-message, .result-domain-label,
  .review-list, .report-name-field, .report-name-field small, .report-help,
  .site-footer { color: var(--ink); }
  .topbar-note, .identity-heading, .identity-detail strong, .catalog-heading p,
  .catalog-note, .domain-question-count, .domain-card-description,
  .domain-topic-chip, .domain-card-button, .catalog-source-note,
  .source-details summary, .source-item a, .source-item p, .setup-description,
  .setup-field, .setup-field small, .setup-note, .active-domain-label,
  .progress-copy, .type-pill, .point-note, .answer-option, .fill-input,
  .match-term, .match-select, .check-button, .feedback, .text-button,
  .quiz-footnote, .result-message, .result-domain-label, .review-list,
  .report-name-field, .report-name-field small, .report-help, .site-footer {
    font-family: 'Noto Sans Arabic', Tahoma, sans-serif;
  }
  .catalog-heading p, .catalog-note, .domain-question-count, .domain-card-description,
  .domain-topic-chip, .domain-card-button, .catalog-source-note,
  .source-details summary, .source-item a, .source-item p { font-size: 13px; }
  .setup-description, .setup-field, .setup-note, .progress-copy,
  .type-pill, .point-note, .answer-option, .fill-input, .match-term,
  .match-select, .check-button, .feedback, .text-button, .result-message,
  .result-domain-label, .review-list, .report-name-field, .report-help { font-size: 15px; }
  .setup-field small, .report-name-field small { font-size: 13px; }
  .question-prompt { font-size: clamp(21px, 2.6vw, 25px); }
  .match-term { line-height: 1.6; }
  .domain-card-description, .catalog-source-note, .source-item p,
  .setup-description, .setup-note, .question-prompt, .feedback,
  .result-message, .review-list { line-height: 1.8; }
  .setup-field input, .setup-field select, .report-name-field input { font-size: 16px; }
}
@media screen and (max-width: 620px) {
  .question-prompt { font-size: 20px; }
  .answer-option, .match-term, .match-select, .next-button, .text-button { font-size: 14px; }
  .topbar-note, .site-footer, .identity-detail strong { font-size: 12px; }
  .score-chip small, .sound-toggle .sound-label, .keyboard-hint { font-size: 12px; }
}
