/* Owner's UI rules: practice first, two themes, warm neutral identity, semantic feedback. */
:root {
  --cream:#f7f3ec; --paper:#fbf8f2; --navy:#2a2622; --navy-soft:#49443f;
  --muted:#5c534a; --line:#ddd3c7; --soft:#f4e8da;
  --accent:#a8481a; --accent-soft:#f4e8da; --green:var(--accent); --green-bg:var(--accent-soft);
  --success:#146e38; --success-bg:#e5f7ed; --red:#ba242b; --red-bg:#ffebee;
  color-scheme:light; background:var(--cream); color:var(--navy);
}
:root[data-theme=dark] {
  --cream:#200d1c; --paper:#36162d; --navy:#fff4f9; --navy-soft:#e5cad9;
  --muted:#d5b7c9; --line:#70425f; --soft:#51203f;
  --accent:#f1b3d0; --accent-soft:#51203f;
  --success:#66e09d; --success-bg:#15352b; --red:#ff9191; --red-bg:#41202a;
  color-scheme:dark;
}
html {scroll-padding-top:80px}
body, body.is-practicing {background:var(--cream); color:var(--navy)}
body {background-image:none}
.site-header {background:transparent; border-color:var(--line)}
.header-inner, .is-practicing .header-inner {height:80px; min-height:80px; gap:20px; flex-wrap:nowrap}
.brand-wordmark {letter-spacing:-.5px; color:var(--navy)}
.brand-wordmark > span {color:var(--accent); font-weight:650}
.header-actions {gap:10px; flex-shrink:0}
.theme-toggle {width:44px; height:44px; padding:0; display:grid; place-items:center; border:1px solid var(--line); background:var(--paper); border-radius:14px; color:var(--accent); font-size:24px}
.language-picker {background:var(--paper); border-color:var(--line); min-height:44px; border-radius:14px}
.main-nav a, .is-practicing .main-nav a {min-height:44px; color:var(--muted); padding:8px}
.main-nav a:hover, .main-nav a[aria-current=page] {color:var(--accent)}
.button, .practice-section .button, .dashboard-section .button, .question-actions .button {
  background:#19385f; border-color:#19385f; color:#fff; border-radius:16px; min-height:52px; font-size:16px;
  box-shadow:0 5px 14px #19385f15; transition:background .18s, transform .18s;
}
.button:hover, .practice-section .button:hover, .dashboard-section .button:hover {background:#27466c; border-color:#27466c}
.button:active {transform:scale(.98)}
.button:disabled, .question-actions .button:disabled {background:var(--soft); border-color:var(--line); color:var(--muted); box-shadow:none}
.button-secondary, .practice-section .button-secondary, .dashboard-section .button-secondary {background:var(--paper); border-color:var(--line); color:var(--accent); box-shadow:none}
.button-secondary:hover {background:var(--soft)}
.practice-section {max-width:1120px; padding-block:8px 24px; min-height:calc(100vh - 80px)}
.practice-section .question-content {padding:10px 0 24px}
.quiz-topline {display:flex; align-items:center; justify-content:space-between; color:var(--muted); font-size:14px; font-weight:600; margin-bottom:14px; font-variant-numeric:tabular-nums}
.quiz-topline .bookmark-control {color:var(--accent); padding:10px; min-width:44px; min-height:44px; background:var(--paper); border:1px solid var(--line); border-radius:14px}
.bookmark-control.saved .icon {fill:var(--accent-soft)}
.practice-section .question-workspace {gap:44px; align-items:start; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
.practice-section .image-stage, .practice-section .image-stage.meeting {background:var(--accent-soft); border-radius:28px; padding:24px; min-height:360px; overflow:hidden; transition:transform .2s}
.practice-section .image-stage:hover {background:var(--soft); transform:translateY(-2px)}
.practice-section .question-image, .practice-section .meeting .question-image {height:320px; object-fit:contain}
.practice-section .question-title, html[lang=ar] .practice-section .question-title {font-size:26px; line-height:1.4; letter-spacing:-.4px; margin-bottom:20px; font-weight:650}
.practice-section .options {gap:10px}
.option, .practice-section .option {background:var(--paper); border:1px solid var(--line); border-radius:18px; min-height:64px; padding:14px 16px; box-shadow:0 3px 12px #101d3004; transition:background .18s,border-color .18s,box-shadow .18s}
.option:hover {background:var(--soft); border-color:var(--accent)}
.option:has(input:focus-visible) {outline:3px solid var(--accent); outline-offset:3px}
.option-text {font-size:17px; line-height:1.5}
.option-letter {background:var(--soft); color:var(--muted); border-color:var(--line); border-radius:10px}
.option.selected:not(.correct):not(.incorrect), .practice-section .option.selected:not(.correct):not(.incorrect) {background:var(--accent-soft); border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent)}
.option.selected:not(.correct):not(.incorrect) .option-letter {background:#19385f; border-color:#19385f; color:#fff}
.option.correct, .practice-section .option.correct {background:var(--success-bg); border-color:var(--success); box-shadow:inset 0 0 0 1px var(--success)}
.option.correct .option-letter, .option.correct .option-marker {background:var(--success); border-color:var(--success); color:var(--cream); box-shadow:none}
.option.incorrect, .practice-section .option.incorrect {background:var(--red-bg); border-color:var(--red); box-shadow:inset 0 0 0 1px var(--red)}
.option.incorrect .option-letter {background:var(--red); border-color:var(--red); color:var(--cream)}
.option.incorrect .option-marker {color:var(--red); font-size:24px}
.answer-verdict {display:block; font-size:13px; font-weight:650; margin-top:5px; color:var(--success)}
.incorrect .answer-verdict {color:var(--red)}
.option.answer-celebrate {animation:premium-answer .3s ease-out}
.option.answer-celebrate .option-marker {animation:answer-check-pop .28s ease-out}
@keyframes premium-answer {from{transform:scale(.985)}to{transform:scale(1)}}
.practice-section .question-actions {margin-top:18px}
.feedback, .feedback.wrong {background:var(--paper); border:1px solid var(--line); border-radius:16px; margin-top:16px}
.feedback-title, .feedback.wrong .feedback-title {display:flex; justify-content:space-between; align-items:center; min-height:48px; padding:12px 16px; color:var(--accent); font-size:15px}
.feedback-content {padding:0 16px 16px}
.feedback p, .feedback.wrong p {color:var(--navy-soft); font-size:16px; line-height:1.65}
.source-link {color:var(--accent)}
.account-tabs, .study-symbol, .progress-glance > .icon, .access-symbol {background:var(--accent-soft); border-color:var(--line); color:var(--accent)}
.account-tabs button[aria-pressed=true], .focus-select, #account-form input, .topic-picker select, .study-controls, .progress-card {background:var(--paper); border-color:var(--line); color:var(--navy)}
.study-tab.active .study-symbol {background:#19385f; border-color:#19385f; box-shadow:none}
.study-tab, .study-tab.active {min-height:80px; color:var(--muted)}
.study-symbol {width:48px; height:48px; border-radius:16px}
#review-mistakes .study-symbol, #saved-practice .study-symbol {background:var(--soft); border-color:var(--line); color:var(--muted)}
#review-mistakes.active .study-symbol, #saved-practice.active .study-symbol {background:#19385f; border-color:#19385f; color:#fff; box-shadow:none}
#review-mistakes.active, #saved-practice.active, .study-tab.active {color:var(--accent)}
.mistake-count, .study-tab.active .mistake-count {background:var(--paper); border-color:var(--line); color:var(--navy)}
.focus-picker, .practice-toolbar, .results-details, .result-list {border-color:var(--line)}
.progress-segment, .readiness-track {background:var(--soft); stroke:var(--line)}
.progress-segment.current, .progress-segment.done {background:var(--accent)}
.image-dialog {background:var(--paper); color:var(--navy)}
.image-dialog::backdrop {background:#242220dc}
.access-card h1, .access-card h2, .dashboard-section .practice-welcome h1, .empty-state h2, .results h2 {font-family:inherit; font-weight:650; font-size:30px; letter-spacing:-.5px}
.access-card .text-link, .access-card button.text-link {color:var(--accent)}
.access-card button.text-link:hover {background:var(--soft)}
.site-footer, .how-section {background:var(--cream); border-color:var(--line)}
.feature-icon, .topic-icon, .topic-card:nth-child(3) .topic-icon {background:var(--accent-soft); color:var(--accent)}
.topic-card {background:var(--paper)}
.language-dot {background:var(--accent)}
.site-privacy-settings {background:var(--paper); color:var(--muted); border-color:var(--line)}
@media(max-width:680px) {
  .container {padding-inline:16px}
  .header-inner, .is-practicing .header-inner {height:64px; min-height:64px; gap:8px; padding-block:8px}
  .brand-icon {display:none}
  .brand-wordmark, .is-practicing .brand-wordmark {display:block; font-size:17px; letter-spacing:-.5px}
  .brand-wordmark small {display:none}
  .main-nav, .is-practicing .main-nav {width:auto; order:0; margin-inline-start:auto; gap:0}
  .main-nav a {display:none}
  .main-nav a[data-action=dashboard] {display:flex; min-width:44px; padding:10px; justify-content:center}
  .main-nav a[data-action=dashboard] span {display:none}
  .main-nav a[data-action=dashboard] .nav-icon {width:20px; height:20px}
  .header-actions {gap:6px}
  .language-picker {padding-inline:6px 2px; gap:0}
  .language-picker > .icon {display:none}
  .language-picker select {font-size:12px; max-width:67px; min-height:42px}
  .theme-toggle {font-size:22px}
  .practice-section {padding-block:0 20px; min-height:calc(100vh - 64px)}
  .practice-section .question-content {padding-top:0}
  .quiz-topline {margin-bottom:8px; min-height:44px}
  .practice-section .question-workspace {display:flex; flex-direction:column; gap:16px}
  .practice-section .image-stage, .practice-section .image-stage.meeting {min-height:0; padding:12px; border-radius:20px; width:100%; order:0}
  .practice-section .question-image, .practice-section .meeting .question-image {height:130px; width:100%}
  .practice-section .answer-area {width:100%}
  .practice-section .question-title, html[lang=ar] .practice-section .question-title {font-size:21px; line-height:1.4; margin:0 0 16px; letter-spacing:0}
  .practice-section .option {padding:12px; min-height:58px; border-radius:16px}
  .option-text {font-size:17px}
  .option-marker {width:20px}
  .practice-section .question-actions {margin-top:16px; position:sticky; bottom:8px; z-index:2}
  .practice-section .question-actions .button {width:100%; min-height:52px; box-shadow:0 8px 24px #24222024}
  html[lang=ar] .option-text {line-height:1.65}
  .dashboard-section {padding-top:20px}
}
@media(prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto}
  *, *::before, *::after {animation:none !important; transition:none !important}
  .button:active, .image-stage:hover {transform:none !important}
}

@media(max-width:680px) {
  .practice-section .question-workspace .answer-area {display:block}
  .practice-section .question-workspace .question-title {order:0}
  .practice-section .question-workspace .question-actions {width:100%}
  .practice-section .question-workspace .question-actions .button {width:100%}
  .practice-section .question-workspace .question-image {height:118px}
}
.dn-privacy-settings {position:static; display:inline-flex; align-items:center; margin:0 16px 16px; background:transparent; border:0; color:var(--muted); font-size:12px}
@media(max-width:680px) {
  body .container.header-inner {height:64px; min-height:64px; flex-wrap:nowrap; gap:8px; padding-block:8px}
  .header-actions {order:0; margin-inline-start:0}
  body .header-inner .main-nav {order:0; width:auto; flex-wrap:nowrap; margin-inline-start:auto}
}

.dn-consent {background:var(--paper); color:var(--navy); border-color:var(--line)}
.dn-consent-actions button {background:var(--paper); color:var(--navy); border-color:var(--line)}
.dn-consent-actions button:hover {background:var(--soft)}
#dn-options small {color:var(--muted)}

/* One focal point: quiz first, three labeled destinations, profile preferences. */
.header-inner,.is-practicing .header-inner {height:64px;min-height:64px}
.brand-icon,.brand-wordmark small {display:none}
.brand-wordmark > span {color:var(--navy)}
.main-nav {margin-inline-start:auto}
.main-nav a {display:flex;gap:8px;align-items:center}
.main-nav a[aria-current=page] {color:var(--navy);font-weight:650}
.main-nav a[aria-current=page]::after {background:var(--accent)}
.header-actions {display:none}
.account-section .header-actions {display:flex;gap:16px;padding:12px 0;justify-content:flex-start}
.profile-preferences {border-top:1px solid var(--line);margin-top:28px;padding-top:20px}
.profile-preferences h2 {font-size:20px;margin-bottom:10px}
.button,.practice-section .button,.dashboard-section .button,.question-actions .button {box-shadow:none;background:#19385f;border-color:#19385f;border-radius:14px}
:root[data-theme=dark] .button,:root[data-theme=dark] .practice-section .button,:root[data-theme=dark] .dashboard-section .button,:root[data-theme=dark] .question-actions .button {background:#f5f0ea;border-color:#f5f0ea;color:#242220}
:root[data-theme=dark] .button:disabled {background:var(--soft);border-color:var(--line);color:var(--muted)}
.button-secondary,.practice-section .button-secondary,.dashboard-section .button-secondary {background:var(--paper);border-color:var(--line);color:var(--navy)}
.practice-section {max-width:1040px;min-height:calc(100dvh - 64px)}
.practice-section .question-workspace.text-only {display:block;max-width:640px;margin:auto}
.quiz-topline {max-width:640px;margin-inline:auto;color:var(--muted)}
.quiz-topline .bookmark-control {background:transparent;border:none;color:var(--navy);min-height:48px}
.practice-section .question-title,html[lang=ar] .practice-section .question-title {font-size:23px;line-height:1.4;font-weight:600}
.option,.practice-section .option {box-shadow:none;border-radius:14px;background:var(--paper)}
.option.selected:not(.correct):not(.incorrect),.practice-section .option.selected:not(.correct):not(.incorrect) {background:var(--accent-soft);border-color:var(--accent)}
.option.selected:not(.correct):not(.incorrect) .option-letter {background:var(--accent);border-color:var(--accent)}
.study-navigation {display:flex;flex-direction:column;gap:0}
.study-tab,.study-tab.active {display:flex;justify-content:flex-start;min-height:56px;width:100%;border-bottom:1px solid var(--line);border-radius:0;gap:14px;text-align:start;color:var(--navy)}
.study-symbol {background:none!important;border:none!important;color:var(--muted)!important;width:36px;height:48px}
.study-label {font-size:17px}
.study-tab.active .study-symbol {color:var(--accent)!important}
.dashboard-section .practice-heading {display:block}
.dashboard-metrics {margin-top:20px;justify-content:flex-start}
.progress-glance {background:none;border:none;padding:0}
.readiness-widget {display:none}
.progress-fraction {font-size:36px}
.dashboard-section .practice-tools {max-width:680px;margin-top:32px}
.footer-links {display:flex;flex-wrap:wrap;gap:18px}
@media(max-width:680px) {
  body {padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .header-inner,.is-practicing .header-inner {height:52px;min-height:52px;justify-content:center}
  .brand-wordmark,.is-practicing .brand-wordmark {font-size:18px}
  .main-nav,.is-practicing .main-nav {position:fixed;inset-inline:0;bottom:0;width:100%;z-index:20;margin:0;padding:6px 12px calc(6px + env(safe-area-inset-bottom));background:var(--paper);border-top:1px solid var(--line);display:flex;justify-content:space-around;gap:0}
  .main-nav a,.main-nav a[data-action=dashboard] {display:flex;flex:1;min-height:56px;padding:4px 8px;flex-direction:column;justify-content:center;gap:5px;font-size:12px;color:var(--muted)}
  .main-nav a span,.main-nav a[data-action=dashboard] span {display:block}
  .main-nav .nav-icon {width:20px;height:20px}
  .main-nav a[aria-current=page] {color:var(--accent)}
  .practice-section {min-height:calc(100dvh - 128px);padding-block:0 16px}
  .practice-section .question-content {padding-bottom:8px}
  .quiz-topline {margin-bottom:10px}
  .practice-section .question-title,html[lang=ar] .practice-section .question-title {font-size:20px;line-height:1.4;margin-bottom:18px}
  .practice-section .option {min-height:52px;padding:12px;border-radius:14px}
  .option-text {font-size:16px;line-height:1.45}
  html[lang=ar] .option-text {line-height:1.5}
  .practice-section .question-actions {margin-top:18px;bottom:84px}
  .practice-section .question-actions .button {box-shadow:none}
  .practice-section .image-stage {background:var(--paper);padding:10px}
  .account-section {padding-top:20px}
  .account-section .access-card {padding:18px 0;border:none;background:none;box-shadow:none}
  .dashboard-section .practice-welcome h1 {font-size:30px}
  .dashboard-metrics {display:block}
}

:root[data-theme=dark] .button-secondary,:root[data-theme=dark] .practice-section .button-secondary,:root[data-theme=dark] .dashboard-section .button-secondary {background:var(--paper);border-color:var(--line);color:var(--navy)}
.profile-preferences .theme-toggle {width:auto;padding:10px 14px;gap:10px;min-height:48px;border-radius:12px;font-size:16px}


/* Completion has its own home; collection actions open question practice. */
.dashboard-content {max-width:600px;margin:24px auto 0}
.dashboard-section > h1 {max-width:600px;margin:auto;font-size:30px;font-weight:650}
.completion-card {padding:24px;background:var(--paper);border:1px solid var(--line);border-radius:22px;display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center}
.completion-reading p {font-size:16px;color:var(--muted);margin:0 0 8px}
.completion-card .progress-fraction {font-size:36px;gap:10px;line-height:1.3;color:var(--navy);font-variant-numeric:tabular-nums}
.completion-card .progress-fraction span {font-size:25px;color:var(--muted)}
.completion-card .readiness-widget {display:block;margin:0;width:80px}
.completion-card .readiness-gauge {position:relative;width:80px;height:80px;display:grid;place-items:center}
.completion-card .readiness-gauge svg {position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.completion-card .readiness-track {fill:none;stroke:var(--line);stroke-width:7}
.completion-card .readiness-fill {fill:none;stroke:var(--accent);stroke-width:7;stroke-linecap:round;stroke-dasharray:var(--completion) 100;transition:stroke-dasharray .35s ease-out}
#completion-percent {font-size:16px;color:var(--navy);font-variant-numeric:tabular-nums}
.answer-counts {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-block:16px 24px}
.answer-count {padding:18px;background:var(--paper);border:1px solid var(--line);border-radius:16px}
.answer-count p {font-size:16px;color:var(--success);margin:0 0 8px}
.answer-count + .answer-count p {color:var(--red)}
.answer-count strong {font-size:28px;color:var(--navy);font-variant-numeric:tabular-nums}
.dashboard-content .study-navigation {display:flex;flex-direction:column;gap:12px;padding:0}
.dashboard-content .study-tab,.dashboard-content .study-tab.active {display:flex;flex-direction:row;align-items:center;gap:12px;padding:16px 18px;min-height:56px;background:var(--paper);color:var(--navy);border:1px solid var(--line);border-radius:18px;width:100%;font-weight:600;transition:background .12s,border-color .12s,opacity .12s}
.dashboard-content .study-tab .icon {width:22px;height:22px;color:inherit}
.dashboard-content .study-label {font-size:17px}
.collection-count {margin-inline-start:auto;font-variant-numeric:tabular-nums;min-width:28px;padding:5px 8px;background:var(--accent-soft);border-radius:20px}
.dashboard-content .study-tab:hover {background:var(--accent-soft);border-color:var(--accent);color:var(--navy)}
.dashboard-content .study-tab:focus-visible {outline:3px solid var(--accent);outline-offset:3px}
.dashboard-content .study-tab:active {opacity:.97}
@media(max-width:680px) {.completion-card {padding:22px;gap:18px}.dashboard-content {margin-top:20px}.dashboard-section {padding-bottom:32px}}
@media(prefers-reduced-motion:reduce) {.dashboard-content .study-tab {transition:none}.dashboard-content .study-tab:active {transform:none}}

.completion-card .progress-fraction strong {font:inherit;color:var(--navy)}
.completion-card .readiness-gauge[aria-valuenow="0"] .readiness-fill {opacity:0}

.dashboard-content #review-mistakes.study-tab,.dashboard-content #saved-practice.study-tab {color:var(--navy)}
.dashboard-content .study-tab .study-label,.dashboard-content .study-tab .collection-count,.dashboard-content #review-mistakes .icon,.dashboard-content #saved-practice .icon {color:inherit}

html[dir=rtl] .collection-arrow {transform:scaleX(-1)}

/* Accent is reserved for borders and icons; selected answer text stays ink. */
.dashboard-content .study-tab > .icon:first-child {box-sizing:content-box;padding:10px;border-radius:12px;background:var(--accent-soft);color:var(--accent)}
.option.selected:not(.correct):not(.incorrect) .option-letter {background:var(--paper);border-color:var(--accent);color:var(--navy)}
:root[data-theme=dark] .button,:root[data-theme=dark] .practice-section .button,:root[data-theme=dark] .dashboard-section .button,:root[data-theme=dark] .question-actions .button {background:#f5f0ea;border-color:#f5f0ea;color:#242220}
:root[data-theme=dark] .button:hover {background:#ded6cc;border-color:#ded6cc}
:root[data-theme=dark] .button-secondary,:root[data-theme=dark] .practice-section .button-secondary,:root[data-theme=dark] .dashboard-section .button-secondary {background:var(--paper);border-color:var(--line);color:var(--navy)}
:root[data-theme=dark] .button:disabled,:root[data-theme=dark] .question-actions .button:disabled {background:var(--soft);border-color:var(--line);color:var(--muted)}

/* Shared preferences and tangible surfaces across every shell destination. */
:root {--button:#b4531f;--button-light:#b65420;--button-edge:#773713;--button-text:#fff}
:root[data-theme=dark] {--button:#f1b3d0;--button-light:#f7cadf;--button-edge:#a46086;--button-text:#280f23}
body {font-family:"Avenir Next","DM Sans",system-ui,sans-serif}
.question-title,.exam-heading,.dashboard-section>h1 {font-family:Georgia,"Times New Roman",serif!important}
html[lang=ar] .question-title,html[lang=ar] .exam-heading {font-family:system-ui,sans-serif!important}
.header-inner,.is-practicing .header-inner {justify-content:space-between}
.header-actions.display-menu {display:block!important;position:relative;margin-inline-start:12px;flex-shrink:0}
.display-menu>summary {list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 12px;border:1px solid var(--line);border-radius:14px;background:var(--paper);font-size:13px;color:var(--navy);gap:8px}
.display-menu>summary::after {content:"⌄";font-size:17px}
.display-options {position:absolute;inset-inline-end:0;top:calc(100% + 8px);z-index:40;display:grid;gap:8px;width:240px;padding:18px;background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:0 16px 36px #0003}
.display-options select {min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--cream);color:var(--navy);padding:8px;font:inherit}
.display-options label {font-size:13px;color:var(--muted)}
.button,.practice-section .button,.dashboard-section .button,.question-actions .button,:root[data-theme=dark] .button,:root[data-theme=dark] .practice-section .button,:root[data-theme=dark] .dashboard-section .button,:root[data-theme=dark] .question-actions .button {
 background:repeating-linear-gradient(125deg,#ffffff0a 0px,#ffffff0a 1px,transparent 1px,transparent 7px),linear-gradient(145deg,var(--button-light),var(--button));color:var(--button-text);border:1px solid #ffffff30;box-shadow:0 3px 0 var(--button-edge),0 8px 16px #0002;transform:none;border-radius:16px}
.button:hover,.practice-section .button:hover {background:linear-gradient(145deg,var(--button-light),var(--button));border-color:#ffffff50}
.button:active {transform:translateY(2px);box-shadow:0 1px 0 var(--button-edge),0 3px 8px #0002}
.button-secondary,.practice-section .button-secondary,.dashboard-section .button-secondary,:root[data-theme=dark] .button-secondary,:root[data-theme=dark] .practice-section .button-secondary {background:var(--paper);color:var(--navy);border:1px solid var(--line);box-shadow:0 2px 0 var(--line)}
.button:disabled,.practice-section .button:disabled,.question-actions .button:disabled,:root[data-theme=dark] .button:disabled {background:var(--soft);color:var(--muted);border-color:var(--line);box-shadow:none}
.option,.practice-section .option {box-shadow:0 2px 0 color-mix(in srgb,var(--line) 70%,transparent),0 5px 12px #00000005;background:linear-gradient(145deg,var(--paper),color-mix(in srgb,var(--paper) 94%,var(--accent)))}
.dashboard-content .study-navigation {margin-top:20px}
.exam-section {max-width:680px;padding-top:24px}
.exam-landing {max-width:600px;margin:auto;display:grid;gap:24px;padding-block:16px}
.exam-heading {font-size:38px;line-height:1.15;margin:0}
.exam-landing p {color:var(--muted);margin:0}
.exam-facts {display:flex;gap:24px;padding:24px;background:var(--paper);border:1px solid var(--line);border-radius:22px}
.exam-facts>div {flex:1;display:grid;gap:8px;color:var(--muted);font-size:13px}
.exam-facts strong {font-size:32px;color:var(--navy)}
.exam-clock {font-variant-numeric:tabular-nums;color:var(--accent)}
.exam-controls {display:flex;gap:12px;margin-top:20px}.exam-controls .button {flex:1}
.exam-result {text-align:center;display:grid;gap:24px;padding-top:28px}.exam-result strong {font-size:48px}
.collection-dialog {max-width:380px;width:calc(100% - 32px);border:1px solid var(--line);border-radius:22px;padding:24px;background:var(--paper);color:var(--navy);box-shadow:0 24px 80px #0005}
.collection-dialog::backdrop {background:#160914aa;backdrop-filter:blur(4px)}
.collection-dialog h2 {font-size:23px;margin:0 0 20px}.collection-dialog form {display:grid;gap:14px}.collection-dialog p {color:var(--muted);margin-bottom:20px}
@media(max-width:680px) {.header-inner,.is-practicing .header-inner {justify-content:space-between}.display-menu>summary {font-size:12px;padding:6px 9px}.brand-wordmark {font-size:16px!important}.exam-section {padding-top:12px}.exam-heading {font-size:32px}.exam-facts {padding:20px;gap:14px}.main-nav a {padding-inline:2px!important;font-size:11px!important}}

.exam-section button.text-link {background:transparent;border:0;color:var(--accent);font:inherit;min-height:44px;padding:8px 0;cursor:pointer;box-shadow:none}

/* Shared car identity and useful dashboard hierarchy. */
.brand-icon {display:block !important;width:64px;height:44px;overflow:hidden;flex-shrink:0}
.brand-icon img {width:100%;height:100%;object-fit:contain}
.bookmark-control.saved .icon {fill:currentColor}
.saved-label {font-size:12px;margin-inline-start:5px}
.chosen-plan {background:var(--accent-soft);border:1px solid var(--line);padding:16px;border-radius:16px;margin-block:16px;text-align:start}

.profile-topic-focus{margin-top:24px;text-align:start}.profile-topic-focus label{display:block;margin-bottom:8px}.profile-topic-focus select{width:100%;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--navy);font:inherit}

/* Topic practice follows the existing ivory/copper and magenta/rose shell. */
.topic-practice-entry {display:flex;justify-content:center;padding-block:18px}
.topic-practice-entry .text-link {font-size:14px;min-height:44px}
.topic-dashboard-entry {display:flex;align-items:center;gap:14px;margin-block:22px;padding:18px 22px;border:1px solid var(--line);border-radius:18px;color:var(--navy);background:var(--paper);text-decoration:none}
.topic-dashboard-entry>span:last-child {margin-inline-start:auto}
/* Editorial photography for the seven curriculum topics. */
.topic-practice-section {max-width:1160px;padding-block:48px 80px;min-height:calc(100svh - 240px)}
.topic-page-heading {max-width:720px;margin:0 auto 34px;text-align:center}
.topic-page-heading h1 {font-family:Georgia,serif;font-size:clamp(34px,4vw,50px);line-height:1.15;letter-spacing:-1.5px;margin:0 0 16px}
html[lang=ar] .topic-page-heading h1 {font-family:system-ui,sans-serif;letter-spacing:0}
.topic-curriculum {margin:0;color:var(--muted);font-size:17px;line-height:1.7;text-wrap:pretty}
.topic-curriculum a {color:inherit;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px}
.topic-curriculum a:hover {color:var(--accent)}
.topic-badges {display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;max-width:1100px;margin:auto}
.topic-badge {grid-column:span 4;display:flex;flex-direction:column;min-width:0;overflow:hidden;padding:0;border:1px solid var(--line);border-radius:20px;background:var(--paper);color:var(--navy);font:inherit;text-align:start;cursor:pointer;box-shadow:0 5px 16px #24190f08;transition:transform .24s,border-color .24s,box-shadow .24s}
.topic-badge:nth-child(n+4) {grid-column:span 3}
.topic-photo {display:block;width:100%;aspect-ratio:3/2;overflow:hidden;background:var(--soft)}
.topic-photo img {display:block;width:100%;height:100%;object-fit:cover;transition:transform .5s cubic-bezier(.2,.7,.3,1)}
.topic-badge-caption {display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:18px 20px;min-height:82px}
.topic-badge-name {font-size:18px;line-height:1.35;font-weight:600;text-wrap:pretty}
.topic-badge:nth-child(n+4) .topic-badge-caption {padding:16px;min-height:80px}
.topic-badge:nth-child(n+4) .topic-badge-name {font-size:16px}
.topic-badge-go {display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent);transition:background .2s,color .2s}
.topic-badge-go .icon {width:16px;height:16px}
.topic-badge:hover {border-color:var(--accent);transform:translateY(-4px);box-shadow:0 12px 28px #24190f14}
.topic-badge:hover .topic-photo img {transform:scale(1.035)}
.topic-badge:hover .topic-badge-go {background:var(--accent);color:var(--paper)}
.topic-badge:active {transform:translateY(0)}
.topic-badge:focus-visible {outline:3px solid var(--accent);outline-offset:4px}
html[dir=rtl] .topic-dashboard-entry>span:last-child {transform:scaleX(-1)}
@media(max-width:900px){.topic-badges{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.topic-badge,.topic-badge:nth-child(n+4){grid-column:auto}.topic-badge:last-child{grid-column:1/-1;width:calc((100% - 18px)/2);justify-self:center}.topic-badge-caption,.topic-badge:nth-child(n+4) .topic-badge-caption{padding:16px 18px;min-height:76px}.topic-badge-name,.topic-badge:nth-child(n+4) .topic-badge-name{font-size:17px}}
@media(max-width:480px){.topic-practice-section{padding-block:30px 48px}.topic-page-heading{text-align:start;margin-bottom:26px}.topic-page-heading h1{font-size:34px;letter-spacing:-.8px;margin-bottom:14px}.topic-curriculum{font-size:15px}.topic-badges{gap:14px}.topic-badge{border-radius:15px}.topic-badge-caption,.topic-badge:nth-child(n+4) .topic-badge-caption{padding:12px;min-height:76px;gap:6px}.topic-badge-name,.topic-badge:nth-child(n+4) .topic-badge-name{font-size:14px}.topic-badge-go{width:24px;height:24px;flex-basis:24px}.topic-badge-go .icon{width:13px;height:13px}.topic-badge:last-child{width:calc((100% - 14px)/2)}}
@media(prefers-reduced-motion:reduce){.topic-badge,.topic-photo img,.topic-badge-go{transition:none}.topic-badge:hover,.topic-badge:hover .topic-photo img{transform:none}}

/* Route announcements retain focus without drawing a box around plain headings. */
.route-heading:focus {outline:none}
.account-section .access-card {gap:20px;margin-block:32px 56px}
.account-help-links {display:flex;justify-content:center;flex-wrap:wrap;gap:12px 24px;margin-top:8px;font-size:14px;color:var(--muted)}
.account-help-links a {display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;text-underline-offset:4px}
.account-section .profile-topic-focus {width:100%;display:grid;justify-items:center;gap:18px;margin-top:12px;padding-top:28px;border-top:1px solid var(--line);text-align:center}
.account-section .profile-topic-focus h2 {font-size:23px;line-height:1.35;letter-spacing:-.3px}
.account-section .profile-topic-focus .button {display:inline-flex;align-items:center;justify-content:center;gap:16px;margin:0}

/* Keep the complete car identity and physical header placement in every language. */
body .container.header-inner, .is-practicing .container.header-inner {direction:ltr;height:104px;min-height:104px;padding-block:8px;gap:20px;flex-wrap:nowrap;justify-content:space-between}
.site-header .brand {direction:ltr;flex-shrink:0;gap:0}
.site-header .brand-icon {position:static;display:block!important;width:128px;height:auto;overflow:visible;flex-shrink:0}
.site-header .brand-icon img {position:static;display:block;width:100%;height:auto;max-width:100%;left:auto;top:auto;object-fit:contain}
.site-header .header-actions.display-menu {direction:ltr;margin-inline-start:0}
.site-header .display-options {inset-inline-end:0;inset-inline-start:auto}
html[dir=rtl] .site-header .display-menu {direction:rtl}
html[dir=rtl] .site-header .display-options {inset-inline-start:0;inset-inline-end:auto}
html[dir=rtl] .main-nav {direction:rtl}
:root[data-theme=dark] .site-header .brand-icon {background:#faf7f1;border-radius:10px}
@media(max-width:680px){body .container.header-inner,.is-practicing .container.header-inner{height:96px;min-height:96px;gap:12px;padding-block:8px}.site-header .brand-icon{width:120px}.site-header .display-menu>summary{font-size:13px;padding:10px 12px}.site-header .display-options{max-width:calc(100vw - 32px)}}

/* Two compact controls: current language flag and immediate light/dark toggle. */
.site-header .header-actions.icon-settings {display:flex!important;direction:ltr;align-items:center;gap:8px;margin:0;flex-shrink:0}
.header-icon-control {position:relative;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--paper);color:var(--navy);cursor:pointer;transition:background .18s,border-color .18s}
.header-icon-control:hover {background:var(--accent-soft);border-color:var(--accent)}
.header-language {font-size:24px;line-height:1}
.header-language select {position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;font-size:16px}
.header-icon-control .icon {width:21px;height:21px;stroke-width:1.8}
.header-icon-control:focus-visible,.header-language:has(select:focus-visible) {outline:3px solid var(--accent);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.header-icon-control{transition:none}}

.header-language .arabic-language-label {font-size:15px;font-weight:700;direction:rtl;line-height:1.2}

/* Middle East silhouette sits behind the Arabic language label. */
.header-language:has(.arabic-language-label)::before {content:"";position:absolute;inset:3px;background:var(--accent);opacity:.32;mask:url("assets/middle-east-map.svg") center/contain no-repeat;-webkit-mask:url("assets/middle-east-map.svg") center/contain no-repeat;pointer-events:none}
.header-language .arabic-language-label {position:relative;z-index:1;text-shadow:0 0 3px var(--paper),0 0 3px var(--paper)}
.header-language select {z-index:2}
:root[data-theme=dark] .header-language:has(.arabic-language-label)::before {opacity:.42}

#header-profile {text-decoration:none}
#header-profile[aria-current=page] {color:var(--accent);background:var(--accent-soft);border-color:var(--accent)}

.dashboard-insights {max-width:600px;margin:28px auto 0;padding:22px;background:var(--paper);border:1px solid var(--line);border-radius:22px}
.dashboard-insights h2 {font-size:21px;line-height:1.4;margin:0 0 8px;color:var(--navy)}
.dashboard-insights p {font-size:15px;line-height:1.6;color:var(--muted);margin:0}
.insight-topics {display:grid;gap:10px;margin-top:18px}
.insight-topics .study-tab {display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:48px;padding:12px 14px;text-align:start;background:var(--soft);color:var(--navy);border:1px solid var(--line);border-radius:14px;font-size:15px}
.insight-topics .study-tab .icon {width:18px;height:18px;flex-shrink:0}
.insight-topics .study-tab:hover {background:var(--accent-soft);border-color:var(--accent)}
.insight-topics .study-tab:focus-visible {outline:3px solid var(--accent);outline-offset:3px}
.dashboard-content .study-navigation {width:100%;align-items:stretch}
.dashboard-section .topic-dashboard-entry {max-width:600px;margin:22px auto;flex-direction:row;font-size:16px;min-height:56px}
.dashboard-section .topic-dashboard-entry>.icon {width:22px;height:22px}
