@charset "UTF-8";
:root {
  color-scheme: light;
  --ink: #1b2942;
  --muted: #738099;
  --line: #e7ebf2;
  --paper: #fff;
  --canvas: #f5f7fb;
  --blue: #315de8;
  --blue-dark: #2449c5;
  --blue-soft: #eef2ff;
  --green: #16865b;
  --green-soft: #eaf7f1;
  --red: #c64a4a;
  --red-soft: #fff0ef;
  --amber: #9b6615;
  --amber-soft: #fff6e6;
  --shadow: 0 14px 38px rgba(30, 48, 84, .055);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.topbar { height: 72px; padding: 0 clamp(16px, 4vw, 44px); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand { display: flex; gap: 11px; align-items: center; border: 0; background: none; padding: 0; color: var(--ink); text-align: left; cursor: pointer; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #416cf4, #294acb); font: 700 22px Georgia, serif; box-shadow: 0 6px 14px #315de833; }
.brand strong { display: block; font-size: 15px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.topbar-right { display: flex; gap: 14px; align-items: center; }
.offline-badge { display: flex; align-items: center; gap: 7px; color: #60708a; font-size: 12px; }
.offline-badge i { width: 7px; height: 7px; border-radius: 50%; background: #3ab780; box-shadow: 0 0 0 4px #3ab7801c; }
.menu-toggle { display: none !important; }
.app-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100vh - 72px); max-width: 1600px; margin: 0 auto; }
.sidebar { border-right: 1px solid var(--line); background: #fbfcfe; padding: 30px 17px 20px; display: flex; flex-direction: column; }
.sidebar-label { padding: 0 13px 12px; color: #a1aabd; font-size: 10px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.main-nav { display: grid; gap: 5px; }
.nav-item { min-height: 43px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 10px; background: transparent; color: #66738a; text-align: left; font-size: 13px; font-weight: 550; cursor: pointer; transition: .16s ease; }
.nav-item:hover { background: #f0f3fa; color: var(--ink); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.nav-item > span { width: 18px; text-align: center; font-size: 17px; line-height: 1; }
.nav-item b { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 99px; background: #edf0f5; color: #69758b; font-size: 10px; text-align: center; }
.nav-item.active b { background: #fff; color: var(--blue); }
.sidebar-foot { margin-top: auto; padding: 14px 13px 5px; }
.side-progress-head { display: flex; justify-content: space-between; align-items: center; color: #65718a; font-size: 11px; }
.side-progress-head b { color: var(--blue); font-size: 12px; }
.progress-track { height: 6px; margin: 10px 0 7px; border-radius: 99px; background: #e9edf4; overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4e79f5, #315de8); transition: width .25s ease; }
.sidebar-foot small { color: #97a1b4; font-size: 10px; }
.main-content { min-width: 0; padding: clamp(22px, 3.5vw, 44px) clamp(17px, 4vw, 54px) 64px; }
.page-wrap { max-width: 1120px; margin: 0 auto; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; color: var(--ink); font-size: clamp(26px, 3vw, 36px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 21px; letter-spacing: -.025em; }
h3 { margin-bottom: 7px; font-size: 16px; }
.intro { max-width: 690px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.home-hero { position: relative; padding: clamp(22px, 4vw, 36px); border: 1px solid #e8ecf5; border-radius: 22px; background: radial-gradient(ellipse at 94% 7%, #edf2ff 0, transparent 37%), #fff; box-shadow: var(--shadow); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(220px,.75fr); gap: 32px; align-items: center; }
.hero-copy { max-width: 620px; }
.hero-copy .intro { margin-bottom: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { min-height: 170px; position: relative; display: grid; place-items: center; }
.orbit { position: absolute; width: 155px; height: 155px; border-radius: 50%; border: 1px solid #dbe4ff; transform: rotate(-28deg) scaleY(.67); }
.orbit:before, .orbit:after { content: ""; position: absolute; inset: 17px; border-radius: 50%; border: 1px solid #e2e9fb; }
.orbit:after { inset: 36px; }
.math-orb { position: relative; display: grid; place-items: center; width: 92px; height: 92px; color: #355ce0; border: 1px solid #e1e7fb; border-radius: 29px; background: #fff; box-shadow: 0 18px 36px #325de81c; font: 36px Georgia, serif; transform: rotate(-7deg); }
.math-orb:after { content: "√  π  ∫"; position: absolute; right: -31px; bottom: -16px; color: #9caeea; font: 12px Georgia, serif; letter-spacing: 3px; transform: rotate(7deg); }
.button { min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button:hover { background: var(--blue-dark); box-shadow: 0 7px 16px #315de82e; transform: translateY(-1px); }
.button.secondary { border-color: var(--line); color: #43516a; background: #fff; }
.button.secondary:hover { color: var(--blue); border-color: #cbd5f4; background: #f9faff; box-shadow: none; }
.button.ghost { color: #69758a; background: transparent; }
.button.danger { color: var(--red); border-color: #f2d6d4; background: #fff; }
.button.small { min-height: 34px; padding: 0 11px; border-radius: 8px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .52; transform: none; box-shadow: none; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin: 18px 0 30px; }
.stat-card { min-height: 96px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stat-card span { display: block; color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin-top: 8px; color: var(--ink); font-size: 23px; line-height: 1; letter-spacing: -.04em; }
.stat-card small { display: block; margin-top: 7px; color: #a0a9b8; font-size: 10px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin: 28px 0 13px; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.module-card { min-height: 146px; display: flex; flex-direction: column; align-items: flex-start; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: #fff; text-align: left; cursor: pointer; box-shadow: 0 4px 16px #253a6810; transition: .18s ease; }
.module-card:hover { border-color: #cbd7fa; box-shadow: 0 12px 26px #24396713; transform: translateY(-2px); }
.module-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-size: 17px; }
.module-card strong { margin-bottom: 5px; font-size: 14px; }
.module-card small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.module-arrow { margin: auto 0 0 auto; color: #9aa5b7; font-size: 16px; }
.paper-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.paper-card { width: 100%; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; transition: .16s ease; }
.paper-card:hover { border-color: #c9d5fa; box-shadow: var(--shadow); transform: translateY(-1px); }
.paper-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.paper-card h3 { margin: 0; font-size: 14px; }
.paper-year { color: #8c98ac; font-size: 11px; white-space: nowrap; }
.paper-card-meta { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.paper-progress-line { display: flex; align-items: center; gap: 9px; margin-top: 14px; }
.paper-progress-line .progress-track { flex: 1; height: 5px; margin: 0; }
.paper-progress-line small { min-width: 56px; color: #8b96a9; font-size: 10px; text-align: right; }
.paper-card-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.paper-card-actions .button { min-height: 42px; }
.paper-card-note { margin: 9px 0 0; color: #8b96a9; font-size: 10px; line-height: 1.5; }
.quiz-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 17px; }
.quiz-source { color: var(--muted); font-size: 12px; }
.quiz-header h1 { margin: 4px 0 7px; font-size: clamp(22px, 2.7vw, 30px); }
.quiz-header-right { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: #68758b; font-size: 10px; white-space: nowrap; }
.pill.blue { border-color: #e1e7ff; color: #3856c4; background: #f2f5ff; }
.pill.green { border-color: #d8efe4; color: var(--green); background: var(--green-soft); }
.pill.red { border-color: #f6dedb; color: var(--red); background: var(--red-soft); }
.pill.amber { border-color: #f5e5c6; color: var(--amber); background: var(--amber-soft); }
.quiz-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.question-meta { min-height: 50px; padding: 12px 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eef0f5; background: #fcfdff; }
.question-meta-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.question-number { color: #78859b; font-size: 11px; }
.question-body { padding: clamp(20px, 4vw, 34px); }
.stem-content { color: #24324a; font-size: clamp(15px, 1.65vw, 17px); line-height: 1.95; overflow-wrap: anywhere; }
.rich-block { white-space: pre-wrap; }
.rich-block math { font-size: 1.05em; vertical-align: -0.1em; }
.stem-content img, .explanation-content img { display: block; max-width: min(100%, 680px); max-height: 520px; height: auto; margin: 18px auto; object-fit: contain; border: 1px solid #edf0f5; border-radius: 8px; background: #fff; cursor: zoom-in; }
.options-list { display: grid; gap: 9px; margin-top: 25px; }
.option-button { width: 100%; min-height: 54px; display: flex; align-items: flex-start; gap: 13px; padding: 13px 15px; border: 1px solid #e7eaf1; border-radius: 12px; background: #fff; color: #344158; text-align: left; cursor: pointer; transition: .14s ease; }
.option-button:hover:not(:disabled) { border-color: #bdcbf9; background: #fbfcff; }
.option-button:disabled { cursor: default; }
.option-button.selected { border-color: #8098ef; background: #f4f6ff; box-shadow: inset 0 0 0 1px #8098ef; }
.option-button.correct { border-color: #8bd0af; background: #effaf4; color: #176f4d; }
.option-button.incorrect { border-color: #efa9a3; background: #fff3f1; color: #a53c3c; }
.option-letter { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #e7ebf3; border-radius: 50%; background: #f8f9fc; color: #69778f; font-size: 11px; font-weight: 750; }
.option-button.selected .option-letter { border-color: var(--blue); background: var(--blue); color: #fff; }
.option-button.correct .option-letter { border-color: #36a875; background: #36a875; color: #fff; }
.option-button.incorrect .option-letter { border-color: #d86e67; background: #d86e67; color: #fff; }
.option-content { min-width: 0; padding-top: 1px; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.option-content math { font-size: 1.04em; }
.feedback { margin-top: 17px; padding: 13px 15px; border-radius: 11px; font-size: 13px; line-height: 1.6; }
.feedback.correct { border: 1px solid #d6eee2; background: var(--green-soft); color: #176f4d; }
.feedback.wrong { border: 1px solid #f3d9d6; background: var(--red-soft); color: #9f4242; }
.feedback strong { display: block; margin-bottom: 4px; }
.answer-area { margin-top: 20px; padding: 18px 20px; border: 1px solid #e7ebf3; border-radius: 13px; background: #fafbfe; }
.answer-area h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; color: #4a5a74; font-size: 13px; }
.answer-content { color: #43516a; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.answer-content .answer-paragraph + .answer-paragraph { margin-top: 9px; }
.explanation-content { color: #48566e; font-size: 14px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.explanation-content math { font-size: 1.02em; }
.quiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 15px 19px; border-top: 1px solid #eef0f5; background: #fcfdff; }
.quiz-actions-group { display: flex; gap: 8px; flex-wrap: wrap; }
.question-nav { margin-top: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.question-nav summary { padding: 13px 16px; color: #5c6980; font-size: 12px; font-weight: 700; cursor: pointer; }
.number-grid { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 15px 15px; }
.number-chip { min-width: 35px; height: 35px; border: 1px solid #e7eaf1; border-radius: 9px; background: #fff; color: #778399; font-size: 11px; cursor: pointer; }
.number-chip.current { border-color: var(--blue); background: var(--blue); color: #fff; }
.number-chip.done { border-color: #bfe5d1; background: #effaf4; color: #16865b; }
.number-chip.wrong { border-color: #f0c3bf; background: #fff3f1; color: #b8504b; }
.number-chip.skipped { border-color: #f0ddba; background: #fff8eb; color: #9b6615; }
.empty-state { padding: 44px 24px; border: 1px dashed #d8deea; border-radius: 15px; background: #fff; text-align: center; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 15px; background: var(--blue-soft); color: var(--blue); font-size: 20px; }
.empty-state p { max-width: 420px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.filter-row label { color: #69758b; font-size: 12px; }
.filter-row select { min-height: 39px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #33415a; font-size: 12px; }
.wrong-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.wrong-list { display: grid; gap: 9px; }
.wrong-title { margin-bottom: 5px; font-weight: 700; font-size: 13px; }
.wrong-subtitle { color: var(--muted); font-size: 11px; }
.wrong-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.progress-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 20px 0 26px; }
.progress-row { display: grid; grid-template-columns: minmax(155px, 1fr) minmax(90px,2fr) 74px; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.progress-row:last-child { border-bottom: 0; }
.progress-row-name { font-size: 12px; font-weight: 650; }
.progress-row-name small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.progress-row .progress-track { margin: 0; }
.progress-row-count { color: #7c899e; font-size: 10px; text-align: right; }
.progress-list { padding: 8px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.notice { padding: 12px 14px; border: 1px solid #eee0bd; border-radius: 10px; background: #fffaed; color: #85611e; font-size: 11px; line-height: 1.65; }
.page-back { margin-bottom: 17px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; padding: 11px 16px; border-radius: 10px; background: #1c2942; color: #fff; box-shadow: 0 12px 30px #18243d2c; font-size: 12px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 30px; background: rgba(18, 26, 42, .88); }
.lightbox[hidden] { display: none; }
.lightbox img { display: block; max-width: min(96vw, 1200px); max-height: 88vh; object-fit: contain; background: #fff; border-radius: 8px; }
.lightbox-close { position: absolute; top: 16px; right: 21px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #ffffff21; color: #fff; font-size: 29px; cursor: pointer; }
.footer-note { margin-top: 20px; color: #98a2b4; font-size: 10px; line-height: 1.6; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 190px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .main-content { padding-right: 25px; padding-left: 25px; }
  .hero-grid { grid-template-columns: minmax(0,1fr) 190px; gap: 15px; }
  .module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .topbar { height: 62px; padding: 0 15px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 11px; font-size: 20px; }
  .app-shell { display: block; min-height: calc(100vh - 62px); }
  .sidebar { display: none; position: fixed; top: 62px; left: 0; right: 0; z-index: 19; padding: 12px 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: 0 12px 25px #1b29421a; }
  .sidebar.open { display: block; }
  .sidebar-label, .sidebar-foot { display: none; }
  .main-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .nav-item { min-height: 42px; }
  .menu-toggle { display: grid !important; place-items: center; width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #60708a; font-size: 16px; }
  .main-content { padding: 22px 15px 44px; }
  .hero-grid { display: block; }
  .hero-art { display: none; }
  .home-hero { padding: 22px 19px; border-radius: 17px; }
  .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 13px 0 26px; }
  .stat-card { min-height: 82px; padding: 13px; }
  .stat-card strong { font-size: 21px; }
  .module-grid, .paper-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 126px; }
  .section-head { align-items: flex-start; }
  .quiz-header { display: block; }
  .quiz-header-right { justify-content: flex-start; margin-top: 10px; }
  .question-meta { padding: 11px 14px; }
  .question-body { padding: 19px 16px; }
  .stem-content { font-size: 15px; line-height: 1.85; }
  .option-button { min-height: 51px; padding: 12px; }
  .option-content, .answer-content, .explanation-content { font-size: 13px; }
  .quiz-actions { padding: 12px; }
  .quiz-actions .button { min-height: 39px; padding: 0 11px; font-size: 12px; }
  .progress-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .progress-row { grid-template-columns: minmax(125px,1fr) minmax(45px,1fr) 57px; gap: 8px; }
  .wrong-row { grid-template-columns: 1fr; }
  .wrong-actions { justify-content: flex-start; }
}
@media (max-width: 390px) {
  .offline-badge { font-size: 10px; }
  .hero-actions .button { flex: 1; }
  .quiz-actions-group { gap: 5px; }
  .quiz-actions .button { padding: 0 9px; }
  .progress-row { grid-template-columns: 1.2fr 1fr 50px; }
}
