/* ── Test pages ─────────────────────────────────────────────────── */
.test-body { background: var(--ink); }

.test-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7,11,18,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 2rem;
}

.test-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.test-header__meta { text-align: center; }

.test-main { min-height: 100vh; padding-bottom: 6rem; }

/* ── Part intro ─────────────────────────────────────────────────── */
.part-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Scale legend ───────────────────────────────────────────────── */
.scale-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: .75rem 1.5rem;
  background: var(--ghost);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.scale-legend__dots {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.scale-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brass);
  opacity: 0.3;
}

/* ── Question Row (Part A - Likert) ─────────────────────────────── */
.question-row {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  align-items: flex-start;
}

.question-row--flagged { background: rgba(212,168,67,.04); border-radius: 4px; }

.question-row__num {
  min-width: 32px;
  font-size: .75rem;
  padding-top: .25rem;
  letter-spacing: .05em;
}

.question-row__body { flex: 1; }

.question-row__text {
  color: var(--smoke);
  margin-bottom: 1rem;
  font-size: .95rem;
  line-height: 1.5;
}

/* ── Likert ─────────────────────────────────────────────────────── */
.likert {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.likert--block {
  flex-direction: row;
  gap: .5rem;
}

.likert__opt {
  position: relative;
  cursor: pointer;
}

.likert__opt input { position: absolute; opacity: 0; width: 0; height: 0; }

.likert__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--slate);
  background: var(--ghost);
  transition: all var(--dur-fast);
}

.likert__opt:hover .likert__btn,
.likert__opt:focus-within .likert__btn {
  border-color: var(--brass);
  color: var(--brass);
}

.likert__opt--selected .likert__btn {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
  font-weight: 700;
}

.likert__label {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--slate);
  opacity: 0;
  transition: opacity var(--dur-fast);
  pointer-events: none;
  background: var(--vault);
  padding: .2rem .4rem;
  border-radius: 2px;
  z-index: 10;
}

.likert__opt:hover .likert__label,
.likert__opt--selected .likert__label {
  opacity: 1;
}

/* ── Question Block (Part B) ────────────────────────────────────── */
.question-block {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.question-block__num {
  font-size: .72rem;
  letter-spacing: .08em;
  margin-bottom: .75rem;
  color: var(--brass);
}

.question-block__research-notice {
  margin-bottom: .5rem;
}

.question-block__text {
  color: var(--smoke);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* ── Multiple Choice ─────────────────────────────────────────────── */
.choice-options {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.choice-opt {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.choice-opt input { position: absolute; opacity: 0; width: 0; height: 0; }

.choice-opt:hover {
  border-color: rgba(212,168,67,.3);
  background: rgba(212,168,67,.04);
}

.choice-opt--selected {
  border-color: var(--brass);
  background: rgba(212,168,67,.08);
}

.choice-opt__letter {
  min-width: 24px;
  font-size: .8rem;
  color: var(--brass);
  font-weight: 700;
  padding-top: .05rem;
}

.choice-opt__text {
  color: var(--smoke);
  font-size: .95rem;
  line-height: 1.5;
}

/* ── Form submit ─────────────────────────────────────────────────── */
.form-submit {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ── Intro page ─────────────────────────────────────────────────── */
.intro-page { background: var(--ink); }

.intro__features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 2rem 0;
}

.intro__feature {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--ghost);
}

.intro__feature-icon { font-size: 1.2rem; padding-top: .1rem; }

.intro__step-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intro__step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  color: var(--slate);
  font-size: .95rem;
  line-height: 1.6;
}

.intro__note {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(46,255,192,.15);
  border-radius: 3px;
  background: rgba(46,255,192,.04);
  margin: 1.5rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   REPORT CSS
   ═══════════════════════════════════════════════════════════════ */
.report-body { background: var(--ink); }

.print-header {
  display: none;
  justify-content: space-between;
  padding: .5rem 2rem;
  border-bottom: 1px solid #ccc;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: #555;
}

/* ── Report Cover ────────────────────────────────────────────────── */
.report-cover {
  padding: 9rem 0 6rem;
  background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(14,26,38,.9) 0%, var(--ink) 70%);
  border-bottom: 1px solid var(--border);
}

.arch-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 640px;
}

.arch-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.arch-list li {
  display: flex;
  gap: .6rem;
  font-size: .9rem;
  color: var(--smoke);
}

.t-sienna { color: var(--sienna); }

/* ── Report Sections ─────────────────────────────────────────────── */
.report-section { padding: 5rem 0; }

.report-section__title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--smoke);
  margin-bottom: .75rem;
}

.report-section .report-section__title { color: var(--smoke); }
.section-light .report-section__title  { color: var(--ink); }

.report-section__sub {
  color: var(--slate);
  font-size: .95rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ── Overview ────────────────────────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.radar-svg { width: 100%; max-width: 260px; display: block; margin: 0 auto; }

.radar-label {
  fill: var(--slate);
  font-family: var(--font-mono);
  font-size: 9px;
}

.radar-user-poly {
  animation: radar-in 1.2s cubic-bezier(.16,1,.3,1) both;
}

@keyframes radar-in {
  from { opacity: 0; transform: scale(.4); transform-origin: 100px 100px; }
  to   { opacity: 1; transform: scale(1); }
}

.overview-bars { display: flex; flex-direction: column; gap: 2rem; }

.overview-bars__group { }

.overview-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}

.overview-bar__name {
  min-width: 140px;
  font-size: .82rem;
  color: var(--slate);
}

.overview-bar__track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.05);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}

.overview-bar__center {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,.2);
}

.overview-bar__fill {
  height: 6px;
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 0;
  transition: width 1s var(--ease-out);
}

.overview-bar__label {
  min-width: 88px;
  font-size: .72rem;
  text-align: right;
}

/* ── Trait Blocks ────────────────────────────────────────────────── */
.trait-block {
  padding: 2.5rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: white;
  margin-bottom: 1.25rem;
}

.trait-block__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.trait-block__score {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.trait-block__intro {
  font-size: .9rem;
  font-style: italic;
  margin-bottom: .75rem;
  line-height: 1.6;
  color: #666;
}

.trait-block__body {
  color: #333;
  line-height: 1.75;
}

/* ── Bias Blocks ─────────────────────────────────────────────────── */
.bias-group {
  margin-bottom: 3.5rem;
}

.bias-group__name {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.bias-block {
  padding: 2rem;
  background: var(--ghost);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.bias-block--flagged {
  border-color: rgba(201,95,58,.3);
  background: rgba(201,95,58,.04);
}

.bias-block__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.bias-block__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}

.bias-block__title {
  font-size: 1.35rem;
  color: var(--smoke);
}

.bias-block__score-wrap {
  min-width: 100px;
  text-align: center;
  flex-shrink: 0;
}

/* Gauge */
.gauge {
  width: 100px;
  height: 55px;
  display: block;
  margin: 0 auto;
}

.gauge__track {
  fill: none;
  stroke: rgba(255,255,255,.08);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 157;
  stroke-dashoffset: 0;
}

.gauge__fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  transition: stroke-dashoffset 1.4s cubic-bezier(.16,1,.3,1);
}

.bias-block__intro {
  color: var(--slate);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.bias-block__intro p { margin-bottom: .75rem; }

.bias-block__advice {
  padding: 1.25rem;
  background: rgba(212,168,67,.05);
  border-left: 2px solid var(--brass);
  border-radius: 0 3px 3px 0;
}

.bias-block__points {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  counter-reset: bias-pts;
}

.bias-block__points li {
  display: flex;
  gap: .75rem;
  font-size: .9rem;
  color: var(--smoke);
  line-height: 1.6;
  counter-increment: bias-pts;
}

.bias-block__points li::before {
  content: counter(bias-pts) ".";
  font-family: var(--font-mono);
  color: var(--brass);
  font-size: .75rem;
  min-width: 18px;
  padding-top: .1rem;
}

/* ── Next Steps ──────────────────────────────────────────────────── */
.next-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.next-step {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--ghost);
}

.next-step > span {
  font-size: 1.1rem;
  font-weight: 700;
  padding-top: .1rem;
  min-width: 28px;
}

/* ── Report Footer ───────────────────────────────────────────────── */
.report-footer {
  padding: 3rem 2rem;
  background: var(--vault);
  border-top: 1px solid var(--border);
}

/* ── Print Styles ────────────────────────────────────────────────── */
@media print {
  .print-header { display: flex !important; }
  .no-print, .nav { display: none !important; }

  body { background: white; color: #111; font-size: 10pt; }

  .report-cover {
    background: white;
    padding: 2cm 0 1cm;
  }

  .report-cover .t-display, .report-cover .t-brass { color: #8a6a10 !important; }
  .report-cover .t-body, .report-cover .t-smoke { color: #222 !important; }

  .section-vault, .section-dark { background: white; color: #111; }
  .section-light { background: white; }

  .bias-block {
    background: #fafafa;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .trait-block {
    break-inside: avoid;
    border: 1px solid #ddd;
  }

  .report-section__title { color: #111 !important; }
  .report-section__sub, .bias-block__intro { color: #444 !important; }
  .bias-block__title, .t-smoke { color: #111 !important; }
  .t-slate { color: #666 !important; }
  .t-brass { color: #8a6a10 !important; }
  .t-current { color: #1a7a60 !important; }

  .overview-grid { grid-template-columns: 1fr; }
  .overview-bar__fill { border: 1px solid #ccc; }

  .gauge__fill, .radar-user-poly { stroke: #8a6a10 !important; }

  @page { margin: 2cm; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .overview-grid { grid-template-columns: 1fr; }
  .likert { flex-wrap: nowrap; }
  .likert__btn { width: 36px; height: 36px; font-size: .8rem; }
  .trait-block__header { flex-direction: column; gap: .75rem; }
  .trait-block__score { text-align: left; }
  .bias-block__header { flex-direction: column; }
  .arch-meta { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   IMPROVED MOBILE STYLES FOR TEST PAGES
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  /* Test header */
  .test-header { padding: .6rem 1rem; }
  .test-header__inner { gap: .75rem; }
  .test-header__meta { display: none; } /* hide word count on small screens */

  /* Likert */
  .likert { flex-wrap: wrap; gap: .35rem; }
  .likert__btn { width: 40px; height: 40px; font-size: .8rem; }

  /* Question rows */
  .question-row { gap: .75rem; }
  .question-row__num { min-width: 24px; font-size: .68rem; }

  /* Trait blocks */
  .trait-block { padding: 1.25rem; }
  .trait-block__header { flex-direction: column; gap: .5rem; }
  .trait-block__score { text-align: left; align-items: flex-start; }

  /* Bias blocks */
  .bias-block { padding: 1.25rem; }
  .bias-block__header { flex-direction: column; gap: 1rem; }
  .bias-block__score-wrap { align-self: flex-start; }

  /* Overview grid */
  .overview-grid { grid-template-columns: 1fr; }
  .radar-svg { max-width: 200px; }

  /* Arch meta */
  .arch-meta { grid-template-columns: 1fr; gap: 1rem; }

  /* Next steps */
  .next-step { flex-direction: column; gap: .75rem; }

  /* Choice options */
  .choice-opt { padding: .7rem .85rem; }
  .choice-opt__text { font-size: .88rem; }

  /* Form submit */
  .form-submit .btn { width: 100%; justify-content: center; }

  /* Report cover */
  .report-cover { padding: 6rem 0 4rem; }

  /* Overview bars */
  .overview-bar__name { min-width: 110px; font-size: .78rem; }
  .overview-bar__label { min-width: 70px; font-size: .68rem; }
}

/* Very small screens */
@media (max-width: 380px) {
  html { font-size: 15px; }
  .likert { flex-wrap: wrap; }
  .likert__btn { width: 36px; height: 36px; }
}

/* Prevent horizontal scroll on all pages */
@media (max-width: 768px) {
  .container,
  .container--text {
    padding-inline: 1rem;
  }
}
