/* Top navigation: highlight follows the current page instead of a fixed item. */
.topbar nav a.nav-import {
  border: 0;
  font-weight: inherit;
  color: #edf4ed;
}

.topbar nav a[aria-current="page"] {
  position: relative;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, .14);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(214, 196, 140, .55);
}

.topbar nav a[aria-current="page"]:hover {
  background: rgba(255, 255, 255, .18);
}

@media (max-width: 700px) {
  .topbar nav a.nav-import {
    padding: 4px;
  }

  .topbar nav a[aria-current="page"] {
    padding: 4px 8px;
  }
}

/* Footer: quiet text on the page itself, not a separate floating box. */
.site-footer {
  box-sizing: border-box;
  width: auto;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 30px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #5b7266;
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
  text-shadow: 0 0 8px rgba(246, 249, 244, .9), 0 0 2px rgba(246, 249, 244, .9);
}

.site-footer::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin: 0 auto 14px;
  background: rgba(176, 152, 86, .6);
}

.site-footer-about {
  overflow-wrap: anywhere;
  letter-spacing: .02em;
}

.site-footer-about span {
  color: inherit;
}

.site-footer-filings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 20px;
  margin-top: 2px;
}

.site-footer-filings a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  max-width: 100%;
  color: #5b7266;
  text-decoration: none;
  transition: color .15s ease;
}

.site-footer-filings a:hover {
  color: #246d60;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-filings a:focus-visible {
  outline: 2px solid #276b5d;
  outline-offset: 3px;
  border-radius: 3px;
}

.site-footer-filings img {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.site-footer-filings span {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .site-footer {
    padding: 22px 16px 28px;
    border-radius: 0;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .site-footer-filings {
    flex-direction: column;
    gap: 0;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-footer {
    background: none;
  }
}

/* Question bank pagination (2026-10-21-b). */
.question-page-summary {
  margin: 0 0 12px;
  font-size: 13px;
}

.question-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* Account menu: name + dropdown with change-password and logout (2026-10-21-c). */
.account-menu {
  position: relative;
  margin-left: auto;
}

.account-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: 6px;
  color: #edf4ed;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary:hover,
.account-menu[open] summary {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.account-menu summary[aria-current="page"] {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(214, 196, 140, .55);
}

.account-menu summary:focus-visible {
  outline: 2px solid #d6c48c;
  outline-offset: 2px;
}

.account-menu .user-name {
  border-left: 0;
  padding-left: 0;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-caret {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease;
}

.account-menu[open] .account-caret {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.account-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  min-width: 156px;
  padding: 6px;
  border: 1px solid #dce5df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(13, 52, 44, .2);
}

.topbar nav .account-menu-list a,
.topbar nav .account-menu-list .link-button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  color: #203b35;
  font-size: 14px;
  text-align: left;
  background: none;
}

.topbar nav .account-menu-list a:hover,
.topbar nav .account-menu-list .link-button:hover {
  color: #185346;
  background: #eef5f0;
}

.account-menu-list form {
  margin: 0;
}

@media (max-width: 700px) {
  .topbar nav a.nav-account {
    display: block;
  }
}

/* Learner mistake book, practice and progress (2026-10-21-c). */
.learner-stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.learner-stats a {
  display: block;
  padding: 17px;
  border: 1px solid #cddfcf;
  border-radius: 10px;
  background: rgba(235, 244, 236, .97);
  color: inherit;
  text-decoration: none;
}

.learner-stats a:hover {
  border-color: #8fb79f;
}

.learner-stats strong small {
  margin-left: 2px;
  font-size: 15px;
}

.badge.wrong-count {
  background: #fdecea;
  color: #9a2d23;
}

.mistake-row h3 {
  margin: 8px 0;
}

.mistake-answer summary {
  cursor: pointer;
  color: #246d60;
  font-size: 14px;
}

.practice-progress {
  margin-bottom: 14px;
}

.practice-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.practice-feedback {
  margin: 12px 0 0;
}

.practice-explanation {
  margin-top: 6px;
  color: var(--ink);
}

.option.is-answer {
  border-color: #74c697;
  background: #e9f8ef;
}

.option.is-wrong {
  border-color: #e79088;
  background: #fdf0ee;
}

.option:has(input:disabled) {
  cursor: default;
}

.practice-done {
  margin-top: 16px;
}

.weak-areas {
  border-left: 3px solid #d98a1c;
}

.weak-areas ul {
  margin: 6px 0 12px;
  padding-left: 20px;
}

.rate-list {
  display: grid;
  gap: 12px;
}

.rate-row {
  display: grid;
  grid-template-columns: minmax(70px, 140px) 1fr 86px;
  align-items: center;
  gap: 12px;
}

.rate-label {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.rate-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ece6;
}

.rate-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: #2f8a6f;
}

.rate-value {
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rate-value small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.progress-exam + .progress-exam {
  margin-top: 22px;
}

.progress-exam-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.progress-attempts {
  min-width: 520px;
}

@media (max-width: 700px) {
  .rate-row {
    grid-template-columns: 1fr 70px;
    gap: 4px 10px;
  }

  .rate-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.topbar nav .nav-note {
  color: #f3e7c4;
  font-size: 14px;
}

/* Mistake book and progress grouped by question bank (2026-10-21-e). */
.mistake-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.mistake-jump a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 6px 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}

.mistake-jump a:hover {
  border-color: #8fb79f;
}

.mistake-jump span {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fdecea;
  color: #9a2d23;
  font-weight: 700;
  text-align: center;
}

.mistake-group {
  scroll-margin-top: 12px;
}

.mistake-group-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.mistake-group-head h2 {
  margin: 0 0 2px;
  overflow-wrap: anywhere;
}

.mistake-group-head .muted {
  font-size: 13px;
}

.practice-scope {
  display: inline-block;
  margin: 4px 0 6px !important;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e8f1f8;
  color: #235c85;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .mistake-group-head {
    flex-direction: column;
    gap: 10px;
  }

  .mistake-group-head .button {
    width: 100%;
  }
}

.mistake-group-head .eyebrow {
  margin-bottom: 2px;
}

.mistake-source {
  overflow-wrap: anywhere;
}

.mistake-jump span.rate-chip {
  background: #e3f1e9;
  color: #185346;
}

.bank-progress h3 {
  margin: 18px 0 10px;
  font-size: 15px;
}

.bank-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 420px;
  margin: 4px 0 6px;
}

.bank-summary div {
  padding: 12px 14px;
  border: 1px solid #cddfcf;
  border-radius: 10px;
  background: rgba(235, 244, 236, .97);
}

.bank-summary strong {
  display: block;
  font-size: 24px;
  color: #185346;
}

.bank-summary strong small {
  margin-left: 2px;
  font-size: 14px;
}

.bank-summary span {
  color: var(--muted);
  font-size: 13px;
}

.bank-progress .weak-areas {
  margin-top: 16px;
  padding: 2px 0 2px 14px;
}

.bank-progress .weak-areas h3 {
  margin-top: 6px;
}

/* Anti-cheat mode (2026-10-23-a). */
.badge.anti-cheat-badge {
  background: #fff1dc;
  color: #8a4b08;
}

.anti-cheat-notice {
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid #f0c98e;
  border-radius: 8px;
  background: #fff7ea;
  color: #6f3d06;
  font-size: 14px;
}

.anti-cheat-card-note {
  color: #8a4b08 !important;
  font-size: 13px;
}

.left-page-badge {
  margin-left: 4px;
}

body.anti-cheat .container {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.anti-cheat textarea {
  -webkit-user-select: text;
  user-select: text;
}

.anti-cheat-watermark {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background-repeat: repeat;
}

.anti-cheat-shield {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(16, 42, 36, .55);
  color: #fff;
  text-align: center;
}

.anti-cheat-shield[hidden] {
  display: none;
}

.anti-cheat-shield div {
  max-width: 320px;
  padding: 22px 26px;
  border-radius: 12px;
  background: rgba(16, 42, 36, .92);
}

.anti-cheat-shield strong {
  font-size: 18px;
}

body.anti-cheat-blurred .container > :not(.anti-cheat-shield):not(.anti-cheat-watermark) {
  filter: blur(14px);
}

@media print {
  body.anti-cheat * {
    visibility: hidden !important;
  }

  body.anti-cheat::after {
    content: "本页面禁止打印";
    visibility: visible;
    display: block;
    padding: 40px;
    font-size: 24px;
  }
}

/* Anti-cheat setting card (2026-10-23-b). */
.ac-setting {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.ac-setting:has(.ac-switch:checked) {
  border-color: #e3b46b;
  box-shadow: 0 0 0 3px #fbe9cc;
}

.ac-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 400;
}

.ac-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e9f2ee;
  color: var(--blue);
  transition: background .15s, color .15s;
}

.ac-setting:has(.ac-switch:checked) .ac-icon {
  background: #fff1dc;
  color: #a85d0c;
}

.ac-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ac-title strong {
  font-size: 16px;
}

.ac-sub {
  color: var(--muted);
  font-size: 13px;
}

.ac-state {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ac-on {
  display: none;
  color: #a85d0c;
}

.ac-off {
  color: var(--muted);
}

.ac-setting:has(.ac-switch:checked) .ac-on {
  display: inline;
}

.ac-setting:has(.ac-switch:checked) .ac-off {
  display: none;
}

input.ac-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 48px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c4cfca;
  cursor: pointer;
  transition: background .15s;
  flex: none;
}

input.ac-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .15s;
}

input.ac-switch:checked {
  background: #d98b1f;
}

input.ac-switch:checked::after {
  transform: translateX(20px);
}

input.ac-switch:focus-visible {
  outline: 3px solid #bde0d4;
  outline-offset: 2px;
}

.ac-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 14px 18px 4px;
  border-top: 1px solid var(--line);
  background: #f8faf9;
  list-style: none;
}

.ac-rules li {
  position: relative;
  display: grid;
  gap: 1px;
  padding-left: 18px;
  font-size: 13px;
}

.ac-rules li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9db5ab;
}

.ac-setting:has(.ac-switch:checked) .ac-rules li::before {
  background: #d98b1f;
}

.ac-rules b {
  font-weight: 600;
  color: var(--ink);
}

.ac-rules span {
  color: var(--muted);
}

.ac-note {
  margin: 0;
  padding: 8px 18px 14px;
  background: #f8faf9;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 700px) {
  .ac-head {
    grid-template-columns: auto 1fr auto;
    gap: 10px 12px;
    padding: 14px;
  }

  .ac-state {
    display: none;
  }

  .ac-rules {
    grid-template-columns: 1fr;
    padding: 12px 14px 2px;
  }

  .ac-note {
    padding: 8px 14px 12px;
  }
}

/* Fill-in-the-blank questions (2026-10-23-b). */
.blank-inputs {
  display: grid;
  gap: 9px;
}

.blank-input {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.blank-input > span {
  color: #3b5b51;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.blank-input input {
  max-width: 420px;
}

.blank-input.is-answer input {
  border-color: #74c697;
  background: #effaf3;
}

.blank-input.is-wrong input {
  border-color: #e79088;
  background: #fff3f2;
}

body.anti-cheat input.blank-field {
  -webkit-user-select: text;
  user-select: text;
}

.blank-review {
  display: grid;
  gap: 6px;
  margin: 6px 0 10px;
  padding: 0;
  list-style: none;
}

.blank-review li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #f6f8f7;
  font-size: 14px;
}

.blank-review li.ok {
  background: #eef9f2;
}

.blank-review li.bad {
  background: #fff4f2;
}

.blank-review-label {
  font-weight: 700;
  color: #3b5b51;
}

.blank-mark {
  margin-left: auto;
  font-size: 16px;
}

.blank-review li.ok .blank-mark {
  color: #157347;
}

.blank-review li.bad .blank-mark {
  color: #b42318;
}

/* Folded-screen / split-screen guard (2026-10-23-c). */
.anti-cheat-shield.anti-cheat-screen {
  z-index: 70;
  background: rgba(16, 42, 36, .82);
}

.anti-cheat-shield.anti-cheat-screen[hidden] {
  display: none;
}

.anti-cheat-shield.anti-cheat-screen p {
  margin: 8px 0 0;
  line-height: 1.6;
}

body.anti-cheat-screen-blocked .container > :not(.anti-cheat-shield):not(.anti-cheat-watermark) {
  filter: blur(14px);
}

/* 2026-10-26: 返回综合管理平台首页（hlmeetingroom.com）。答题页不显示。 */
.topbar-start {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.portal-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 3px 11px 3px 8px;
  border: 1px solid rgba(237, 244, 237, .45);
  border-radius: 999px;
  color: #edf4ed;
  background: rgba(255, 255, 255, .08);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.portal-home:hover,
.portal-home:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .7);
}
.portal-home:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.portal-home-arrow {
  font-size: 18px;
  line-height: 1;
  margin-top: -2px;
}
.portal-home-short {
  display: none;
}
@media (max-width: 480px) {
  .topbar-start { gap: 8px; }
  .portal-home { padding: 3px 9px 3px 6px; }
  .portal-home-long { display: none; }
  .portal-home-short { display: inline; }
}
@media print {
  .portal-home { display: none; }
}

/* 2026-10-26: 错题由学习者自己决定移出或保留 */
.mistake-row .question-meta { flex-wrap: wrap; }
.mistake-remove { margin-left: auto; }
.mistake-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mistake-notice .undo-button,
.keep-choice .link-button { color: #1f6f5c; font-weight: 700; text-decoration: underline; padding: 0 2px; }
.keep-choice { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: 6px; }
.keep-choice.keep-removed span { color: #155b36; }
.keep-choice.keep-kept span { color: #4b5f6f; }
@media (max-width: 480px) {
  .mistake-remove { margin-left: 0; width: 100%; }
  .keep-choice { margin-left: 0; margin-top: 6px; width: 100%; }
}

/* Practice mode: check one question at a time */
.practice-mode-tip { color: #1f7a68; }
.paper-question .practice-actions .check-item { min-width: 96px; }
.paper-question.is-checked .option { cursor: default; }
.question-nav a.checked-right { background: #d9f4e6; border-color: #3fa66f; color: #145f38; font-weight: 700; }
.question-nav a.checked-wrong { background: #fdf0ee; border-color: #e07a70; color: #9a2d23; font-weight: 700; }
.practice-feedback .item-score { display: block; margin-bottom: 4px; font-size: 14px; }
.practice-feedback .item-score b { font-size: 18px; }
.option.is-wrong:has(input:checked) { border-color: #e79088; background: #fdf0ee; }
.option.is-answer:has(input:checked) { border-color: #74c697; background: #e9f8ef; }
.practice-feedback .point-results { margin: 6px 0; padding-left: 0; list-style: none; }
.practice-feedback .point-results li { margin: 2px 0; }
.practice-feedback .point-results li.hit { color: #145f38; }
.practice-feedback .point-results li.miss { color: #9a2d23; }
