:root {
  --exam-ink: #203331;
  --exam-muted: #667a76;
  --exam-line: #dce9e5;
  --exam-bg: #ffffff;
  --exam-blue: #3f8f83;
  --exam-blue-deep: #286b63;
  --exam-blue-soft: #e6f4f0;
  --exam-teal: #2f8f83;
  --exam-card: #ffffff;
}

.exams-hero {
  background: linear-gradient(125deg, #175e5b 0%, #2d8278 58%, #63aa8e 130%);
}

.exams-hero-copy > span { color: #c5f2e5; }
.exams-hero p { color: #e2f4ef; }
.exams-hero-stat span { color: #dcf2ec; }
.exams-hero::after { background: rgba(197, 242, 229, .14); }

.exam-filter-card,
.exam-results {
  box-shadow: 0 14px 38px rgba(38, 96, 86, .07);
}

.filter-heading button,
.filter-chip {
  border-color: #d9e7e3;
  color: #526b66;
}

.filter-heading button:hover,
.filter-chip:hover {
  border-color: #9fc9c0;
}

.filter-chip.is-active {
  border-color: #4b9186;
  background: #4b9186;
  box-shadow: 0 6px 15px rgba(47, 112, 101, .15);
}

.paper-row:hover { background: #f4faf8; }
.paper-meta i { background: #eaf5f2; color: #4f716a; }
.pdf-mark {
  background: linear-gradient(155deg, #ef8c78, #c96462);
  box-shadow: 0 7px 15px rgba(163, 86, 79, .14);
}

.exam-pagination { display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:24px 0 4px; }
.exam-pagination[hidden] { display:none; }
.page-button { min-width:38px;height:38px;padding:0 11px;border:1px solid #d7e6e2;border-radius:9px;background:#fff;color:#58716c;font-size:12px;cursor:pointer;transition:.16s; }
.page-button:hover:not(:disabled) { border-color:#8ebeb4;color:#2f756b;background:#f2faf7; }
.page-button.is-active { border-color:#4b9186;background:#4b9186;color:#fff;box-shadow:0 5px 12px rgba(47,112,101,.14); }
.page-button:disabled { opacity:.42;cursor:not-allowed; }
.page-direction { min-width:68px; }
.page-ellipsis { min-width:24px;text-align:center;color:#95a7a3; }

html[data-theme="dark"] .exams-page,
html[data-theme="dark"] .exam-detail-page { background: #0d1715 !important; }
html[data-theme="dark"] .exam-filter-card,
html[data-theme="dark"] .exam-results,
html[data-theme="dark"] .pdf-panel,
html[data-theme="dark"] .exam-action-card {
  background: #15211f !important;
  border-color: #2d413d !important;
}
html[data-theme="dark"] .filter-heading,
html[data-theme="dark"] .filter-step,
html[data-theme="dark"] .exam-results-head,
html[data-theme="dark"] .paper-row { border-color: #2d413d !important; }
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .filter-heading button {
  background: #1d2b28 !important;
  border-color: #38514c !important;
  color: #c7dbd6 !important;
}
html[data-theme="dark"] .filter-chip.is-active {
  background: #4f9388 !important;
  border-color: #4f9388 !important;
  color: #fff !important;
}
html[data-theme="dark"] .paper-row:hover { background: #20312e !important; }
html[data-theme="dark"] .paper-meta i { background: #253936 !important; color: #bdd6d0 !important; }
html[data-theme="dark"] .page-button { background:#202c2a;border-color:#38514c;color:#c7dbd6; }
html[data-theme="dark"] .page-button.is-active { background:#4f9388;border-color:#4f9388;color:#fff; }

.exam-detail-page .exam-workspace { grid-template-columns:minmax(0,1fr) 360px;align-items:stretch;min-height:1080px; }
.exam-detail-page .pdf-panel { display:flex;flex-direction:column;height:100%;min-height:1080px;padding:0;overflow:hidden; }
.pdf-toolbar { min-height:58px;display:flex;align-items:center;justify-content:center;gap:18px;padding:10px 18px;border-bottom:1px solid var(--exam-line);background:#fbfdfc; }
.pdf-toolbar[hidden],.single-page-viewer[hidden] { display:none; }
.pdf-toolbar button { min-width:92px;height:38px;padding:0 15px;border:1px solid #d4e5e0;border-radius:9px;background:#fff;color:#3f6962;font-size:13px;cursor:pointer; }
.pdf-toolbar button:hover:not(:disabled) { border-color:#89baaf;background:#eef8f5; }
.pdf-toolbar button:disabled { opacity:.42;cursor:not-allowed; }
.pdf-toolbar span { min-width:110px;text-align:center;color:#526b66;font-size:13px; }
.single-page-viewer { flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;background:#e9eeec;overflow:hidden; }
.single-page-viewer canvas { display:block;max-width:100%;max-height:100%;background:#fff;box-shadow:0 5px 20px rgba(31,55,51,.13); }
.exam-detail-page .pdf-empty { flex:1;min-height:0; }
.exam-detail-page .pdf-empty[hidden] { display:none; }
.exam-detail-page .exam-actions { display:flex;height:100%;gap:14px; }
.exam-detail-page .exam-action-card { padding:22px; }
.exam-detail-page .exam-action-card h2 { margin-bottom:16px;font-size:19px; }
.exam-detail-page #fileStatus { margin:0 0 14px;font-size:13px; }
.exam-detail-page .exam-button { height:50px;font-size:15px; }
.exam-detail-page .exam-button.light { border:1px solid #cfe3de; }
.exam-recommend-card { flex:1;display:flex;flex-direction:column; }
.recommend-columns { display:flex;flex:1;flex-direction:column;gap:24px; }
.recommend-columns > section { min-width:0; }
.recommend-columns h3 { position:relative;margin:0 0 9px;padding-left:13px;color:#294d47;font-size:16px; }
.recommend-columns h3::before { content:"";position:absolute;left:0;top:2px;width:4px;height:19px;border-radius:4px;background:#48a789; }
.recommend-list { display:flex;flex-direction:column; }
.recommend-list a { display:block;min-width:0;padding:11px 2px;border-bottom:1px solid #e7efed;color:inherit;text-decoration:none; }
.recommend-list a:last-child { border-bottom:0; }
.recommend-list a:hover strong { color:#2f8f83; }
.recommend-list strong { display:block;overflow:hidden;color:#465450;font-size:13px;font-weight:400;line-height:1.55;text-overflow:ellipsis;white-space:nowrap; }
.recommend-list span { display:none; }
.recommend-empty { display:block;padding:12px 4px;color:#98a7a3;font-size:12px; }

html[data-theme="dark"] .pdf-toolbar { background:#182522;border-color:#2d413d; }
html[data-theme="dark"] .pdf-toolbar button { background:#21322f;border-color:#3b554f;color:#c9ddd8; }
html[data-theme="dark"] .pdf-toolbar span { color:#c1d4cf; }
html[data-theme="dark"] .single-page-viewer { background:#0e1715; }
html[data-theme="dark"] .recommend-columns h3,
html[data-theme="dark"] .recommend-list strong { color:#e6f1ee; }
html[data-theme="dark"] .recommend-list a { border-color:#304640; }

@media(max-width:980px){.exam-detail-page .exam-workspace{grid-template-columns:1fr;min-height:0}.exam-detail-page .exam-actions{height:auto}.exam-detail-page .pdf-panel{height:880px;min-height:0}}
@media(max-width:620px){.exam-detail-page .pdf-panel{height:650px}.pdf-toolbar{gap:8px}.pdf-toolbar button{min-width:76px;padding:0 10px}}

body[data-page="exams"] .main-nav a:hover,
body[data-page="exams"] .main-nav a.active { color:#2f8f83; }
body[data-page="exams"] .main-nav a.active::after { background:#4b9f91; }
html[data-theme="dark"] body[data-page="exams"] .main-nav a:hover,
html[data-theme="dark"] body[data-page="exams"] .main-nav a.active { color:#65c8b6 !important; }
html[data-theme="dark"] body[data-page="exams"] .main-nav a.active::after { background:#65c8b6 !important; }

.exams-page .exams-hero-copy > span,
.exams-page .exams-hero-stat span,
.exams-page .filter-heading span,
.exams-page .exam-results-head > div > span,
.exams-page .filter-label small,
.exams-page .active-filter-tags span,
.exams-page .paper-main small,
.exams-page .filter-label > b,
.exams-page .pdf-mark b,
.exams-page .paper-meta i,
.exams-page .paper-meta em,
.exams-page .exam-empty span,
.exam-detail-page .exam-detail-head a,
.exam-detail-page .exam-action-card p,
.exam-detail-page .answer-placeholder,
.exam-detail-page .related-paper-group h3,
.exam-detail-page .related-paper-links a,
.exam-detail-page .related-paper-links i { font-size:12px; }

.page-summary { flex:0 0 100%;margin-bottom:4px;text-align:center;color:var(--exam-muted);font-size:12px; }
.exams-page .filter-step { grid-template-columns:150px 1fr; }
.exams-page .filter-label { display:block; }
.exams-page .filter-label > strong { color:var(--exam-ink);font-size:18px;line-height:1.4; }
