:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #f0f3ed;
  --text: #202522;
  --muted: #69716b;
  --line: #dfe4dd;
  --brand: #2f6b4f;
  --brand-dark: #214c39;
  --brand-soft: #e4f0e8;
  --green: #287a4b;
  --green-soft: #e7f5ec;
  --yellow: #9a6a00;
  --yellow-soft: #fff4cf;
  --red: #b33a35;
  --red-soft: #fdebea;
  --shadow: 0 18px 50px rgba(34, 52, 42, 0.08);
  font-family: "Microsoft YaHei", "STHeiti", "Heiti SC", "SimHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(92, 139, 111, 0.12), transparent 28rem),
    var(--bg);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.review-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.review-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 228, 221, 0.9);
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(16px);
}
.review-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.review-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.review-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 8px 24px rgba(47, 107, 79, 0.22);
}
.review-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-main { padding: 38px 0 64px; }
.review-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 5vw, 48px); line-height: 1.08; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.review-intro { max-width: 720px; margin-bottom: 0; color: var(--muted); line-height: 1.8; }
.review-grid { display: grid; gap: 20px; }
.review-grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr); }
.review-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.review-card-head h2, .review-card-head h3 { margin-bottom: 5px; }
.review-card-body { padding: 22px 24px 24px; }
.review-muted { color: var(--muted); font-size: 14px; line-height: 1.7; }
.review-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.review-stack { display: grid; gap: 14px; }
.review-field { display: grid; gap: 7px; }
.review-field label { color: #4f5752; font-size: 13px; font-weight: 700; }
.review-control {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ced5cf;
  border-radius: 11px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  outline: none;
}
.review-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.12); }
textarea.review-control { min-height: 82px; resize: vertical; line-height: 1.6; }
.review-button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 9px 16px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.review-button:hover { background: var(--brand-dark); }
.review-button:disabled { cursor: not-allowed; opacity: 0.55; }
.review-button.secondary { color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); }
.review-button.secondary:hover { background: #e6ebe4; }
.review-button.danger { color: var(--red); background: var(--red-soft); }
.review-button.small { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.review-status {
  min-height: 22px;
  margin-top: 14px;
  color: var(--brand);
  font-size: 14px;
  line-height: 1.6;
}
.review-status.error { color: var(--red); }
.review-source {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.review-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
}
.review-pill.draft { color: var(--yellow); background: var(--yellow-soft); }
.review-account-card { margin-bottom: 20px; }
.review-account-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.review-account-controls label { min-width: 150px; color: #4f5752; font-size: 13px; font-weight: 700; }
.review-account-controls label:last-child { min-width: min(250px, 100%); }
.review-account-controls .review-control { margin-top: 7px; }
.review-account-note { margin-bottom: 16px; }
.review-account-list { max-height: 430px; overflow: auto; display: grid; gap: 8px; padding-right: 4px; }
.review-account-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(90px, 0.55fr) minmax(90px, 0.55fr) minmax(190px, 0.9fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfa;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.review-account-row.just-reset { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 3px rgba(40, 122, 75, 0.12); }
.review-account-row > div:first-child span,
.review-account-credential > span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.review-account-credential > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.review-account-pin { min-width: 48px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.review-grade-tag { display: inline-flex; width: fit-content; border-radius: 999px; padding: 4px 9px; color: var(--brand); background: var(--brand-soft); font-size: 12px; }
.review-account-warning { color: var(--yellow); font-size: 12px; font-weight: 700; }
.review-link-button { border: 0; padding: 0; color: var(--brand); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.review-editor-list { display: grid; gap: 14px; }
.review-editor {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfa;
}
.review-editor-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.review-editor-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}
.review-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.review-field.wide { grid-column: 1 / -1; }
.review-check-list {
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}
.review-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.review-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.review-check strong { display: block; margin-bottom: 2px; font-size: 14px; }
.review-check span { color: var(--muted); font-size: 12px; }
.review-task-list { display: grid; gap: 14px; }
.review-task {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfa;
}
.review-task.is-closed { background: #f6f6f3; opacity: 0.88; }
.review-task-title { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.review-published-link {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid #aed2bc;
  border-radius: 14px;
  background: var(--green-soft);
}
.review-published-link[hidden] { display: none; }
.review-published-link a { color: var(--brand-dark); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.review-task-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
}
.review-task-share p { margin: 4px 0 0; }
.review-assignment {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
}
.review-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe5;
}
.review-progress > span { display: block; height: 100%; background: var(--brand); transition: width 0.2s ease; }
.review-result-counts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 5px 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.review-result-counts .green { color: var(--green); }
.review-result-counts .yellow { color: var(--yellow); }
.review-result-counts .red { color: var(--red); }
.review-empty { padding: 26px; text-align: center; color: var(--muted); }
dialog {
  width: min(620px, calc(100% - 28px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(25, 36, 30, 0.24);
}
dialog::backdrop { background: rgba(25, 32, 28, 0.48); }
.review-dialog-head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px 12px; }
.review-dialog-body { padding: 10px 24px 24px; }
.review-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.review-results-dialog { width: min(980px, calc(100% - 28px)); max-height: min(90vh, 900px); }
.review-results-dialog .review-dialog-body { max-height: calc(90vh - 100px); overflow: auto; }
.review-results-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.review-results-summary > div { padding: 14px; border-radius: 14px; text-align: center; background: var(--surface-soft); }
.review-results-summary strong { display: block; color: var(--brand); font-size: 26px; }
.review-results-summary span { color: var(--muted); font-size: 12px; }
.review-result-section + .review-result-section { margin-top: 26px; }
.review-result-section h3 { margin-bottom: 6px; }
.review-card-stat-list, .review-student-result-list, .review-student-card-list { display: grid; gap: 9px; }
.review-card-stat {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.review-card-stat > div:nth-child(2) span,
.review-student-card > div span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-student-result { border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; }
.review-student-result summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 13px 15px; cursor: pointer; }
.review-student-result summary small { display: block; margin-top: 3px; color: var(--muted); }
.review-student-card-list { padding: 0 15px 15px; }
.review-student-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 11px; background: #fff; }
.review-student-card.green { border-left: 4px solid var(--green); }
.review-student-card.yellow { border-left: 4px solid var(--yellow); }
.review-student-card.red { border-left: 4px solid var(--red); }
.review-student-card.unanswered { border-left: 4px solid var(--line); }

/* Student review */
.student-review-shell { width: min(760px, calc(100% - 28px)); margin: 0 auto; }
.student-review-main { padding: 26px 0 58px; }
.student-review-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}
.student-panel {
  min-height: 520px;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: clamp(24px, 6vw, 52px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.student-intro { text-align: center; }
.student-intro h1 { font-size: clamp(30px, 7vw, 46px); }
.student-login { width: min(430px, 100%); margin: 0 auto; text-align: center; }
.student-login h1 { font-size: clamp(28px, 7vw, 42px); }
.student-login-form { display: grid; gap: 14px; margin: 24px auto 10px; text-align: left; }
.student-login-form .review-button { margin-top: 4px; }
.student-question {
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.5;
  font-weight: 800;
  white-space: pre-wrap;
}
.student-ability { color: var(--brand); font-size: 14px; font-weight: 800; }
.student-answer {
  padding: 20px;
  border-radius: 16px;
  background: var(--brand-soft);
  line-height: 1.9;
  white-space: pre-wrap;
}
.student-answer strong { display: block; margin-bottom: 7px; color: var(--brand-dark); }
.student-actions { display: grid; gap: 12px; }
.student-rating-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rating-button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.rating-button.green { color: var(--green); background: var(--green-soft); border-color: #bcdcc9; }
.rating-button.yellow { color: var(--yellow); background: var(--yellow-soft); border-color: #ead99b; }
.rating-button.red { color: var(--red); background: var(--red-soft); border-color: #efc2bf; }
.map-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.map-stat { padding: 15px; border-radius: 14px; text-align: center; }
.map-stat strong { display: block; margin-top: 4px; font-size: 27px; }
.map-stat.green { color: var(--green); background: var(--green-soft); }
.map-stat.yellow { color: var(--yellow); background: var(--yellow-soft); }
.map-stat.red { color: var(--red); background: var(--red-soft); }
.map-groups { display: grid; gap: 16px; }
.map-group { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.map-group h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.map-list { display: grid; gap: 10px; }
.map-item { padding: 12px 0; border-top: 1px dashed var(--line); }
.map-item:first-child { border-top: 0; }
.map-item strong { display: block; margin-bottom: 5px; }
.map-answer { color: var(--muted); font-size: 13px; line-height: 1.6; }
.review-site-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 16px 28px;
  color: var(--muted);
  font-size: 12px;
}
.review-site-footer a { color: inherit; }

@media (max-width: 820px) {
  .review-grid.two { grid-template-columns: 1fr; }
  .review-hero { align-items: flex-start; flex-direction: column; }
  .review-editor-grid, .review-form-grid { grid-template-columns: 1fr; }
  .review-field.wide { grid-column: auto; }
  .review-assignment { grid-template-columns: 1fr auto; }
  .review-assignment .review-button { grid-column: 1 / -1; }
  .review-task-share { align-items: stretch; flex-direction: column; }
  .review-task-title { align-items: flex-start; flex-direction: column; }
  .review-account-row { grid-template-columns: 1fr 1fr; }
  .review-card-stat { grid-template-columns: auto 1fr; }
  .review-card-stat .review-result-counts { grid-column: 2; }
}

@media (max-width: 560px) {
  .review-shell { width: min(100% - 20px, 1180px); }
  .review-topbar { padding: 10px 0; align-items: flex-start; }
  .review-brand span:last-child { display: none; }
  .review-main { padding-top: 24px; }
  .review-card-head, .review-card-body { padding-left: 16px; padding-right: 16px; }
  .student-panel { min-height: 480px; border-radius: 20px; }
  .student-rating-grid, .map-summary { grid-template-columns: 1fr; }
  .review-results-summary { grid-template-columns: repeat(2, 1fr); }
  .review-account-row { grid-template-columns: 1fr; }
  .review-student-result summary, .review-student-card { align-items: flex-start; flex-direction: column; }
  .rating-button { min-height: 54px; }
}
