/* DSAT-format problem viewer — mirrors ipe-sat-practice style.css.
 * 2-column layout: stem (left) | choices (right), vertical divider.
 * Pure B&W minimalism inside body, marketing brand only in header.
 */

:root {
  --dsat-ink: #0F0F0F;
  --dsat-char: #3A3A3A;
  --dsat-muted: #767676;
  --dsat-ghost: #BBBBBB;
  --dsat-line: #DDDDDD;
  --dsat-hover: #F4F4F4;
  --dsat-panel: #FAFAFA;
  --dsat-bg: #FFFFFF;
  --dsat-correct: #15803D;
  --dsat-wrong: #B91C1C;
}

.page-viewer {
  background: var(--dsat-bg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }

/* Topbar uses marketing-site .site-header — keep that for branding */

/* Practice viewport — fixed-height, inner scroll if needed */
.viewer-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* Tier/progress strip below header */
.viewer-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--dsat-muted);
  padding: 12px 32px;
  border-bottom: 1px solid var(--dsat-line);
}
.viewer-meta .chapter-name {
  font-weight: 600;
  color: var(--dsat-ink);
  font-size: 14px;
}
.viewer-meta .tier-pill {
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  font-size: 11px;
}
.viewer-meta .prob-count {
  font-size: 13px;
  color: var(--dsat-char);
}
.viewer-meta .meta-sep { color: var(--dsat-ghost); }
.viewer-meta .meta-tools {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--dsat-muted);
}
.viewer-meta .mini-tog {
  display: flex; align-items: center; gap: 4px;
  cursor: pointer;
  user-select: none;
}
.viewer-meta .mini-tog input { margin: 0; }
.viewer-meta .mini-btn {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--dsat-line);
  background: white;
  cursor: pointer;
  border-radius: 4px;
  color: var(--dsat-ink);
}
.viewer-meta .mini-btn:hover { background: var(--dsat-hover); }
.viewer-meta .skip-btn {
  background: #FFF8E1;
  border-color: #C9A05C;
  color: #8B6F2A;
  font-weight: 700;
}
.viewer-meta .skip-btn:hover { background: #FAEFCE; }

/* Calculator — floating, draggable window (DSAT Bluebook style) */
.calc-modal {
  position: fixed;
  top: 80px; right: 20px;
  width: 420px; height: 520px;
  background: white;
  border: 1px solid var(--dsat-line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.calc-modal[hidden] { display: none; }
.calc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--dsat-panel);
  border-bottom: 1px solid var(--dsat-line);
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}
.calc-header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dsat-ink);
  letter-spacing: 0.02em;
}
.calc-header-buttons { display: flex; gap: 4px; }
.calc-iconbtn {
  width: 24px; height: 24px;
  border: 1px solid var(--dsat-line);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--dsat-char);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.calc-iconbtn:hover { background: var(--dsat-hover); }
.calc-modal-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.calc-modal-content iframe {
  width: 100%; height: 100%; border: none;
}
.calc-resize {
  position: absolute;
  bottom: 0; right: 0;
  width: 16px; height: 16px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 50%, var(--dsat-ghost) 50%, var(--dsat-ghost) 60%, transparent 60%),
    linear-gradient(135deg, transparent 70%, var(--dsat-ghost) 70%, var(--dsat-ghost) 80%, transparent 80%);
}
.calc-modal.minimized { height: 40px !important; }
.calc-modal.minimized .calc-modal-content { display: none; }

/* Strikethrough mode */
.choice.struck { opacity: 0.45; text-decoration: line-through; }

/* Mark for review pin on the meta */
.viewer-meta .mark-toggle-wrap.marked {
  background: #FEF3C7;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Two-column DSAT layout */
.dsat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 24px 32px;
  flex: 1;
}

.stem {
  padding-right: 32px;
  border-right: 1px solid var(--dsat-line);
  overflow-y: auto;
}
.choices {
  padding-left: 32px;
  overflow-y: auto;
}

.stem-body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--dsat-ink);
  white-space: pre-line;
}
.stem-body .katex-display { margin: 0.6em 0 !important; }
.stem-body .katex { font-size: 1.05em; }

.passage-block {
  font-size: 16px;
  line-height: 1.7;
  color: var(--dsat-ink);
  margin-bottom: 18px;
  white-space: pre-line;
}
.passage-block .underline {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.passage-block .blank {
  display: inline-block;
  min-width: 56px;
  border-bottom: 2px solid var(--dsat-ink);
  margin: 0 2px;
}

.stem-figure { margin-top: 14px; text-align: center; }
.stem-figure img, .stem-figure svg {
  max-width: 90%; max-height: 320px;
}
.stem-figure:empty { display: none; }

/* Choices side */
.choices-list { display: block; }
.choice {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1.5px solid var(--dsat-line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  background: white;
  transition: border-color 0.1s, background 0.1s;
  align-items: start;
}
.choice:hover {
  background: var(--dsat-hover);
  border-color: var(--dsat-char);
}
.choice.selected {
  border-color: var(--dsat-ink);
  background: #F9FAFB;
}
.choice.correct {
  border-color: var(--dsat-correct);
  background: #F0FDF4;
}
.choice.wrong {
  border-color: var(--dsat-wrong);
  background: #FEF2F2;
}
.choice-key {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--dsat-char);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
  color: var(--dsat-char);
  flex-shrink: 0;
}
.choice.selected .choice-key {
  background: var(--dsat-ink); color: white; border-color: var(--dsat-ink);
}
.choice.correct .choice-key {
  background: var(--dsat-correct); color: white; border-color: var(--dsat-correct);
}
.choice.wrong .choice-key {
  background: var(--dsat-wrong); color: white; border-color: var(--dsat-wrong);
}
.choice-text { padding-top: 2px; }
.choice-text .katex-display { display: inline; margin: 0 !important; }
.choice-text .katex-display > .katex { font-size: 1.05em; }
.choice-text .katex { font-size: 1.05em; }

.explain {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 6px;
  border: 1px solid var(--dsat-line);
  background: var(--dsat-panel);
}
.explain-status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.explain-status.correct { color: var(--dsat-correct); }
.explain-status.wrong { color: var(--dsat-wrong); }
.explain-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--dsat-char);
}

/* Bottom navbar (DSAT-style) */
.viewer-navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 32px;
  border-top: 1px solid var(--dsat-line);
  background: white;
}
.nav-btn {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 18px;
  border: 1px solid var(--dsat-line);
  background: white;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 500;
}
.nav-btn:hover { background: var(--dsat-hover); }
.nav-btn.primary {
  background: var(--dsat-ink);
  color: white;
  border-color: var(--dsat-ink);
}
.nav-btn.primary:hover { background: var(--dsat-char); }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.viewer-navbar .nav-info {
  text-align: center;
  font-size: 13px;
  color: var(--dsat-muted);
}
.viewer-navbar .nav-prev { justify-self: start; }
.viewer-navbar .nav-next { justify-self: end; }

.page-viewer .site-footer { display: none; }

/* ============================================
   RESULTS VIEW
   ============================================ */
.results-view {
  flex: 1;
  padding: 32px 48px;
  overflow-y: auto;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.results-summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: stretch;
  padding: 24px 28px;
  border: 1px solid var(--dsat-line);
  border-radius: 10px;
  background: white;
  margin-bottom: 28px;
}
.results-score {
  text-align: center;
  padding: 12px 8px;
  border-right: 1px solid var(--dsat-line);
}
.score-big {
  font-size: 38px;
  font-weight: 700;
  color: var(--dsat-ink);
  line-height: 1;
  margin-bottom: 6px;
}
.score-pct {
  font-size: 18px;
  font-weight: 600;
  color: var(--dsat-char);
  margin-bottom: 4px;
}
.score-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dsat-muted);
}
.results-breakdown {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.tier-row {
  display: grid;
  grid-template-columns: 110px 1fr 50px;
  gap: 14px;
  align-items: center;
  font-size: 13px;
}
.tier-row .tier-name {
  font-weight: 600;
  color: var(--dsat-char);
}
.tier-row .tier-bar {
  height: 8px;
  background: var(--dsat-hover);
  border-radius: 4px;
  overflow: hidden;
}
.tier-row .tier-bar-fill {
  height: 100%;
  background: var(--dsat-ink);
  transition: width 0.4s ease;
}
.tier-row .tier-stat {
  font-size: 12px;
  color: var(--dsat-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.results-section { margin-bottom: 24px; }
.results-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dsat-ink);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

.results-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1.5px solid var(--dsat-line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dsat-char);
  background: white;
  cursor: pointer;
  transition: all 0.12s;
  font-variant-numeric: tabular-nums;
}
.result-badge .mark { font-weight: 700; }
.result-badge.correct { border-color: #BDDFCC; color: #15803D; }
.result-badge.correct .mark { color: #15803D; }
.result-badge.wrong { border-color: #F2C8C8; color: #B91C1C; cursor: pointer; }
.result-badge.wrong .mark { color: #B91C1C; }
.result-badge.wrong:hover { background: #FEF2F2; }
.result-badge.skipped { border-color: var(--dsat-line); color: var(--dsat-muted); }
.result-badge.active { box-shadow: 0 0 0 2px rgba(0,0,0,0.12); border-color: var(--dsat-ink); }
.result-badge.correct { cursor: default; }
.result-badge.correct:hover { background: white; }
.results-hint {
  font-size: 12px;
  color: var(--dsat-muted);
  margin: 6px 0 0;
}
.badge-mini {
  display: inline-block;
  width: 18px; height: 18px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
  border: 1.5px solid #F2C8C8;
  border-radius: 4px;
  color: #B91C1C;
  font-size: 11px;
}

/* Analysis modal overlay (replaces inline expand) */
.results-analysis {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 63, 0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.analysis-card {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.analysis-card-body {
  flex: 1;
  overflow-y: auto;
}
.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  background: var(--dsat-panel);
  border-bottom: 1px solid var(--dsat-line);
  flex-shrink: 0;
  gap: 16px;
}
.analysis-close {
  width: 32px; height: 32px;
  border: 1px solid var(--dsat-line);
  background: white;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  color: var(--dsat-char);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.analysis-close:hover { background: var(--dsat-hover); }
.analysis-header-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dsat-ink);
}
.analysis-header-meta {
  font-size: 12px;
  color: var(--dsat-muted);
}
.analysis-body {
  padding: 22px 26px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dsat-char);
}

/* Problem recap inside analysis panel */
.recap-block {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--dsat-line);
  background: white;
}
.recap-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}
.recap-passage {
  background: var(--dsat-panel);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--dsat-ink);
  white-space: pre-line;
}
.recap-passage:empty { display: none; }
.recap-passage .underline {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.recap-passage .blank {
  display: inline-block;
  min-width: 50px;
  border-bottom: 2px solid var(--dsat-ink);
  margin: 0 2px;
}
.recap-stem {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dsat-ink);
  font-weight: 500;
  margin-bottom: 14px;
  white-space: pre-line;
}
.recap-stem .katex { font-size: 1em; }
.recap-stem .katex-display { margin: 0.4em 0 !important; }

.recap-choices { display: flex; flex-direction: column; gap: 6px; }
.recap-choice {
  display: grid;
  grid-template-columns: 26px 1fr 110px;
  gap: 12px;
  align-items: center;
  padding: 8px 14px;
  border: 1.5px solid var(--dsat-line);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}
.recap-choice .recap-key {
  font-weight: 700;
  text-align: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--dsat-char);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--dsat-char);
}
.recap-choice .recap-text { color: var(--dsat-char); }
.recap-choice .recap-text .katex-display { display: inline; margin: 0 !important; }
.recap-choice .recap-marker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  color: var(--dsat-muted);
}
.recap-choice.your-pick {
  background: #FCF3F2;
  border-color: var(--dsat-wrong);
}
.recap-choice.your-pick .recap-key {
  background: var(--dsat-wrong); color: white; border-color: var(--dsat-wrong);
}
.recap-choice.your-pick .recap-marker { color: var(--dsat-wrong); }
.recap-choice.correct {
  background: #F0FDF4;
  border-color: var(--dsat-correct);
}
.recap-choice.correct .recap-key {
  background: var(--dsat-correct); color: white; border-color: var(--dsat-correct);
}
.recap-choice.correct .recap-marker { color: var(--dsat-correct); }
.recap-choice.both {
  background: #F0FDF4;
  border-color: var(--dsat-correct);
}
.recap-choice.both .recap-key {
  background: var(--dsat-correct); color: white; border-color: var(--dsat-correct);
}
.recap-choice.both .recap-marker { color: var(--dsat-correct); }

/* Analysis "your choice" emphasis */
.analysis-wrong-block.yours {
  border-left-width: 4px;
  background: #FCF3F2;
}
.wrong-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.wrong-marker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dsat-wrong);
  background: white;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--dsat-wrong);
}
.approach-line { font-size: 13px; color: var(--dsat-char); margin-bottom: 4px; }
.analysis-body h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dsat-muted);
  margin: 0 0 6px;
}
.analysis-body .concept-line {
  font-size: 15px;
  color: var(--dsat-ink);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--dsat-line);
}
.analysis-section { margin-bottom: 18px; }
.analysis-wrong-block {
  background: #FCF3F2;
  border-left: 3px solid #B91C1C;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 8px;
}
.analysis-wrong-block .wrong-letter {
  display: inline-block;
  font-weight: 700;
  color: #B91C1C;
  margin-right: 6px;
}
.analysis-wrong-block dl {
  margin: 4px 0 0;
  font-size: 13px;
}
.analysis-wrong-block dt {
  font-weight: 600;
  color: var(--dsat-char);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
}
.analysis-wrong-block dt:first-of-type { margin-top: 0; }
.analysis-wrong-block dd {
  margin: 2px 0 0;
  color: var(--dsat-char);
}
.analysis-correct-block {
  background: #F0FDF4;
  border-left: 3px solid #15803D;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
}
.analysis-correct-block ol {
  margin: 6px 0 0 18px;
  padding: 0;
  font-size: 13px;
}
.analysis-correct-block li { margin-bottom: 4px; }
.takeaway-line {
  margin-top: 16px;
  padding: 10px 14px;
  background: #FFF8E1;
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--dsat-ink);
}
.takeaway-line strong { color: var(--dsat-ink); }

/* Results CTA */
.results-cta {
  padding: 24px 28px;
  border: 1px solid var(--dsat-line);
  border-radius: 10px;
  background: var(--dsat-panel);
  text-align: center;
}
.results-cta h3 {
  font-size: 18px;
  margin: 0 0 6px;
  color: var(--dsat-ink);
}
.results-cta p {
  font-size: 13px;
  color: var(--dsat-muted);
  margin: 0 0 14px;
}
.results-cta .nav-btn { padding: 10px 24px; font-size: 14px; }
.results-cta .nav-btn:disabled { background: var(--dsat-ghost); color: white; cursor: default; }

/* Results CTA */
.results-cta {
  padding: 28px;
  border: 1px solid var(--dsat-line);
  border-radius: 10px;
  background: var(--dsat-panel);
  text-align: center;
  margin-bottom: 24px;
}
.results-cta h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--dsat-ink);
  font-weight: 700;
}
.results-cta > p {
  font-size: 14px;
  color: var(--dsat-char);
  margin: 0 0 18px;
}
.cta-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cta-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dsat-char);
}
.cta-form input {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 14px;
  border: 1.5px solid var(--dsat-line);
  border-radius: 6px;
  background: white;
  color: var(--dsat-ink);
  width: 240px;
  outline: none;
}
.cta-form input:focus {
  border-color: var(--dsat-ink);
}
.results-cta .nav-btn { padding: 10px 28px; font-size: 14px; }
.cta-status {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--dsat-muted);
  min-height: 16px;
}
.cta-status.error { color: var(--dsat-wrong); }
.cta-status.success { color: var(--dsat-correct); }

/* ============================================
   WORKBOOK PREVIEW (on-screen, identical to PDF)
   ============================================ */
.workbook-preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}
.workbook-preview:empty { display: none; }

/* ============================================
   WORKBOOK PAGES (used both on-screen and in print window)
   ============================================ */
.wb {
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  color: #0F0F0F;
  font-size: 13px;
  line-height: 1.6;
}
/* Workbook page — preview AND print share the same wb- styles */
.wb-page {
  width: 780px;
  min-height: 1080px;
  padding: 0 0 64px;
  background: white;
  page-break-after: always;
  break-after: page;
  position: relative;
  margin: 0 auto;
  border: 1px solid #E5E5E5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.wb-page:last-child { page-break-after: auto; break-after: auto; }

/* Header (every page) — student name left, RT Prep logo top-right */
.wb-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 56px 14px;
  border-bottom: 2px solid #1F5C3D;
  background: white;
}
.wb-header img.rtprep-logo {
  height: 40px; width: auto; display: block;
  justify-self: end;
}
.wb-header .student-block {
  text-align: left;
  font-size: 11px;
  color: #767676;
  letter-spacing: 0.04em;
  justify-self: start;
}
.wb-header .student-block .student {
  font-weight: 700; color: #0F0F0F; font-size: 13px;
  letter-spacing: 0.02em; display: block;
}
.wb-header .student-block .meta {
  font-size: 10px; color: #999; margin-top: 2px;
}

/* Body region */
.wb-body { padding: 28px 56px 0; }

/* Footer */
.wb-page-footer {
  position: absolute;
  bottom: 24px;
  left: 56px;
  right: 56px;
  font-size: 10px;
  color: #999;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #E5E5E5;
  padding-top: 10px;
}

/* Cover */
.wb-cover .wb-body {
  padding: 56px 56px 0;
  display: flex;
  flex-direction: column;
  min-height: 880px;
}
.wb-cover-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1F5C3D;
  font-weight: 700;
  margin-bottom: 14px;
}
.wb-cover-title {
  font-size: 44px;
  font-weight: 700;
  color: #0F0F0F;
  line-height: 1.04;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.wb-cover-chapter {
  font-size: 17px;
  color: #3A3A3A;
  margin-bottom: 48px;
  font-weight: 500;
}
.wb-cover-prepared {
  border-top: 1px solid #E5E5E5;
  border-bottom: 1px solid #E5E5E5;
  padding: 18px 0;
  margin-bottom: 36px;
}
.wb-cover-prepared .label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 6px;
}
.wb-cover-prepared .name {
  font-size: 22px;
  font-weight: 600;
  color: #0F0F0F;
  margin-bottom: 4px;
}
.wb-cover-prepared .date {
  font-size: 13px;
  color: #767676;
}
.wb-cover-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 28px;
}
.wb-stat {
  text-align: center;
  padding: 12px 8px;
  border-right: 1px solid #E5E5E5;
}
.wb-stat:last-child { border-right: none; }
.wb-stat-num {
  font-size: 38px;
  font-weight: 700;
  color: #1F5C3D;
  line-height: 1;
  margin-bottom: 6px;
}
.wb-stat-label {
  font-size: 10px;
  color: #767676;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.wb-cover-intro {
  font-size: 13px;
  line-height: 1.65;
  color: #3A3A3A;
  margin-top: auto;
  padding-top: 24px;
}

/* Performance snapshot section on cover */
.wb-snapshot { margin-top: 8px; }
.wb-snapshot h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1F5C3D;
  margin: 18px 0 8px;
}
.wb-snapshot h4:first-child { margin-top: 0; }

/* ── Cover headline diagnosis ── */
.wb-headline {
  margin: 24px 0 22px;
  padding: 16px 20px;
  background: #1F5C3D;
  border-radius: 6px;
  color: white;
}
.wb-headline-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C9D9CC;
  margin-bottom: 4px;
}
.wb-headline-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

/* Updated cover stats — third column for predicted band */
.wb-stat-of {
  font-size: 18px;
  font-weight: 500;
  color: #767676;
  margin-left: 2px;
}

/* ── Diagnostic page ── */
.wb-diagnostic .wb-body { padding-top: 28px; }
.wb-diag-block {
  margin-bottom: 22px;
}
.wb-diag-block:last-child { margin-bottom: 0; }
.wb-diag-block h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1F5C3D;
  margin: 0 0 10px;
}

/* Concept mastery table */
.wb-mastery-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.wb-mastery-table thead th {
  text-align: left;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #767676;
  border-bottom: 1px solid #DDD;
}
.wb-mastery-table thead th.ev { text-align: right; width: 70px; }
.wb-mastery-table tbody tr {
  border-bottom: 1px solid #F0F0F0;
}
.wb-mastery-table tbody tr:last-child { border-bottom: none; }
.wb-mastery-table td {
  padding: 8px 12px;
  vertical-align: middle;
}
.wb-mastery-table .skill-cell {
  color: #0F0F0F;
  font-size: 12px;
}
.wb-mastery-table .status-cell {
  width: 130px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.wb-mastery-table .evidence-cell {
  text-align: right;
  font-size: 11px;
  color: #767676;
  font-variant-numeric: tabular-nums;
  width: 70px;
}
.wb-mastery-table .status-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.wb-mastery-table tr.mastered .status-cell { color: #15803D; }
.wb-mastery-table tr.mastered .status-dot { background: #15803D; }
.wb-mastery-table tr.developing .status-cell { color: #C9A05C; }
.wb-mastery-table tr.developing .status-dot { background: #C9A05C; }
.wb-mastery-table tr.needs-work .status-cell { color: #B91C1C; }
.wb-mastery-table tr.needs-work .status-dot { background: #B91C1C; }

/* Predicted band */
.wb-band-headline {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}
.wb-band-num {
  font-size: 26px;
  font-weight: 700;
  color: #0F0F0F;
  letter-spacing: -0.01em;
}
.wb-band-label {
  font-size: 12px;
  color: #767676;
}
.wb-band-vis { margin-bottom: 8px; }
.wb-band-track {
  position: relative;
  height: 10px;
  background: linear-gradient(to right,
    #FCC0C0 0%, #FCC0C0 25%,
    #F8E2AB 25%, #F8E2AB 60%,
    #B7DDC4 60%, #B7DDC4 100%);
  border-radius: 5px;
}
.wb-band-marker {
  position: absolute;
  top: -4px;
  width: 4px; height: 18px;
  background: #1F5C3D;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px white;
}
.wb-band-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}
.wb-band-note {
  font-size: 11px;
  color: #767676;
  margin: 8px 0 0;
  font-style: italic;
}

/* Plan table */
.wb-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.wb-plan-table tbody tr {
  border-bottom: 1px solid #F0F0F0;
}
.wb-plan-table tbody tr:last-child { border-bottom: none; }
.wb-plan-table td {
  padding: 10px 0;
  vertical-align: middle;
}
.wb-plan-table .plan-num {
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #1F5C3D;
}
.wb-plan-table .plan-kind {
  width: 90px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1F5C3D;
}
.wb-plan-table .plan-desc {
  color: #0F0F0F;
}
.wb-plan-table .plan-min {
  width: 80px;
  text-align: right;
  font-size: 11px;
  color: #767676;
  font-variant-numeric: tabular-nums;
}

/* ── Practice Set pages ── */
.wb-practice-page .wb-body { padding-top: 28px; }

.practice-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 16px;
}
.practice-problem {
  padding: 16px 18px;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  background: white;
  page-break-inside: avoid;
  break-inside: avoid;
}
.practice-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1F5C3D;
  margin-bottom: 2px;
}
.practice-meta {
  font-size: 10px;
  color: #999;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.practice-passage {
  background: #FAF7EE;
  border-left: 3px solid #C9A05C;
  padding: 8px 12px;
  margin: 0 0 10px;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}
.practice-passage:empty { display: none; }
.practice-stem {
  font-size: 13px;
  line-height: 1.55;
  color: #0F0F0F;
  margin-bottom: 10px;
  white-space: pre-line;
}
.practice-choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.practice-choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 6px 10px;
  border: 1px solid #EEE;
  border-radius: 4px;
  font-size: 12px;
  background: white;
}
.practice-choice .key {
  font-weight: 700;
  color: #3A3A3A;
  text-align: center;
}
.practice-choice .text { color: #0F0F0F; line-height: 1.5; }

/* Answer key table */
.practice-key-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 12px;
}
.practice-key-table thead th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #767676;
  border-bottom: 1px solid #DDD;
}
.practice-key-table thead th.num { width: 48px; text-align: center; }
.practice-key-table thead th.letter { width: 80px; text-align: center; }
.practice-key-table thead th.tier { width: 60px; text-align: center; }
.practice-key-table tbody tr {
  border-bottom: 1px solid #F0F0F0;
}
.practice-key-table tbody tr:last-child { border-bottom: none; }
.practice-key-table td {
  padding: 8px 12px;
  vertical-align: middle;
}
.practice-key-table .key-num {
  text-align: center;
  width: 48px;
  font-weight: 700;
  color: #1F5C3D;
}
.practice-key-table .key-letter {
  text-align: center;
  width: 80px;
  font-weight: 700;
  font-size: 14px;
  color: #15803D;
}
.practice-key-table .key-text { color: #3A3A3A; }
.practice-key-table .key-tier {
  text-align: center;
  width: 60px;
  font-size: 11px;
  color: #767676;
  font-variant-numeric: tabular-nums;
}

/* Tier bars */
.wb-tier-grid { display: flex; flex-direction: column; gap: 6px; }
.wb-tier-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.wb-tier-row .tier-name { font-weight: 600; color: #3A3A3A; }
.wb-tier-row .tier-bar {
  height: 8px;
  background: #F0F0F0;
  border-radius: 4px;
  overflow: hidden;
  display: block;
}
.wb-tier-row .tier-bar .fill {
  display: block;
  height: 100%;
  background: #1F5C3D;
}
.wb-tier-row .tier-stat {
  font-size: 11px;
  color: #767676;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Skills list */
.wb-skill-list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 4px;
}
.wb-skill-list li {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 10px;
  background: #FAFAFA;
  border-left: 2px solid #C9A05C;
  border-radius: 0 3px 3px 0;
}
.wb-skill-list li.muted { background: transparent; border: none; color: #999; }
.wb-skill-list .skill-name { color: #0F0F0F; }
.wb-skill-list .skill-count { color: #767676; font-size: 11px; }

/* Topic cloud */
.wb-topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wb-topic-cloud .topic-pill {
  font-size: 11px;
  padding: 4px 10px;
  background: #FAF7EE;
  border: 1px solid #E4D4A8;
  border-radius: 12px;
  color: #3A3A3A;
}
.wb-topic-cloud .topic-pill .x {
  color: #1F5C3D;
  font-weight: 700;
  margin-left: 3px;
}
.wb-topic-cloud .muted { color: #999; font-size: 12px; }

/* Tutor's note (algorithmic evaluation) */
.wb-evaluation {
  margin-top: 22px;
  padding: 14px 18px;
  background: #FAF7EE;
  border-left: 3px solid #C9A05C;
  border-radius: 0 4px 4px 0;
}
.wb-evaluation .eval-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8B6F2A;
  margin-bottom: 6px;
}
.wb-evaluation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #0F0F0F;
}

/* Problem page body */
.wb-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1F5C3D;
  margin-bottom: 4px;
}
.wb-problem-num {
  font-size: 24px;
  font-weight: 700;
  color: #0F0F0F;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.wb-problem-meta {
  font-size: 12px;
  color: #767676;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E5E5E5;
}

.wb-passage {
  background: #FAF7EE;
  border-left: 3px solid #C9A05C;
  padding: 12px 16px;
  margin: 0 0 16px;
  border-radius: 0 4px 4px 0;
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.65;
}
.wb-passage:empty { display: none; }
.wb-stem {
  font-size: 14px;
  margin-bottom: 16px;
  white-space: pre-line;
  line-height: 1.65;
  color: #0F0F0F;
}

.wb-choices { margin-bottom: 22px; }
.wb-choice {
  padding: 9px 14px;
  border: 1px solid #DDD;
  border-radius: 5px;
  margin-bottom: 5px;
  display: grid;
  grid-template-columns: 22px 1fr 110px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  background: white;
}
.wb-choice .key { font-weight: 700; color: #3A3A3A; text-align: center; }
.wb-choice .text { color: #0F0F0F; }
.wb-choice .marker {
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #767676;
}
.wb-choice.your-pick { background: #FDF1F1; border-color: #B91C1C; }
.wb-choice.your-pick .key { color: #B91C1C; }
.wb-choice.your-pick .marker { color: #B91C1C; }
.wb-choice.correct { background: #F0FBF4; border-color: #15803D; }
.wb-choice.correct .key { color: #15803D; }
.wb-choice.correct .marker { color: #15803D; }
.wb-choice.both { background: #F0FBF4; border-color: #15803D; }
.wb-choice.both .key { color: #15803D; }
.wb-choice.both .marker { color: #15803D; }

/* Analysis sections inside problem page */
.wb-analysis { margin-top: 8px; }
.wb-analysis h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1F5C3D;
  margin: 18px 0 8px;
}
.wb-analysis h4:first-child { margin-top: 0; }
.wb-concept-line { font-size: 13px; color: #0F0F0F; margin-bottom: 6px; line-height: 1.6; }
.wb-concept-line strong { font-weight: 700; }

.wb-wrong-row {
  padding: 10px 14px;
  background: #FDF1F1;
  border-left: 3px solid #B91C1C;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  margin-bottom: 6px;
}
.wb-wrong-row .row-head {
  font-weight: 700; color: #B91C1C;
  margin-bottom: 4px; font-size: 13px;
}
.wb-wrong-row .field { margin-top: 6px; }
.wb-wrong-row .field-name {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #767676;
  margin-bottom: 2px;
}
.wb-wrong-row .field-text { color: #3A3A3A; line-height: 1.55; }

.wb-correct-row {
  background: #F0FBF4;
  border-left: 3px solid #15803D;
  border-radius: 0 4px 4px 0;
  padding: 12px 16px;
  font-size: 12px;
  margin-bottom: 6px;
}
.wb-correct-row .approach {
  margin-bottom: 6px; line-height: 1.55;
}
.wb-correct-row ol {
  margin: 4px 0 0 18px;
  padding: 0;
  font-size: 12px;
  line-height: 1.55;
}
.wb-correct-row li { margin-bottom: 3px; }

.wb-takeaway {
  margin-top: 14px;
  padding: 12px 16px;
  background: #FAF7EE;
  border-left: 3px solid #C9A05C;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #0F0F0F;
}
.wb-takeaway strong { font-weight: 700; }
.wb-drill { margin-top: 10px; font-size: 11px; color: #767676; }
.wb-drill strong { color: #3A3A3A; font-weight: 700; }

@media (max-width: 760px) {
  .results-view { padding: 18px 14px; }
  .results-summary { grid-template-columns: 1fr; padding: 18px 14px; }
  .results-score { border-right: none; border-bottom: 1px solid var(--dsat-line); padding-bottom: 16px; margin-bottom: 16px; }
  .tier-row { grid-template-columns: 80px 1fr 40px; }
}

@media (max-width: 880px) {
  .dsat { grid-template-columns: 1fr; padding: 20px 18px; }
  .stem { padding-right: 0; border-right: none; border-bottom: 1px solid var(--dsat-line); padding-bottom: 20px; margin-bottom: 20px; }
  .choices { padding-left: 0; }
  .viewer-meta { padding: 10px 18px; }
  .viewer-navbar { padding: 12px 18px; }
}
