:root {
  --quiz-max: 1280px;
  --glass: rgba(0, 0, 0, 0.18);
  --glass-soft: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.10);
  --text-soft: var(--text, rgba(255, 255, 255, 0.78));
  --text-muted: var(--muted, rgba(255, 255, 255, 0.60));
  --chart-grad-start: #d7a03b;
  --chart-grad-end: #2f8ca1;
  --chart-1: #2f6b92;
  --chart-2: #d28a2e;
  --chart-3: #5a8f55;
  --chart-4: #8b5fbf;
  --chart-5: #c45454;
  --chart-6: #2f8e9c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 28px 16px 42px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 45% 0%, rgba(150,130,255,0.18), transparent 60%),
              radial-gradient(900px 600px at 80% 10%, rgba(126,231,255,0.12), transparent 55%),
              radial-gradient(900px 700px at 10% 40%, rgba(255,212,138,0.10), transparent 55%),
              var(--bg, #059e4f);
  color: var(--text, #fff);
}

.quiz-shell {
  max-width: var(--quiz-max);
  margin: 0 auto;
}

.topnav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 18px 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
}

.topnav a {
  color: var(--text, rgba(255, 255, 255, 0.92));
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text, #fff);
}

.hero-card,
.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-kicker,
.section-kicker {
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.hero-card h1,
.question-head h2,
.review-head h2,
.results-panel h2,
.results-panel h3,
.insight-card h3,
.mini-card h3 {
  margin-top: 0;
}

.hero-card h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}

.hero-copy,
.summary-text,
.identity-note,
.small-note,
.muted,
.mini-card p,
.mini-card li,
.meaning-note,
#benchmarkList p,
#detailBars p,
#reviewList p {
  color: var(--text-soft);
  line-height: 1.68;
}

.hero-stats {
  display: grid;
  gap: 12px;
}

.hero-stats article {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.14);
}

.hero-stats strong {
  display: block;
  font-size: 24px;
  margin-bottom: 6px;
}

.identity-card,
.section-card,
.question-card,
.review-card,
.results-panel,
.mini-card,
.insight-card {
  padding: 18px;
}

.identity-card {
  margin-bottom: 18px;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.identity-grid label {
  display: grid;
  gap: 8px;
}

.identity-grid span,
.review-row strong,
.matrix-cell strong,
.bar-label span:first-child {
  font-weight: 600;
}

.identity-grid input,
.identity-grid select,
.action-row button,
.review-actions button,
.download-zone button,
.scale-button,
.stack-buttons button {
  font: inherit;
}

.identity-grid input,
.identity-grid select,
.stack-buttons button,
.action-row button,
.review-actions button,
.download-zone button {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text, #fff);
}

.identity-grid option {
  color: #111;
}

.quiz-layout,
.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.question-column,
.side-rail {
  display: grid;
  gap: 18px;
}

.section-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-pill,
.tag,
.pdf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.16);
  color: var(--text, rgba(255, 255, 255, 0.94));
  font-size: 13px;
}

.section-pill.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}

.question-head,
.review-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.progress-wrap {
  min-width: 220px;
  flex: 0 0 260px;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}

.progress-track > span,
.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--chart-grad-start, rgba(255, 212, 138, 0.96)), var(--chart-grad-end, rgba(126, 231, 255, 0.96)));
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.question-text {
  margin: 22px 0;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.48;
  color: var(--text, rgba(255, 255, 255, 0.98));
  min-height: 90px;
}

.question-text.fade {
  animation: questionFade 180ms ease;
}

@keyframes questionFade {
  from { opacity: 0.5; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.scale-button {
  min-height: 88px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text, #fff);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.scale-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.20);
}

.scale-button.active {
  background: rgba(255, 255, 255, 0.50);
  border-color: rgba(255, 255, 255, 0.34);
  outline: 2px solid rgba(255, 255, 255, 0.20);
}

.scale-button strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.scale-button small {
  display: block;
  color: var(--text-soft);
  line-height: 1.35;
}

.action-row,
.review-actions,
.stack-buttons,
.download-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.action-row button,
.review-actions button,
.stack-buttons button,
.download-zone button {
  width: auto;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.action-row button:hover,
.review-actions button:hover,
.stack-buttons button:hover,
.download-zone button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
}

button.primary {
  background: rgba(255, 255, 255, 0.12);
}

button.emphasis {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
}

.action-row #prevBtn,
.action-row #nextBtn {
  background: rgba(0, 0, 0, 0.18) !important;
  color: var(--text, #fff) !important;
  border: 1px solid var(--line-soft) !important;
  box-shadow: none !important;
}

.score-preview,
#detailBars,
#meaningBars,
#benchmarkList,
.matrix-grid,
.review-list {
  display: grid;
  gap: 10px;
}

.bar-wrap,
.detail-row,
.review-row,
.matrix-cell,
.benchmark-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.12);
  padding: 12px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--text, rgba(255, 255, 255, 0.96));
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}

.review-row {
  display: grid;
  gap: 8px;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.review-row button {
  justify-self: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, white);
  cursor: pointer;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.results-area {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.primary-results {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.secondary-results,
.tertiary-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

canvas {
  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--line-soft);
  margin-bottom: 12px;
}

.matrix-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.matrix-cell strong {
  display: block;
  margin-bottom: 6px;
}

.hidden {
  display: none !important;
}

.hidden-render {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 794px;
}

.pdf-page {
  width: 794px;
  min-height: 1123px;
  box-sizing: border-box;
  padding: 44px;
  background: #fff;
  color: #111;
  --text: #17212b;
  --muted: #667286;
  --text-soft: #3c4758;
  --text-muted: #667286;
  --line: rgba(17, 24, 39, 0.14);
  --line-soft: rgba(17, 24, 39, 0.12);
  --glass: rgba(15, 23, 42, 0.03);
  --glass-soft: rgba(15, 23, 42, 0.025);
  --glass-strong: rgba(15, 23, 42, 0.05);
  --chart-grad-start: #c48a2c;
  --chart-grad-end: #2f8ca1;
  --chart-1: #2f6b92;
  --chart-2: #d28a2e;
  --chart-3: #5a8f55;
  --chart-4: #8b5fbf;
  --chart-5: #c45454;
  --chart-6: #2f8e9c;
  font: 14px/1.55 Inter, Arial, sans-serif;
  position: relative;
}

.pdf-page h1,
.pdf-page h2,
.pdf-page h3 {
  margin: 0 0 10px 0;
  color: #111;
}

.pdf-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #5d6170;
  margin-bottom: 10px;
}

.pdf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pdf-pill {
  color: #1f2430;
  border-color: #d7dbe3;
  background: #f5f7fb;
}

.pdf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pdf-card {
  border: 1px solid #dfe4ec;
  border-radius: 16px;
  padding: 14px;
  background: #cfcfe6;
}

.pdf-canvas {
  width: 100%;
  display: block;
  border: 1px solid #e0e5ed;
  border-radius: 14px;
  margin-top: 6px;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 12px;
}

.pdf-table th,
.pdf-table td {
  border: 1px solid #dce2ea;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.pdf-table th {
  background: #f3f6fb;
}

.pdf-quote {
  border-left: 4px solid #8e9aad;
  padding-left: 12px;
  color: #394150;
  margin: 10px 0 16px;
}

.pdf-page .hero-copy,
.pdf-page .summary-text,
.pdf-page .identity-note,
.pdf-page .small-note,
.pdf-page .muted,
.pdf-page .mini-card p,
.pdf-page .mini-card li,
.pdf-page .meaning-note,
.pdf-page #benchmarkList p,
.pdf-page #detailBars p,
.pdf-page #reviewList p,
.pdf-page .review-answer-text,
.pdf-page .review-question,
.pdf-page .question-text,
.pdf-page .bar-label,
.pdf-page .progress-meta,
.pdf-page .preview-title,
.pdf-page .review-table th,
.pdf-page .hero-kicker,
.pdf-page .section-kicker {
  color: var(--text-soft);
}

.pdf-page .hero-card,
.pdf-page .panel-card,
.pdf-page .question-card,
.pdf-page .review-card,
.pdf-page .results-panel,
.pdf-page .mini-card,
.pdf-page .insight-card,
.pdf-page .identity-card,
.pdf-page .section-card,
.pdf-page .bar-wrap,
.pdf-page .detail-row,
.pdf-page .review-row,
.pdf-page .matrix-cell,
.pdf-page .benchmark-item,
.pdf-page .review-table-wrap {
  background: #add8e6;
  border-color: #dce3eb;
  box-shadow: none;
}

.pdf-page .hero-stats article,
.pdf-page .section-pill,
.pdf-page .tag,
.pdf-page .review-indicator,
.pdf-page .review-row button,
.pdf-page .review-table button,
.pdf-page .identity-grid input,
.pdf-page .identity-grid select,
.pdf-page .stack-buttons button,
.pdf-page .action-row button,
.pdf-page .review-actions button,
.pdf-page .download-zone button {
  background: #add8e6;
  color: var(--text);
  border-color: #d7dfe8;
  box-shadow: none;
}

.pdf-page .progress-track,
.pdf-page .bar {
  background: #add8e6;
  border-color: #d7dfe8;
}

.pdf-page .progress-track > span,
.pdf-page .bar > span {
  background: linear-gradient(90deg, #c48a2c, #2f8ca1);
}

.pdf-page canvas,
.pdf-page .pdf-canvas {
  background: #5d38e6;
  border-color: #dce3eb;
}

.pdf-page .review-table tbody tr:hover {
  background: #f5f7fb;
}


.pdf-footer {
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6d7482;
}

@media (max-width: 1040px) {
  .quiz-layout,
  .results-grid,
  .primary-results,
  .secondary-results,
  .tertiary-results,
  .insight-grid,
  .hero-card {
    grid-template-columns: 1fr;
  }

  .identity-grid,
  .matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    padding: 18px 10px 32px;
  }

  .identity-grid,
  .scale-grid,
  .matrix-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .question-text {
    min-height: auto;
  }

  .progress-wrap {
    min-width: 100%;
    flex-basis: 100%;
  }
}


.preview-section {
  display: grid;
  gap: 10px;
}

.preview-title {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 2px 0 2px;
}

.review-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.12);
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.review-table th,
.review-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  text-align: left;
}

.review-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.review-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.review-q {
  font-weight: 700;
  white-space: nowrap;
}

.review-question {
  min-width: 320px;
  color: var(--text, rgba(255,255,255,0.94));
}

.review-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  margin-right: 10px;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
}

.review-answer-text {
  color: var(--text-soft);
  white-space: nowrap;
}

.review-indicator.level-1 { background: rgba(255,255,255,0.04); }
.review-indicator.level-2 { background: rgba(255,255,255,0.08); }
.review-indicator.level-3 { background: rgba(255,255,255,0.12); }
.review-indicator.level-4 { background: rgba(255,255,255,0.16); }
.review-indicator.level-5 { background: rgba(255,255,255,0.22); }

.review-table button {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.06);
  color: var(--text, #fff);
  cursor: pointer;
}

.review-table button:hover {
  background: rgba(255,255,255,0.10);
}
