@charset "UTF-8";
:root {
  color-scheme: light;
  --ink: #26332e;
  --muted: #737b72;
  --green: #315b52;
  --green-dark: #23473f;
  --paper: #faf8f1;
  --paper-deep: #f2e9d8;
  --line: #e8e4d9;
  --white: #fffefa;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #c68152; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 30; top: 10px; right: 10px; padding: 10px 14px; transform: translateY(-150%); border-radius: 4px; color: var(--green-dark); background: var(--white); }
.skip-link:focus { transform: translateY(0); }
.topbar { height: 74px; padding: 0 clamp(18px, 6vw, 88px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(48,65,55,.09); background: rgba(250,248,241,.98); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: flex; justify-content: center; align-items: center; gap: 2px; border-radius: 50%; background: var(--green); transform: rotate(-5deg); }
.brand-mark span { width: 6px; height: 18px; border: 1px solid #f4ead9; border-radius: 2px 0 0 2px; background: #c78b61; }
.brand-mark span:nth-child(2) { height: 23px; background: #e6d6b9; }
.brand-mark span:nth-child(3) { height: 16px; background: #8fac8e; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 13px; font-weight: 750; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: 9px; }
.top-actions { display: flex; align-items: center; gap: 11px; }
.connection-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #e3e7db; border-radius: 999px; color: #657166; background: transparent; font-size: 10px; white-space: nowrap; }
.connection-pill i, .footer-local i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #79a17d; box-shadow: 0 0 0 3px #e4eee3; }
.connection-pill.offline i { background: #c78856; box-shadow: 0 0 0 3px #f5e9db; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: transparent; cursor: pointer; font-size: 20px; }
.icon-button[hidden] { display: none; }
.home-main { width: min(930px, calc(100% - 44px)); min-height: calc(100vh - 142px); margin: 0 auto; padding: clamp(48px, 8vh, 78px) 0 65px; }
.section-kicker { margin: 0 0 7px; color: #9c7152; font-size: 10px; font-weight: 700; }
.home-title { margin: 0 0 28px; color: #293830; font-size: clamp(25px, 3.5vw, 35px); line-height: 1.5; letter-spacing: -.03em; }
.course-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.course-link { min-height: 72px; padding: 18px 20px; display: flex; align-items: center; border: 1px solid #e7e3d9; border-radius: 4px; color: #304239; background: var(--white); box-shadow: 0 2px 8px rgba(38,51,46,.025); text-decoration: none; font-size: 14px; font-weight: 650; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.course-link.has-cover { min-height: 94px; padding: 12px 14px; gap: 12px; border-color: #e1e5e8; border-radius: 12px; background: var(--white); box-shadow: 0 5px 16px rgba(20,36,60,.055); }
.course-main { min-width: 0; display: flex; align-items: center; gap: 13px; }
.course-cover-thumb { width: 50px; height: 68px; flex: 0 0 50px; object-fit: cover; object-position: center 24%; border: 1px solid rgba(20,36,60,.10); border-radius: 8px; background: #f1f3f6; box-shadow: 0 2px 7px rgba(20,36,60,.12); }
.course-title { line-height: 1.7; }
.course-link.has-cover .course-arrow { flex: 0 0 30px; margin-inline-start: auto; }
.course-link.has-cover:hover { border-color: #b8cabb; color: var(--green-dark); background: #f7faf5; }
.course-link:hover { transform: translateY(-2px); border-color: #b8cabb; color: var(--green-dark); background: #f7faf5; }
.footer { min-height: 68px; padding: 14px clamp(18px, 6vw, 88px); display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #e9e5dc; color: #96988f; background: var(--paper); font-size: 9px; }
.footer-brand { display: inline-flex; align-items: center; gap: 7px; color: #59685d; text-decoration: none; font-weight: 700; }
.mini-mark { color: #b27751; font-size: 14px; }
.footer-local { display: inline-flex; align-items: center; gap: 8px; }
.footer-local i { width: 5px; height: 5px; flex-basis: 5px; }
.course-page { width: min(1030px, calc(100% - 44px)); min-height: calc(100vh - 142px); margin: 0 auto; padding: 32px 0 65px; }
@media (max-width: 860px) and (min-width: 701px) { .course-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 28px; color: #66766a; text-decoration: none; font-size: 11px; }
.back-link:hover { color: var(--green); }
.back-link span { color: #a87751; font-size: 15px; }
.course-page > .section-kicker { margin-bottom: 4px; }
.detail-title { margin: 0 0 24px; color: #293830; font-size: clamp(24px, 3vw, 32px); line-height: 1.5; }
.detail-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.detail-resources[hidden] { display: none; }
.detail-resource { min-width: 0; min-height: 218px; padding: 18px; border: 1px solid #e6e2d8; border-radius: 4px; background: var(--white); box-shadow: 0 5px 20px rgba(38,51,46,.035); }
.resource-heading, .resource-title { display: flex; align-items: center; }
.resource-heading { justify-content: space-between; gap: 8px; }
.resource-title { min-width: 0; gap: 10px; }
.resource-symbol { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 4px; color: #5d7767; background: #e9efe8; font-size: 17px; }
.exam-symbol { color: #986e4d; background: #f2eadc; }
.resource-title h2 { margin: 0; color: #33463b; font-size: 15px; line-height: 1.55; }
.resource-state { flex: 0 0 auto; color: #99958a; font-size: 10px; }
.resource-state.available { color: #54775b; }
.resource-help { margin: 25px 0 17px; color: #8c9087; font-size: 11px; }
.resource-add { min-height: 36px; margin-top: 18px; padding: 0 12px; border: 1px solid #d5e1d6; border-radius: 3px; color: var(--green); background: #f5f8f2; cursor: pointer; font-size: 10px; font-weight: 700; transition: background .15s, border-color .15s; }
.resource-add:hover { border-color: #b9cdbb; background: #eaf1e9; }
.resource-add.is-saved, .resource-add.is-saved:hover { border-color: #dce6db; color: #54775b; background: #f3f7f0; cursor: default; }
.download-progress { display: grid; gap: 7px; margin-top: 11px; color: var(--muted); font-size: 10px; }
.download-progress[hidden] { display: none; }
.download-progress progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 99px; appearance: none; background: #e7ece4; }
.download-progress progress::-webkit-progress-bar { border-radius: 99px; background: #e7ece4; }
.download-progress progress::-webkit-progress-value { border-radius: 99px; background: #547d64; transition: width .2s ease; }
.download-progress progress::-moz-progress-bar { border-radius: 99px; background: #547d64; }
.embedded-reader { grid-column: 1 / -1; margin-top: 3px; padding: 18px; border: 1px solid #e6e2d8; border-radius: 4px; background: var(--white); box-shadow: 0 5px 20px rgba(38,51,46,.035); }
.embedded-reader[hidden] { display: none; }
.embedded-reader-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.embedded-reader-heading .section-kicker { margin-bottom: 2px; }
.embedded-reader-heading h2 { margin: 0; color: #33463b; font-size: 16px; }
.reader-toolbar { min-height: 48px; margin-top: 14px; padding: 7px 10px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.reader-control { min-height: 32px; padding: 0 10px; border: 1px solid #d5e1d6; border-radius: 3px; color: var(--green-dark); background: var(--white); cursor: pointer; font-size: 10px; }
.reader-control:disabled { opacity: .45; cursor: default; }
.reader-page-label, .reader-zoom-label { min-width: 74px; color: var(--muted); text-align: center; font-size: 10px; }
.reader-zoom { min-width: 34px; padding: 0 7px; font-size: 15px; }
.reader-toolbar-divider { width: 1px; height: 22px; margin: 0 3px; background: var(--line); }
.reader-message { margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.reader-message[hidden] { display: none; }
.reader-page-wrap { min-height: 300px; max-height: 78vh; margin-top: 12px; padding: 16px; display: flex; align-items: flex-start; justify-content: center; overflow: auto; border: 1px solid var(--line); border-radius: 3px; background: #e6e7e2; }
.reader-page-wrap[hidden] { display: none; }
.reader-page-wrap canvas { display: block; background: #fff; box-shadow: 0 3px 16px rgba(0,0,0,.18); }
.document-row { min-width: 0; margin-top: 18px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; border-top: 1px solid #eeeae1; }
.document-meta { min-width: 0; display: grid; gap: 2px; }
.document-name { overflow: hidden; color: #4e5d52; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.document-meta small { color: #a2a095; font-size: 8px; }
.document-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.mini-action { min-height: 29px; padding: 0 9px; border: 1px solid #e0e6de; border-radius: 3px; color: #466650; background: #fffefa; cursor: pointer; font-size: 9px; }
.mini-action:hover { background: #edf3ec; }
.mini-action.remove-action { border-color: transparent; color: #8c7167; background: transparent; }
.mini-action.remove-action:hover { color: #9a4e3d; background: #f8ece7; }
.exam-list { display: grid; gap: 2px; margin-top: 10px; }
.exam-list .document-row { margin-top: 5px; padding: 8px 0; }
.not-found { padding: 30px 0; }
.not-found[hidden] { display: none; }
.not-found h2 { color: #435249; font-size: 18px; }
.detail-footer { margin-top: 16px; }
.reader-dialog { width: min(1000px, calc(100% - 28px)); max-width: none; height: min(88vh, 820px); padding: 0; border: 1px solid #d9d6ce; border-radius: 6px; background: #f8f7f3; box-shadow: 0 20px 80px rgba(0,0,0,.25); }
.reader-dialog::backdrop { background: rgba(27,37,31,.62); backdrop-filter: blur(2px); }
.dialog-header { min-height: 68px; padding: 10px 18px 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dialog-kicker { margin: 0 0 2px; color: #a17754; font-size: 9px; }
.dialog-header h2 { margin: 0; color: #314239; font-size: 14px; }
.dialog-actions { display: flex; align-items: center; gap: 14px; }
.dialog-download { color: var(--green); font-size: 10px; text-decoration: none; }
.dialog-download:hover { text-decoration: underline; }
.close-dialog { width: 32px; height: 32px; border: 1px solid #e5e1d7; border-radius: 50%; color: #66746a; background: transparent; cursor: pointer; font-size: 21px; line-height: 1; }
.reader-dialog iframe { display: block; width: 100%; height: calc(100% - 68px); border: 0; background: #e7e6e1; }
.toast { position: fixed; z-index: 40; right: 50%; bottom: 22px; max-width: calc(100vw - 32px); padding: 11px 17px; transform: translate(50%, 20px); border: 1px solid rgba(255,255,255,.16); border-radius: 4px; color: #fff; background: #2d4d43; box-shadow: 0 8px 24px rgba(25,45,34,.22); opacity: 0; pointer-events: none; font-size: 11px; transition: opacity .2s, transform .2s; }
.toast.show { transform: translate(50%, 0); opacity: 1; }
.noscript { padding: 14px; color: #713c32; background: #f8e6dd; text-align: center; }
@media (max-width: 700px) {
  .home-main { width: min(calc(100% - 34px), 530px); min-height: calc(100vh - 132px); padding-top: 48px; }
  .course-list { grid-template-columns: 1fr; gap: 9px; }
  .course-link { min-height: 63px; padding: 15px 17px; font-size: 13px; }
  .course-page { width: min(calc(100% - 34px), 540px); min-height: calc(100vh - 132px); padding-top: 27px; }
  .detail-resources { grid-template-columns: 1fr; gap: 12px; }
  .detail-resource { min-height: 175px; padding: 15px; }
  .back-link { margin-bottom: 23px; }
  .topbar { height: 66px; padding: 0 17px; }
  .footer { justify-content: center; flex-wrap: wrap; gap: 8px 22px; padding: 15px; }
}
@media (max-width: 390px) {
  .course-link { font-size: 12px; }
  .detail-resource .resource-add { max-width: 100%; white-space: normal; }
  .document-actions { gap: 2px; }
  .mini-action { padding: 0 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Dark theme palette and component surfaces. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9e8df;
  --muted: #a7aca3;
  --green: #9ab9a6;
  --green-dark: #c1d7c7;
  --paper: #171d1b;
  --paper-deep: #222a26;
  --line: #39423d;
  --white: #202724;
}
:root[data-theme="dark"] body { color: var(--ink); background: var(--paper); }
:root[data-theme="dark"] .topbar { border-color: #343c37; background: rgba(23,29,27,.98); }
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .home-title,
:root[data-theme="dark"] .detail-title { color: #e8e8df; }
:root[data-theme="dark"] .brand-copy small,
:root[data-theme="dark"] .connection-pill,
:root[data-theme="dark"] .footer { color: #a4aaa1; }
:root[data-theme="dark"] .connection-pill { border-color: #424c45; }
:root[data-theme="dark"] .connection-pill i,
:root[data-theme="dark"] .footer-local i { box-shadow: 0 0 0 3px #2a3930; }
:root[data-theme="dark"] .icon-button { color: #e6c98d; }
:root[data-theme="dark"] .course-link,
:root[data-theme="dark"] .detail-resource { border-color: #39433d; color: #e1e6dc; background: #202724; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
:root[data-theme="dark"] .course-link:hover { border-color: #667f6c; color: #f0f3eb; background: #27332d; }
:root[data-theme="dark"] .footer { border-color: #343c37; background: var(--paper); }
:root[data-theme="dark"] .footer-brand { color: #c6d3c8; }
:root[data-theme="dark"] .section-kicker,
:root[data-theme="dark"] .dialog-kicker { color: #d3a77e; }
:root[data-theme="dark"] .back-link { color: #b2c0b4; }
:root[data-theme="dark"] .back-link:hover,
:root[data-theme="dark"] .dialog-download { color: #bdd6c4; }
:root[data-theme="dark"] .resource-symbol { color: #bed4c4; background: #304238; }
:root[data-theme="dark"] .exam-symbol { color: #e0c192; background: #42392b; }
:root[data-theme="dark"] .resource-title h2,
:root[data-theme="dark"] .not-found h2,
:root[data-theme="dark"] .dialog-header h2 { color: #e1e8df; }
:root[data-theme="dark"] .resource-state,
:root[data-theme="dark"] .resource-help,
:root[data-theme="dark"] .document-meta small { color: #a9aea5; }
:root[data-theme="dark"] .resource-state.available { color: #a9d1ad; }
:root[data-theme="dark"] .resource-add { border-color: #4a6351; color: #c5dfca; background: #29392f; }
:root[data-theme="dark"] .resource-add:hover { border-color: #78947e; background: #34483a; }
:root[data-theme="dark"] .resource-add.is-saved,
:root[data-theme="dark"] .resource-add.is-saved:hover { border-color: #4a6351; color: #c5dfca; background: #29392f; }
:root[data-theme="dark"] .download-progress progress,
:root[data-theme="dark"] .download-progress progress::-webkit-progress-bar { background: #354039; }
:root[data-theme="dark"] .download-progress progress::-webkit-progress-value,
:root[data-theme="dark"] .download-progress progress::-moz-progress-bar { background: #9ab9a6; }
:root[data-theme="dark"] .document-row { border-color: #3b443e; }
:root[data-theme="dark"] .document-name { color: #d5ded4; }
:root[data-theme="dark"] .mini-action { border-color: #46574a; color: #c8ddca; background: #26332b; }
:root[data-theme="dark"] .mini-action:hover { background: #34463a; }
:root[data-theme="dark"] .mini-action.remove-action { color: #d4aaa0; background: transparent; }
:root[data-theme="dark"] .mini-action.remove-action:hover { color: #f2b4a3; background: #482e29; }
:root[data-theme="dark"] .embedded-reader { border-color: #39433d; background: #202724; }
:root[data-theme="dark"] .embedded-reader-heading h2 { color: #e1e8df; }
:root[data-theme="dark"] .reader-toolbar { border-color: #39433d; background: #171d1b; }
:root[data-theme="dark"] .reader-control { border-color: #4a6351; color: #c5dfca; background: #26332b; }
:root[data-theme="dark"] .reader-toolbar-divider { background: #39433d; }
:root[data-theme="dark"] .reader-page-wrap { border-color: #39433d; background: #121614; }
:root[data-theme="dark"] .close-dialog { border-color: #48524b; color: #d1d7cd; }
:root[data-theme="dark"] .skip-link { color: #e4f0e5; background: #27332c; }
@media (prefers-reduced-motion: no-preference) {
  body, .topbar, .footer, .course-link, .detail-resource, .icon-button { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
}


/* Professional academic redesign — preserves all existing reader states and controls. */
:root {
  color-scheme: light;
  --ink: #182a26;
  --ink-soft: #33443e;
  --muted: #66756e;
  --green: #173f37;
  --green-dark: #10352f;
  --green-bright: #2d6856;
  --sage: #dfe9e2;
  --sage-soft: #eef3ee;
  --copper: #c39462;
  --paper: #f4f5f0;
  --paper-deep: #f7f5ee;
  --white: #fffefa;
  --line: #e2e7df;
  --line-strong: #d2dbd2;
  --shadow: 0 14px 40px rgba(27,49,40,.065);
  --shadow-small: 0 5px 18px rgba(27,49,40,.05);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --sans: "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}
html { min-width: 320px; background: var(--paper); }
body {
  min-width: 320px; min-height: 100vh; margin: 0; display: flex; flex-direction: column;
  color: var(--ink);
  background: radial-gradient(ellipse at 4% 16%, rgba(221,231,220,.42), transparent 31rem), var(--paper);
}
button:focus-visible, a:focus-visible { outline: 3px solid #c39462; outline-offset: 4px; }
.skip-link { z-index: 40; top: 12px; right: 12px; padding: 11px 15px; border-radius: 10px; color: var(--green-dark); background: var(--white); box-shadow: var(--shadow-small); }
.topbar {
  position: sticky; z-index: 20; top: 0; min-height: 76px; height: auto; padding: 0 clamp(20px,6vw,88px);
  gap: 20px; border-color: rgba(37,62,51,.09); background: rgba(250,250,246,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.brand { gap: 12px; color: var(--ink); }
.brand-mark {
  position: relative; width: 42px; height: 42px; flex: 0 0 42px; gap: 2px; overflow: hidden;
  border: 1px solid rgba(215,187,142,.38); border-radius: 13px 13px 13px 5px;
  background: linear-gradient(145deg,#28594c,#123a32); box-shadow: 0 4px 11px rgba(18,58,50,.14); transform: rotate(-2deg);
}
.brand-mark span { width: 5px; height: 20px; border: 1px solid rgba(255,255,255,.5); border-radius: 2px; background: #e8ddc7; }
.brand-mark span:nth-child(2) { height: 25px; background: #d6ae7e; }
.brand-mark span:nth-child(3) { height: 17px; background: #a8c2ad; }
.brand-copy { gap: 2px; }
.brand-copy strong { color: var(--green-dark); font-size: 14px; font-weight: 800; letter-spacing: -.025em; }
.brand-copy small { color: var(--muted); font-size: 10px; }
.top-actions { gap: 10px; }
.connection-pill {
  min-height: 36px; padding: 0 13px; gap: 9px; border-color: var(--line); color: #586960;
  background: rgba(255,255,255,.58); font-size: 11px;
}
.connection-pill i, .footer-local i { width: 7px; height: 7px; flex-basis: 7px; background: #6eaa7a; box-shadow: 0 0 0 4px rgba(110,170,122,.13); }
.connection-pill.offline i { background: #c58b55; box-shadow: 0 0 0 4px rgba(197,139,85,.14); }
.icon-button {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-color: var(--line);
  border-radius: 13px; color: var(--green); background: var(--white); cursor: pointer; font-size: 19px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.icon-button:hover { transform: translateY(-2px); border-color: #b9cbbd; background: var(--sage-soft); }
.icon-button[hidden] { display: none; }
.home-main, .course-page { width: min(1160px,calc(100% - 48px)); min-height: 0; margin: 0 auto; flex: 1 0 auto; }
.home-main { padding: clamp(34px,5vw,60px) 0 76px; }
.home-hero {
  position: relative; min-height: 324px; padding: clamp(32px,5vw,64px);
  display: grid; grid-template-columns: minmax(0,1.2fr) minmax(220px,.8fr); align-items: center; gap: 24px;
  overflow: hidden; isolation: isolate; border: 1px solid rgba(233,225,204,.18); border-radius: 28px; color: #f8f6ed;
  background: radial-gradient(circle at 80% 15%,rgba(197,153,96,.22),transparent 19rem),linear-gradient(125deg,#1d5145 0%,#173f37 47%,#11352f 100%);
  box-shadow: 0 20px 55px rgba(22,56,47,.17);
}
.home-hero::before { position: absolute; z-index: -1; inset: 0 49% 0 auto; width: 1px; content: ""; background: linear-gradient(transparent,rgba(232,222,197,.25),transparent); }
.home-hero::after { position: absolute; z-index: -1; top: -155px; left: -120px; width: 360px; height: 360px; border: 1px solid rgba(236,221,191,.13); border-radius: 50%; content: ""; box-shadow: 0 0 0 30px rgba(236,221,191,.025),0 0 0 72px rgba(236,221,191,.02); }
.hero-copy { position: relative; z-index: 2; max-width: 630px; }
.hero-kicker { margin: 0 0 18px; display: flex; align-items: center; gap: 10px; color: #d7c7a5; font-size: 11px; font-weight: 700; }
.hero-kicker span { width: 22px; height: 1px; background: var(--copper); }
.hero-copy h1 { margin: 0; color: #fbfaf5; font-size: clamp(38px,5vw,62px); font-weight: 760; line-height: 1.25; letter-spacing: -.045em; }
.hero-copy h1 span { color: #d8bc91; }
.hero-description { max-width: 465px; margin: 18px 0 25px; color: rgba(246,245,236,.77); font-size: 14px; line-height: 1.95; }
.hero-jump { min-height: 43px; padding: 0 16px; display: inline-flex; align-items: center; gap: 22px; border: 1px solid rgba(233,225,204,.27); border-radius: 12px; color: #f6f3e9; background: rgba(255,255,255,.075); text-decoration: none; font-size: 12px; font-weight: 700; transition: background .2s ease,transform .2s ease; }
.hero-jump:hover { transform: translateY(-2px); background: rgba(255,255,255,.15); }
.hero-jump span { color: #d8bc91; font-size: 18px; line-height: 1; }
.hero-art { position: relative; z-index: 1; min-height: 212px; display: grid; place-items: center; }
.hero-orbit { position: absolute; border: 1px solid rgba(234,224,199,.2); border-radius: 50%; pointer-events: none; }
.hero-orbit-one { width: 242px; height: 242px; }
.hero-orbit-two { width: 190px; height: 190px; border-color: rgba(234,224,199,.12); }
.term-card {
  position: relative; width: min(235px,88%); min-height: 175px; padding: 22px; display: flex; flex-direction: column; justify-content: center;
  border: 1px solid rgba(248,245,233,.22); border-radius: 19px; background: linear-gradient(145deg,rgba(246,244,231,.15),rgba(246,244,231,.055));
  box-shadow: 0 14px 45px rgba(0,0,0,.09),inset 0 1px rgba(255,255,255,.12); backdrop-filter: blur(8px); transform: rotate(-3deg);
}
.term-card::before, .term-card::after { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #d8bc91; content: ""; }
.term-card::before { top: 17px; left: 18px; }
.term-card::after { right: 18px; bottom: 17px; width: 28px; height: 1px; border-radius: 0; }
.term-card-label { color: #d8d8cb; font-size: 11px; }
.term-card strong { margin: 3px 0 10px; color: #f7f3e8; font-size: clamp(31px,4vw,45px); font-weight: 700; line-height: 1.25; }
.term-card-level { display: flex; align-items: center; gap: 8px; color: #c6d1c5; font-size: 11px; }
.term-card-level i { width: 17px; height: 1px; background: #c39462; }
.hero-art-index { position: absolute; right: calc(50% - 118px); bottom: -2px; color: rgba(238,233,217,.57); font-family: var(--serif); font-size: 9px; letter-spacing: .15em; transform: rotate(-3deg); }
.hero-art-index b { color: #d8bc91; font-weight: 400; }
.home-catalog { padding-top: clamp(44px,6vw,70px); }
.section-head { margin-bottom: 21px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-kicker { margin: 0 0 6px; color: #9b704c; font-size: 10px; font-weight: 750; letter-spacing: .025em; }
.section-head h2 { margin: 0; color: var(--ink); font-size: clamp(23px,2.5vw,29px); font-weight: 780; line-height: 1.45; letter-spacing: -.025em; }
.section-head-note { max-width: 330px; margin: 0 2px 4px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.course-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
@media (max-width: 860px) and (min-width: 701px) { .course-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.course-link {
  min-width: 0; min-height: 88px; padding: 17px 21px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid var(--line); border-radius: 15px; color: #263a32; background: var(--white); box-shadow: var(--shadow-small);
  text-decoration: none; font-size: 14px; font-weight: 730; line-height: 1.75;
  transition: transform .2s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease;
}
.course-link:hover { transform: translateY(-3px); border-color: #b9cdbd; background: #fff; box-shadow: 0 12px 26px rgba(27,49,40,.09); }
.course-arrow { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border: 1px solid #e4e9e2; border-radius: 11px; color: #527263; background: #f4f7f2; font-size: 18px; transition: transform .2s ease,background .2s ease; }
.course-link:hover .course-arrow { transform: translateX(-3px); border-color: transparent; color: #fff; background: var(--green); }
.footer { min-height: 76px; padding: 17px clamp(20px,6vw,88px); display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(40,62,52,.09); color: #818d83; background: rgba(248,248,243,.72); font-size: 10px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: #4e6558; text-decoration: none; font-weight: 800; }
.mini-mark { color: #b88756; font-size: 15px; }
.footer-local { display: inline-flex; align-items: center; gap: 9px; color: #6d7b70; }
.footer-local i { width: 6px; height: 6px; flex-basis: 6px; }
.designer-credit { color: #8d958a; font-size: 9px; }
.course-page { padding: 26px 0 76px; }
.course-breadcrumb { min-height: 34px; margin-bottom: 19px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; margin: 0; color: #536d5e; text-decoration: none; font-size: 12px; font-weight: 700; }
.back-link:hover { color: var(--green); }
.back-link span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; color: #8f704e; background: rgba(255,255,255,.6); font-size: 15px; }
.breadcrumb-context { display: inline-flex; align-items: center; gap: 10px; color: #89938a; font-size: 10px; }
.breadcrumb-context i { width: 3px; height: 3px; border-radius: 50%; background: var(--copper); }
.course-hero {
  min-height: 205px; padding: 29px clamp(22px,4vw,43px); display: flex; align-items: center; justify-content: space-between; gap: 26px;
  overflow: hidden; border: 1px solid #e5e6dc; border-radius: 21px;
  background: radial-gradient(circle at 12% 100%,rgba(219,230,216,.64),transparent 20rem),linear-gradient(110deg,#fffefa,#f6f5ed); box-shadow: var(--shadow-small);
}
.course-hero-copy { min-width: 0; }
.course-hero .section-kicker { margin-bottom: 7px; }
.detail-title { margin: 0; color: var(--green-dark); font-size: clamp(27px,3.7vw,41px); font-weight: 790; line-height: 1.45; letter-spacing: -.035em; }
.course-intro { max-width: 620px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.course-hero-index { position: relative; width: 118px; height: 118px; flex: 0 0 118px; padding: 15px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; border: 1px solid rgba(224,231,219,.2); border-radius: 20px; color: #f5f3e9; background: linear-gradient(145deg,#2a5b4c,#173f37); box-shadow: 0 10px 24px rgba(28,68,54,.14); }
.course-hero-index::before { position: absolute; top: -28px; left: -20px; width: 95px; height: 95px; border: 1px solid rgba(245,241,223,.22); border-radius: 50%; content: ""; }
.course-hero-index span { position: relative; color: #cdd8c9; font-size: 9px; }
.course-hero-index strong { position: relative; color: #ead1a9; font-size: 38px; font-weight: 600; line-height: 1.2; }
.course-hero-index i { position: absolute; right: 15px; bottom: 15px; width: 20px; height: 1px; background: #c39462; }
.course-resources { margin-top: 37px; }
.resources-head { margin-bottom: 17px; }
.resources-head h2 { font-size: 22px; }
.detail-resources { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 15px; }
.detail-resources[hidden] { display: none; }
.detail-resource { min-width: 0; min-height: 218px; padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: var(--shadow-small); }
.resource-heading, .resource-title { display: flex; align-items: center; }
.resource-heading { justify-content: space-between; gap: 9px; }
.resource-title { min-width: 0; gap: 12px; }
.resource-symbol { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid #e0e9df; border-radius: 12px; color: #416c56; background: #eef4ee; font-size: 20px; }
.exam-symbol { border-color: #eee3d2; color: #a0764e; background: #f8f1e6; }
.resource-title h2 { margin: 0; color: #263b31; font-size: 16px; font-weight: 760; line-height: 1.55; }
.resource-state { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #e8e9df; border-radius: 999px; color: #878d82; background: #f8f8f3; font-size: 10px; }
.resource-state.available { border-color: #d8e7d9; color: #3e7750; background: #f0f7ef; }
.resource-help { margin: 24px 0 12px; color: #7c8980; font-size: 12px; line-height: 1.8; }
.resource-add { min-height: 40px; margin-top: 15px; padding: 0 15px; border: 1px solid #cdddcf; border-radius: 11px; color: #315f48; background: #f4f8f2; cursor: pointer; font-size: 11px; font-weight: 750; transition: background .18s,border-color .18s,transform .18s; }
.resource-add:hover { transform: translateY(-1px); border-color: #a9c5ae; background: #eaf2e9; }
.resource-add.is-saved, .resource-add.is-saved:hover { border-color: #d5e3d4; color: #527858; background: #f3f7f0; cursor: default; }
.download-progress { margin-top: 13px; display: grid; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.download-progress[hidden] { display: none; }
.download-progress progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #e9eee7; }
.download-progress progress::-webkit-progress-bar { border-radius: 999px; background: #e9eee7; }
.download-progress progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg,#376c50,#7ba67a); transition: width .2s ease; }
.download-progress progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg,#376c50,#7ba67a); }
.document-row { min-width: 0; margin-top: 18px; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #edf0e9; }
.document-meta { min-width: 0; display: grid; gap: 4px; }
.document-name { overflow: hidden; color: #334b3e; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.document-meta small { color: #8d978d; font-size: 9px; }
.document-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.mini-action { min-height: 33px; padding: 0 11px; border: 1px solid #dce6dc; border-radius: 9px; color: #42664d; background: #f7faf5; cursor: pointer; font-size: 10px; font-weight: 700; transition: background .16s,border-color .16s; }
.mini-action:hover:not(:disabled) { border-color: #bfd2c0; background: #edf4ec; }
.mini-action:disabled { opacity: .68; cursor: wait; }
.mini-action.remove-action { border-color: transparent; color: #8e756d; background: transparent; }
.mini-action.remove-action:hover { color: #9a4e3d; background: #f8ece7; }
.exam-list { display: grid; gap: 3px; margin-top: 10px; }
.exam-list .document-row { margin-top: 5px; padding: 10px 0; }
.embedded-reader { margin-top: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); scroll-margin-top: 88px; }
.embedded-reader[hidden] { display: none; }
.embedded-reader-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.embedded-reader-heading .section-kicker { margin-bottom: 2px; }
.embedded-reader-heading h2 { margin: 0; color: #263c31; font-size: 17px; }
.reader-toolbar { position: sticky; z-index: 5; top: 83px; min-height: 51px; margin-top: 15px; padding: 7px 10px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); border-radius: 13px; background: rgba(246,247,241,.95); box-shadow: 0 4px 15px rgba(34,53,43,.035); backdrop-filter: blur(10px); }
.reader-control { min-height: 34px; padding: 0 12px; border: 1px solid #d8e4d9; border-radius: 9px; color: var(--green); background: var(--white); cursor: pointer; font-size: 11px; font-weight: 700; }
.reader-control:hover:not(:disabled) { border-color: #b7cbb8; background: #f0f6ef; }
.reader-control:disabled { opacity: .45; cursor: default; }
.reader-page-label, .reader-zoom-label { min-width: 78px; color: var(--muted); text-align: center; font-size: 10px; }
.reader-page-jump { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.reader-page-jump[hidden] { display: none; }
.reader-page-jump input { width: 64px; min-height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); text-align: center; }
.reader-page-jump input:focus-visible { outline: 2px solid #c39462; outline-offset: 2px; }
.reader-zoom { min-width: 37px; padding: 0 8px; font-size: 17px; }
.reader-toolbar-divider { width: 1px; height: 23px; margin: 0 4px; background: var(--line-strong); }
.reader-message { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.reader-message[hidden] { display: none; }
.reader-page-wrap { min-height: 300px; max-height: 78vh; margin-top: 13px; padding: clamp(10px,2vw,22px); display: flex; align-items: flex-start; justify-content: center; overflow: auto; border: 1px solid #dde2db; border-radius: 13px; background: #e9ece7; }
.embedded-reader .reader-page-wrap { justify-content: flex-start; }
.embedded-reader .reader-book-pages { width: max-content; min-width: 100%; }
.reader-page-wrap[hidden] { display: none; }
.reader-page-wrap canvas { display: block; max-width: none; background: #fff; box-shadow: 0 5px 22px rgba(23,36,29,.18); }
.reader-page-wrap canvas[hidden] { display: none; }
.reader-book-pages { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.reader-book-pages[hidden] { display: none; }
.reader-book-page { flex: 0 0 auto; background: #fff; box-shadow: 0 5px 22px rgba(23,36,29,.18); }
.reader-book-page canvas { display: block; width: 100%; height: auto; }
.reader-native-frame { width: 100%; height: 74vh; min-height: 300px; flex: 1 1 auto; border: 0; border-radius: 8px; background: #fff; }
.reader-native-frame[hidden] { display: none; }
.close-dialog { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; color: #607066; background: var(--white); cursor: pointer; font-size: 24px; line-height: 1; }
.close-dialog:hover { color: #8e493d; background: #fbefeb; }
.not-found { padding: 42px 0; }
.not-found[hidden] { display: none; }
.not-found h2 { color: var(--ink-soft); font-size: 20px; }
.detail-footer { margin-top: auto; }
.toast { z-index: 50; bottom: 24px; padding: 13px 18px; border-radius: 12px; background: #183f37; box-shadow: 0 10px 28px rgba(22,45,35,.25); font-size: 12px; line-height: 1.6; }
:root[data-theme="dark"] {
  color-scheme: dark; --ink: #edf0e9; --ink-soft: #dce5dc; --muted: #aeb9af; --green: #a4c5ad;
  --green-dark: #d7e8d9; --green-bright: #9bb9a2; --sage: #2f4036; --sage-soft: #27372e;
  --copper: #d0a16e; --paper: #151c19; --paper-deep: #1a211d; --white: #202925;
  --line: #39453e; --line-strong: #4a5a4e; --shadow: 0 16px 42px rgba(0,0,0,.19); --shadow-small: 0 5px 18px rgba(0,0,0,.14);
}
:root[data-theme="dark"] body { color: var(--ink); background: radial-gradient(ellipse at 4% 16%,rgba(47,64,54,.33),transparent 31rem),var(--paper); }
:root[data-theme="dark"] .topbar { border-color: #333f37; background: rgba(21,28,25,.93); }
:root[data-theme="dark"] .brand-copy strong { color: #edf0e9; }
:root[data-theme="dark"] .brand-copy small, :root[data-theme="dark"] .connection-pill, :root[data-theme="dark"] .breadcrumb-context, :root[data-theme="dark"] .section-head-note, :root[data-theme="dark"] .footer { color: #aab4aa; }
:root[data-theme="dark"] .connection-pill, :root[data-theme="dark"] .icon-button, :root[data-theme="dark"] .back-link span { border-color: #3e4b42; color: #c9ddcc; background: #202a24; }
:root[data-theme="dark"] .icon-button:hover { background: #2b3a30; }
:root[data-theme="dark"] .section-head h2, :root[data-theme="dark"] .detail-title { color: #e6eee5; }
:root[data-theme="dark"] .section-kicker { color: #d5a878; }
:root[data-theme="dark"] .course-link { border-color: #37443c; color: #e4ebe1; background: #202925; box-shadow: 0 5px 18px rgba(0,0,0,.13); }
:root[data-theme="dark"] .course-link:hover { border-color: #617968; background: #25332b; }
:root[data-theme="dark"] .course-arrow { border-color: #3c4d40; color: #b7d1bb; background: #29362d; }
:root[data-theme="dark"] .course-link:hover .course-arrow { color: #182a26; background: #a9c9b0; }
:root[data-theme="dark"] .footer { border-color: #333f37; background: #171e1a; }
:root[data-theme="dark"] .footer-brand, :root[data-theme="dark"] .footer-local, :root[data-theme="dark"] .designer-credit { color: #bec9be; }
:root[data-theme="dark"] .course-hero { border-color: #38453c; background: radial-gradient(circle at 12% 100%,rgba(51,70,57,.6),transparent 20rem),linear-gradient(110deg,#232d27,#1c2520); }
:root[data-theme="dark"] .course-intro { color: #abb7ac; }
:root[data-theme="dark"] .back-link { color: #bbd0be; }
:root[data-theme="dark"] .detail-resource, :root[data-theme="dark"] .embedded-reader { border-color: #3a473e; background: #202925; }
:root[data-theme="dark"] .resource-title h2, :root[data-theme="dark"] .embedded-reader-heading h2 { color: #e4ebe1; }
:root[data-theme="dark"] .resource-symbol { border-color: #3d5544; color: #bed7c1; background: #2c3e32; }
:root[data-theme="dark"] .exam-symbol { border-color: #5c4c39; color: #e3c394; background: #3a3329; }
:root[data-theme="dark"] .resource-state { border-color: #424b42; color: #b0b8ad; background: #272f2a; }
:root[data-theme="dark"] .resource-state.available { border-color: #43624b; color: #b9d9b8; background: #2b3b2e; }
:root[data-theme="dark"] .resource-help, :root[data-theme="dark"] .download-progress, :root[data-theme="dark"] .document-meta small { color: #aab5aa; }
:root[data-theme="dark"] .resource-add { border-color: #48614e; color: #c5dfc8; background: #2a392e; }
:root[data-theme="dark"] .resource-add:hover { border-color: #718e74; background: #34483a; }
:root[data-theme="dark"] .resource-add.is-saved, :root[data-theme="dark"] .resource-add.is-saved:hover { border-color: #48614e; color: #c5dfc8; background: #2a392e; }
:root[data-theme="dark"] .download-progress progress, :root[data-theme="dark"] .download-progress progress::-webkit-progress-bar { background: #354239; }
:root[data-theme="dark"] .document-row { border-color: #39453e; }
:root[data-theme="dark"] .document-name { color: #dce7dc; }
:root[data-theme="dark"] .mini-action { border-color: #46594a; color: #cde0cb; background: #27362b; }
:root[data-theme="dark"] .mini-action:hover:not(:disabled) { border-color: #6b896e; background: #34483a; }
:root[data-theme="dark"] .mini-action.remove-action { color: #d7aaa0; background: transparent; }
:root[data-theme="dark"] .mini-action.remove-action:hover { color: #f0b5a6; background: #482e29; }
:root[data-theme="dark"] .reader-toolbar { border-color: #3c4840; background: rgba(25,33,28,.95); }
:root[data-theme="dark"] .reader-control { border-color: #4b624f; color: #cce0ce; background: #27352b; }
:root[data-theme="dark"] .reader-control:hover:not(:disabled) { border-color: #789078; background: #334538; }
:root[data-theme="dark"] .reader-toolbar-divider { background: #465349; }
:root[data-theme="dark"] .reader-page-wrap { border-color: #3d4940; background: #141a17; }
:root[data-theme="dark"] .close-dialog { border-color: #465349; color: #d3ded2; background: #263129; }
:root[data-theme="dark"] .close-dialog:hover { color: #ffc5b2; background: #482e29; }
:root[data-theme="dark"] .skip-link { color: #e5f0e5; background: #27372e; }
@media (max-width: 760px) {
  .topbar { min-height: 68px; padding-inline: 18px; }
  .brand-mark { width: 39px; height: 39px; flex-basis: 39px; }
  .home-main, .course-page { width: min(calc(100% - 34px),570px); }
  .home-main { padding-top: 28px; padding-bottom: 55px; }
  .home-hero { min-height: 0; padding: 31px 26px; grid-template-columns: minmax(0,1fr) 175px; gap: 12px; border-radius: 22px; }
  .hero-art { min-height: 180px; }
  .hero-orbit-one { width: 174px; height: 174px; }
  .hero-orbit-two { width: 138px; height: 138px; }
  .term-card { width: 155px; min-height: 139px; padding: 15px; }
  .term-card strong { margin: 2px 0 7px; font-size: 30px; }
  .term-card-label, .term-card-level { font-size: 9px; }
  .hero-art-index { right: calc(50% - 77px); font-size: 7px; }
  .hero-copy h1 { font-size: clamp(36px,6vw,48px); }
  .hero-description { font-size: 12px; }
  .course-page { padding-top: 22px; }
  .course-hero { min-height: 177px; padding: 23px; }
  .course-hero-index { width: 96px; height: 96px; flex-basis: 96px; border-radius: 17px; }
  .course-hero-index strong { font-size: 32px; }
  .detail-resources { gap: 12px; }
  .detail-resource { min-height: 190px; padding: 18px; }
  .footer { flex-wrap: wrap; justify-content: center; gap: 11px 24px; padding: 17px; text-align: center; }
}
@media (max-width: 560px) {
  .topbar { padding-inline: 14px; gap: 8px; }
  .brand { gap: 9px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 9px; }
  .top-actions { gap: 6px; }
  .icon-button { width: 36px; height: 36px; border-radius: 11px; }
  .connection-pill { min-height: 33px; padding-inline: 9px; gap: 7px; font-size: 9px; }
  .connection-pill i { width: 6px; height: 6px; flex-basis: 6px; box-shadow: 0 0 0 3px rgba(110,170,122,.13); }
  .home-hero { grid-template-columns: 1fr; padding: 28px 23px 22px; }
  .home-hero::before { inset: auto 0 43% 0; width: auto; height: 1px; background: linear-gradient(90deg,transparent,rgba(232,222,197,.2),transparent); }
  .hero-kicker { margin-bottom: 13px; font-size: 10px; }
  .hero-copy h1 { font-size: clamp(38px,10vw,48px); }
  .hero-description { max-width: 100%; margin: 13px 0 18px; font-size: 12px; }
  .hero-jump { min-height: 40px; font-size: 11px; }
  .hero-art { min-height: 165px; margin-top: 2px; }
  .hero-orbit-one { width: 163px; height: 163px; }
  .hero-orbit-two { width: 126px; height: 126px; }
  .term-card { width: 160px; min-height: 133px; }
  .term-card strong { font-size: 28px; }
  .hero-art-index { right: calc(50% - 81px); bottom: 0; }
  .home-catalog { padding-top: 37px; }
  .section-head { align-items: start; flex-direction: column; gap: 7px; margin-bottom: 15px; }
  .section-head h2 { font-size: 22px; }
  .section-head-note { margin: 0; font-size: 11px; }
  .course-list { grid-template-columns: 1fr; gap: 9px; }
  .course-link { min-height: 70px; padding: 13px 15px; border-radius: 13px; font-size: 12px; }
  .course-link.has-cover { min-height: 86px; padding: 10px 12px; border-radius: 12px; }
  .course-main { gap: 10px; }
  .course-cover-thumb { width: 44px; height: 60px; flex-basis: 44px; border-radius: 7px; }
  .course-arrow { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; }
  .course-breadcrumb { margin-bottom: 14px; }
  .breadcrumb-context { font-size: 9px; gap: 7px; }
  .course-hero { min-height: 0; padding: 20px 17px; gap: 12px; border-radius: 17px; }
  .detail-title { font-size: clamp(24px,7vw,32px); }
  .course-intro { margin-top: 6px; font-size: 10px; line-height: 1.8; }
  .course-hero-index { width: 70px; height: 70px; flex-basis: 70px; padding: 10px; border-radius: 13px; }
  .course-hero-index span { font-size: 8px; }
  .course-hero-index strong { font-size: 24px; }
  .course-hero-index i { right: 10px; bottom: 10px; width: 14px; }
  .course-resources { margin-top: 28px; }
  .resources-head { flex-direction: row; align-items: end; }
  .resources-head h2 { font-size: 19px; }
  .resources-head .section-head-note { max-width: 145px; text-align: left; font-size: 9px; }
  .detail-resources { grid-template-columns: 1fr; gap: 10px; }
  .detail-resource { min-height: 165px; padding: 16px; border-radius: 14px; }
  .resource-symbol { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  .resource-title h2 { font-size: 14px; }
  .resource-state { padding: 5px 8px; font-size: 9px; }
  .resource-help { margin: 17px 0 9px; font-size: 11px; }
  .resource-add { min-height: 37px; margin-top: 11px; }
  .document-row { align-items: flex-start; flex-direction: column; }
  .document-actions { width: 100%; }
  .mini-action { flex: 0 0 auto; }
  .download-progress { font-size: 9px; }
  .embedded-reader { margin-top: 14px; padding: 14px; border-radius: 15px; }
  .reader-toolbar { top: 72px; gap: 5px; padding: 7px 5px; }
  .reader-control { min-height: 31px; padding: 0 8px; font-size: 10px; }
  .reader-page-label, .reader-zoom-label { min-width: 62px; font-size: 9px; }
  .reader-page-jump { font-size: 9px; }
  .reader-page-jump input { width: 54px; min-height: 31px; }
  .reader-toolbar-divider { margin-inline: 1px; }
  .reader-page-wrap { min-height: 210px; max-height: 70vh; padding: 8px; }
  .reader-native-frame { height: 66vh; min-height: 210px; }
  .reader-page-wrap canvas { max-width: 100%; height: auto !important; }
  .footer { gap: 8px 15px; font-size: 9px; }
  .designer-credit { font-size: 8px; }
}
@media (max-width: 360px) {
  .brand-copy small { display: none; }
  .connection-pill { padding-inline: 7px; }
  .breadcrumb-context { font-size: 8px; }
  .resources-head .section-head-note { max-width: 115px; }
  .document-actions { gap: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .term-card { animation: card-arrive .75s cubic-bezier(.2,.75,.25,1) both; }
  @keyframes card-arrive { from { opacity: .65; transform: translateY(7px) rotate(-3deg); } to { opacity: 1; transform: translateY(0) rotate(-3deg); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* University identity, explicit offline saving, and full-screen in-site reading. */
.brand-logo {
  width: 39px; height: 54px; flex: 0 0 39px; display: block; object-fit: contain;
  border: 1px solid rgba(22,63,55,.12); border-radius: 9px; background: #fff;
  box-shadow: 0 3px 10px rgba(19,55,45,.1);
}
.hero-logo-plaque {
  position: relative; z-index: 1; width: 132px; height: 184px; padding: 7px;
  border: 1px solid rgba(231,205,152,.7); border-radius: 16px; background: #fff;
  box-shadow: 0 14px 36px rgba(0,0,0,.19); transform: rotate(-2deg);
}
.hero-university-logo { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.book-offline-actions { margin-top: 4px; }
.book-offline-actions .resource-add { margin-top: 0; }
.book-offline-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
body.reader-active { overflow: hidden; }
.embedded-reader {
  position: fixed; z-index: 60; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  display: flex; flex-direction: column; overflow: hidden; border: 0; border-radius: 0; background: var(--paper); box-shadow: none;
}
.embedded-reader[hidden] { display: none; }
.embedded-reader-heading { flex: 0 0 auto; }
.embedded-reader-heading h2 { max-width: min(76vw,900px); overflow-wrap: anywhere; }
.reader-swipe-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.embedded-reader .reader-toolbar { position: relative; top: auto; flex: 0 0 auto; margin-top: 12px; }
.embedded-reader .reader-page-wrap {
  min-height: 0; max-height: none; flex: 1 1 auto; margin-top: 12px; direction: ltr; touch-action: pan-y;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; user-select: none;
}
.embedded-reader .reader-page-wrap canvas { max-width: none; height: auto; }
:root[data-theme="dark"] .brand-logo { border-color: rgba(220,231,218,.2); }
:root[data-theme="dark"] .hero-logo-plaque { border-color: rgba(231,205,152,.45); }
:root[data-theme="dark"] .book-offline-note { color: #aab5aa; }
:root[data-theme="dark"] .embedded-reader { background: var(--paper); }
@media (max-width: 760px) {
  .brand-logo { width: 36px; height: 50px; flex-basis: 36px; }
}
@media (max-width: 560px) {
  .hero-logo-plaque { width: 110px; height: 154px; padding: 6px; }
  .embedded-reader { padding: max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); }
  .embedded-reader .reader-toolbar { gap: 5px; padding: 7px 5px; }
  .embedded-reader .reader-control { min-height: 32px; padding: 0 8px; }
  .embedded-reader .reader-page-label, .embedded-reader .reader-zoom-label { min-width: 61px; }
  .embedded-reader .reader-page-wrap { padding: 8px; }
  .embedded-reader .reader-page-wrap canvas { max-width: none; }
}

/* Zero's navy and slate-blue-gray identity; Cairo is bundled for offline use. */
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./assets/cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
:root {
  --ink: #14243C;
  --ink-soft: #334155;
  --muted: #64748B;
  --green: #14243C;
  --green-dark: #14243C;
  --green-bright: #334155;
  --sage: #E2E8F0;
  --sage-soft: #F1F3F6;
  --copper: #64748B;
  --paper: #F1F3F6;
  --paper-deep: #E7EBF1;
  --white: #FFFFFF;
  --line: #DCE2E9;
  --line-strong: #CBD5E1;
  --shadow: 0 14px 40px rgba(20,36,60,.07);
  --shadow-small: 0 5px 18px rgba(20,36,60,.055);
  --sans: "Cairo", "Tajawal", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}
html, body, button, input { font-family: var(--sans); }
html, body { background-color: var(--paper); }
body { color: var(--ink); background: radial-gradient(ellipse at 5% 12%,rgba(100,116,139,.09),transparent 34rem),var(--paper); }
::selection { color: #FFFFFF; background: #14243C; }
button:focus-visible, a:focus-visible { outline-color: #64748B; }
.topbar { border-color: rgba(20,36,60,.1); background: rgba(255,255,255,.94); }
.brand { color: var(--ink); }
.brand-copy strong { color: var(--ink); }
.brand-copy small { color: var(--muted); }
.connection-pill { border-color: #DCE2E9; color: #64748B; background: rgba(255,255,255,.8); }
.icon-button { border-color: #DCE2E9; color: #FFFFFF; background: #14243C; }
.icon-button:hover { border-color: #334155; background: #243650; }
.home-hero {
  border-color: #DCE2E9; color: #14243C;
  background: linear-gradient(125deg,#FFFFFF 0%,#EEF1F5 100%);
  box-shadow: 0 18px 48px rgba(20,36,60,.08);
}
.home-hero::before { background: linear-gradient(transparent,rgba(100,116,139,.18),transparent); }
.home-hero::after { border-color: rgba(100,116,139,.12); box-shadow: 0 0 0 30px rgba(100,116,139,.025),0 0 0 72px rgba(100,116,139,.018); }
.hero-kicker { color: #64748B; }
.hero-kicker span { background: #64748B; }
.hero-copy h1 { color: #14243C; }
.hero-copy h1 span { color: #64748B; }
.hero-description { color: #64748B; }
.hero-jump { border-color: #14243C; color: #FFFFFF; background: #14243C; }
.hero-jump:hover { background: #243650; }
.hero-jump span { color: #E2E8F0; }
.hero-orbit { border-color: rgba(100,116,139,.25); }
.hero-orbit-two { border-color: rgba(100,116,139,.16); }
.hero-art-index { color: #64748B; }
.hero-art-index b { color: #334155; }
.section-kicker { color: #64748B; }
.section-head h2 { color: #14243C; }
.section-head-note { color: #64748B; }
.course-link { border-color: #DCE2E9; color: #14243C; background: #FFFFFF; box-shadow: 0 5px 18px rgba(20,36,60,.055); }
.course-link:hover { border-color: #94A3B8; color: #14243C; background: #FFFFFF; box-shadow: 0 12px 26px rgba(20,36,60,.1); }
.course-arrow { border-color: #DCE2E9; color: #14243C; background: #F1F3F6; }
.course-link:hover .course-arrow { color: #FFFFFF; background: #14243C; }
.footer { border-color: #DCE2E9; color: #64748B; background: rgba(255,255,255,.72); }
.footer-brand, .footer-local, .designer-credit { color: #64748B; }
.mini-mark { color: #64748B; }
.course-breadcrumb .back-link { color: #334155; }
.back-link:hover { color: #14243C; }
.back-link span { color: #14243C; }
.breadcrumb-context { color: #64748B; }
.breadcrumb-context i { background: #64748B; }
.course-hero { border-color: #DCE2E9; background: linear-gradient(115deg,#FFFFFF,#F1F3F6); }
.detail-title, .course-hero-index strong { color: #14243C; }
.course-hero-index { border-color: rgba(20,36,60,.16); color: #FFFFFF; background: linear-gradient(145deg,#14243C,#263A56); box-shadow: 0 10px 24px rgba(20,36,60,.15); }
.course-hero-index span { color: #CBD5E1; }
.course-hero-index i { background: #94A3B8; }
.detail-resource { border-color: #DCE2E9; background: #FFFFFF; box-shadow: var(--shadow-small); }
.resource-symbol { border-color: #DCE2E9; color: #14243C; background: #F1F3F6; }
.exam-symbol { border-color: #DCE2E9; color: #64748B; background: #E7EBF1; }
.resource-title h2 { color: #14243C; }
.resource-state { border-color: #DCE2E9; color: #64748B; background: #F1F3F6; }
.resource-state.available { border-color: #CBD5E1; color: #64748B; background: #F1F3F6; }
.resource-help, .book-offline-note { color: #64748B; }
.resource-add, .mini-action:not(.remove-action), .reader-control {
  border-color: #14243C; color: #FFFFFF; background: #14243C;
}
.resource-add:hover, .mini-action:not(.remove-action):hover:not(:disabled), .reader-control:hover:not(:disabled) {
  border-color: #334155; color: #FFFFFF; background: #243650;
}
.resource-add.is-saved, .resource-add.is-saved:hover { border-color: #64748B; color: #FFFFFF; background: #64748B; }
.resource-add:disabled, .mini-action:disabled, .reader-control:disabled { opacity: .55; }
.download-progress progress, .download-progress progress::-webkit-progress-bar { background: #E2E8F0; }
.download-progress progress::-webkit-progress-value, .download-progress progress::-moz-progress-bar { background: #14243C; }
.document-row { border-color: #E2E8F0; }
.document-name { color: #14243C; }
.document-meta small { color: #64748B; }
.mini-action.remove-action { border-color: transparent; color: #64748B; background: transparent; }
.mini-action.remove-action:hover { color: #334155; background: #E7EBF1; }
.reader-toolbar { border-color: #DCE2E9; background: rgba(255,255,255,.94); }
.reader-toolbar-divider { background: #CBD5E1; }
.reader-page-wrap { border-color: #DCE2E9; background: #E2E8F0; }
.close-dialog { border-color: #DCE2E9; color: #14243C; background: #FFFFFF; }
.close-dialog:hover { color: #FFFFFF; background: #14243C; }
.toast { background: #14243C; }
:root[data-theme="dark"] {
  --ink: #E6EDF6;
  --ink-soft: #CFD8E5;
  --muted: #A4B0C2;
  --green: #CBD7E7;
  --green-dark: #E6EDF6;
  --green-bright: #B9C8DB;
  --sage: #293A52;
  --sage-soft: #213149;
  --copper: #94A3B8;
  --paper: #0D1524;
  --paper-deep: #131F33;
  --white: #18263B;
  --line: #2B3B52;
  --line-strong: #40516A;
  --shadow: 0 16px 42px rgba(0,0,0,.2);
  --shadow-small: 0 5px 18px rgba(0,0,0,.17);
  color-scheme: dark;
}
:root[data-theme="dark"] body { color: var(--ink); background: radial-gradient(ellipse at 5% 12%,rgba(100,116,139,.15),transparent 34rem),var(--paper); }
:root[data-theme="dark"] .topbar { border-color: #2B3B52; background: rgba(13,21,36,.95); }
:root[data-theme="dark"] .brand-copy strong, :root[data-theme="dark"] .home-title, :root[data-theme="dark"] .section-head h2, :root[data-theme="dark"] .detail-title { color: #E6EDF6; }
:root[data-theme="dark"] .brand-copy small, :root[data-theme="dark"] .connection-pill, :root[data-theme="dark"] .footer, :root[data-theme="dark"] .footer-local, :root[data-theme="dark"] .designer-credit { color: #A4B0C2; }
:root[data-theme="dark"] .connection-pill, :root[data-theme="dark"] .icon-button, :root[data-theme="dark"] .back-link span { border-color: #40516A; }
:root[data-theme="dark"] .icon-button { color: #FFFFFF; background: #263D5D; }
:root[data-theme="dark"] .home-hero { border-color: #2B3B52; color: #E6EDF6; background: linear-gradient(125deg,#18263B,#111D30); }
:root[data-theme="dark"] .hero-kicker, :root[data-theme="dark"] .hero-description, :root[data-theme="dark"] .section-head-note { color: #A4B0C2; }
:root[data-theme="dark"] .hero-copy h1 { color: #E6EDF6; }
:root[data-theme="dark"] .hero-copy h1 span { color: #A4B0C2; }
:root[data-theme="dark"] .hero-jump { border-color: #40516A; color: #FFFFFF; background: #263D5D; }
:root[data-theme="dark"] .course-link, :root[data-theme="dark"] .detail-resource { border-color: #2B3B52; color: #E6EDF6; background: #18263B; box-shadow: 0 5px 18px rgba(0,0,0,.17); }
:root[data-theme="dark"] .course-link:hover { border-color: #64748B; background: #1E3049; }
:root[data-theme="dark"] .course-arrow, :root[data-theme="dark"] .resource-symbol { border-color: #40516A; color: #E6EDF6; background: #213149; }
:root[data-theme="dark"] .course-link:hover .course-arrow { color: #FFFFFF; background: #263D5D; }
:root[data-theme="dark"] .course-hero { border-color: #2B3B52; background: linear-gradient(115deg,#18263B,#131F33); }
:root[data-theme="dark"] .course-hero-index { border-color: #40516A; background: linear-gradient(145deg,#263D5D,#14243C); }
:root[data-theme="dark"] .detail-resource { background: #18263B; }
:root[data-theme="dark"] .exam-symbol { border-color: #40516A; color: #CFD8E5; background: #26364B; }
:root[data-theme="dark"] .resource-title h2, :root[data-theme="dark"] .document-name, :root[data-theme="dark"] .embedded-reader-heading h2 { color: #E6EDF6; }
:root[data-theme="dark"] .resource-state, :root[data-theme="dark"] .resource-state.available { border-color: #40516A; color: #CFD8E5; background: #213149; }
:root[data-theme="dark"] .resource-help, :root[data-theme="dark"] .book-offline-note, :root[data-theme="dark"] .document-meta small { color: #A4B0C2; }
:root[data-theme="dark"] .resource-add, :root[data-theme="dark"] .mini-action:not(.remove-action), :root[data-theme="dark"] .reader-control { border-color: #40516A; color: #FFFFFF; background: #263D5D; }
:root[data-theme="dark"] .resource-add:hover, :root[data-theme="dark"] .mini-action:not(.remove-action):hover:not(:disabled), :root[data-theme="dark"] .reader-control:hover:not(:disabled) { border-color: #64748B; background: #334A6A; }
:root[data-theme="dark"] .resource-add.is-saved, :root[data-theme="dark"] .resource-add.is-saved:hover { border-color: #64748B; color: #FFFFFF; background: #64748B; }
:root[data-theme="dark"] .mini-action.remove-action { color: #A4B0C2; background: transparent; }
:root[data-theme="dark"] .mini-action.remove-action:hover { color: #E6EDF6; background: #26364B; }
:root[data-theme="dark"] .download-progress progress, :root[data-theme="dark"] .download-progress progress::-webkit-progress-bar { background: #293A52; }
:root[data-theme="dark"] .download-progress progress::-webkit-progress-value, :root[data-theme="dark"] .download-progress progress::-moz-progress-bar { background: #94A3B8; }
:root[data-theme="dark"] .document-row, :root[data-theme="dark"] .reader-toolbar { border-color: #2B3B52; }
:root[data-theme="dark"] .reader-toolbar { background: rgba(24,38,59,.96); }
:root[data-theme="dark"] .reader-page-wrap { border-color: #2B3B52; background: #0B1220; }
:root[data-theme="dark"] .reader-toolbar-divider { background: #40516A; }
:root[data-theme="dark"] .close-dialog { border-color: #40516A; color: #E6EDF6; background: #18263B; }
:root[data-theme="dark"] .close-dialog:hover { color: #FFFFFF; background: #263D5D; }
:root[data-theme="dark"] .footer { border-color: #2B3B52; background: rgba(13,21,36,.8); }
:root[data-theme="dark"] .toast { background: #263D5D; }

/* Display the university mark itself, with no plaque, white fill, frame, or shadow. */
.brand-logo { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.hero-logo-plaque { width: 150px; height: 190px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }
.hero-university-logo { width: 100%; height: 100%; border-radius: 0; object-fit: contain; }
:root[data-theme="dark"] .brand-logo, :root[data-theme="dark"] .hero-logo-plaque { border: 0; background: transparent; box-shadow: none; }
@media (max-width: 640px) { .hero-logo-plaque { width: 112px; height: 150px; padding: 0; } }

/* Keep the new full college title legible beside the standalone university mark. */
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; max-width: min(36vw, 280px); line-height: 1.45; white-space: normal; }
@media (max-width: 640px) { .brand-copy strong { max-width: min(43vw, 180px); font-size: 11px; } }

/* Three distinct course resources: book, self-testing, and past-year exams. */
.detail-resources { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
@media (max-width: 640px) { .detail-resources { grid-template-columns: 1fr; } }
.download-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
