:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --surface: #fff;
  --ink: #203c36;
  --muted: #5c6f67;
  --green: #155d48;
  --green-dark: #104a3a;
  --soft: #eef3ed;
  --line: #d7dfd5;
  --error: #a33b32;
  --amber: #8a601b;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: var(--green); text-underline-offset: 4px; }
button { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
button:disabled { cursor: not-allowed; opacity: .58; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #b97628; outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.3; letter-spacing: -.03em; }
h2 { font-size: 23px; line-height: 1.45; letter-spacing: -.025em; }
h3 { font-size: 19px; line-height: 1.5; }
p { margin-bottom: 16px; }
small { font-size: 14px; }
[hidden] { display: none !important; }
.sr-only, .visually-hidden { 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; z-index: 20; top: -80px; left: 16px; background: #fff; color: var(--green); padding: 12px 20px; border: 2px solid var(--green); border-radius: 10px; }
.skip-link:focus { top: 16px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; min-height: 600px; padding: 36px 20px 24px; display: flex; flex-direction: column; background: var(--green-dark); color: #fff; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; font-size: 24px; font-weight: 750; text-decoration: none; letter-spacing: .04em; }
.brand .icon-mark { width: 38px; height: 42px; border: 1px solid #aac4b4; border-radius: 11px 11px 11px 3px; display: grid; place-items: center; font-size: 19px; color: #e0e8cd; }
.sidebar-copy { margin: 11px 0 38px; font-size: 13px; color: #bed2c8; letter-spacing: .1em; }
.nav-list { display: grid; gap: 8px; }
.nav-list a, .nav-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border: 0; background: transparent; border-radius: 11px; color: #c9ddd2; text-decoration: none; text-align: left; font-size: 16px; min-height: 52px; }
.nav-list a:hover, .nav-list button:hover { background: #ffffff0e; color: white; }
.nav-list a[aria-current="page"], .nav-list .active, .nav-list a.active { background: #f4f2e7; color: var(--green-dark); font-weight: 700; box-shadow: 0 3px 10px #00180d12; }
.nav-list .nav-icon { width: 24px; font-size: 21px; text-align: center; }
.profile-mini { margin-top: auto; padding: 18px 6px 0; border-top: 1px solid #ffffff24; font-size: 14px; color: #d0dfd7; }
.profile-mini a { display: flex; align-items: center; gap: 10px; min-height: 48px; color: inherit; text-decoration: none; }
.profile-mini .avatar, .avatar { display: inline-grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #e8eee2; color: var(--green); font-weight: 700; }
.main-shell { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 79px; padding: 14px 40px; border-bottom: 1px solid var(--line); background: #f7f5efef; }
.topbar-subtitle { font-size: 14px; color: var(--muted); }
.topbar .brand { display: none; }
.local-status { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--muted); background: #eeefe5; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
#app { max-width: 1216px; margin: auto; padding: 34px 40px 64px; outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.page-head h1, .page-title { margin-bottom: 8px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .13em; }
.page-description { margin: 0; color: var(--muted); font-size: 15px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 30px 0 16px; }
.section-head h2 { margin: 0; }
.button, .action-link, button:not(.chip):not(.answer-option) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 19px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--green); font-weight: 650; font-size: 15px; line-height: 1.6; text-decoration: none; transition: background .15s, border-color .15s; }
.button:hover, .action-link:hover, button:not(.chip):not(.answer-option):hover { background: var(--soft); border-color: #9db9a7; }
.button-primary, button.button-primary, .button.primary, button.primary { background: var(--green) !important; color: #fff !important; border-color: var(--green) !important; }
.button-primary:hover, button.primary:hover { background: var(--green-dark) !important; }
.button-secondary, .button.secondary { background: transparent; color: var(--green); border-color: #aabeb0; }
.button-ghost, button.button-ghost, .button.ghost { background: transparent; border-color: transparent; padding-inline: 10px; }
.button-danger, button.button-danger { color: var(--error); }
.button-small, button.button-small { min-height: 44px; padding: 7px 13px; font-size: 14px; }
.inline-actions, .question-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-card { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px 34px; border-radius: var(--radius); color: #fff; background: var(--green); margin-bottom: 24px; }
.hero-card::after { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid #ffffff12; border-radius: 50%; right: -90px; top: -70px; pointer-events: none; }
.hero-card h2 { margin-bottom: 8px; color: #fff; font-size: 27px; }
.hero-card p { margin: 0; color: #d6e5dc; font-size: 15px; }
.hero-card .eyebrow { color: #bed5c6; }
.hero-card .button, .hero-card button { position: relative; z-index: 1; flex: none; background: #f6f1db; border-color: #f6f1db; color: var(--green-dark); }
.hero-number { font-size: 42px; font-weight: 720; line-height: 1; margin-right: 6px; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card, .question-card, .stat-card, .review-card, .profile-card { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.question-card { display: flex; flex-direction: column; }
.question-card .question-actions { margin-top: auto; padding-top: 20px; border-top: 1px solid #edf0e8; }
.question-card .question-stem { margin-bottom: 24px; font-size: 19px; line-height: 1.85; }
.question-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.subject-mark, .badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: #edf2e8; color: #3d5d42; font-size: 12px; font-weight: 600; }
.subject-mark.science, .badge.science { background: #e9eff3; color: #416071; }
.badge.warning { background: #fff2da; color: var(--amber); }
.badge.error { color: var(--error); background: #faefec; }
.question-stem { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.question-image, .question-card img, .candidate-card img { margin: 16px 0; border: 1px solid #e5e9e0; border-radius: 9px; max-height: 400px; object-fit: contain; background: #fff; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0; }
.chip { min-height: 44px; padding: 8px 18px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: 15px; }
.chip:hover { background: #e9eee5; }
.chip[aria-pressed="true"], .chip.active, .chip.selected { background: #e4ecdf; color: var(--green-dark); border-color: #c6d4c1; font-weight: 700; }
.filter-bar .filter-caption { margin-left: auto; font-size: 13px; color: var(--muted); }
.muted, .source-note, .workspace-note { color: var(--muted); font-size: 14px; }
.workspace-note { margin-top: 28px; }
.source-note { margin: 12px 0 0; line-height: 1.65; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 54px 28px; border: 1px dashed #c4d2bf; border-radius: var(--radius); background: #ffffff85; }
.empty-state h2 { font-size: 24px; margin-bottom: 10px; }
.empty-state p { max-width: 440px; margin: 0 auto 22px; font-size: 15px; color: var(--muted); }
.empty-state .inline-actions { justify-content: center; }
.empty-state .empty-icon { display: grid; place-items: center; margin: 0 auto 22px; width: 64px; height: 64px; border-radius: 20px; background: #e9eee0; font-size: 28px; color: var(--green); }
.notice, .feedback { padding: 16px 20px; border-radius: 11px; background: #edf2e6; border: 1px solid #cfddc5; margin-bottom: 22px; font-size: 15px; overflow-wrap: anywhere; }
.notice.error, .feedback-error { background: #fcf1ed; border-color: #e5c5ba; color: #8b352b; }
.feedback-success { color: var(--green-dark); background: #edf4e9; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.stat-card { padding: 22px 24px; }
.stat-card .stat-label { font-size: 14px; color: var(--muted); }
.stat-card .stat-value { display: block; margin: 8px 0 4px; font-size: 34px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 24px; }
.review-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.review-toolbar p { margin: 0; color: var(--muted); font-size: 14px; }
.review-card { max-width: 850px; margin: 0 auto; padding: 32px; }
.review-card .question-stem { font-size: 24px; line-height: 1.9; margin: 20px 0 30px; }
.answer-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.answer-option { min-height: 66px; border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; text-align: left; color: var(--ink); background: #fff; font-size: 19px; line-height: 1.6; overflow-wrap: anywhere; }
.answer-option:hover { border-color: #8bab96; background: #f5f8f0; }
.answer-option[aria-pressed="true"], .answer-option.selected, .answer-option.active { border: 2px solid var(--green); padding: 14px 17px; background: #edf4e7; box-shadow: 0 0 0 2px #155d480a; }
.answer-option.correct { border-color: var(--green); }
.answer-option.incorrect { border-color: var(--error); }
.answer-input { width: 100%; min-height: 58px; border: 1px solid #a2b8a9; border-radius: 11px; padding: 12px 16px; font-size: 23px; color: var(--ink); background: #fbfcf7; }
.answer-form { margin: 24px 0; }
.answer-form .button { margin-top: 14px; }
.knowledge-panel, .solution-panel { margin-top: 22px; padding: 22px; border-radius: 12px; background: #f0f4ea; border: 1px solid #dbe4d3; }
.knowledge-panel h3, .solution-panel h3 { margin-bottom: 10px; }
.knowledge-panel p:last-child, .solution-panel p:last-child { margin-bottom: 0; }
.solution-panel { background: #faf8ef; border-color: #e8e2cc; }
.review-card > .inline-actions { margin: 20px 0 0; }
.steps, .step-list { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 24px 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.steps li, .step-list li { display: flex; align-items: center; gap: 9px; }
.steps li.active, .step-list li.active, .steps [aria-current="step"] { color: var(--green); font-weight: 700; }
.step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.steps li.active .step-number { background: var(--green); border-color: var(--green); color: white; }
.upload-zone { padding: 38px 24px; border: 1.5px dashed #b8cbb4; border-radius: var(--radius); background: #fdfef9; text-align: center; }
.upload-zone h2 { margin-bottom: 8px; }
.upload-zone p { color: var(--muted); font-size: 15px; }
.upload-zone .inline-actions { justify-content: center; }
.upload-zone .upload-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border: 1px solid #cad7bf; border-radius: 18px; background: #edf2e5; font-size: 24px; }
.file-label { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 19px; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 15px; font-weight: 650; color: var(--green); }
.file-label:focus-within { outline: 3px solid #b97628; outline-offset: 3px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.photo-card { min-width: 0; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.photo-card img { width: 100%; height: 160px; object-fit: contain; background: #f7f6f0; border-radius: 6px; }
.photo-card figcaption { display: flex; justify-content: space-between; gap: 5px; align-items: center; margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; }
.photo-card figcaption > span { min-width: 0; flex: 1; }
.photo-card button { flex: none; min-width: 44px; min-height: 44px !important; padding: 5px 9px !important; font-size: 12px !important; }
.candidate-list { display: grid; gap: 14px; margin: 24px 0; }
.candidate-card { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.candidate-card.selected, .candidate-card:has(input:checked) { border-color: #6b9579; background: #f8fbf4; }
.checkbox-label { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; }
.checkbox-label input { flex: none; width: 22px; height: 22px; margin: 5px 0; accent-color: var(--green); }
.checkbox-label .question-stem { margin-bottom: 8px; font-size: 18px; }
.save-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid #cbd9c3; border-radius: 13px; background: #edf3e5; margin-top: 24px; }
.save-bar p { margin: 0; font-size: 15px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, label.field-label { color: var(--ink); font-size: 15px; font-weight: 650; }
.field input, .field select, .field textarea, input[type="text"], input[type="number"], select { width: 100%; min-height: 50px; padding: 10px 14px; background: #fbfcf7; border: 1px solid #bac9b5; border-radius: 10px; color: var(--ink); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.form-grid .full-width { grid-column: 1 / -1; }
.profile-list { display: grid; gap: 12px; margin: 18px 0; }
.profile-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; }
.profile-card p { margin-bottom: 0; font-size: 14px; color: var(--muted); }
.profile-card h3 { margin: 0 0 3px; }
.profile-card.active { border-color: #6b9579; background: #f8fbf4; }
.profile-name { display: flex; align-items: center; gap: 12px; }
.compact-list { margin: 0; padding: 0; list-style: none; }
.compact-list li { padding: 16px 0; border-bottom: 1px solid #e7ebe1; }
.compact-list li:last-child { border-bottom: 0; }
.progress-summary { margin: 24px 0; }
.chart-bars { display: grid; gap: 22px; margin-top: 24px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(100px, 2fr) auto; align-items: center; gap: 16px; font-size: 14px; }
.bar-track { height: 10px; border-radius: 8px; background: #e9eee3; overflow: hidden; }
.bar-fill { min-width: 0; height: 100%; border-radius: inherit; background: #65916a; }
.bar-fill.warning { background: #c19855; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #e2e8db; vertical-align: top; }
th { background: #f0f3e9; color: #546a5b; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
details { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
summary { min-height: 44px; cursor: pointer; color: var(--green); font-size: 15px; font-weight: 650; }
dialog { width: min(680px, calc(100% - 32px)); max-height: 85vh; padding: 28px; color: var(--ink); border: 1px solid var(--line); border-radius: 18px; background: #fffef8; box-shadow: 0 24px 100px #132c2540; }
dialog::backdrop { background: #152e2780; }
.mobile-nav { display: none; }
@media (min-width: 1440px) { #app { padding-top: 42px; } }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 192px minmax(0, 1fr); }
  .sidebar { padding-inline: 16px; }
  .topbar { padding-inline: 26px; }
  #app { padding: 28px 26px 56px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .hero-card { padding: 28px; }
  .split-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 73px; padding: 14px 22px; }
  .topbar .brand { display: flex; font-size: 22px; }
  .topbar .brand .icon-mark { width: 32px; height: 36px; font-size: 16px; border-color: #b8c9b3; }
  .topbar-subtitle { display: none; }
  .topbar-actions { gap: 12px; }
  .local-status { font-size: 11px; }
  #app { padding: 26px 22px calc(110px + env(safe-area-inset-bottom, 0px)); }
  .mobile-nav { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; background: #fffffff5; border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 20px #1e3c3210; }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 54px; padding: 4px 2px; color: var(--muted); font-size: 12px; text-decoration: none; border-radius: 9px; }
  .mobile-nav .nav-icon { font-size: 21px; line-height: 1.3; }
  .mobile-nav a[aria-current="page"], .mobile-nav a.active { color: var(--green); background: #edf2e7; font-weight: 700; }
  .page-head { gap: 16px; margin-bottom: 24px; }
  h1 { font-size: 29px; }
  .page-description { font-size: 14px; }
  .review-card { padding: 26px; }
}
@media (max-width: 520px) {
  :root { font-size: 17px; }
  .topbar { padding-inline: 18px; }
  #app { padding: 25px 18px calc(110px + env(safe-area-inset-bottom, 0px)); }
  .page-head { flex-direction: column; gap: 15px; }
  .page-head .inline-actions { width: 100%; }
  h1 { font-size: 27px; }
  .hero-card { display: block; padding: 24px; }
  .hero-card h2 { font-size: 25px; }
  .hero-card .button, .hero-card button { margin-top: 22px; }
  .card, .question-card, .review-card, .profile-card { padding: 20px; border-radius: 15px; }
  .question-card .question-stem { font-size: 18px; }
  .question-meta { font-size: 12px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 16px 10px; border-radius: 12px; }
  .stat-card .stat-value { font-size: 28px; }
  .stat-card .stat-label, .stat-card p { font-size: 12px; }
  .filter-bar { margin: 18px 0; }
  .chip { padding-inline: 15px; }
  .filter-bar .filter-caption { width: 100%; margin-left: 0; }
  .review-card .question-stem { font-size: 21px; }
  .answer-choices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .answer-option { min-height: 60px; }
  .review-card .inline-actions { gap: 8px; }
  .knowledge-panel, .solution-panel { padding: 18px; }
  .empty-state { padding: 38px 20px; }
  .upload-zone { padding: 28px 18px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-card img { height: 140px; }
  .photo-card figcaption { flex-wrap: wrap; }
  .save-bar { align-items: stretch; flex-direction: column; padding: 18px; }
  .save-bar .button, .save-bar button { width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-card { align-items: flex-start; flex-wrap: wrap; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  th, td { padding: 12px; font-size: 14px; }
  .steps, .step-list { gap: 8px; font-size: 12px; }
  .step-number { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .button, button { display: none !important; }
  .app-shell { display: block; }
  #app { padding: 0; }
  .card, .question-card, .review-card { break-inside: avoid; border-color: #aaa; box-shadow: none; }
}
/* View contract refinements: keep native controls accessible and source order intact. */
.brand > span:last-child { display: block; }
.brand small { display: block; margin-top: 3px; color: #c1d6c8; font-size: 10px; letter-spacing: .06em; font-weight: 400; }
.brand-mark { display: grid; place-items: center; flex: none; width: 40px; height: 46px; background: #cbd9b7; border-radius: 12px 12px 12px 3px; color: var(--green-dark); font-size: 22px; font-weight: 600; }
.mobile-brand { display: none; color: var(--green); text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: .04em; }
.topbar p { margin: 0; }
.nav-list a > span { width: 24px; text-align: center; font-size: 22px; line-height: 1; }
.mobile-nav a > span { font-size: 21px; line-height: 1.3; }
.profile-mini > .badge { background: #ffffff12; color: #dae7dd; font-size: 11px; }
.profile-mini p { margin-top: 10px; margin-bottom: 0; color: #bacebf; font-size: 12px; }
.split-grid > .hero-card:not(.notebook-hero) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; margin-bottom: 0; }
.split-grid > .hero-card:not(.notebook-hero) .eyebrow { margin-bottom: 22px; }
.split-grid > .hero-card:not(.notebook-hero) h2 { font-size: 32px; line-height: 1.5; margin-bottom: 24px; }
.split-grid > .hero-card:not(.notebook-hero) .compact-list { margin-bottom: 24px; color: #e0ebe2; font-size: 15px; }
.split-grid > .hero-card:not(.notebook-hero) .compact-list li { padding: 14px 0; border-color: #ffffff20; }
.split-grid > .hero-card:not(.notebook-hero) .source-note { color: #c8dbcd; font-size: 12px; }
.question-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.question-actions { justify-content: space-between; gap: 12px; }
.card > .section-head:first-child { margin-top: 0; }
.empty-state > .icon-mark, .upload-zone > .icon-mark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 20px; background: #e9efdf; border: 1px solid #d6e0c9; border-radius: 18px; color: var(--green); font-size: 29px; }
.empty-state > .button + p { margin-top: 14px; margin-bottom: 0; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card > p:first-child { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.stat-card > strong { display: block; color: var(--ink); font-size: 34px; line-height: 1.35; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-card > strong small { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.stat-card > p:last-child { margin-top: 9px; }
#app > section.card + section.card, #app > .stats-grid + section.card + section.card { margin-top: 24px; }
.profile-card { display: block; }
.profile-card > h2 { margin-bottom: 7px; font-size: 28px; }
.profile-card > .source-note { max-width: 680px; margin: 16px 0 24px; }
.profile-list-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid #e6ebe0; }
.profile-list-item:first-child { padding-top: 0; }
.profile-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.profile-list-item p { margin: 4px 0 0; }
.field { font-size: 15px; font-weight: 600; }
.field input, .field select, .field textarea { font-weight: 400; }
.profile-form > .muted { font-size: 13px; }
.profile-form > .button { margin-top: 4px; }
.workspace-note h2 { font-size: 18px; }
.workspace-note p { font-size: 13px; }
.file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
label.button:focus-within { outline: 3px solid #b97628; outline-offset: 3px; }
fieldset.answer-choices { border: 0; padding: 0; min-width: 0; }
.answer-choices legend { margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.answer-option { display: flex; align-items: baseline; gap: 12px; }
.answer-option > span { flex: none; display: grid; place-items: center; min-width: 27px; height: 27px; border-radius: 6px; background: #eef1e8; font-size: 14px; color: var(--green); }
.answer-option.selected > span { color: #fff; background: var(--green); }
.reference-answer { font-size: 25px; color: var(--green); font-weight: 700; white-space: pre-wrap; }
.explanation-text { white-space: pre-wrap; }
/* Reference material stays distinct from checked answers without implying an error. */
.reference-status { max-width: 100%; font-size: 14px; overflow-wrap: anywhere; }
.reference-status, .reference-warning { color: var(--amber); background: #fff2da; }
.reference-warning { padding: 14px 16px; border: 1px solid #e8d8b7; border-radius: 10px; font-size: 15px; overflow-wrap: anywhere; }
.reference-answer, .explanation-text { max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
.reference-pending .reference-answer { color: var(--ink); }
.provenance-details { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.provenance-details > summary { min-height: 44px; font-size: 15px; touch-action: manipulation; }
.provenance-details > p { margin: 8px 0 0; }
.provenance-content p { margin: 8px 0 0; }
.review-image, .candidate-card .candidate-image { width: 100%; height: auto; max-height: none; object-fit: contain; }
.review-footer { max-width: 850px; margin: 24px auto 0; }
fieldset.candidate-list { min-width: 0; border: 0; padding: 0; }
.candidate-list legend { margin-bottom: 16px; }
.candidate-list .checkbox-label { align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.candidate-card .question-stem { margin-bottom: 0; font-size: 17px; }
.candidate-card .muted { margin: 12px 0 0; font-size: 13px; }
.candidate-image { width: 100%; max-height: 450px; }
.loading-dot { display: inline-block; width: 22px; height: 22px; margin-bottom: 15px; border: 3px solid #d9e4ce; border-right-color: var(--green); border-radius: 50%; animation: loading-turn 1s linear infinite; }
@keyframes loading-turn { to { transform: rotate(360deg); } }
@media (max-width: 1100px) {
  .question-list { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .mobile-brand { display: inline-block; }
}
@media (max-width: 520px) {
  .split-grid { gap: 20px; }
  .split-grid > .hero-card:not(.notebook-hero) { padding: 26px; }
  .split-grid > .hero-card:not(.notebook-hero) h2 { font-size: 28px; }
  .question-actions .button { margin-left: auto; }
  .stat-card { padding: 17px; }
  .stat-card > strong { font-size: 31px; }
  .profile-list-item { gap: 10px; }
  .profile-list-item .button { min-width: 65px; }
  .candidate-list .checkbox-label .badge { margin-left: 31px; }
}
@media (prefers-reduced-motion: reduce) { .loading-dot { animation: none; } }
