:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #d9e0ea;
  --line-strong: #c7d0dd;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --warn: #b54708;
  --ok: #067647;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button { touch-action: manipulation; }

.page-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.gaokao-locked .gaokao-content { display: none; }
.access-shell {
  width: 100%;
  min-height: 100vh;
  padding: 32px 20px;
  display: grid;
  place-items: center;
}
.access-card {
  width: min(760px, 100%);
  padding: 28px;
  box-shadow: none;
}

.surface-card,
.hero-card,
.context-panel,
.basis-card,
.checklist-card,
.paste-panel,
.data-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  margin-bottom: 12px;
}

.hero-copy { min-width: 0; }

.return-workstation-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #b7c3d2;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f3a5f;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.return-workstation-btn:hover {
  border-color: #7f96b2;
  background: #eef4fb;
}

.hero-copy h1,
.section-head h2,
.access-card h1 {
  margin: 0;
  color: #101828;
}

.hero-copy h1 { font-size: 30px; line-height: 1.18; }
.section-head h2 { font-size: 22px; line-height: 1.25; }
.access-card h1 { font-size: 30px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.lead,
.hint,
.subtle,
.context-preview,
.context-panel p,
.basis-card span,
.checklist-card span,
.data-grid span {
  color: var(--muted);
  line-height: 1.65;
}

.lead { max-width: 980px; margin: 8px 0 0; font-size: 14px; }
.hint { margin: 10px 0 0; }
.subtle { margin: 0; }

.profile-card,
.tab-panel > .surface-card,
.split-card.surface-card {
  padding: 20px;
}

.profile-card { margin-top: 0; }

.section-head,
.compact-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}

.inline-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.profile-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-grid label,
.form-grid label,
.toolbar-row label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.profile-grid .wide,
.form-grid .wide { grid-column: span 2; }

input,
select,
textarea,
.username-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
  box-shadow: none;
}

textarea {
  min-height: 124px;
  line-height: 1.6;
  resize: vertical;
}

input::placeholder,
textarea::placeholder { color: var(--subtle); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.primary,
.secondary,
.ghost-btn,
.export-row button,
.row-action,
.tab-btn,
.starter-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.secondary {
  color: #344054;
  background: #fff;
  border-color: var(--line-strong);
}

.secondary:hover,
.export-row button:hover,
.row-action:hover,
.starter-row button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #f0fdfa;
}

button:disabled,
button[disabled] {
  cursor: not-allowed;
  color: #98a2b3 !important;
  background: #f2f4f7 !important;
  border-color: var(--line) !important;
}

.ghost-btn {
  color: var(--brand-dark);
  background: #f0fdfa;
  border-color: #99f6e4;
}

.action-row,
.toolbar-row,
.starter-row,
.export-row,
.volunteer-actions,
.candidate-counts,
.scope-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-row { margin: 14px 0; }
.compact-actions { margin: 0; }

.tab-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 6px;
  overflow: auto;
  margin: 16px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.tab-btn {
  color: #475467;
  background: transparent;
  border-color: transparent;
}

.tab-btn.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.qa-layout,
.split-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.split-card { grid-template-columns: 1fr 1fr; }

.context-panel {
  padding: 16px;
  background: var(--soft);
  box-shadow: none;
}

.context-panel strong,
.basis-card b,
.checklist-card b,
.paste-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #101828;
  font-size: 15px;
}

.context-preview {
  min-height: 120px;
  white-space: pre-wrap;
}

.starter-row { margin: 12px 0; }
.starter-row button {
  min-height: 34px;
  color: var(--brand-dark);
  background: #f0fdfa;
  border-color: #cce7e3;
  font-size: 13px;
}

.profile-details {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #c7d0dd;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}
.profile-details summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(148px, 0.24fr) minmax(0, 1fr) 36px;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  cursor: pointer;
  color: #344054;
  font-weight: 900;
  list-style: none;
}
.profile-details summary::-webkit-details-marker { display: none; }
.profile-details summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #0f766e, #84cc16);
}
.profile-details summary::after {
  content: "";
  justify-self: center;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--brand-dark);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}
.profile-details[open] summary::after { transform: rotate(225deg); }
.profile-details summary:hover,
.profile-details summary:focus-visible { background: rgba(240, 253, 250, 0.72); outline: none; }
.profile-details summary span {
  display: block;
  padding-left: 8px;
  color: #101828;
  font-size: 17px;
  line-height: 1.25;
}
.profile-details summary span::after {
  content: "点开查看";
  display: block;
  width: max-content;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}
.profile-details[open] summary span::after { content: "点击收起"; }
.profile-details summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.55;
  text-align: left;
}

.data-scope-status {
  margin: 0 12px 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  line-height: 1.6;
}

.data-scope-status.ready { border-color: #abefc6; background: #ecfdf3; color: var(--ok); }
.data-scope-status.partial { border-color: #fedf89; background: #fffaeb; color: var(--warn); }
.data-scope-status.pending { border-color: #fecdca; background: #fef3f2; color: var(--danger); }
.data-scope-status a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.data-scope-status strong,
.data-scope-status small { display: block; }
.data-scope-status small { margin-top: 6px; font-size: 12px; font-weight: 700; opacity: 0.86; }

.scope-dashboard { display: grid; gap: 12px; }
.scope-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.scope-title span {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.scope-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.scope-metrics.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.scope-metric,
.scope-gap-card,
.scope-boundary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.scope-metric b,
.scope-gap-card b { font-size: 13px; }
.scope-metric em {
  color: #101828;
  font-style: normal;
  font-size: 18px;
  font-weight: 950;
}
.scope-metric.ok em { color: var(--ok); }
.scope-metric.missing em { color: var(--danger); }
.scope-gap-list { display: grid; gap: 8px; }
.scope-gap-card { background: #fffaeb; border-color: #fedf89; }
.scope-gap-card.ok { background: #ecfdf3; border-color: #abefc6; }
.scope-gap-card span { font-weight: 900; }
.scope-boundary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.scope-boundary-card { background: #eff6ff; border-color: #bfdbfe; }
.scope-boundary-card.ok { background: #ecfdf3; border-color: #abefc6; }
.scope-boundary-card.hold { background: #fffaeb; border-color: #fedf89; }
.scope-boundary-card span { font-size: 13px; font-weight: 900; }
.scope-boundary-card small { font-size: 12px; font-weight: 750; opacity: 0.82; }
.scope-gap-evidence { padding-top: 5px; border-top: 1px dashed rgba(181, 71, 8, 0.24); }
.scope-diagnostics summary { cursor: pointer; font-size: 12px; font-weight: 900; opacity: 0.78; }
.scope-rule { font-size: 12px; font-weight: 850; opacity: 0.86; }
.scope-links a {
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 900;
}

.task-checklist {
  display: grid;
  gap: 10px;
  margin: 0 12px 12px;
  padding: 14px;
  border: 1px solid #cce7e3;
  border-radius: 8px;
  background: #f0fdfa;
  color: var(--brand-dark);
}

.task-checklist-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.task-checklist-head strong { font-size: 15px; }
.task-checklist-head span { font-size: 12px; font-weight: 900; }
.task-checklist ol { display: grid; gap: 6px; margin: 0; padding-left: 22px; }
.task-checklist li { line-height: 1.5; font-weight: 800; }
.task-checklist li.done { color: var(--ok); text-decoration: line-through; text-decoration-thickness: 1px; }
.task-checklist li.todo { color: var(--brand-dark); }

.candidate-status {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #abefc6;
  background: #ecfdf3;
  color: var(--ok);
  font-weight: 850;
  line-height: 1.55;
}

.candidate-diagnostics {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.candidate-diagnostics ul,
.candidate-diagnostics p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.6;
}

.candidate-diagnostics ul {
  padding-left: 30px;
  border: 1px solid #fedf89;
  background: #fffaeb;
  color: var(--warn);
}

.candidate-diagnostics p {
  border: 1px solid #abefc6;
  background: #ecfdf3;
  color: var(--ok);
}

.candidate-counts span,
.risk-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.candidate-counts span { background: #eef4ff; color: #3538cd; }
.risk-chip { background: #fffaeb; color: var(--warn); }
.risk-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.paste-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border-style: dashed;
  background: var(--soft);
  box-shadow: none;
}

.data-search-row {
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.data-search-row input { min-width: 180px; }
.single-row { align-items: end; }
.single-row input { flex: 1; min-width: 240px; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-table,
.volunteer-table { margin-top: 12px; }
.volunteer-table table { min-width: 1040px; }

.table-wrap table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475467;
  font-weight: 900;
}

.table-wrap a {
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.volunteer-table select {
  min-height: 34px;
  padding: 5px 8px;
  font-weight: 850;
}

.row-action {
  min-height: 32px;
  padding: 0 9px;
  color: var(--brand-dark);
  background: #f0fdfa;
  border-color: #99f6e4;
  font-size: 12px;
}

.row-action.danger {
  color: var(--danger);
  background: #fef3f2;
  border-color: #fecdca;
}

.empty-state {
  padding: 16px;
  color: var(--muted);
  font-weight: 750;
}

.report-box {
  margin-top: 16px;
  min-height: 130px;
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  line-height: 1.72;
}

.report-box strong,
.report-box h3,
.report-box h4 { color: #101828; }
.report-box p { margin: 4px 0; color: #344054; }
.report-box code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f2f4f7;
  color: #7a2e0e;
}
.report-box hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.report-box .md-bullet { padding-left: 6px; }
.small-report { min-height: 150px; }
.check-report { min-height: auto; max-height: none; }
.check-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 8px 0;
  color: #344054;
  line-height: 1.55;
}
.check-line input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 3px 0 0;
  padding: 0;
  border-radius: 4px;
}
.check-line span { min-width: 0; }

.markdown-table-wrap {
  overflow: auto;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.markdown-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.markdown-table th,
.markdown-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-table th { background: #f8fafc; color: #475467; }

.export-row { margin-top: 14px; }
.export-row button {
  min-height: 36px;
  color: #344054;
  background: #fff;
  border-color: var(--line-strong);
}
.export-row span { color: var(--muted); font-size: 13px; font-weight: 800; }

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.data-grid div {
  padding: 14px;
  background: var(--soft);
  box-shadow: none;
}

.data-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-dark);
  font-size: 17px;
}

.checklist-card,
.basis-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--soft);
  box-shadow: none;
}

.checklist-card span {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
  font-weight: 750;
}

.basis-card em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 980px) {
  .qa-layout,
  .split-card { grid-template-columns: 1fr; }
  .profile-grid,
  .form-grid,
  .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .page-shell { width: min(100% - 24px, 720px); padding: 16px 0 36px; }
  .hero-card,
  .profile-card,
  .tab-panel > .surface-card,
  .split-card.surface-card { padding: 16px; }
  .hero-copy h1 { font-size: 27px; }
  .hero-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .return-workstation-btn {
    align-self: flex-start;
    min-height: 36px;
  }
  .section-head,
  .compact-head,
  .scope-title { display: grid; }
  .scope-title span { width: max-content; }
  .scope-metrics,
  .scope-metrics.four,
  .scope-boundary,
  .profile-grid,
  .form-grid,
  .data-grid { grid-template-columns: 1fr; }
  .profile-details summary {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 10px;
  }
  .profile-details summary span,
  .profile-details summary em { grid-column: 1; }
  .profile-details summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .profile-details summary em { text-align: left; }
  .profile-grid .wide,
  .form-grid .wide { grid-column: auto; }
  .tab-bar { top: 0; }
  .tab-btn,
  .primary,
  .secondary,
  .export-row button { min-height: 38px; }
  .data-search-row label,
  .data-search-row input,
  .data-search-row select,
  .data-search-row button { width: 100%; min-width: 0; }
}
