.rph-reviewer-page {
  --quiz-ink: #202938;
  --quiz-muted: #667085;
  --quiz-line: #dfe3e8;
  --quiz-paper: #fff;
  --quiz-soft: #f4f5f7;
  --quiz-accent: #986019;
  background: #f3f4f6;
  color: var(--quiz-ink);
}

.rph-reviewer-main {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.rph-reviewer-breadcrumb {
  margin-bottom: 18px;
  color: var(--quiz-muted);
  font-size: .9rem;
}
.rph-reviewer-breadcrumb a { color: #385471; }

.rph-reviewer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid #d9dde3;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #f2f0ea);
  box-shadow: 0 14px 34px rgba(31, 41, 55, .07);
}
.rph-reviewer-kicker {
  margin: 0 0 10px;
  color: var(--quiz-accent);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.rph-reviewer-hero h1.rph-page-title {
  max-width: 760px;
  margin: 0 !important;
  color: var(--quiz-ink) !important;
  font-size: clamp(2rem, 5vw, 3.25rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em;
}
.rph-reviewer-hero p:last-child {
  max-width: 690px;
  margin: 14px 0 0;
  color: var(--quiz-muted);
  line-height: 1.65;
}
.rph-reviewer-count {
  min-width: 142px;
  padding: 18px;
  border: 1px solid #e4d3b8;
  border-radius: 12px;
  background: #fff9ef;
  text-align: center;
}
.rph-reviewer-count strong { display: block; font-size: 2rem; line-height: 1; }
.rph-reviewer-count span { color: var(--quiz-muted); font-size: .82rem; }

.rph-subject-switcher {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--quiz-line);
  border-radius: 12px;
  background: #fff;
}
.rph-subject-switcher label { font-weight: 800; }
.rph-subject-switcher > div { display: flex; flex: 1; max-width: 620px; }
.rph-subject-switcher select {
  min-width: 0;
  flex: 1;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #cbd1d9;
  border-radius: 8px 0 0 8px;
  background: #fff;
  color: var(--quiz-ink);
}
.rph-subject-switcher button {
  min-height: 46px;
  padding: 9px 16px;
  border: 1px solid #293444;
  border-radius: 0 8px 8px 0;
  background: #293444;
  color: #fff;
  font-weight: 750;
}

.rph-reviewer-status {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  margin-top: 26px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #e5d2b2;
  border-radius: 16px;
  background: #fff9ef;
}
.rph-reviewer-status > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #f1dfc2;
  color: #75460d;
  font-size: 1.35rem;
  font-weight: 900;
}
.rph-reviewer-status h2 { margin: 0 0 6px; font-size: 1.35rem; }
.rph-reviewer-status p { margin: 0; color: var(--quiz-muted); }
.rph-reviewer-status__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rph-reviewer-status__actions a {
  padding: 9px 13px;
  border: 1px solid #cfd4db;
  border-radius: 8px;
  background: #fff;
  color: var(--quiz-ink);
  font-weight: 700;
  text-decoration: none;
}

.rph-quiz { margin-top: 26px; }
.rph-quiz-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--quiz-line);
  border-radius: 12px;
  background: #fff;
}
.rph-quiz-intro div span { display: block; color: var(--quiz-muted); font-size: .8rem; }
.rph-quiz-intro div strong { font-size: 1.1rem; }
.rph-quiz-intro p { max-width: 520px; margin: 0; color: var(--quiz-muted); font-size: .9rem; }

.rph-question-card {
  display: block;
  min-width: 0;
  margin: 0 0 22px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--quiz-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31,41,55,.04);
}
.rph-question-card legend {
  width: auto;
  margin: 0;
  padding: 0 8px 0 0;
  color: var(--quiz-accent);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.rph-question-prompt {
  min-width: 0;
  margin: 8px 0 22px;
  color: var(--quiz-ink);
  font-size: 1.06rem;
  font-weight: 750;
  line-height: 1.65;
  overflow-x: auto;
  overflow-wrap: anywhere;
}
.rph-question-prompt > :first-child,
.rph-choice__text > :first-child,
.rph-question-feedback span > :first-child { margin-top: 0; }
.rph-question-prompt > :last-child,
.rph-choice__text > :last-child,
.rph-question-feedback span > :last-child { margin-bottom: 0; }
.rph-question-prompt p { margin: 0 0 12px; }
.rph-question-prompt img,
.rph-choice__text img,
.rph-question-feedback img { display: block; max-width: 100%; height: auto; margin: 12px auto; }
.rph-question-prompt table,
.rph-choice__text table,
.rph-question-feedback table {
  display: table;
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  background: #fff;
  font-size: .94rem;
  font-weight: 500;
  line-height: 1.45;
}
.rph-reviewer-page.rph-unified .rph-question-prompt table,
.rph-reviewer-page.rph-unified .rph-choice__text table,
.rph-reviewer-page.rph-unified .rph-question-feedback table { display: table; max-width: none; overflow: visible; }
.rph-question-prompt th,
.rph-question-prompt td,
.rph-choice__text th,
.rph-choice__text td,
.rph-question-feedback th,
.rph-question-feedback td { padding: 9px 10px; border: 1px solid #cfd6df; text-align: left; vertical-align: top; }
.rph-question-prompt tr:nth-child(even),
.rph-choice__text tr:nth-child(even),
.rph-question-feedback tr:nth-child(even) { background: #f6f8fa; }
.rph-question-prompt pre,
.rph-choice__text pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }
.rph-question-prompt ul,
.rph-question-prompt ol { margin: 10px 0; padding-left: 24px; }
.rph-choice-list { display: grid; gap: 10px; }
.rph-choice {
  display: grid;
  grid-template-columns: 24px 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  background: #fbfcfd;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.rph-choice:hover { border-color: #aeb7c3; background: #fff; }
.rph-choice:focus-within { outline: 3px solid rgba(152,96,25,.18); outline-offset: 1px; }
.rph-choice input { width: 18px; height: 18px; margin: 0; accent-color: #293444; }
.rph-choice__letter {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #eef0f3;
  font-size: .82rem;
  font-weight: 850;
}
.rph-choice__text { min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.rph-choice.is-selected { border-color: #536174; background: #f2f4f7; box-shadow: inset 3px 0 #293444; }
.rph-question-card.has-error { border-color: #c97c68; box-shadow: 0 0 0 3px rgba(178,75,49,.1); }
.rph-choice.is-correct { border-color: #74a687; background: #edf7f0; box-shadow: inset 3px 0 #39744d; }
.rph-choice.is-incorrect { border-color: #cf8b7c; background: #fff1ee; box-shadow: inset 3px 0 #a94731; }
.rph-question-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #edf7f0;
  color: #245436;
}

.rph-quiz-actions {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #cfd4dc;
  border-radius: 13px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 34px rgba(31,41,55,.16);
  backdrop-filter: blur(8px);
}
.rph-quiz-actions div span { display: block; color: var(--quiz-muted); font-size: .82rem; }
.rph-quiz-actions div strong { display: block; margin-top: 2px; }
.rph-quiz-actions button {
  min-height: 46px;
  padding: 10px 17px;
  border: 1px solid #293444;
  border-radius: 9px;
  background: #293444;
  color: #fff;
  font-weight: 800;
}
.rph-quiz-actions #print-reviewer { border-color: #cfd4db; background: #fff; color: var(--quiz-ink); }

.rph-reviewer-note {
  margin-top: 26px;
  padding: 18px 20px;
  border-left: 4px solid var(--quiz-accent);
  border-radius: 8px;
  background: #fff;
}
.rph-reviewer-note p { margin: 6px 0 0; color: var(--quiz-muted); }

@media (max-width: 720px) {
  .rph-reviewer-main { width: min(100% - 20px, 980px); padding-top: 18px; }
  .rph-reviewer-hero { grid-template-columns: 1fr; border-radius: 14px; }
  .rph-reviewer-count { text-align: left; }
  .rph-subject-switcher, .rph-quiz-intro { align-items: stretch; flex-direction: column; }
  .rph-subject-switcher > div { width: 100%; }
  .rph-choice { grid-template-columns: 22px 32px minmax(0, 1fr); padding-inline: 10px; }
  .rph-choice__letter { width: 30px; height: 30px; }
  .rph-question-card { padding: 18px 14px; }
  .rph-question-prompt { font-size: 1rem; line-height: 1.55; overflow-x: auto; }
  .rph-question-prompt table { min-width: 520px; font-size: .88rem; }
  .rph-quiz-actions { position: static; grid-template-columns: 1fr; }
  .rph-quiz-actions button { width: 100%; }
  .rph-reviewer-status { grid-template-columns: 1fr; }
}

@media print {
  .rph-header, .rph-footer, .noprint, .rph-reviewer-breadcrumb, .rph-subject-switcher, .rph-quiz-next { display: none !important; }
  .rph-reviewer-page { background: #fff; }
  .rph-reviewer-main { width: 100%; padding: 0; }
  .rph-reviewer-hero, .rph-question-card { break-inside: avoid; box-shadow: none; }
}
