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

:root {
  color-scheme: light;
  --ink: #102a3a;
  --ink-soft: #244657;
  --ink-muted: #647b84;
  --paper: #f6f4ee;
  --card: #fffefa;
  --line: #e5e2d8;
  --line-dark: rgba(255,255,255,.14);
  --emerald: #167765;
  --emerald-bright: #23a38b;
  --emerald-pale: #e7f4ef;
  --gold: #d7b36a;
  --gold-pale: #f6eedb;
  --red: #b5443e;
  --red-pale: #fae9e6;
  --shadow: 0 18px 52px rgba(18,42,53,.075);
  font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(35,163,139,.46); outline-offset: 3px; }
.site-shell { max-width: 1480px; margin: 0 auto; padding: 0 52px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(16,42,58,.11); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--ink); }
.brand-mark svg { width: 29px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; gap: 5px; }
.brand-copy strong { font-size: 20px; letter-spacing: -.04em; font-weight: 800; }
.brand-copy small { color: #73868b; font-size: 11px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 28px; }
.source-badge { color: #60767b; font-size: 12px; display: flex; align-items: center; gap: 9px; }
.source-badge i { width: 7px; height: 7px; display: inline-block; background: var(--emerald-bright); border-radius: 50%; box-shadow: 0 0 0 4px rgba(35,163,139,.12); }
.top-cta { border: 0; border-radius: 3px; background: var(--ink); color: #fff; padding: 11px 17px; font-size: 13px; font-weight: 700; transition: .2s ease; }
.top-cta:hover { background: var(--emerald); transform: translateY(-1px); }
.top-cta span { color: var(--gold); margin-inline-start: 10px; }

.hero { position: relative; isolation: isolate; overflow: hidden; margin: 25px 0 64px; min-height: 387px; border-radius: 5px; background: var(--ink); color: #fff; padding: 49px 55px 0; display: grid; grid-template-columns: minmax(0, 1fr) 370px; grid-template-rows: 1fr 78px; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse at 72% 45%, rgba(27,106,105,.35), transparent 37%), linear-gradient(115deg, #102a3a, #123246 57%, #0e2737); }
.hero-grid { position: absolute; inset: 0 0 78px; z-index: -1; opacity: .13; background-image: linear-gradient(rgba(217,183,111,.26) 1px, transparent 1px), linear-gradient(90deg, rgba(217,183,111,.24) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(90deg, transparent 12%, #000 80%); }
.hero-copy { max-width: 610px; padding-block: 9px 27px; }
.eyebrow, .section-kicker { text-transform: uppercase; letter-spacing: .09em; color: var(--emerald-bright); font-family: 'DM Mono', 'Tajawal', sans-serif; font-size: 11px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.hero .eyebrow { color: #a3c9bd; letter-spacing: .015em; font-family: 'Tajawal', sans-serif; font-size: 13px; }
.eyebrow-line { display: inline-block; width: 26px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(39px, 4.6vw, 57px); line-height: 1.1; letter-spacing: -.04em; margin: 20px 0 13px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-copy p { max-width: 510px; margin: 0; color: #b8c7ca; font-size: 16px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 24px; }
.button { border: 0; border-radius: 3px; font-weight: 700; transition: .2s ease; }
.button-gold { background: var(--gold); color: #1c2d33; padding: 12px 18px; font-size: 14px; }
.button-gold:hover { background: #e8c987; transform: translateY(-1px); }
.button-gold span { margin-inline-start: 16px; font-size: 17px; }
.text-link { background: none; border: 0; color: #d7e1e1; font-size: 13px; padding: 8px 0; }
.text-link:hover { color: var(--gold); }
.text-link span { color: var(--gold); margin-inline-start: 8px; }
.hero-art { position: relative; min-height: 265px; display: flex; justify-content: center; align-items: center; }
.book-frame { width: 122px; height: 174px; padding: 6px; border: 1px solid rgba(215,179,106,.75); background: rgba(11,30,43,.7); box-shadow: 11px 13px 0 rgba(215,179,106,.13), 0 25px 54px rgba(0,0,0,.27); transform: rotate(2.2deg); z-index: 2; }
.book-frame img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; }
.hero-orbit { position: absolute; border: 1px solid rgba(215,179,106,.35); border-radius: 50%; }
.orbit-one { width: 235px; height: 235px; transform: scaleY(.63) rotate(-26deg); }
.orbit-two { width: 296px; height: 296px; transform: scaleY(.6) rotate(26deg); border-color: rgba(35,163,139,.3); }
.orbit-dot { position: absolute; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 6px rgba(215,179,106,.1); }
.dot-one { top: 48px; right: 53px; }.dot-two { bottom: 45px; left: 42px; background: var(--emerald-bright); }.dot-three { right: 30px; bottom: 82px; width: 4px; height: 4px; }
.hero-caption { position: absolute; bottom: 17px; right: 13px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.hero-caption span { font-size: 10px; color: #8ea3a7; }
.hero-caption strong { font-size: 13px; line-height: 1.45; color: #f4f0e5; }
.hero-caption small { font-size: 10px; color: var(--gold); }
.hero-bottom { grid-column: 1 / -1; border-top: 1px solid var(--line-dark); display: flex; align-items: center; gap: 23px; }
.hero-stat { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.hero-stat strong { color: var(--gold); font-family: 'DM Mono', sans-serif; font-size: 20px; font-weight: 500; }
.hero-stat span { color: #b0c1c4; font-size: 12px; }
.hero-separator { height: 24px; width: 1px; background: var(--line-dark); }
.hero-note { margin-inline-start: auto; color: #839ba0; font-size: 11px; }

.workspace { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 81px; }
.sidebar { border-inline-start: 1px solid var(--line); padding-inline-start: 23px; position: sticky; top: 22px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 21px 0; }
.sidebar-head .section-kicker { font-size: 10px; }
.sidebar-head h2 { margin: 7px 0 0; font-size: 21px; letter-spacing: -.03em; }
.chapter-total { font-family: 'DM Mono', monospace; font-size: 11px; color: #a2a99e; border-bottom: 1px solid var(--gold); padding-bottom: 4px; }
.chapter-button { display: flex; width: 100%; align-items: center; gap: 11px; text-align: right; background: transparent; border: 1px solid transparent; padding: 10px 8px; color: var(--ink); border-radius: 3px; transition: .18s ease; }
.chapter-button:hover { background: rgba(255,255,255,.72); }
.chapter-button.is-active { border-color: #d7e8e0; background: #edf5f0; }
.chapter-index { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 3px; background: var(--ink); color: var(--gold); font-family: 'DM Mono', monospace; font-size: 11px; flex: 0 0 auto; }
.all-index { font-size: 17px; }
.chapter-label { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.chapter-label strong { font-size: 13px; font-weight: 700; }
.chapter-label small { color: #879398; font-size: 10px; }
.chapter-count { color: #879398; font: 10px 'DM Mono', monospace; }
.part-label { display: flex; gap: 9px; align-items: center; margin: 22px 4px 8px 0; font-size: 10px; color: #8b9695; letter-spacing: .01em; }
.part-label span { color: var(--gold); font: 10px 'DM Mono', monospace; }
.chapter-list { display: flex; flex-direction: column; gap: 2px; }
.part-two { border-top: 1px solid var(--line); padding-top: 16px; }
.sidebar-foot { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 17px; display: flex; align-items: flex-start; gap: 10px; }
.sidebar-foot p { margin: 0; font-size: 11px; line-height: 1.7; color: #7a898a; }
.source-stamp { display: inline-grid; place-items: center; margin-top: 2px; color: var(--emerald); font-size: 11px; }

.learning-area { min-width: 0; }
.area-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 26px; }
.area-heading .section-kicker { font-size: 10px; }
.area-heading h2 { margin: 6px 0 3px; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.04em; line-height: 1.2; }
.area-heading p { margin: 0; color: #718186; font-size: 13px; }
.area-progress { flex: 0 0 190px; margin-bottom: 3px; }
.progress-copy { display: flex; justify-content: space-between; color: #849093; font-size: 10px; margin-bottom: 9px; }
.progress-copy strong { color: var(--emerald); font: 11px 'DM Mono', monospace; }
.progress-track { height: 4px; background: #e2e4dc; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--emerald); transition: width .35s ease; }
.toolbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 59px; }
.mode-switch { align-self: stretch; display: flex; gap: 24px; }
.mode-tab { border: 0; border-bottom: 2px solid transparent; color: #869194; background: transparent; padding: 0 2px; font-size: 13px; font-weight: 600; transition: .2s; }
.mode-tab span { display: inline-block; margin-inline-end: 7px; font: 9px 'DM Mono', monospace; color: #b0b5ad; }
.mode-tab.is-active { color: var(--ink); border-bottom-color: var(--emerald); }
.mode-tab.is-active span { color: var(--emerald); }
.search-box { display: flex; align-items: center; gap: 9px; min-width: 260px; height: 35px; padding: 0 10px; border: 1px solid #e3e3da; background: rgba(255,255,255,.5); color: #788889; }
.search-icon { font-size: 22px; line-height: 1; transform: rotate(-20deg); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #9aa4a3; }
.search-box kbd { color: #9fa7a3; border: 1px solid #e0e1d9; padding: 1px 4px; border-radius: 2px; font: 9px 'DM Mono', monospace; white-space: nowrap; }
.filter-row { display: flex; align-items: center; gap: 8px; min-height: 55px; }
.filter-intro { font-size: 11px; color: #869194; margin-inline-end: 3px; }
.filter-chip { border: 1px solid transparent; background: transparent; color: #718085; padding: 5px 10px; border-radius: 2px; font-size: 11px; transition: .15s; }
.filter-chip:hover { color: var(--ink); background: #eeeee7; }
.filter-chip.is-active { border-color: #d9e6dd; background: #eaf2ed; color: var(--emerald); font-weight: 700; }
.filter-chip span { margin-inline-start: 5px; font: 9px 'DM Mono', monospace; color: #92a09a; }
.filter-result { margin-inline-start: auto; color: #a0a6a1; font-size: 10px; }

.question-card { background: var(--card); border: 1px solid #e8e5dc; box-shadow: var(--shadow); position: relative; min-height: 340px; animation: rise-in .28s ease both; }
.question-card::before { content: ''; position: absolute; top: 0; right: 0; height: 3px; width: 82px; background: var(--gold); }
.question-topline { display: flex; align-items: center; gap: 10px; padding: 24px 30px 0; }
.question-number { font: 11px 'DM Mono', monospace; color: var(--emerald); }
.meta-divider { width: 1px; height: 15px; background: #dcded7; }
.question-kind, .question-level { color: #7c8c8e; font-size: 10px; }
.question-level { margin-inline-start: auto; border: 1px solid #e3e4dc; padding: 4px 8px; color: #899593; }
.question-main { padding: 18px 30px 5px; }
.question-title { margin: 0 0 9px; color: #607379; font-size: 12px; font-weight: 600; }
.question-text { margin: 0; max-width: 860px; font-size: clamp(20px, 2.15vw, 27px); font-weight: 700; line-height: 1.7; letter-spacing: -.025em; }
.option-list { list-style: none; padding: 0; margin: 18px 30px 21px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.option-button { min-height: 56px; width: 100%; display: flex; align-items: center; gap: 11px; text-align: right; border: 1px solid #e7e7df; border-radius: 2px; color: #4c6167; background: #fff; padding: 10px 12px; transition: .15s ease; line-height: 1.55; font-size: 12px; }
.option-button:hover:not(:disabled) { border-color: #92b6a8; background: #fbfdf9; }
.option-letter { flex: 0 0 22px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #dbded7; color: #879390; font: 10px 'DM Mono', monospace; }
.option-button.is-selected { border-color: var(--emerald); background: #eff7f2; color: var(--ink); }
.option-button.is-selected .option-letter { border-color: var(--emerald); color: var(--emerald); background: #fff; }
.option-button.is-correct { border-color: #6eab8f; background: #eaf5ee; color: #174b3c; }
.option-button.is-wrong { border-color: #d99a8e; background: #fff2ef; color: #7a3932; }
.option-button.is-muted { opacity: .64; }
.option-button:disabled { cursor: default; }
.answer-panel { margin: 0 30px 21px; border-inline-start: 3px solid var(--emerald); padding: 15px 17px; background: #eef6f0; animation: rise-in .22s ease both; }
.answer-panel.is-wrong { border-color: var(--red); background: #fbf1ee; }
.answer-header { display: flex; align-items: center; gap: 8px; color: var(--emerald); font-size: 13px; font-weight: 800; margin-bottom: 7px; }
.answer-panel.is-wrong .answer-header { color: var(--red); }
.answer-icon { font: 14px 'DM Mono', monospace; }
.answer-correct-text { font-size: 12px; font-weight: 700; line-height: 1.6; color: #425a5b; margin: 0 0 6px; }
.answer-explanation { color: #546b6b; font-size: 12px; line-height: 1.85; margin: 0; }
.source-line { display: flex; align-items: center; gap: 7px; margin-top: 11px; color: #7e8b86; font-size: 10px; }
.source-line span { color: var(--gold); font-size: 12px; }
.question-controls { border-top: 1px solid #edebe4; margin-top: 20px; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.control-hint { color: #97a19d; font-size: 10px; }
.check-button, .continue-button { border: 0; background: var(--ink); color: #fff; padding: 10px 17px; border-radius: 2px; font-size: 12px; font-weight: 700; transition: .18s ease; }
.check-button:hover:not(:disabled), .continue-button:hover { background: var(--emerald); transform: translateY(-1px); }
.check-button:disabled { opacity: .45; cursor: not-allowed; }
.continue-button { background: var(--emerald); }
.question-navigation { display: flex; align-items: center; justify-content: space-between; padding: 15px 4px 0; }
.nav-button { border: 0; color: #6b7c80; background: transparent; padding: 8px 0; font-size: 11px; transition: .16s; }
.nav-button:hover:not(:disabled) { color: var(--emerald); }
.nav-button:disabled { opacity: .38; cursor: default; }
.nav-next span { color: var(--emerald); margin-inline-start: 10px; font-size: 16px; }
.nav-prev span { color: var(--emerald); margin-inline-end: 10px; font-size: 16px; }
.question-counter { color: #9aa39f; font: 10px 'DM Mono', monospace; direction: ltr; }
.question-counter i { color: var(--gold); font-style: normal; padding: 0 7px; }

.quiz-intro, .quiz-results, .empty-state { min-height: 310px; border: 1px solid #e8e5dc; background: var(--card); box-shadow: var(--shadow); padding: 35px; animation: rise-in .25s ease both; }
.quiz-intro { display: grid; grid-template-columns: 1fr 210px; align-items: center; gap: 30px; }
.quiz-intro h3, .quiz-results h3, .empty-state h3 { margin: 9px 0 8px; font-size: 26px; letter-spacing: -.03em; }
.quiz-intro p, .quiz-results p, .empty-state p { max-width: 530px; margin: 0; color: #708084; font-size: 13px; line-height: 1.8; }
.quiz-symbol { width: 150px; height: 150px; margin-inline: auto; border-radius: 50%; border: 1px solid #eadcb9; display: grid; place-items: center; position: relative; color: var(--emerald); font-size: 55px; background: radial-gradient(circle, #fff 0 45%, #f7f3e6 46%); }
.quiz-symbol::before, .quiz-symbol::after { content: ''; position: absolute; border: 1px solid #d9bd79; border-radius: 50%; inset: 12px; }
.quiz-symbol::after { inset: -9px; border-color: #dce8e0; }
.quiz-actions { display: flex; justify-content: center; gap: 10px; margin-top: 15px; }
.quiz-intro .start-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.start-button { background: var(--emerald); color: #fff; border: 0; border-radius: 2px; padding: 11px 16px; font-size: 12px; font-weight: 700; }
.start-button:hover { background: #105e51; }
.start-button.secondary { background: #edf2ed; color: var(--emerald); }
.start-button.secondary:hover { background: #dbece1; }
.quiz-label { display: inline-flex; align-items: center; gap: 8px; color: var(--emerald); font-size: 11px; font-weight: 700; }
.quiz-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.quiz-question-count { display: inline-block; margin-top: 16px; color: #a28a51; font: 11px 'DM Mono', monospace; }
.quiz-results { text-align: center; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.result-ring { width: 113px; height: 113px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; border: 6px solid #e4eee7; color: var(--emerald); font: 20px 'DM Mono', monospace; position: relative; }
.result-ring::after { content: ''; position: absolute; inset: -6px; border: 6px solid var(--gold); border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; transform: rotate(25deg); }
.quiz-results h3 { margin-top: 0; }
.quiz-results p { max-width: 450px; }
.quiz-results .start-buttons { justify-content: center; }
.empty-state { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state .empty-mark { font-size: 34px; color: var(--gold); }
.empty-state button { margin-top: 14px; border: 1px solid #dce8e0; color: var(--emerald); background: #edf5f0; padding: 8px 13px; font-size: 11px; }

.site-footer { min-height: 87px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 20px 0; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.footer-brand small { display: block; font-size: 9px; color: #82908d; font-weight: 500; }
.footer-mark { display: grid; place-items: center; width: 29px; height: 29px; color: var(--gold); background: var(--ink); border-radius: 9px; font-size: 16px; }
.site-footer p { max-width: 650px; color: #8a9694; font-size: 10px; line-height: 1.7; margin: 0; }
.footer-edition { color: #a2aaa3; font: 9px 'DM Mono', monospace; white-space: nowrap; }
.toast { position: fixed; z-index: 10; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; color: #fff; background: var(--ink); box-shadow: 0 12px 35px rgba(15,42,55,.18); font-size: 12px; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }
@keyframes rise-in { from { opacity: .45; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1280px) {
  .hero { grid-template-columns: minmax(0, 1fr) 410px; }
  .question-card { min-height: 360px; }
}
@media (max-width: 1020px) {
  .site-shell { padding-inline: 28px; }
  .workspace { grid-template-columns: 225px minmax(0,1fr); gap: 30px; }
  .hero { grid-template-columns: minmax(0,1fr) 310px; padding-inline: 38px; }
  .hero-caption { right: 0; }
  .option-list { grid-template-columns: 1fr; }
  .question-card { min-height: 0; }
}
@media (max-width: 760px) {
  .site-shell { padding-inline: 18px; }
  .topbar { height: 72px; }
  .topbar-right { gap: 12px; }
  .source-badge { display: none; }
  .top-cta { padding: 9px 12px; font-size: 11px; }
  .hero { margin-top: 17px; margin-bottom: 40px; min-height: 0; padding: 31px 25px 0; grid-template-columns: minmax(0,1fr) 145px; grid-template-rows: 1fr 67px; }
  .hero-copy { padding-block: 3px 19px; }
  .hero h1 { font-size: clamp(32px, 8vw, 45px); margin: 16px 0 9px; }
  .hero-copy p { font-size: 13px; line-height: 1.75; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 8px; margin-top: 18px; }
  .button-gold { padding: 10px 12px; font-size: 12px; }
  .text-link { padding: 6px 0; font-size: 11px; }
  .hero-art { min-height: 200px; }
  .book-frame { width: 85px; height: 124px; }
  .hero-orbit.orbit-one { width: 160px; height: 160px; }
  .hero-orbit.orbit-two { width: 204px; height: 204px; }
  .hero-caption { bottom: 3px; right: 0; }
  .hero-caption strong { font-size: 10px; }
  .hero-caption span, .hero-caption small { font-size: 8px; }
  .hero-bottom { gap: 11px; }
  .hero-stat { flex-direction: column; gap: 0; line-height: 1.1; }
  .hero-stat strong { font-size: 16px; }
  .hero-stat span { font-size: 9px; }
  .hero-note { display: none; }
  .hero-separator { height: 21px; }
  .workspace { display: flex; flex-direction: column; gap: 23px; padding-bottom: 50px; }
  .sidebar { position: static; width: 100%; border-inline-start: 0; border-bottom: 1px solid var(--line); padding: 0 0 17px; }
  .sidebar-head { padding-bottom: 10px; }
  .sidebar-head h2 { font-size: 17px; }
  .sidebar-head .section-kicker { display: none; }
  .sidebar-head h2::before { content: 'مسارات الكتاب · '; color: var(--emerald); font-size: 11px; font-weight: 500; }
  .chapter-button[data-chapter="all"] { width: auto; display: inline-flex; padding: 5px 9px 5px 12px; margin-bottom: 8px; }
  .chapter-button[data-chapter="all"] .chapter-label small { display: none; }
  .part-label { display: none; }
  .chapter-list { flex-direction: row; overflow-x: auto; gap: 5px; padding: 0 0 5px; scrollbar-width: thin; }
  .chapter-list + .part-label { display: none; }
  #chapter-list-two { border-top: 1px solid #e4e4dc; padding-top: 6px; margin-top: 5px; }
  .chapter-list .chapter-button { width: auto; flex: 0 0 auto; gap: 7px; padding: 5px 8px; border-color: #ebe9e2; background: rgba(255,255,255,.45); }
  .chapter-list .chapter-button.is-active { background: #edf5f0; border-color: #d9e8df; }
  .chapter-index { width: 25px; height: 25px; font-size: 9px; }
  .chapter-label strong { font-size: 10px; white-space: nowrap; }
  .chapter-label small, .chapter-count, .sidebar-foot { display: none; }
  .learning-area { width: 100%; }
  .area-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 17px; }
  .area-heading h2 { font-size: 25px; }
  .area-heading p { font-size: 11px; }
  .area-progress { flex: auto; width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column-reverse; gap: 0; padding: 8px 0 0; }
  .mode-switch { min-height: 43px; gap: 22px; }
  .mode-tab { font-size: 12px; }
  .search-box { min-width: 0; width: 100%; }
  .filter-row { flex-wrap: wrap; gap: 4px; padding: 8px 0; }
  .filter-intro { display: none; }
  .filter-chip { font-size: 10px; padding: 5px 8px; }
  .filter-result { font-size: 9px; }
  .question-topline { padding: 20px 17px 0; gap: 7px; }
  .question-main { padding: 15px 17px 4px; }
  .question-text { font-size: 19px; line-height: 1.7; }
  .option-list { margin: 15px 17px 17px; gap: 7px; }
  .option-button { min-height: 49px; font-size: 11px; padding: 8px; }
  .answer-panel { margin: 0 17px 17px; padding: 12px; }
  .answer-explanation { font-size: 11px; }
  .question-controls { padding: 13px 17px; align-items: flex-start; }
  .control-hint { max-width: 170px; line-height: 1.6; }
  .check-button, .continue-button { padding: 10px 12px; font-size: 11px; white-space: nowrap; }
  .quiz-intro, .quiz-results, .empty-state { padding: 24px 19px; min-height: 0; }
  .quiz-intro { grid-template-columns: 1fr; }
  .quiz-symbol { width: 92px; height: 92px; font-size: 36px; grid-row: 1; }
  .quiz-intro h3, .quiz-results h3, .empty-state h3 { font-size: 22px; }
  .quiz-intro p, .quiz-results p { font-size: 12px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 12px; padding: 18px 0; }
  .footer-edition { align-self: flex-end; }
}
@media (max-width: 390px) {
  .site-shell { padding-inline: 13px; }
  .hero { grid-template-columns: minmax(0,1fr) 112px; padding-inline: 18px; }
  .hero h1 { font-size: 31px; }
  .hero-copy p { font-size: 12px; }
  .book-frame { width: 72px; height: 107px; }
  .hero-bottom { gap: 8px; }
  .hero-stat span { font-size: 8px; }
  .question-level { display: none; }
  .filter-chip { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Focused review and local progress tools */
.feature-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 18px; padding: 9px 0 13px; }
.progress-filter-group, .progress-data-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.review-label { color: #7c8987; font-size: 10px; font-weight: 700; margin-inline-end: 3px; }
.progress-filter { border: 1px solid transparent; border-radius: 2px; background: transparent; color: #718085; padding: 6px 9px; font-size: 10px; transition: .15s ease; }
.progress-filter:hover { background: #eeeee7; color: var(--ink); }
.progress-filter.is-active { border-color: #d9e6dd; background: #eaf2ed; color: var(--emerald); font-weight: 700; }
.progress-filter span { margin-inline-start: 5px; color: #91a099; font: 9px 'DM Mono', monospace; }
.progress-filter.is-active span { color: var(--emerald); }
.data-button { border: 1px solid #dfe3dc; border-radius: 2px; background: rgba(255,255,255,.55); color: #657579; padding: 6px 9px; font-size: 10px; transition: .15s ease; }
.data-button:hover { border-color: #9ab9aa; background: #f7fbf7; color: var(--emerald); }
.question-topline { flex-wrap: wrap; }
.question-level { margin-inline-start: 0; }
.bookmark-toggle { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; border: 1px solid #e3e4dc; border-radius: 2px; background: #fff; color: #7b8988; padding: 5px 8px; font-size: 10px; transition: .16s ease; }
.bookmark-toggle:hover { border-color: #d8c38d; background: #fcf8ed; color: #806a37; }
.bookmark-toggle > span:first-child { color: #b5a77f; font-size: 14px; line-height: 1; }
.bookmark-toggle.is-saved { border-color: #eadbb7; background: #faf5e8; color: #806a37; }
.bookmark-toggle.is-saved > span:first-child { color: #b58f3d; }
.daily-dashboard { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(230px, .9fr); gap: 12px; margin: 0 0 20px; }
.daily-goal-card, .streak-card { border: 1px solid #e6e2d8; background: rgba(255,254,250,.74); padding: 15px 18px; }
.daily-goal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.daily-kicker { color: var(--emerald); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.daily-goal-heading h3 { margin: 3px 0 0; font-size: 17px; }
.daily-goal-count { direction: ltr; unicode-bidi: isolate; color: var(--emerald); font: 15px 'DM Mono', monospace; }
.daily-goal-card p { min-height: 17px; margin: 7px 0 9px; color: #768487; font-size: 10px; }
.daily-track { height: 5px; overflow: hidden; background: #e6e8df; }
.daily-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--emerald), var(--emerald-bright)); transition: width .3s ease; }
.daily-goal-settings { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; color: #8a9694; font-size: 9px; }
.daily-goal-choices { display: flex; gap: 4px; }
.daily-goal-choice { min-width: 28px; border: 1px solid #e4e3da; background: #fff; color: #718085; padding: 3px 7px; font: 10px 'DM Mono', monospace; }
.daily-goal-choice:hover { border-color: #a6c2b5; }
.daily-goal-choice.is-active { border-color: #c7ded2; background: #eaf3ed; color: var(--emerald); font-weight: 700; }
.streak-card { display: flex; align-items: center; gap: 15px; }
.streak-total { display: flex; align-items: center; gap: 9px; min-width: 75px; }
.streak-flame { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--gold-pale); color: #99783b; font-size: 16px; }
.streak-total div { display: flex; flex-direction: column; gap: 2px; }
.streak-total strong { color: var(--ink); font: 21px 'DM Mono', monospace; line-height: 1; }
.streak-total div span { color: #879391; font-size: 8px; white-space: nowrap; }
.week-activity { display: flex; flex: 1; justify-content: space-between; gap: 4px; }
.activity-day { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #a3aaa4; }
.activity-day small { font-size: 8px; }
.activity-day strong { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #e5e5dc; border-radius: 50%; background: #fff; font: 9px 'DM Mono', monospace; }
.activity-day.has-activity strong { border-color: #c5dbcf; background: #edf5ef; color: var(--emerald); }
.activity-day.goal-met strong { border-color: var(--emerald); background: var(--emerald); color: #fff; }
.activity-day.is-today small { color: var(--emerald); font-weight: 800; }
.week-caption { display: none; }
@media (max-width: 760px) {
  .feature-tools { align-items: flex-start; flex-direction: column; gap: 9px; padding: 9px 0 12px; }
  .progress-filter-group { width: 100%; gap: 4px; }
  .review-label { width: 100%; }
  .progress-filter { padding: 5px 7px; font-size: 9px; }
  .progress-data-tools { justify-content: flex-start; width: 100%; }
  .data-button { padding: 6px 8px; }
  .bookmark-toggle { gap: 3px; padding: 4px 6px; font-size: 9px; }
  .daily-dashboard { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
  .daily-goal-card, .streak-card { padding: 12px 13px; }
  .streak-card { justify-content: space-between; gap: 10px; }
  .streak-total { min-width: 67px; }
  .activity-day strong { width: 21px; height: 21px; }
}
