.cbpt-sc-modal[hidden],
.cbpt-sc-app[hidden] {
  display: none !important;
}

.cbpt-sc-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(27, 38, 85, 0.45);
  backdrop-filter: blur(8px);
}

.cbpt-sc-modal-card {
  position: relative;
  width: min(100%, 760px);
  padding: 40px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(27, 38, 85, 0.22);
}

.cbpt-sc-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #8a8475;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cbpt-sc-modal-icon {
  margin-bottom: 14px;
  text-align: center;
  font-size: 42px;
}

.cbpt-sc-modal-card h3 {
  margin: 0 0 10px;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  color: #1b2655;
}

.cbpt-sc-modal-card > p {
  max-width: 520px;
  margin: 0 auto 24px;
  text-align: center;
  font-size: 15px;
  line-height: 1.65;
  color: #8a8475;
}

.cbpt-sc-modal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.cbpt-sc-modal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cbpt-sc-modal-form label span {
  font-size: 13px;
  font-weight: 600;
  color: #8a8475;
}

.cbpt-sc-modal-form input {
  height: 52px;
  border: 1.5px solid #ddd8d0;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
}

.cbpt-sc-modal-form input:focus {
  outline: 0;
  border-color: rgba(27, 38, 85, 0.4);
  box-shadow: 0 0 0 4px rgba(27, 38, 85, 0.07);
}

.cbpt-sc-modal-submit,
.cbpt-sc-modal-status {
  grid-column: 1 / -1;
}

.cbpt-sc-modal-submit {
  height: 56px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: #b8292d;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.cbpt-sc-modal-status {
  min-height: 20px;
  margin: 0;
  font-size: 14px;
  color: #1b2655;
}

.cbpt-sc-modal-status.is-error,
.cbpt-sc-status.is-error,
.cbpt-sc-submit-status.is-error {
  color: #b8292d;
}

.cbpt-sc-app {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: #f8f5f0;
  font-family: "DM Sans", sans-serif;
  color: #2d2d2d;
}

body.admin-bar .cbpt-sc-app {
  inset: 32px 0 0;
}

.cbpt-sc-shell,
.cbpt-sc-screen {
  height: 100%;
}

.cbpt-sc-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cbpt-sc-screen[hidden] {
  display: none !important;
}

.cbpt-sc-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 54px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid #ddd8d0;
  box-shadow: 0 1px 4px rgba(27, 38, 85, 0.06);
}

.cbpt-sc-left,
.cbpt-sc-right {
  display: flex;
  align-items: center;
}

.cbpt-sc-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
}

.cbpt-sc-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1b2655;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.cbpt-sc-brand img {
  width: auto;
  height: 30px;
  object-fit: contain;
}

.cbpt-sc-brand b {
  color: #b8292d;
}

.cbpt-sc-sep {
  width: 1px;
  height: 18px;
  margin: 0 12px;
  background: #ddd8d0;
}

.cbpt-sc-test-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #8a8475;
}

.cbpt-sc-badge {
  border: 1px solid rgba(27, 38, 85, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1b2655;
  background: rgba(27, 38, 85, 0.04);
}

.cbpt-sc-right {
  gap: 8px;
}

.cbpt-sc-timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 96px;
  justify-content: center;
  padding: 6px 14px;
  border: 1.5px solid #ddd8d0;
  border-radius: 8px;
  background: #f8f5f0;
  color: #1b2655;
  font-family: "DM Mono", monospace;
  font-size: 16px;
  font-weight: 500;
}

.cbpt-sc-timer svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.cbpt-sc-timer.is-urgent {
  color: #b8292d;
  border-color: rgba(184, 41, 45, 0.45);
  background: #fff5f5;
}

.cbpt-sc-pbar {
  height: 3px;
  background: #e8e4de;
}

.cbpt-sc-pfill {
  height: 100%;
  width: 0;
  background: #b8292d;
  transition: width 0.3s ease;
}

.cbpt-sc-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(27, 38, 85, 0.18);
}

.cbpt-sc-dot.is-active {
  background: #b8292d;
}

.cbpt-sc-dot.is-complete {
  background: #2e7d32;
}

.cbpt-sc-split {
  display: grid;
  grid-template-columns: 1fr 420px;
  flex: 1;
  overflow: hidden;
}

.cbpt-sc-lpane {
  padding: 28px 32px;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid #ddd8d0;
}

.cbpt-sc-rpane {
  padding: 24px 24px 0;
  overflow-y: auto;
  background: #f8f5f0;
  display: flex;
  flex-direction: column;
}

.cbpt-sc-part-badge {
  margin-bottom: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8475;
}

.cbpt-sc-part-title {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.05;
  color: #1b2655;
}

.cbpt-sc-instr {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
  color: #2d2d2d;
}

.cbpt-sc-image-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cbpt-sc-image-stack img {
  width: 100%;
  display: block;
  border: 1px solid #ddd8d0;
  border-radius: 10px;
  background: #fff;
}

.cbpt-sc-passage-box {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1.5px solid #ddd8d0;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  line-height: 1.9;
}

.cbpt-sc-passage-box b {
  background: #e8f5e9;
  border-radius: 4px;
  padding: 1px 6px;
  color: #2e7d32;
}

.cbpt-sc-passage-box [data-cbpt-sc-blank] {
  display: inline-block;
  min-width: 88px;
  margin: 0 4px;
  border-bottom: 2px solid #f57c00;
  color: #f57c00;
  text-align: center;
}

.cbpt-sc-questions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
}

.cbpt-sc-question-card {
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e4de;
}

.cbpt-sc-question-card:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cbpt-sc-qnum {
  margin-bottom: -4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 46px;
  line-height: 1;
  color: rgba(27, 38, 85, 0.08);
}

.cbpt-sc-qmeta {
  margin-bottom: 8px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8475;
}

.cbpt-sc-qstem {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: #1b2655;
}

.cbpt-sc-field {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid #ddd8d0;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #2d2d2d;
  outline: 0;
}

.cbpt-sc-field:focus {
  border-color: rgba(27, 38, 85, 0.4);
  box-shadow: 0 0 0 4px rgba(27, 38, 85, 0.07);
}

.cbpt-sc-field.is-textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.cbpt-sc-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cbpt-sc-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid #ddd8d0;
  cursor: pointer;
  transition: all 0.16s ease;
}

.cbpt-sc-opt:hover {
  border-color: rgba(27, 38, 85, 0.3);
  box-shadow: 0 1px 4px rgba(27, 38, 85, 0.06);
}

.cbpt-sc-opt.is-selected {
  background: #fdf2f2;
  border-color: rgba(184, 41, 45, 0.45);
}

.cbpt-sc-opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #ddd8d0;
  background: #f8f5f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  color: #8a8475;
  flex-shrink: 0;
}

.cbpt-sc-opt.is-selected .cbpt-sc-opt-letter {
  background: #b8292d;
  border-color: #b8292d;
  color: #fff;
}

.cbpt-sc-opt-text {
  font-size: 14px;
  line-height: 1.45;
  color: #2d2d2d;
}

.cbpt-sc-qnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid #ddd8d0;
  background: #fff;
}

.cbpt-sc-nbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 44px;
  padding: 0 18px;
  border: 1.5px solid #ddd8d0;
  border-radius: 10px;
  background: #fff;
  color: #8a8475;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.cbpt-sc-nbtn-pri {
  background: #b8292d;
  border-color: #b8292d;
  color: #fff;
}

.cbpt-sc-qctr {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  color: #8a8475;
}

.cbpt-sc-status,
.cbpt-sc-submit-status {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #1b2655;
}

.cbpt-sc-fullpage {
  flex: 1;
  overflow-y: auto;
  padding: 28px 44px;
}

.cbpt-sc-fp {
  max-width: 1080px;
  margin: 0 auto;
}

.cbpt-sc-card,
.cbpt-sc-done-card {
  background: #fff;
  border: 1px solid #ddd8d0;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 1px 8px rgba(27, 38, 85, 0.05);
}

.cbpt-sc-review-head {
  margin-bottom: 18px;
}

.cbpt-sc-review-head h2,
.cbpt-sc-done-card h2 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 68px;
  font-weight: 500;
  line-height: 0.95;
  color: #1b2655;
}

.cbpt-sc-review-head p,
.cbpt-sc-done-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #8a8475;
}

.cbpt-sc-review-title {
  margin-bottom: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 36px;
  font-weight: 500;
  color: #1b2655;
}

.cbpt-sc-review-copy {
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.7;
  color: #8a8475;
}

.cbpt-sc-review-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  border: 1px solid #ddd8d0;
  border-radius: 16px;
  overflow: hidden;
}

.cbpt-sc-review-stats > div {
  padding: 18px 24px;
  border-right: 1px solid #ddd8d0;
}

.cbpt-sc-review-stats > div:last-child {
  border-right: 0;
}

.cbpt-sc-review-stats span,
.cbpt-sc-done-grid span,
.cbpt-sc-review-summary dt {
  display: block;
  margin-bottom: 6px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8292d;
}

.cbpt-sc-review-stats strong,
.cbpt-sc-done-grid strong,
.cbpt-sc-review-summary dd {
  font-size: 22px;
  color: #1b2655;
}

.cbpt-sc-review-summary dd {
  margin: 0;
}

.cbpt-sc-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.cbpt-sc-review-panel {
  min-height: 260px;
  padding: 26px 28px;
  border: 1px solid #ddd8d0;
  border-radius: 16px;
  background: #fdfbf8;
}

.cbpt-sc-review-panel-title {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #1b2655;
}

.cbpt-sc-review-preview {
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.85;
  color: #2d2d2d;
}

.cbpt-sc-review-missing {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 700;
  color: #2eb872;
}

.cbpt-sc-review-summary {
  display: grid;
  gap: 20px;
}

.cbpt-sc-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border: 1px solid #ddd8d0;
  border-radius: 16px;
  background: #fdfbf8;
}

.cbpt-sc-review-note {
  flex: 1;
  font-size: 16px;
  line-height: 1.65;
  color: #8a8475;
}

.cbpt-sc-review-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cbpt-sc-done-card {
  max-width: 980px;
  margin: 60px auto 0;
  text-align: center;
}

.cbpt-sc-done-kicker {
  margin-bottom: 12px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a8475;
}

.cbpt-sc-done-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0;
  text-align: left;
}

.cbpt-sc-done-grid > div {
  padding: 22px 24px;
  border: 1px solid #ddd8d0;
  border-radius: 16px;
  background: #fdfbf8;
}

@media (max-width: 1120px) {
  .cbpt-sc-split {
    grid-template-columns: 1fr;
  }

  .cbpt-sc-lpane {
    border-right: 0;
    border-bottom: 1px solid #ddd8d0;
  }

  .cbpt-sc-review-grid,
  .cbpt-sc-done-grid {
    grid-template-columns: 1fr;
  }

  .cbpt-sc-review-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .cbpt-sc-modal-card,
  .cbpt-sc-card,
  .cbpt-sc-done-card {
    padding: 24px 20px;
  }

  .cbpt-sc-modal-form,
  .cbpt-sc-review-stats {
    grid-template-columns: 1fr;
  }

  .cbpt-sc-hdr {
    padding: 0 14px;
    gap: 12px;
  }

  .cbpt-sc-left {
    min-width: 0;
  }

  .cbpt-sc-test-name {
    display: none;
  }

  .cbpt-sc-mid {
    display: none;
  }

  .cbpt-sc-fullpage {
    padding: 18px 16px;
  }

  .cbpt-sc-review-head h2,
  .cbpt-sc-done-card h2 {
    font-size: 46px;
  }

  .cbpt-sc-review-buttons {
    flex-direction: column;
    width: 100%;
  }

  .cbpt-sc-review-buttons .cbpt-sc-nbtn {
    width: 100%;
  }
}
