/* ═══════════════════════════════════════════════════
   法考练习平台 · 全局样式
   ═══════════════════════════════════════════════════ */
:root {
  --blue:       #003087;
  --blue-mid:   #1565c0;
  --blue-light: #e8f0fe;
  --green:      #2e7d32;
  --orange:     #e65100;
  --gray:       #757575;
  --bg:         #f0f2f5;
  --white:      #ffffff;
  --border:     #d0d7de;
  --text:       #1a1a1a;
  --text-soft:  #4a4a4a;
  --sidebar-w:  176px;
  --header-h:   50px;
  --radius:     6px;
  --font:       'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius);
  transition: opacity .15s, background .15s;
}
button:disabled { opacity: .5; cursor: not-allowed; }

input, textarea, select {
  font-family: var(--font);
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  color: var(--text);
}
input:focus, textarea:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 2px rgba(21,101,192,.15);
}

/* ═══════════════════════════════════════════════════
   入口页（登录 / 首页仪表盘）· 清爽浅色专业风
   ═══════════════════════════════════════════════════ */
.auth-wrap, .home-wrap {
  --ink:       #1b2330;
  --ink-soft:  #5a6575;
  --ink-faint: #8b95a6;
  --pri:       #2155d4;
  --pri-deep:  #16389c;
  --pri-soft:  #eaf0fd;
  --line:      #e3e8f1;
}

/* ── 登录页 ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(1100px 520px at 85% -10%, #dce7fb 0%, transparent 60%),
    radial-gradient(900px 480px at -10% 105%, #e6edfb 0%, transparent 55%),
    #f3f5f9;
}
.auth-shell { width: 400px; max-width: 100%; }

.auth-brand { text-align: center; margin-bottom: 22px; }
.brand-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(150deg, #3568e4 0%, #16389c 100%);
  box-shadow: 0 8px 20px rgba(33,85,212,.28);
}
.auth-brand h2 {
  font-size: 22px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 1px;
}
.auth-brand p {
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 5px;
  letter-spacing: 3px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px 28px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 16px 40px -12px rgba(16,24,40,.12);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: #f0f3f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 8px 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}
.auth-tab.active {
  background: #fff;
  color: var(--pri);
  box-shadow: 0 1px 4px rgba(16,24,40,.10);
}

.field-group { margin-bottom: 16px; }
.field-group label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 600;
}
.field-group input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14.5px;
  border: 1px solid #d8dfeb;
  border-radius: 10px;
  background: #fafbfe;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field-group input:focus {
  background: #fff;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(33,85,212,.12);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  background: linear-gradient(180deg, #2e63e8 0%, #1f4fc7 100%);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: 2px;
  box-shadow: 0 6px 16px -4px rgba(33,85,212,.45);
  transition: transform .12s, filter .15s, box-shadow .15s;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 8px 20px -4px rgba(33,85,212,.5);
}
.btn-primary:active:not(:disabled) { transform: translateY(1px); }

.auth-error {
  background: #fdecea;
  color: #c62828;
  border: 1px solid #f5c6c0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.auth-error.show { display: block; }

.auth-features {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.auth-features li {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.auth-features li::before {
  content: '✓ ';
  color: var(--pri);
  font-weight: 700;
}

/* ── 首页仪表盘 ── */
.home-wrap {
  min-height: 100vh;
  background:
    radial-gradient(1100px 420px at 90% -16%, #dce7fb 0%, transparent 60%),
    #f3f5f9;
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hh-brand { display: flex; align-items: center; gap: 12px; }
.hh-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(150deg, #3568e4 0%, #16389c 100%);
}
.hh-brand h1 {
  font-size: 16px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.2;
}
.hh-sub {
  display: block;
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 2px;
  font-weight: 400;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.user-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pri-soft);
  color: var(--pri);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-bar button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 8px;
}
.user-bar button:hover {
  border-color: #c9d4e8;
  color: var(--ink);
  background: #f7f9fc;
}

.home-body {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 24px 64px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-head h2 {
  font-size: 16px;
  color: var(--ink);
  font-weight: 800;
}
.panel-head .head-hint {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* 年份 */
.year-section { display: flex; flex-wrap: wrap; gap: 10px; }
.year-btn {
  min-width: 86px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #fafbfe;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.year-btn .yr-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.year-btn .yr-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 100px;
  background: var(--pri-soft);
  color: var(--pri);
}
.year-btn:not(.empty):hover { border-color: #b9cdf2; background: #fff; }
.year-btn.active {
  border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(33,85,212,.12);
}
.year-btn.active .yr-name { color: var(--pri); }
.year-btn.active .yr-badge { background: var(--pri); color: #fff; }
.year-btn.empty { opacity: .55; }
.year-btn.empty .yr-badge { background: #eef0f4; color: #9aa3b2; }

/* 模式 */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mode-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fafbfe;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 18px 44px 18px 20px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.mode-card:hover { border-color: #b9cdf2; background: #fff; }
.mode-card.active {
  border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(33,85,212,.12);
}
.mode-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pri-soft);
  color: var(--pri);
}
.mode-icon svg { width: 22px; height: 22px; }
.mode-card h3 {
  font-size: 15.5px;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 5px;
}
.mode-card.active h3 { color: var(--pri); }
.mode-card p {
  font-size: 12.8px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.mode-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cfd8e8;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.mode-card.active .mode-check {
  border-color: var(--pri);
  background: var(--pri);
  box-shadow: inset 0 0 0 3px #fff;
}

/* 单题列表 */
.single-q-list {
  display: none;
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}
.single-q-list.show { display: block; }
.single-q-list h4 {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 10px;
}
.q-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: #fafbfe;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.q-option:hover { border-color: #b9cdf2; background: #fff; }
.q-option.active {
  border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(33,85,212,.10);
}
.q-option .q-label {
  font-weight: 700;
  color: var(--pri);
  min-width: 48px;
  font-size: 13.5px;
}
.q-option .q-info { font-size: 13px; color: var(--ink-soft); }

/* 开始按钮 */
.start-bar {
  display: flex;
  justify-content: center;
  margin: 26px 0 30px;
}
.start-btn {
  min-width: 260px;
  padding: 14px 56px;
  background: linear-gradient(180deg, #2e63e8 0%, #1f4fc7 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 4px;
  text-indent: 4px;
  border-radius: 100px;
  box-shadow: 0 10px 24px -6px rgba(33,85,212,.5);
  transition: transform .12s, filter .15s, box-shadow .15s;
}
.start-btn:hover:not(:disabled) { filter: brightness(1.06); }
.start-btn:active:not(:disabled) { transform: translateY(1px); }
.start-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}

/* 历史记录 */
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td {
  text-align: left;
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.history-table th {
  color: var(--ink-faint);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .5px;
  border-bottom: 1.5px solid var(--line);
}
.history-table tbody tr:last-child td { border-bottom: none; }
.history-table tbody tr:hover td { background: #fafbfe; }
.history-table a { color: var(--pri); font-weight: 600; }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.status-completed   { background: #e8f5e9; color: #2e7d32; }
.status-grading     { background: #fff3e0; color: #e65100; }
.status-submitted   { background: #e3f2fd; color: #1565c0; }
.status-in_progress { background: #f3e5f5; color: #6a1b9a; }

@media (max-width: 720px) {
  .home-header { padding: 0 16px; }
  .hh-sub { display: none; }
  #userEmail { display: none; }
  .home-body { padding: 20px 14px 48px; }
  .panel { padding: 18px 16px 20px; }
  .mode-cards { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px 26px; }
  .start-btn { width: 100%; min-width: 0; }
}

/* ── API 配置卡 ── */
.config-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.config-card h3 { font-size: 15px; color: var(--text-soft); margin-bottom: 14px; }
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.config-grid .field-group { margin-bottom: 0; }
.config-grid input { padding: 8px 10px; }
.btn-save {
  padding: 8px 18px;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.btn-save:hover { background: var(--blue-mid); }

/* ── 考试界面 ── */
.exam-layout {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  height: 100vh;
  overflow: hidden;
}

.exam-header {
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 2px solid var(--blue-mid);
  z-index: 100;
}
.exam-header .title-area h1 { font-size: 16px; letter-spacing: 1px; }
.exam-header .title-area .sub { font-size: 12px; opacity: .75; margin-top: 1px; }

.exam-timer {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  color: var(--white);
}
.exam-timer.warn { color: #ffcc02; }
.exam-timer.danger { color: #ff5252; animation: blink .8s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.btn-submit-exam {
  background: #d32f2f;
  color: var(--white);
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
}
.btn-submit-exam:hover { background: #b71c1c; }

.exam-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  overflow: hidden;
}

/* ── 左侧栏 ── */
.exam-sidebar {
  background: #f7f8fa;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px 10px;
  gap: 6px;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 6px;
  margin-top: 6px;
}

.q-nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  text-align: left;
  width: 100%;
  transition: border-color .12s, background .12s;
}
.q-nav-btn:hover { border-color: var(--blue-mid); background: var(--blue-light); }
.q-nav-btn.active {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 700;
}
.q-nav-btn.answered {
  border-left: 3px solid var(--green);
}
.q-nav-btn.flagged {
  border-left: 3px solid var(--orange);
}
.q-status-icon {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  min-width: 14px;
}
.q-nav-btn.answered .q-status-icon { color: var(--green); }
.q-nav-btn.flagged .q-status-icon  { color: var(--orange); }
.q-nav-btn.active .q-status-icon   { color: var(--blue); }

.optional-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  background: #fffbf0;
  margin-top: 4px;
}
.optional-group .opt-title {
  font-size: 11px;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 6px;
}
.opt-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 4px;
  cursor: pointer;
}
.opt-radio input { width: 14px; height: 14px; cursor: pointer; }

.btn-laws {
  margin-top: auto;
  padding: 10px;
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  text-align: center;
  letter-spacing: 0.5px;
}
.btn-laws:hover { background: var(--blue-mid); }

/* ── 主内容区 ── */
.exam-main {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--white);
}

.exam-content-split {
  display: grid;
  grid-template-rows: 42% 58%;
  overflow: hidden;
}

.question-pane {
  overflow-y: auto;
  padding: 22px 28px;
  border-bottom: 2px solid var(--border);
  background: #fafbfc;
}
.question-pane .q-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}
.q-header .q-number {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}
.q-header .q-subject-badge {
  font-size: 12px;
  background: var(--blue-light);
  color: var(--blue);
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 600;
}
.question-pane .case-text {
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 18px;
}
.question-pane .prompt-text {
  font-size: 14.5px;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 600;
}
.material-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.8;
}
.material-block .mat-title {
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.sub-questions-list {
  margin-top: 14px;
  padding-left: 0;
}
.sub-q-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14.5px;
  line-height: 1.7;
}
.sub-q-num {
  font-weight: 700;
  color: var(--blue-mid);
  min-width: 24px;
}
.requirements-block {
  background: #fff9e6;
  border-left: 3px solid #f9a825;
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 12px;
  font-size: 13.5px;
}
.requirements-block .req-title { font-weight: 700; color: #f57f17; margin-bottom: 6px; }

.answer-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 20px 12px;
}
.answer-pane .ans-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ans-toolbar .ans-label { font-size: 13px; font-weight: 700; color: var(--text-soft); }
.ans-toolbar .ans-meta { display: flex; align-items: center; gap: 14px; }
.word-count { font-size: 13px; color: var(--gray); }
.btn-flag {
  padding: 5px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  border-radius: var(--radius);
}
.btn-flag.active {
  background: #fff3e0;
  border-color: var(--orange);
  color: var(--orange);
  font-weight: 600;
}
.answer-textarea {
  flex: 1;
  resize: none;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.75;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
}
.answer-textarea:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 2px rgba(21,101,192,.12);
}
.autosave-hint {
  font-size: 12px;
  color: var(--gray);
  margin-top: 5px;
  height: 16px;
}

/* ── 法条浮层 ── */
.laws-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 500;
  display: none;
}
.laws-overlay.show { display: block; }

.laws-panel {
  position: fixed;
  top: 60px; right: 20px;
  width: 560px;
  height: calc(100vh - 80px);
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  z-index: 501;
  display: none;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  resize: both;
  min-width: 340px;
  min-height: 300px;
}
.laws-panel.show { display: flex; }

.laws-panel-header {
  background: var(--blue);
  color: var(--white);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}
.laws-panel-header h3 { flex: 1; font-size: 15px; }
.btn-close-laws {
  background: rgba(255,255,255,.15);
  color: var(--white);
  padding: 3px 10px;
  font-size: 18px;
  line-height: 1;
  border-radius: var(--radius);
}
.btn-close-laws:hover { background: rgba(255,255,255,.3); }

.laws-search {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.laws-search input {
  width: 100%;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius);
}

.laws-body {
  display: grid;
  grid-template-columns: 170px 1fr;
  flex: 1;
  overflow: hidden;
}

.laws-list {
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 8px 0;
}
.law-item {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  border-left: 3px solid transparent;
}
.law-item:hover { background: var(--blue-light); }
.law-item.active {
  background: var(--blue-light);
  border-left-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}

.laws-content {
  overflow-y: auto;
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  user-select: text;
}
.laws-content h4 { color: var(--blue); font-size: 14px; margin-bottom: 10px; }
.law-chapter { font-weight: 700; color: var(--blue-mid); margin: 14px 0 6px; }
.law-article { margin-bottom: 8px; }
.law-article .art-num { font-weight: 600; color: var(--text); }

/* ── 等待页 ── */
.wait-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  gap: 24px;
}
.wait-wrap h2 { font-size: 22px; color: var(--blue); }
.wait-wrap p  { color: var(--text-soft); font-size: 15px; }
.progress-bar-wrap {
  width: 360px;
  height: 10px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--blue-mid);
  border-radius: 100px;
  transition: width .5s ease;
  width: 0%;
}
.progress-detail { font-size: 13px; color: var(--gray); }

/* ── 结果页 ── */
.result-wrap {
  min-height: 100vh;
  background: var(--bg);
}

.result-header {
  background: var(--blue);
  color: var(--white);
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-header h1 { font-size: 17px; }
.result-header .btn-home {
  background: rgba(255,255,255,.15);
  color: var(--white);
  padding: 6px 16px;
  font-size: 13px;
  border-radius: var(--radius);
}
.result-header .btn-home:hover { background: rgba(255,255,255,.28); }

.result-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.summary-card {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.summary-card h2 { font-size: 18px; color: var(--blue); margin-bottom: 18px; }

.score-overview {
  display: flex;
  gap: 28px;
  margin-bottom: 20px;
}
.score-box {
  text-align: center;
  flex: 1;
}
.score-box .num {
  font-size: 38px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.1;
}
.score-box .num.sub { font-size: 20px; color: var(--gray); }
.score-box .label { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.time-cell {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.time-cell .t-subject { font-size: 12px; color: var(--blue); font-weight: 700; margin-bottom: 3px; }
.time-cell .t-time   { font-size: 15px; font-weight: 700; color: var(--text); }

.q-result-card {
  background: var(--white);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.q-result-card h3 {
  font-size: 16px;
  color: var(--blue);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.q-score-badge {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13.5px;
}
.score-table th, .score-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: center;
}
.score-table th { background: var(--blue-light); color: var(--blue); font-weight: 700; }
.score-table .q-col { text-align: left; }
.score-table .problem-col { text-align: left; font-size: 12.5px; color: var(--text-soft); }
.score-table tr.full-score td { color: var(--green); }
.score-table tr.partial td   { color: var(--orange); }

.eval-block {
  background: #f8f9fa;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.eval-block h4 { font-size: 13px; color: var(--text-soft); font-weight: 700; margin-bottom: 6px; }

.advice-list { list-style: none; }
.advice-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.advice-item .a-title {
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.advice-item .a-problem { font-size: 13.5px; color: var(--text-soft); margin-bottom: 4px; }
.advice-item .a-improve { font-size: 13.5px; color: var(--text); }

.no-template-note {
  background: #fff9e6;
  border: 1px solid #f9a825;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: #795548;
  margin-top: 10px;
}

/* ── 找回密码 / 个人中心 / 登录体验 ────────────────────── */
.pwd-wrap { position: relative; display: flex; align-items: center; }
.pwd-wrap input { flex: 1; padding-right: 64px; }
.pwd-eye {
  position: absolute; right: 8px;
  background: #eef2fb; color: #2155d4; font-size: 12px; font-weight: 600;
  border: 1px solid #d8dfeb; border-radius: 7px; padding: 5px 9px; white-space: nowrap;
}
.pwd-eye:hover { background: #e2e9f8; }
.pwd-eye:disabled { color: #999; background: #f1f1f4; cursor: default; }

.auth-links { text-align: right; margin-top: 10px; }
.auth-links a { color: #2155d4; font-size: 13px; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.modal-mask {
  position: fixed; inset: 0; z-index: 9000; display: none;
  background: rgba(20,32,54,.5); align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal-box {
  width: 420px; max-width: 92vw; background: #fff; border-radius: 14px;
  box-shadow: 0 18px 50px -10px rgba(0,0,0,.4); padding: 24px 26px 22px;
}
.modal-title { font-size: 18px; font-weight: 700; color: #1f2d4a; margin-bottom: 16px; }
.modal-subt { font-size: 14px; font-weight: 700; color: #1f2d4a; margin: 8px 0 12px; padding-top: 12px; border-top: 1px solid #eef0f5; }
.modal-err {
  background: #fdecea; color: #c62828; border: 1px solid #f5c6c0;
  border-radius: 10px; padding: 9px 13px; font-size: 13px; margin-bottom: 14px; display: none;
}
.modal-err.show { display: block; }
.prof-info { font-size: 14px; color: #444; margin-bottom: 4px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn-primary, .modal-actions .btn-ghost { margin-top: 0; }
.btn-ghost {
  width: 100%; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600;
  background: #f1f3f8; color: #475069; border: 1px solid #dde2ec;
}
.btn-ghost:hover { background: #e8ebf3; }

/* ── 页脚 ── */
.site-footer{text-align:center;padding:22px 12px 30px;color:#9aa3b2;font-size:13px}
.site-footer a{color:#6b7688;text-decoration:none;margin:0 6px}
.site-footer a:hover{color:#2155d4;text-decoration:underline}
.site-footer span{color:#c4ccd8}

/* ── 手机端适配（首页/成绩页/报告下载；机考页保持电脑端） ── */
@media (max-width: 680px){
  .auth-shell{width:100%;max-width:100%;padding:0 14px}
  .auth-card{padding:18px 16px}
  .home-wrap,.result-wrap{padding:0}
  .home-header,.result-header{flex-direction:column;align-items:flex-start;gap:8px;padding:12px 14px}
  .home-header h1,.result-header h1{font-size:18px}
  .user-bar{flex-wrap:wrap;gap:6px}
  .user-bar button{padding:6px 10px;font-size:13px}
  .home-body,.result-body{padding:12px 12px 30px}
  .panel{padding:14px 12px}
  .panel-head h2{font-size:16px}
  .year-section{grid-template-columns:repeat(2,1fr)!important;gap:8px!important}
  .mode-grid,.mode-cards{grid-template-columns:1fr!important}
  .mode-card{width:100%}
  .start-btn,.btn-primary,.btn-home{width:100%}
  .result-header{position:static}
  .stat-grid,.summary-stats{grid-template-columns:repeat(2,1fr)!important}
  /* 宽表格可横向滚动，避免溢出 */
  .history-section table,.score-table,table{display:block;overflow-x:auto;white-space:nowrap}
  .modal-box{width:94vw;padding:18px 16px}
}
@media (max-width: 420px){
  .year-section{grid-template-columns:1fr!important}
  .stat-grid,.summary-stats{grid-template-columns:1fr!important}
}
