/* Original results styles scoped to keep the question player and review intact. */
@scope (.results-page) {
:scope{--blue:var(--brand-primary);--blue-light:var(--brand-light);--blue-mid:var(--brand-secondary);font:16px/1.6 Inter,Arial,sans-serif;color:#333;background:#f5f6f8;min-height:100vh}
#results-content,#results-content *{box-sizing:border-box}
:where(#results-content,#results-content *){margin:0;padding:0}
/* Main */
.main-content { max-width: 1200px; margin: 0 auto; padding: 6rem 20px 3rem !important; }

/* ===== TOP BANNER ===== */
.top-banner {
  background: #fff; border-radius: 12px; padding: 1.5rem 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.banner-left h1 {
  font-family: 'Montserrat', sans-serif; font-size: 1.35rem; font-weight: 700; color: #1f2937; margin-bottom: 0.4rem;
}
.view-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--blue); color: #fff; padding: 0.55rem 1.25rem;
  border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.85rem;
  transition: opacity 0.2s; white-space: nowrap;
}
.view-btn:hover { opacity: 0.85; }

/* ===== THREE CARDS ROW ===== */
.cards-row {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 1.25rem;
}
.card {
  background: #fff; border-radius: 12px; padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card-title {
  font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 700;
  color: #1f2937; margin-bottom: 1rem;
}

/* Score — hero number + stat cards */
.perf-score-hero {
  text-align: center; padding: 1.5rem 0 1.25rem;
}
.perf-score-hero .score-value {
  font-family: 'Montserrat', sans-serif; font-size: 4.5rem; font-weight: 800; color: var(--brand-primary); line-height: 1;
}
.perf-score-hero .score-value small {
  font-size: 2.25rem; font-weight: 600; color: #9ca3af;
}
.perf-score-hero .score-label {
  font-size: 0.9rem; color: #6b7280; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; margin-top: 0.5rem;
}
.perf-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.perf-grid:has(> .p-box:nth-child(4)) {
  grid-template-columns: repeat(4, 1fr);
}
.perf-grid .p-box {
  border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 1rem 0.75rem; text-align: center;
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s cubic-bezier(0.16,1,0.3,1), border-color 0.2s;
  cursor: default;
}
.perf-grid .p-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb,var(--brand-primary) 8%,transparent);
  border-color: var(--brand-border);
}
.p-box { display: flex; flex-direction: column; justify-content: space-between; }
.p-box .p-label {
  font-size: 0.7rem; color: #6b7280; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 0.35rem;
  transition: color 0.2s;
}
.p-box .p-value { margin-top: auto; }
.perf-grid .p-box:hover .p-label { color: var(--brand-primary); }
.p-box .p-value {
  font-family: 'Montserrat', sans-serif; font-size: 1.4rem; font-weight: 800; color: #1f2937;
}
.p-box .p-value small { font-size: 0.8rem; font-weight: 600; color: #9ca3af; }
.p-box .p-value .ci-correct { color: #059669; }
.p-box .p-value .ci-incorrect { color: #dc2626; }
.p-box .p-value .ci-sep { color: #d1d5db; font-weight: 400; margin: 0 0.15rem; }

/* (see Time Analysis section below) */

/* ===== SECTION HEADING ===== */
.section-heading {
  font-family: 'Montserrat', sans-serif; font-size: 1.65rem; color: #1f2937;
  margin-bottom: 1.1rem; text-align: center; font-weight: 700;
  letter-spacing: -0.01em;
}

/* ===== PREDICTED PERCENTILE BANNER (overall, multi-section) ===== */
.pct-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: #fff; color: var(--brand-primary);
  border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 0.9rem 1.25rem; margin-bottom: 1.1rem;
}
.pct-banner-left { display: flex; flex-direction: column; gap: 0.2rem; }
.pct-banner-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: #6b7280;
}
.pct-banner-sub { font-size: 0.72rem; color: #9ca3af; }
.pct-banner-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem; font-weight: 800; color: var(--brand-primary); line-height: 1;
}
.pct-banner-value small { font-size: 0.8rem; color: #9ca3af; margin-left: 0.3rem; font-weight: 600; }
.pct-banner-meta { font-size: 0.72rem; color: #6b7280; margin-top: 0.2rem; }

/* Tabs */
.section-tabs {
  display: flex; justify-content: center; gap: 0; background: #f3f4f6;
  border-radius: 8px; padding: 4px; margin-bottom: 1.25rem; width: fit-content;
  margin-left: auto; margin-right: auto;
}
.section-tab {
  padding: 0.45rem 1.1rem; border-radius: 6px; border: none; background: transparent;
  font-size: 0.82rem; font-weight: 500; color: #6b7280; cursor: pointer;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.section-tab.active { background: #fff; color: #1f2937; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }


/* ===== TOPIC-WISE ANALYSIS ===== */
.topic-section {
  background: #fff; border-radius: 12px; padding: 1.5rem 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 1.25rem;
}
.topic-summary-stats {
  display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.topic-stat-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 500; }
.topic-stat-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 0.8rem;
}
/* Same palette as the review page's answer bubbles (.ra-qnum) and the
   Conceptual Coverage chips, so every correct/wrong/skipped marker on the
   page speaks one colour language. */
.topic-stat-num.green { background: #dcfce7; color: #15803d; }
.topic-stat-num.red { background: #fee2e2; color: #b91c1c; }
.topic-stat-num.amber { background: #f3f4f6; color: #6b7280; }

/* Topic table */
.topic-table-wrap { }
.topic-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.topic-table th {
  padding: 0.6rem 0.75rem; text-align: center; font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
}
.topic-table th:first-child { text-align: left; }
.topic-table thead th { position: sticky; top: var(--nav-h, 0px); background: #fff; z-index: 10; }
.topic-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.topic-table tr:last-child td { border-bottom: none; }
.topic-table tr.tt-total td { box-shadow: inset 0 2px 0 #e5e7eb; font-weight: 700; }

/* Topic name cell */
.tt-name {
  display: flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.85rem;
  color: #1f2937; cursor: pointer; user-select: none;
}
.tt-chevron {
  font-size: 0.65rem; color: #9ca3af; transition: transform 0.4s ease; display: inline-block; width: 14px;
}
.tt-chevron.open { transform: rotate(90deg); }
.tt-total-label { font-weight: 700; font-size: 0.85rem; color: #1f2937; padding-left: 18px; }

/* Readiness bars in each cell */
.tt-cell { text-align: center; }
.tt-readiness {
  display: inline-flex; align-items: center; gap: 6px; position: relative; cursor: default;
}
.tt-bars {
  display: flex; gap: 2px;
}
.tt-bar {
  width: 18px; height: 6px; border-radius: 2px; background: var(--brand-light); overflow: hidden; position: relative;
}
.tt-bar-fill {
  position: absolute; inset: 0; border-radius: 2px; transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
/* Tooltip on readiness bars */
.tt-readiness .tt-tip {
  visibility: hidden; opacity: 0; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); white-space: nowrap; z-index: 20;
  font-size: 0.72rem; color: #1f2937; pointer-events: none;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.tt-tip-header { font-weight: 600; font-size: 0.73rem; color: var(--brand-primary); padding-bottom: 6px; border-bottom: 1px solid var(--brand-light); margin-bottom: 4px; }
.tt-tip-table { border-collapse: collapse; font-size: 0.7rem; width: 100%; }
.tt-tip-table .tt-tip-head th { font-size: 0.6rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; padding: 0 6px 3px; text-align: right; }
.tt-tip-table .tt-tip-head th:first-child { text-align: left; padding-left: 0; }
.tt-tip-table td { padding: 1px 6px; line-height: 1.9; vertical-align: middle; text-align: right; font-variant-numeric: tabular-nums; }
.tt-tip-table td:first-child { text-align: left; padding-left: 0; padding-right: 12px; }
.tt-tip-table td .tt-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.tt-readiness .tt-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #fff;
}
.tt-readiness .tt-tip::before {
  content: ''; position: absolute; top: calc(100% + 1px); left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #e5e7eb;
}
.tt-readiness:hover .tt-tip { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }

/* Expandable chapter rows — hidden by default, shown when open */
.tt-chapter-row { display: none; }
.tt-chapter-row.open { display: table-row; }
.tt-chapter-row td {
  padding: 0.5rem 0.75rem; background: color-mix(in srgb, var(--brand-light) 45%, white); border-bottom: 1px solid var(--brand-light); vertical-align: middle;
}
.tt-chapter-row .tt-ch-inner {
  opacity: 1;
}
.tt-chapter-name {
  font-size: 0.8rem; font-weight: 500; color: #475569; padding-left: 1.5rem;
  display: block; word-break: break-word; overflow-wrap: break-word;
}

/* Harvey ball (circular progress) — weight only */
.harvey-cell { text-align: center; }
.harvey-wrap {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
}
.harvey-ball {
  width: 32px; height: 32px; position: relative;
}
.harvey-ball svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.harvey-ball .hb-track { fill: none; stroke: var(--brand-light); stroke-width: 3; }
.harvey-ball .hb-fill { fill: none; stroke: var(--brand-primary); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.5s cubic-bezier(0.16,1,0.3,1); }
.harvey-pct {
  font-size: 0.65rem; font-weight: 600; color: #475569; line-height: 1; white-space: nowrap;
}

/* Simple % pill for attempt & accuracy */
.tt-pct-pill {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.tt-pct-pill.pct-high { background: var(--brand-light); color: var(--brand-secondary); }
.tt-pct-pill.pct-mid  { background: var(--brand-light); color: #475569; }
.tt-pct-pill.pct-low  { background: #fff7ed; color: #9a3412; }
.tt-pct-pill.pct-none { background: color-mix(in srgb, var(--brand-light) 45%, white); color: #94a3b8; }


/* ===== SWOT ANALYSIS ===== */
.swot-section {
  background: #fff; border-radius: 12px; padding: 1.5rem 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 1.25rem;
}
.swot-wrapper { display: flex; gap: 10px; max-width: 780px; margin: 0 auto; }

/* Y-axis */
.swot-y-axis {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  width: 48px; flex-shrink: 0; margin-bottom: 36px; padding: 4px 0;
}
.swot-y-high, .swot-y-low {
  font-size: 0.6rem; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0;
}
.swot-y-mid {
  writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; flex: 1;
}
.swot-y-label {
  display: block; font-size: 0.85rem; font-weight: 700; color: var(--brand-primary); letter-spacing: 0.5px;
  white-space: nowrap;
}
.swot-y-sub {
  display: block; font-size: 0.65rem; color: #94a3b8; white-space: nowrap; margin-top: 4px;
}

.swot-body { flex: 1; min-width: 0; }

/* 2x2 quadrant grid */
.swot-grid {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--brand-light); border-radius: 10px; overflow: hidden;
  background: var(--brand-light); gap: 1px; height: 520px;
}
.swot-cell { padding: 1rem; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.swot-cell.sw-s { background: #f0fdf4; }
.swot-cell.sw-o { background: color-mix(in srgb, var(--brand-light) 45%, white); }
.swot-cell.sw-t { background: #fef2f2; }
.swot-cell.sw-w { background: #fffbeb; }

.swot-cell-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 0.6rem; margin-bottom: 0.6rem; border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.swot-cell-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; flex-shrink: 0;
}
.sw-s .swot-cell-icon { background: #bbf7d0; color: #15803d; }
.sw-o .swot-cell-icon { background: var(--brand-border); color: var(--brand-secondary); }
.sw-t .swot-cell-icon { background: #fecaca; color: #dc2626; }
.sw-w .swot-cell-icon { background: #fde68a; color: #b45309; }
.swot-cell-title { font-size: 0.95rem; font-weight: 700; color: var(--brand-primary); }
.swot-cell-desc { font-size: 0.65rem; color: #6b7280; margin-top: 2px; }

/* Topic items */
.swot-items { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #94a3b8 transparent; }
.swot-items::-webkit-scrollbar { width: 6px; }
.swot-items::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
.swot-items::-webkit-scrollbar-track { background: transparent; }
.swot-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: rgba(255,255,255,0.65); border-radius: 6px;
  cursor: pointer; user-select: none; flex-shrink: 0;
  transition: background 0.15s, box-shadow 0.15s;
}
.swot-item:not(.is-static):hover { background: rgba(255,255,255,0.9); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.swot-item.is-static { cursor: default; }
.swot-item-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sw-s .swot-item-dot { background: #16a34a; }
.sw-o .swot-item-dot { background: var(--brand-accent); }
.sw-t .swot-item-dot { background: #dc2626; }
.sw-w .swot-item-dot { background: #d97706; }
.swot-item-name { font-size: 0.76rem; font-weight: 600; color: #1f2937; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swot-item-val { width: 40px; text-align: left; font-size: 0.65rem; font-weight: 600; color: #475569; flex-shrink: 0; }
.swot-item-chev { font-size: 0.55rem; color: #64748b; flex-shrink: 0; width: 12px; text-align: center; transition: transform 0.15s, color 0.15s; }
.swot-item:hover .swot-item-chev { color: var(--brand-primary); transform: translateX(2px); }
.swot-empty { display: flex; align-items: center; justify-content: center; flex: 1; color: #94a3b8; font-size: 0.68rem; font-style: italic; }

/* Column headers */
.swot-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 3px; flex-shrink: 0;
}
.swot-col-dot-spacer { width: 7px; flex-shrink: 0; }
.swot-col-name-spacer { flex: 1; min-width: 0; }
.swot-col-lbl { width: 40px; text-align: left; font-size: 0.5rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; }
.swot-col-chev { width: 12px; flex-shrink: 0; }


/* X-axis */
.swot-x-axis {
  display: flex; align-items: center; justify-content: space-between; padding-top: 10px;
}
.swot-x-mid { text-align: center; flex: 1; }
.swot-x-label { font-size: 0.85rem; font-weight: 700; color: var(--brand-primary); letter-spacing: 0.5px; display: block; }
.swot-x-sub { font-size: 0.65rem; color: #94a3b8; display: block; margin-top: 4px; }
.swot-x-cue { font-size: 0.6rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }

@media (max-width: 600px) {
  .swot-grid { grid-template-columns: 1fr; grid-template-rows: repeat(4, auto); height: auto; }
  .swot-cell { min-height: 100px; }
  .swot-y-axis { display: none; }
}

/* ===== QUESTION PERFORMANCE ===== */
.qp-section {
  background: #fff; border-radius: 12px; padding: 1.5rem 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 1.25rem;
}
.qp-chart-wrap { margin-bottom: 1.5rem; }
.qp-chart-wrap canvas { width: 100% !important; height: 250px !important; }

/* Grouped chart */
.ta-chart-wrap {
  margin-top: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
}
.ta-chart-wrap::-webkit-scrollbar { height: 8px; }
.ta-chart-wrap::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
.ta-chart-wrap::-webkit-scrollbar-track { background: transparent; }
.ta-chart-wrap canvas { height: 380px !important; }
.ta-chart-inner { min-width: 100%; height: 380px; }

/* Time Analysis — legend + flags */
.ta-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1rem;
  font-size: 0.75rem; color: #6b7280;
}
.ta-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.ta-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.ta-flag-icon { color: #dc2626; font-size: 0.85rem; line-height: 1; }

.ta-flags-summary {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px;
  padding: 1rem 1.25rem; margin-top: 0.5rem;
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s;
}
.ta-flags-summary:hover {
  transform: translateY(-1px); box-shadow: 0 2px 8px rgba(220,38,38,0.08);
}
.ta-flags-title {
  font-size: 0.8rem; font-weight: 600; color: #991b1b; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.35rem;
}
.ta-flags-title .ta-flag-icon { font-size: 0.9rem; }
.ta-flags-list {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.ta-flag-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #fff; border: 1px solid #fecaca; border-radius: 6px;
  padding: 0.25rem 0.6rem; font-size: 0.7rem; font-weight: 500; color: #991b1b;
  transition: transform 0.15s cubic-bezier(0.16,1,0.3,1), box-shadow 0.15s;
  cursor: default;
}
.ta-flag-chip:hover {
  transform: translateY(-1px); box-shadow: 0 2px 6px rgba(220,38,38,0.1);
}
.ta-flag-chip .chip-time { color: #dc2626; font-weight: 600; }
.qp-legend {
  display: flex; justify-content: center; gap: 1.25rem; margin-bottom: 1rem;
  font-size: 0.75rem; color: #6b7280; flex-wrap: wrap;
}
.qp-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.qp-legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.qp-legend-dot.green { background: #059669; }
.qp-legend-dot.red { background: #dc2626; }
.qp-legend-dot.gray { background: #9ca3af; }

/* GitHub-style heatmap grid for 90 questions */
.section-questions { margin-bottom: 1rem; }
.section-header-label {
  font-size: 0.82rem; font-weight: 600; color: #1f2937; margin-bottom: 0.4rem;
  padding-bottom: 0.3rem; border-bottom: 1px solid #e5e7eb;
}
.compact-grid-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.compact-grid {
  display: grid; grid-template-columns: repeat(30, 18px); gap: 2px; width: max-content;
}
.cq {
  width: 18px; height: 18px; border-radius: 2px; display: flex; align-items: center;
  justify-content: center; cursor: default; position: relative;
  transition: outline 0.1s; font-size: 0;
}
.cq:hover { outline: 2px solid #1f2937; outline-offset: 0; z-index: 2; }
.cq.c-correct { background: #34d399; }
.cq.c-incorrect { background: #f87171; }
.cq.c-skipped { background: #e5e7eb; }
/* Tooltip on hover */
.cq .cq-tip {
  display: none; position: absolute; bottom: calc(100% + 5px); left: 50%;
  transform: translateX(-50%); background: #1f2937; color: #fff;
  padding: 3px 7px; border-radius: 4px; font-size: 0.6rem; font-weight: 500;
  white-space: nowrap; z-index: 10; pointer-events: none;
}
.cq .cq-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: #1f2937;
}
.cq:hover .cq-tip { display: block; }

/* ===== NEXT STEPS (bottom) ===== */
.next-steps-card {
  background: #fff; border-radius: 12px; padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center;
}
.next-steps-title { font-family: 'Montserrat', sans-serif; font-size: 1.15rem; font-weight: 700; color: #1f2937; margin-bottom: 1rem; }
.next-steps-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.next-step-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.15rem; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 0.85rem; transition: all 0.2s; min-width: 150px; justify-content: center;
}
.next-step-btn.primary { background: var(--blue); color: #fff; border: 1px solid var(--blue); }
.next-step-btn.primary:hover { opacity: 0.85; }
.next-step-btn.secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.next-step-btn.secondary:hover { background: var(--blue); color: #fff; }
.next-step-btn.retake { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.next-step-btn.retake:hover { background: var(--blue); color: #fff; }

/* No results */
.no-results { text-align: center; padding: 5rem 2rem; color: #888; }
.no-results h2 { color: #1f2937; margin-bottom: 0.75rem; font-family: 'Montserrat', sans-serif; }

/* Responsive */
@media (max-width: 768px) {
  .top-banner { padding: 1.25rem 1rem; }
  .banner-left h1 { font-size: 1.1rem; }
  .perf-grid { grid-template-columns: repeat(2, 1fr); }
  .perf-grid:has(> .p-box:nth-child(4)) { grid-template-columns: repeat(2, 1fr); }
  .next-steps-buttons { flex-direction: column; align-items: center; }
  .next-step-btn { width: 100%; max-width: 280px; min-width: auto; }
  .compact-grid { grid-template-columns: repeat(30, 16px); }
  .cq { width: 16px; height: 16px; }
  .topic-table { min-width: 480px; }
  .topic-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .section-heading { font-size: 1.35rem; }
  .card { padding: 1.25rem 1rem; }
}
@media (max-width: 640px) {
  .main-content { padding-left: 12px; padding-right: 12px; }
  .card { padding: 1rem 0.75rem; }
  .topic-section { padding: 1rem 0.75rem; }
  /* Topic table — all columns visible, horizontal scroll */
  .topic-table { table-layout: fixed !important; min-width: 680px; }
  .topic-table thead th { position: static !important; }
  .topic-table th, .topic-table td { padding: 0.5rem 0.4rem; }
  .topic-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tt-name { font-size: 0.78rem; }
  .tt-chapter-name { font-size: 0.72rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* SWOT — single column */
  .swot-wrap { flex-direction: column; }
  .swot-y-axis { display: none; }
  .swot-x-axis { display: none; }
  .swot-grid { grid-template-columns: 1fr; height: auto; }
  .swot-cell { max-height: 200px; padding: 0.6rem; }
  .swot-cell-icon { width: 28px; height: 28px; font-size: 0.85rem; }
  .swot-cell-title { font-size: 0.8rem; }
  .swot-cell-desc { display: none; }
  .swot-col-header { display: none; }
  .swot-item-val { display: none; }
  /* Time chart */
  .ta-chart-wrap canvas { height: 250px !important; }
  /* Compact grid — auto-fill to fit screen */
  .compact-grid { grid-template-columns: repeat(auto-fill, 18px); justify-content: center; }
}
@media (max-width: 480px) {
  .main-content { }
  .perf-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .perf-grid:has(> .p-box:nth-child(4)) { grid-template-columns: repeat(2, 1fr); }
  .perf-score-hero .score-value { font-size: 3rem; }
  .top-banner { padding: 1rem 0.75rem; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  .view-btn { font-size: 0.8rem; }
  .compact-grid { grid-template-columns: repeat(auto-fill, 14px); }
  .cq { width: 14px; height: 14px; font-size: 0.5rem; }
}

/* ===== Conceptual coverage ===== */
#coverage-section { position: relative; }
.cov-review-top { position: absolute; top: 1.25rem; right: 1.25rem; }
@media (max-width: 640px) {
  .cov-review-top { position: static; display: inline-flex; margin-bottom: 0.75rem; }
}
.cov-subtitle { text-align: center; font-size: 0.85rem; color: #6b7280; margin: -0.5rem 0 1.25rem; }
.cov-table-wrap { overflow-x: auto; }
.cov-table { width: 100%; border-collapse: collapse; min-width: 860px; table-layout: fixed; }
.cov-table th {
  padding: 0.4rem 0.6rem; font-size: 0.66rem; font-weight: 600; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #e5e7eb;
  text-align: left;
}
.cov-table th.cov-th-res { width: 25%; }
.cov-table td {
  padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--brand-light);
  vertical-align: top; text-align: left;
}
.cov-table tr:last-child td { border-bottom: none; }
.cov-res-name { font-weight: 600; font-size: 0.82rem; color: #1f2937; }
.cov-topic-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font: 600 0.82rem/1.4 inherit; font-family: inherit; color: #1f2937;
  text-align: left;
}
.cov-topic-btn:hover { color: var(--brand-primary); }
.cov-topic-btn:hover .cov-chev { color: var(--brand-primary); }
.cov-chev { font-size: 0.55rem; color: #94a3b8; transition: color 0.15s; }
.cov-none { color: #d1d5db; font-size: 0.8rem; line-height: 32px; }
/* Fixed mini-grid: uniform bubbles, top-left aligned, wraps every 6 */
.cov-chips { display: grid; grid-template-columns: repeat(6, 32px); gap: 11px; justify-content: start; }
/* Stacked outcome mini-grids within a cell (incorrect / skipped / correct) */
.cov-chips + .cov-chips { margin-top: 13px; }
/* Chips — fill carries the outcome (the review palette's pastels), a halo
   ring outside the pastel border carries coverage:
     navy ring             → BluePrint Notes
     light blue ring       → Flashcards (the bookmark-active blue, #a3c4e8)
     half-and-half ring    → both
   Uncovered chips wear no ring but stay clickable (question + solution
   still open in the overlay). */
.cov-chip {
  position: relative;
  width: 32px; height: 32px;
  border: 1.5px solid var(--brand-light); border-radius: 50%;
  background: #fff; font-size: 0.72rem; font-weight: 600; color: #94a3b8;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: inherit; padding: 0;
}
.cov-chip.correct { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
.cov-chip.correct:hover { background: #bbf7d0; border-color: #86efac; }
.cov-chip.incorrect { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.cov-chip.incorrect:hover { background: #fecaca; border-color: #fca5a5; }
.cov-chip.skipped { background: #f3f4f6; border-color: #e5e7eb; color: #6b7280; }
.cov-chip.skipped:hover { background: #e5e7eb; border-color: #d1d5db; }
/* Coverage halo — border-drawn rings (crisp at 1x, unlike masked gradients);
   the both-ring is two half-borders split down the middle with clip-path. */
.cov-chip.ring-notes::before, .cov-chip.ring-fc::before,
.cov-chip.ring-both::before, .cov-chip.ring-both::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2.5px solid transparent; pointer-events: none;
}
.cov-chip.ring-notes::before { border-color: var(--brand-primary); }
.cov-chip.ring-fc::before { border-color: var(--brand-border); }
.cov-chip.ring-both::before { border-color: var(--brand-primary); clip-path: inset(0 50% 0 0); }
.cov-chip.ring-both::after { border-color: var(--brand-border); clip-path: inset(0 0 0 50%); }
/* Legend — coverage cluster | badge cluster, divided structurally:
   tight gaps inside a cluster, a hairline divider and wide gap between */
.cov-legend {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.5rem 1.25rem; margin: 0 0 1.1rem; font-size: 0.72rem; color: #475569;
}
.cov-leg-group {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 0.4rem 0.9rem;
}
.cov-leg-sep { width: 1px; height: 16px; background: var(--brand-light); }
@media (max-width: 900px) { .cov-leg-sep { display: none; } }
.cov-leg-item { display: inline-flex; align-items: center; gap: 6px; }
/* Ring swatches: border-drawn like the chip halos, so they stay crisp */
.cov-leg-ring { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; position: relative; }
.cov-leg-ring-notes { border: 3px solid var(--brand-primary); }
.cov-leg-ring-fc { border: 3px solid var(--brand-border); }
.cov-leg-ring-both::before, .cov-leg-ring-both::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent;
}
.cov-leg-ring-both::before { border-color: var(--brand-primary); clip-path: inset(0 50% 0 0); }
.cov-leg-ring-both::after { border-color: var(--brand-border); clip-path: inset(0 0 0 50%); }
/* Outcome swatches: the chip pastels */
.cov-leg-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.cov-leg-correct { background: #dcfce7; border: 1.5px solid #bbf7d0; }
.cov-leg-incorrect { background: #fee2e2; border: 1.5px solid #fecaca; }
.cov-leg-skipped { background: #f3f4f6; border: 1.5px solid #e5e7eb; }
#cov-tip {
  position: fixed; z-index: 1100; max-width: 320px; pointer-events: none;
  background: #fff; border: 1px solid var(--brand-light); border-radius: 10px;
  box-shadow: 0 8px 24px color-mix(in srgb,var(--brand-primary) 14%,transparent);
  padding: 0.6rem 0.75rem; font-size: 0.75rem; line-height: 1.5; color: #334155;
}
#cov-tip p { margin: 0 0 0.35rem; }
#cov-tip p:last-child { margin-bottom: 0; }
#cov-tip .katex { font-size: 1.05em; }
#cov-tip .katex-display { margin: 0.25rem 0; }
/* Overlay hosting the review block */
.cov-overlay {
  position: fixed; inset: 0; background: color-mix(in srgb,var(--brand-primary) 45%,transparent); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.cov-overlay-card {
  position: relative; background: #fff; border-radius: 16px;
  max-width: 780px; width: 100%; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px color-mix(in srgb,var(--brand-primary) 35%,transparent); -webkit-overflow-scrolling: touch;
}
.cov-ov-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 10px 12px 0; pointer-events: none;
}
.cov-overlay-close {
  width: 32px; height: 32px; border-radius: 50%; border: none; flex-shrink: 0;
  background: #fff; color: #64748b; font-size: 1.25rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto; box-shadow: 0 1px 5px color-mix(in srgb,var(--brand-primary) 20%,transparent);
}
.cov-overlay-close:hover { color: var(--brand-primary); background: var(--brand-light); }
.cov-overlay-body { padding: 0.75rem 1.25rem 1.25rem; font-family: 'BDO Grotesk VF', 'Inter', sans-serif; }
.cov-overlay-body .ra-panel { margin-top: 1rem; }
.cov-ov-passage { max-height: 16rem; overflow-y: auto; }
/* Answer & Solution expander — collapsed by default */
.cov-answer { margin-top: 1.1rem; border: 1px solid #d8dee7; border-radius: 12px; background: #fff; }
.cov-answer summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 0.8rem 1rem; font-weight: 700; font-size: 0.85rem; color: var(--brand-primary);
}
.cov-answer summary::-webkit-details-marker { display: none; }
.cov-answer-chev i { transition: transform 0.2s; font-size: 0.7rem; color: #64748b; }
.cov-answer[open] .cov-answer-chev i { transform: rotate(180deg); }
.cov-answer-body { padding: 0 1rem 1rem; }
.cov-answer-verdict { font-size: 0.85rem; color: #1f2937; margin-bottom: 0.5rem; }
.cov-answer-verdict strong { color: #059669; }
@media (max-width: 640px) {
  .cov-overlay { padding: 0.5rem; }
  .cov-overlay-body { padding: 0 0.75rem 1rem; }
}

.main-content{padding-top:40px!important}
.banner-left h1{margin-bottom:6.4px}.section-heading{line-height:.95}
.result-percentile-note{margin-top:13.6px!important;font-size:11.2px;color:#94a3b8;line-height:1.5}
.perf-score-hero .score-label{margin-bottom:0}
.topic-table{font-size:13px}.tt-name{border:0;background:none;text-align:left;padding:0;font-family:Inter,Arial;line-height:1.6}.tt-readiness:focus .tt-tip{visibility:visible;opacity:1;transform:translateX(-50%) translateY(0)}
.tt-chapter-row.open .tt-ch-inner,.tt-chapter-row.open>td{animation:result-chapter-in .28s ease both}
.result-mode-toggle{display:flex;justify-content:center;gap:4px;background:color-mix(in srgb, var(--brand-light) 60.00%, transparent);padding:4px;border-radius:8px;width:max-content;margin:0 auto 16px!important}.result-mode-toggle button{border:0;background:transparent;color:#64748b;font:500 12px/1 BDO,Arial;padding:0 13.6px;height:28px;border-radius:6px}.result-mode-toggle button.is-active{background:white;color:var(--brand-primary);font-weight:600;box-shadow:0 1px 2px color-mix(in srgb, var(--brand-primary) 7.84%, transparent)}
.result-state-row{display:flex;justify-content:center;align-items:center;margin:-4px 0 12px!important;min-height:24px;color:#94a3b8;font:500 11.2px/1.4 BDO,Arial;letter-spacing:.02em}.result-state-row button{border:0;background:none;color:#64748b;font:500 12px/1.4 BDO,Arial;padding:4px 8px}.result-state-row strong{color:var(--brand-primary)}.result-state-row button span{color:#94a3b8}
.swot-grid{margin-top:0!important}.swot-item{border:0;width:100%;font-family:Inter;text-align:left}.swot-item-name{white-space:nowrap}.swot-item-val{margin:0!important}.swot-item:focus-visible{outline:2px solid var(--brand-accent);outline-offset:-2px}
.cov-table{font-size:13px}.cov-topic-btn{font:600 13.12px/1.4 Inter,Arial}.cov-chips{padding:4px 0!important}.cov-chip{box-shadow:none!important}.cov-subtitle{margin:-8px 0 20px!important}.cov-legend{line-height:1.5}.ta-chart-wrap{padding-top:4px!important}.time-chart{display:block;min-width:100%;height:380px}.time-group-label{cursor:pointer}.time-question:hover rect:first-child{filter:brightness(.88)}.time-question:focus rect:first-child{stroke:var(--brand-primary);stroke-width:2}.time-target-line{display:inline-block;width:18px;border-top:1.5px dashed color-mix(in srgb, var(--brand-primary) 45.10%, transparent)}.time-average-line{display:inline-block;width:18px;border-top:2px solid var(--brand-primary)}.result-history{text-align:center;font-size:12px;color:#94a3b8;margin-top:24px!important}.result-history select{margin-left:8px;border:1px solid var(--brand-light);background:white;border-radius:6px;padding:7px;color:#64748b}
.result-content-enter{animation:result-content-in .28s ease both}.section-tab:hover{color:var(--brand-primary);background:#ffffff80}.view-btn:focus-visible,.next-step-btn:focus-visible{outline:2px solid var(--brand-accent);outline-offset:3px}.next-step-btn.primary{padding:8.8px 18.4px;background:var(--brand-primary);color:white;font-size:13.6px}
}
@font-face{font-family:Montserrat;src:url('https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
html.lenis,html.lenis body{height:auto}.lenis.lenis-smooth{scroll-behavior:auto!important}.lenis.lenis-stopped{overflow:hidden}.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.cov-overlay{position:fixed;inset:0;background:color-mix(in srgb, var(--brand-primary) 45.10%, transparent);z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px;animation:result-content-in .18s ease}.cov-overlay-card{position:relative;background:#fff;border-radius:16px;max-width:780px;width:100%;max-height:88vh;overflow:auto;box-shadow:0 20px 60px color-mix(in srgb, var(--brand-primary) 34.90%, transparent);overscroll-behavior:contain}.cov-ov-head{position:sticky;top:0;z-index:5;display:flex;justify-content:flex-end;padding:10px 12px 0;pointer-events:none}.cov-overlay-close{width:32px;height:32px;border-radius:50%;border:0;background:#fff;color:#64748b;font-size:20px;pointer-events:auto;box-shadow:0 1px 5px color-mix(in srgb, var(--brand-primary) 20.00%, transparent)}.cov-overlay-body{padding:12px 20px 20px;font-family:BDO,Inter,Arial;line-height:1.6}.cov-ov-passage{max-height:256px}.cov-answer{margin-top:18px;border:1px solid #d8dee7;border-radius:12px;background:white}.cov-answer summary{list-style:none;cursor:pointer;display:flex;gap:8px;align-items:center;padding:13px 16px;font-size:13.6px;font-weight:700;color:var(--brand-primary)}.cov-answer-body{padding:0 16px 16px}.cov-answer-verdict{font-size:13.6px;color:#1f2937}.cov-answer-verdict strong{color:#059669}.cov-answer-chev{transition:transform .2s}.cov-answer[open] .cov-answer-chev{transform:rotate(180deg)}
#cov-tip{position:fixed;z-index:1100;max-width:320px;pointer-events:none;background:white;border:1px solid var(--brand-light);border-radius:10px;box-shadow:0 8px 24px color-mix(in srgb, var(--brand-primary) 14.12%, transparent);padding:10px 12px;font:12px/1.5 Inter,Arial;color:#334155}#cov-tip p{margin:6px 0}#cov-tip small{color:#94a3b8}
@keyframes result-content-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes result-chapter-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.results-page *,.cov-overlay{transition:none!important;animation:none!important}.results-page .p-box:hover{transform:none!important}}

.results-page .pyq-nav{font-family:BDO,Inter,Arial,sans-serif}@scope (.results-page){.banner-left h1{line-height:.95}.section-tabs{margin-bottom:17.6px}.card>.section-tabs{margin-bottom:16px}}
@scope (.results-page){:scope{--nav-h:57px}}
