@font-face {
  font-family: "Question Bank Math";
  src: url("./assets/fonts/STIXTwoMath-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  font-synthesis: none;
  --blue: #0066cc;
  --muted: #6e6e73;
  --line: #e6e6e9;
  --surface: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #0071e3; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
.question-block:focus-visible { outline: 3px solid #0071e3; outline-offset: 4px; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: 10px; z-index: 10; background: #fff; padding: 12px 18px; border-radius: 10px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid #dcdce180; background: #fbfbfce8; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.header-inner { max-width: 1200px; min-height: 76px; padding: 0 40px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 10px; color: #1d1d1f; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; }
.brand-wordmark { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.brand-name { font-size: 18px; font-weight: 650; letter-spacing: .5px; line-height: 1.2; }
.brand-light { color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: 1.5px; line-height: 1.2; }
.primary-nav { display: flex; gap: 8px; align-items: center; }
.primary-nav a { color: #6e6e73; font-size: 14px; padding: 10px 16px; min-height: 40px; border-radius: 22px; white-space: nowrap; }
.primary-nav a:hover { color: #1d1d1f; text-decoration: none; background: #eeeeef; }
.primary-nav a[aria-current="page"] { color: #fff; background: #1d1d1f; }
.main-shell { max-width: 1200px; margin: auto; padding: 0 40px 88px; min-height: calc(100vh - 181px); }
.page-intro { padding-top: 72px; padding-bottom: 42px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; line-height: 1.6; margin-bottom: 14px; }
h1 { font-size: clamp(32px, 4.3vw, 50px); font-weight: 650; line-height: 1.2; letter-spacing: -1.8px; overflow-wrap: anywhere; }
.intro-description { color: var(--muted); font-size: 16px; line-height: 1.8; margin-top: 20px; max-width: 780px; }
.filter-panel { border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 18px 22px; display: flex; gap: 24px; align-items: center; }
.search-field { flex: 1 1 240px; min-width: 180px; display: flex; align-items: center; gap: 12px; }
.search-icon { display: block; position: relative; flex: 0 0 15px; height: 15px; border: 1.6px solid #86868b; border-radius: 50%; margin-right: 2px; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; height: 1.6px; background: #86868b; transform: rotate(45deg); border-radius: 2px; }
.search-field input { width: 100%; min-width: 0; border: 0; background: transparent; color: #1d1d1f; padding: 9px 0; font-size: 14px; min-height: 40px; }
.search-field input::placeholder { color: #86868b; opacity: 1; }
.search-field input:focus-visible { outline-offset: 3px; border-radius: 3px; }
.search-button { background: #f5f5f7; border: 1px solid var(--line); color: #444449; border-radius: 8px; padding: 8px 12px; min-height: 38px; white-space: nowrap; font-size: 13px; }
.search-button:hover { background: #eaeaec; }
.filter-controls { display: flex; align-items: center; gap: 16px; }
.select-field { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.select-field select { border: 0; border-radius: 6px; background: #fff; color: #1d1d1f; max-width: 150px; min-height: 40px; font-size: 13px; padding: 8px 19px 8px 3px; }
.filter-reset { font-size: 12px; display: inline-flex; min-height: 40px; align-items: center; white-space: nowrap; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin: 29px 0 18px; }
.result-bar p { font-size: 14px; color: #6e6e73; }
.result-bar strong { color: #1d1d1f; font-weight: 600; }
.paper-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.paper-card { background: var(--surface); border: 1px solid #e8e8eb; border-radius: 20px; padding: 26px; display: flex; flex-direction: column; min-height: 260px; box-shadow: 0 3px 7px #00000002; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.paper-year { font-size: 29px; letter-spacing: -1px; font-weight: 550; }
.chip { display: inline-flex; align-items: center; background: #f4f4f6; border-radius: 6px; padding: 5px 8px; color: #6e6e73; font-size: 11px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; max-width: 100%; }
.chip-blue { background: #eaf3ff; color: #0066cc; }
.chip-review { background: #fff3db; color: #7a5014; }
.is-review { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.review-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 13px 22px calc(13px + env(safe-area-inset-bottom)); background: #fff7e6; border-top: 1px solid #e8d9b8; color: #6c4b18; font-size: 13px; font-weight: 500; line-height: 1.7; text-align: center; box-shadow: 0 -4px 18px #00000006; }
.paper-card h2 { font-size: 19px; font-weight: 600; line-height: 1.6; letter-spacing: -.3px; }
.card-title { color: #1d1d1f; }
.card-title:hover { color: var(--blue); }
.card-source { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 10px; margin-bottom: 26px; overflow-wrap: anywhere; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 19px; margin-top: auto; border-top: 1px solid #eeeef0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.card-bottom > span { min-width: 0; overflow-wrap: anywhere; }
.card-action { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 28px; font-size: 12px; }
.question-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.question-card { border-radius: 20px; padding: 26px; background: #fff; border: 1px solid #e8e8eb; display: flex; flex-direction: column; min-width: 0; }
.question-card-heading { display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.question-card-heading h2 { font-size: 19px; font-weight: 600; }
.question-paper-name { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.7; overflow-wrap: anywhere; }
.question-preview { position: relative; height: 105px; overflow: hidden; margin: 23px 0 20px; color: #4d4d52; font-size: 14px; pointer-events: none; }
.question-preview::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 28px; background: linear-gradient(#fff0, #fff); }
.question-preview img { max-height: 80px; object-fit: contain; }
.question-preview p + p { margin-top: 8px; }
.empty-state { border: 1px solid var(--line); background: #fff; border-radius: 24px; min-height: 330px; padding: 62px 24px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty-symbol { display: grid; place-items: center; width: 52px; height: 60px; border: 1px solid #d9d9de; border-radius: 9px; color: #a5a5ab; font-size: 23px; font-weight: 300; background: #fafafb; margin-bottom: 22px; box-shadow: 4px 4px 0 #f3f3f5; }
.empty-state h2 { font-size: 21px; letter-spacing: -.4px; font-weight: 600; line-height: 1.5; }
.empty-state p { color: var(--muted); margin-top: 12px; font-size: 14px; line-height: 1.8; max-width: 430px; }
.empty-state .button { margin-top: 24px; }
.button { display: inline-flex; min-height: 44px; padding: 11px 20px; justify-content: center; align-items: center; border-radius: 24px; font-size: 14px; font-weight: 500; line-height: 1.4; border: 1px solid transparent; text-align: center; }
.button:hover { text-decoration: none; }
.button-primary { background: #0071e3; color: #fff; }
.button-primary:hover { background: #0077ed; }
.button-secondary { background: #fff; color: #1d1d1f; border-color: #d2d2d7; }
.button-secondary:hover { background: #fafafa; }
.inline-actions, .download-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 35px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.breadcrumbs a { color: #6e6e73; min-height: 30px; display: inline-flex; align-items: center; }
.breadcrumbs a:hover { color: var(--blue); }
.detail-intro { padding-top: 33px; padding-bottom: 22px; }
.detail-intro h1 { font-size: clamp(28px, 3.7vw, 42px); line-height: 1.4; letter-spacing: -1.1px; }
.detail-intro .intro-description { margin-top: 14px; }
.detail-metadata { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.source-line { color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.source-line > span { color: #86868b; }
.download-actions { margin-top: 24px; margin-bottom: 42px; }
.download-note { color: var(--muted); font-size: 13px; }
.paper-layout { display: grid; grid-template-columns: 204px minmax(0, 1fr); align-items: start; gap: 24px; }
.paper-index { position: sticky; top: 101px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.index-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 19px; }
.index-heading h2 { font-size: 14px; font-weight: 600; }
.index-heading > span { font-size: 11px; color: var(--muted); }
.question-jumps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.question-jump { display: flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 7px; font-size: 12px; color: #56565c; background: #f5f5f7; overflow-wrap: anywhere; padding: 4px; }
.question-jump:hover { background: #eaf3ff; color: var(--blue); text-decoration: none; }
.question-jump.is-current { background: #0071e3; color: #fff; }
.index-note { margin-top: 18px; font-size: 10px; line-height: 1.7; color: #86868b; }
.paper-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.paper-section-instructions { padding: 8px 4px 2px; margin-top: 12px; min-width: 0; }
.paper-section-instructions:first-child { margin-top: 0; padding-top: 0; }
.section-instructions-heading { font-size: 11px; line-height: 1.6; font-weight: 500; color: var(--muted); letter-spacing: 1px; margin-bottom: 9px; }
.section-instructions-text { color: #444449; font-size: 15px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-instructions { border: 1px solid #e8e8eb; border-radius: 10px; margin-bottom: 26px; padding: 0 16px; background: #fafafb; }
.answer-instructions summary { cursor: pointer; color: #6e6e73; font-size: 12px; line-height: 1.7; padding: 12px 0; }
.answer-instructions[open] summary { margin-bottom: 2px; }
.answer-instructions .section-instructions-text { padding-bottom: 16px; font-size: 14px; }
.question-block { scroll-margin-top: 101px; padding: 30px 32px 24px; background: #fff; border-radius: 20px; border: 1px solid var(--line); min-width: 0; }
.question-block-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 27px; }
.question-block-heading h2 { font-size: 17px; font-weight: 600; white-space: nowrap; }
.question-number-link { color: #1d1d1f; }
.question-heading-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.quiet-link { color: #86868b; font-size: 11px; min-height: 28px; display: inline-flex; align-items: center; }
.quiet-link:hover { color: var(--blue); }
.math-content { font-family: "Times New Roman", "Songti SC", SimSun, "Noto Serif CJK SC", serif; line-height: 2.05; overflow-wrap: anywhere; min-width: 0; overflow-x: auto; }
.math-content p, .math-content .stem-paragraph { margin-bottom: 13px; }
.math-content p:last-child { margin-bottom: 0; }
.math-content ul, .math-content ol { padding-left: 1.6em; }
.math-content table { max-width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .93em; }
.math-content td, .math-content th { border: 1px solid #d2d2d7; padding: 7px 10px; font-weight: inherit; }
.math-content th { font-weight: 600; }
.math-content figure { margin: 20px 0; }
.math-content figcaption { font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 8px; }
.math-content img { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; object-fit: fill; }
.math-content math { display: inline-block; font-family: "Question Bank Math", "STIX Two Math", "Cambria Math", serif; font-size: 1.08em; math-style: normal; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-block: .15em; vertical-align: middle; }
.math-content math[display="block"], .math-content .math-block { display: block; overflow-x: auto; max-width: 100%; padding: 10px 0; margin: 10px 0; }
.math-content .math-inline { display: inline-block; max-width: 100%; overflow-x: auto; vertical-align: middle; }
.math-content .keep-together { white-space: nowrap; }
.math-content .question-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-top: 18px; list-style: none; padding-left: 0; }
.math-content .option { min-width: 0; }
.math-content .option-label { margin-right: .6em; }
.question-preview.math-content { overflow: hidden; }
.question-content { font-size: 17px; }
.question-block > .source-line { padding-top: 22px; margin-top: 25px; border-top: 1px solid #f0f0f2; font-size: 10px; }
.question-detail { max-width: 940px; margin: 0 auto; }
.single-question-wrap { margin-top: 32px; }
.single-question { padding: 32px 36px 38px; }
.single-question .question-block-heading { margin-bottom: 30px; }
.single-question .question-block-heading h2 { font-size: 14px; color: #86868b; font-weight: 400; }
.question-origin { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 17px; padding: 24px 28px; margin-top: 20px; background: #fbfbfc; }
.question-origin .eyebrow { font-size: 10px; margin-bottom: 7px; }
.origin-title { font-size: 14px; line-height: 1.7; font-weight: 500; overflow-wrap: anywhere; }
.question-origin > a { font-size: 12px; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.adjacent-questions { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; font-size: 12px; color: #86868b; }
.adjacent-questions a { display: inline-flex; align-items: center; min-height: 40px; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 32px; font-size: 12px; color: var(--muted); }
.pagination a, .pagination .disabled { border: 1px solid var(--line); background: #fff; border-radius: 10px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 15px; }
.pagination .disabled { color: #a1a1a7; background: #f9f9fa; }
.site-footer { padding: 0 40px; border-top: 1px solid #e2e2e5; background: #f5f5f7; }
.site-footer > div { max-width: 1120px; margin: auto; padding: 27px 0; min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #86868b; font-size: 11px; }
.loading-state { min-height: 380px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 14px; }
.loading-dot { width: 7px; height: 7px; border-radius: 50%; background: #a4a4aa; }
.noscript-message { background: #fff; margin: 24px; padding: 24px; border-radius: 14px; line-height: 1.8; text-align: center; }

@media (min-width: 901px) {
  .paper-card { transition: transform 150ms ease, box-shadow 150ms ease; }
  .paper-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px #00000006; }
}

@media (max-width: 1080px) {
  .filter-panel { flex-wrap: wrap; gap: 10px 24px; }
  .search-field { flex-basis: 100%; }
  .filter-controls { width: 100%; padding-top: 8px; border-top: 1px solid #f0f0f2; flex-wrap: wrap; gap: 10px 20px; }
  .paper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paper-layout { grid-template-columns: 174px minmax(0, 1fr); gap: 18px; }
  .paper-index { padding: 20px 15px; }
  .question-block { padding: 27px; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 68px; padding: 0 22px; gap: 14px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 7px; }
  .brand-wordmark { gap: 2px; }
  .brand-name { font-size: 16px; }
  .brand-light { font-size: 9px; letter-spacing: 1px; }
  .primary-nav { gap: 3px; }
  .primary-nav a { font-size: 12px; padding: 9px 12px; min-height: 38px; }
  .main-shell { padding: 0 22px 56px; }
  .page-intro { padding-top: 47px; padding-bottom: 30px; }
  .eyebrow { font-size: 11px; margin-bottom: 12px; }
  h1 { font-size: 34px; letter-spacing: -1.2px; line-height: 1.3; }
  .intro-description { font-size: 14px; margin-top: 15px; line-height: 1.8; }
  .filter-panel { padding: 14px 16px; border-radius: 16px; }
  .search-field { gap: 10px; }
  .search-field input { font-size: 13px; }
  .search-button { font-size: 12px; padding: 7px 10px; }
  .filter-controls { gap: 3px 12px; }
  .select-field { gap: 3px; font-size: 11px; }
  .select-field select { font-size: 12px; max-width: 130px; }
  .result-bar { margin-top: 23px; font-size: 10px; }
  .result-bar p { font-size: 13px; }
  .paper-grid, .question-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .paper-card { padding: 24px; min-height: 245px; border-radius: 18px; }
  .card-topline { margin-bottom: 20px; }
  .paper-card h2 { font-size: 19px; }
  .card-source { margin-bottom: 21px; }
  .question-card { padding: 23px; border-radius: 18px; }
  .question-preview { font-size: 14px; }
  .empty-state { border-radius: 20px; min-height: 320px; padding: 45px 25px; }
  .empty-state h2 { font-size: 20px; }
  .empty-state p { font-size: 13px; line-height: 1.9; }
  .breadcrumbs { padding-top: 24px; font-size: 11px; gap: 8px; }
  .detail-intro { padding-top: 24px; padding-bottom: 20px; }
  .detail-intro h1 { font-size: 29px; line-height: 1.45; letter-spacing: -.7px; }
  .download-actions { margin-top: 22px; margin-bottom: 28px; }
  .button { font-size: 13px; padding: 10px 18px; min-height: 43px; }
  .source-line { font-size: 11px; }
  .paper-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .paper-index { position: static; padding: 20px; border-radius: 16px; }
  .index-heading { margin-bottom: 14px; }
  .question-jumps { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .question-jump { min-height: 36px; }
  .index-note { margin-top: 12px; }
  .paper-body { gap: 14px; }
  .paper-section-instructions { padding: 7px 2px 1px; margin-top: 10px; }
  .section-instructions-text { font-size: 14px; }
  .answer-instructions { padding: 0 13px; margin-bottom: 23px; }
  .question-block { padding: 22px 20px; border-radius: 17px; scroll-margin-top: 86px; }
  .question-block-heading { margin-bottom: 24px; gap: 10px; }
  .question-block-heading h2 { font-size: 16px; }
  .question-heading-meta { gap: 7px; }
  .quiet-link { font-size: 10px; }
  .question-content { font-size: 16px; line-height: 2; }
  .math-content .question-options { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .math-content table { font-size: 12px; }
  .math-content td, .math-content th { padding: 5px; }
  .single-question-wrap { margin-top: 25px; }
  .single-question { padding: 23px 21px 28px; }
  .question-origin { display: block; padding: 21px; border-radius: 15px; }
  .question-origin > a { margin-top: 10px; }
  .origin-title { font-size: 13px; }
  .site-footer { padding: 0 22px; }
  .site-footer > div { font-size: 10px; gap: 12px; min-height: 76px; }
}

@media (max-width: 360px) {
  .header-inner { padding: 0 16px; gap: 8px; }
  .main-shell { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 30px; }
  .primary-nav a { padding-left: 10px; padding-right: 10px; }
  .question-jumps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .skip-link, .breadcrumbs, .paper-index, .download-actions, .question-heading-meta a, .adjacent-questions, .question-origin { display: none; }
  body, :root { background: #fff; color: #000; }
  .main-shell { max-width: none; padding: 0; }
  .page-intro { padding-top: 0; }
  .paper-layout { display: block; }
  .question-block { border: 0; border-radius: 0; padding: 16px 0; }
  .math-content { overflow: visible; }
  a { color: inherit; }
  .is-review { padding-bottom: 0; }
  .review-notice { position: static; border: 1px solid #e8d9b8; box-shadow: none; margin-bottom: 20px; }
}
