.wpsxep-card,
.wpsxep-result,
.wpsxep-empty {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 22px auto;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 3px;
}

.wpsxep-front-wrap {
  width: 100%;
  margin: 0 auto;
}

.wpsxep-front-wrap .content-wrap {
  width: 100%;
}

.wpsxep-front-wrap .content {
  float: none;
  width: 100%;
  margin-right: 0;
}

.wpsxep-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wpsxep-card h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  font-size: 22px;
  line-height: 1.3;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.wpsxep-card h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 2px;
  background: #ff5e52;
}

/* 试卷预览 / 在线答题：卷名与说明居中 */
.wpsxep-card h2.wpsxep-paper-title {
  text-align: center;
}

.wpsxep-card h2.wpsxep-paper-title::before {
  left: 50%;
  transform: translateX(-50%);
}

.wpsxep-card p.wpsxep-paper-desc {
  text-align: center;
  margin-top: 0;
}

.wpsxep-card p {
  color: #666;
  line-height: 1.8;
}

.wpsxep-question {
  margin: 16px 0;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.wpsxep-question:hover {
  border-color: #e1e1e1;
  background: #fff;
}

.wpsxep-stem {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: #333;
}

.wpsxep-question p {
  margin: 6px 0;
}

.wpsxep-question p:first-of-type {
  margin-top: 0;
}

.wpsxep-question p:last-child {
  margin-bottom: 0;
}

.wpsxep-pill-label,
.wpsxep-pill-value {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 2px;
  vertical-align: middle;
}

.wpsxep-pill-label {
  color: #888;
  background: #f3f3f3;
  border: 1px solid #ebebeb;
}

.wpsxep-pill-value {
  color: #555;
  background: #fafafa;
  border: 1px solid #ededed;
}

.wpsxep-question ul {
  margin: 0;
  padding-left: 0;
}

.wpsxep-question li,
.wpsxep-question label {
  display: block;
  margin: 8px 0;
  color: #555;
  line-height: 1.8;
}

.wpsxep-question input[type="radio"],
.wpsxep-question input[type="checkbox"] {
  margin-right: 8px;
  transform: translateY(1px);
}

.wpsxep-question input[type="text"],
.wpsxep-question textarea,
.wpsxep-card input[type="text"],
.wpsxep-card select {
  width: 100%;
  max-width: 520px;
  padding: 9px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.wpsxep-question input[type="text"]:focus,
.wpsxep-question textarea:focus,
.wpsxep-card input[type="text"]:focus,
.wpsxep-card select:focus {
  border-color: #ff5e52;
  box-shadow: 0 0 0 2px rgba(255, 94, 82, 0.12);
}

.wpsxep-btn {
  display: inline-block;
  min-height: 36px;
  padding: 8px 18px;
  border: 1px solid #ff5e52;
  border-radius: 2px;
  background: #ff5e52;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: all 0.2s ease;
}

.wpsxep-btn:hover {
  background: #ff786f;
  border-color: #ff786f;
  color: #fff;
}

.wpsxep-collapse-toggle {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  background: #fff;
  color: #666;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.wpsxep-collapse-toggle:hover {
  color: #ff5e52;
  border-color: #ffd0cc;
  background: #fff8f7;
}

.wpsxep-collapse-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ececec;
}

.wpsxep-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.wpsxep-search-form input[type="text"] {
  flex: 1 1 auto;
  max-width: none;
}

.wpsxep-result {
  border-left: 3px solid #3ca5f6;
  background: #f6fbff;
  color: #2e6f9f;
}

.wpsxep-empty {
  border-left: 3px solid #ff5e52;
  background: #fff8f7;
  color: #9c3f36;
}

.wpsxep-result code,
.wpsxep-card code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  background: #f5f5f5;
  color: #666;
}

.wpsxep-exam-form > p:last-child {
  margin-top: 18px;
  margin-bottom: 0;
}

.wpsxep-exam-form br {
  display: none;
}

.wpsxep-bank-guest-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f6fbff;
  border: 1px solid #cfe8fc;
  border-radius: 2px;
  color: #444;
  line-height: 1.7;
}

.wpsxep-bank-guest-notice a {
  color: #ff5e52;
  font-weight: 600;
}

.wpsxep-cart-bar-guest {
  justify-content: space-between;
}

.wpsxep-bank-wrap {
  padding-bottom: 88px;
}

.wpsxep-bank-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.wpsxep-bank-sidebar {
  flex: 0 0 230px;
  position: sticky;
  top: 12px;
  align-self: flex-start;
}

.wpsxep-bank-sidebar-card {
  background: #fff;
  border: 1px solid #e7edf3;
  border-radius: 8px;
  padding: 12px 12px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wpsxep-bank-sidebar-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #1e293b;
}

.wpsxep-bank-main {
  flex: 1 1 auto;
  min-width: 0;
}

.wpsxep-tree-list {
  margin: 0;
  padding-left: 14px;
  list-style: none;
}

.wpsxep-tree-node {
  margin: 4px 0;
}

.wpsxep-tree-branch > summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.wpsxep-tree-branch > summary::-webkit-details-marker {
  display: none;
}

.wpsxep-tree-branch > summary::before {
  content: "▾";
  display: inline-block;
  width: 1em;
  margin-right: 2px;
  color: #64748b;
}

.wpsxep-tree-branch:not([open]) > summary::before {
  content: "▸";
}

.wpsxep-tree-link {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  color: #475569;
  text-decoration: none;
  line-height: 1.5;
}

.wpsxep-tree-link:hover {
  color: #ff5e52;
  background: #fff8f7;
}

.wpsxep-tree-link.is-active {
  color: #ff5e52;
  background: #fff1ef;
  font-weight: 600;
}

.wpsxep-tree-empty {
  margin: 6px 0;
  color: #94a3b8;
  font-size: 13px;
}

.wpsxep-paper-list {
  display: grid;
  gap: 12px;
}

.wpsxep-paper-list-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.wpsxep-paper-list-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.wpsxep-paper-list-meta {
  color: #64748b;
  font-size: 13px;
  margin: 0 0 8px;
}

.wpsxep-bank-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.wpsxep-bank-filters p {
  margin: 0;
}

.wpsxep-bank-meta {
  color: #666;
  font-size: 14px;
}

.wpsxep-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.wpsxep-btn-outline {
  background: #fff;
  color: #ff5e52;
}

.wpsxep-btn-outline:hover {
  background: #fff8f7;
  color: #ff5e52;
}

.wpsxep-cart-bar {
  position: fixed;
  z-index: 99990;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.wpsxep-cart-drawer {
  position: fixed;
  z-index: 99989;
  left: 0;
  right: 0;
  bottom: 56px;
  max-height: 42vh;
  overflow: auto;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.wpsxep-cart-drawer-inner {
  padding: 14px 16px 18px;
}

.wpsxep-cart-drawer-inner h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.wpsxep-cart-list {
  margin: 0;
  padding-left: 18px;
}

.wpsxep-cart-list li {
  margin: 8px 0;
  color: #444;
}

.wpsxep-cart-list .wpsxep-cart-stem {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.wpsxep-cart-remove {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
}

.wpsxep-cart-remove:hover {
  border-color: #ff5e52;
  color: #ff5e52;
}

.wpsxep-cart-hint {
  font-size: 13px;
  color: #888;
  margin: 10px 0 0;
}

.wpsxep-compose-preview {
  margin: 16px 0;
  padding: 14px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 2px;
}

.wpsxep-compose-ol {
  margin: 0;
  padding-left: 20px;
}

.wpsxep-compose-group {
  margin: 0 0 16px;
  padding: 12px 12px 4px;
  border: 1px solid #ececec;
  border-radius: 4px;
  background: #fafcff;
}

.wpsxep-compose-group-title {
  margin: 0 0 8px;
  font-size: 15px;
  color: #334155;
}

.wpsxep-compose-ol li {
  margin: 10px 0;
  line-height: 1.6;
}

.wpsxep-compose-stem {
  margin-right: 8px;
}

.wpsxep-compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wpsxep-bank-card {
  margin: 18px 0;
  padding: 16px 18px 14px;
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.wpsxep-bank-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #64748b;
}

.wpsxep-bank-id {
  font-weight: 700;
  color: #0ea5a4;
}

.wpsxep-bank-source {
  color: #475569;
}

.wpsxep-bank-type {
  padding: 2px 10px;
  border-radius: 4px;
  background: #ecfeff;
  color: #0f766e;
  font-weight: 600;
}

.wpsxep-bank-stars .wpsxep-ds {
  color: #e2e8f0;
  font-size: 15px;
  letter-spacing: 1px;
}

.wpsxep-bank-stars .wpsxep-ds.is-on {
  color: #f59e0b;
}

.wpsxep-bank-stem {
  margin-bottom: 12px;
}

.wpsxep-bank-options {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 10px 14px;
}

.wpsxep-bank-options-cols-1 {
  grid-template-columns: 1fr;
}

.wpsxep-bank-options-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wpsxep-bank-options-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wpsxep-bank-options li {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 6px;
  background: #fafbfc;
  line-height: 1.65;
  color: #334155;
  display: flex;
  align-items: baseline;
  gap: 1ch;
}

.wpsxep-opt-mark {
  display: inline-flex;
  align-items: baseline;
  font-weight: 600;
  color: #334155;
  min-width: 2.4ch;
}

.wpsxep-opt-dot {
  font-size: 1em;
  margin-left: 0.06ch;
  line-height: 1;
}

.wpsxep-exam-options {
  margin-top: 10px;
}

.wpsxep-exam-options .wpsxep-exam-option-label {
  display: flex;
  align-items: baseline;
  gap: 1ch;
  width: 100%;
  margin: 0;
  cursor: pointer;
  line-height: 1.65;
}

.wpsxep-opt-text {
  flex: 1 1 auto;
}

.wpsxep-bank-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.wpsxep-bank-foot-meta {
  flex: 1 1 auto;
  text-align: left;
}

.wpsxep-fill-input {
  width: min(100%, 28rem);
  max-width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 15px;
}

.wpsxep-bank-pick {
  margin-left: auto;
}

.wpsxep-bank-pick.is-in-cart {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.wpsxep-bank-pick.is-in-cart:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.wpsxep-bank-analysis-body {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  line-height: 1.7;
  color: #334155;
}

.wpsxep-bank-analysis-inner .wpsxep-bank-ref-answer {
  margin: 0 0 0.65em;
}

.wpsxep-bank-analysis-inner .wpsxep-bank-ref-analysis {
  margin: 0;
}

@media (max-width: 782px) {
  .wpsxep-card,
  .wpsxep-result,
  .wpsxep-empty {
    margin: 12px;
    padding: 14px;
  }

  .wpsxep-card h2 {
    font-size: 19px;
  }

  .wpsxep-search-form {
    display: block;
  }

  .wpsxep-search-form .wpsxep-btn {
    margin-top: 8px;
  }

  .wpsxep-stem {
    font-size: 15px;
  }

  .wpsxep-bank-layout {
    display: block;
  }

  .wpsxep-bank-sidebar {
    position: static;
    margin: 0 12px 12px;
  }

  .wpsxep-bank-options-cols-2,
  .wpsxep-bank-options-cols-4 {
    grid-template-columns: 1fr;
  }

  .wpsxep-bank-pick {
    margin-left: 0;
    width: 100%;
  }
}

/* 题干内 \hx（兼容 [[hr]]）渲染为填空线 */
.wpsxep-stem .wpsxep-stem-blank {
  display: inline-block;
  width: var(--wpsxep-blank-len, 7em);
  max-width: 40vw;
  border-bottom: 1px solid #475569;
  height: 0.95em;
  vertical-align: -0.1em;
  margin: 0 0.2em;
}

.wpsxep-stem .wpsxep-choice-tail {
  display: inline-flex;
  align-items: baseline;
  margin-left: 0.3em;
}

.wpsxep-stem .wpsxep-choice-tail-gap {
  display: inline-block;
  width: 2em;
}

.wpsxep-section-intro {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25em 0 0.5em;
  line-height: 1.55;
  color: #222;
}
