/* ═══════════════════════════════════════════════════════════════
   Spectrum Dimensions — Interactive ASDQ Explorer Stylesheet
   Clean editorial-modern light UI with domain-driven accents
═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-secondary: #475569;
  --ink-muted: #64748b;
  --accent: #3b6fb6;
  --accent-hover: #2c5794;
  --accent-soft: rgba(59, 111, 182, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.07), 0 2px 8px rgba(15, 23, 42, 0.04);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.2;
  color: var(--ink);
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.app-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  min-height: 100vh;
}

.screen {
  display: none;
  animation: fadeIn 0.32s ease;
}

.screen--active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Shared Components ── */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.panel-sub {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  text-decoration: none;
}

.btn--primary {
  background: var(--ink);
  color: #ffffff;
}

.btn--primary:hover:not(:disabled) {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: #94a3b8;
}

.btn--subtle {
  background: transparent;
  color: var(--ink-secondary);
}

.btn--subtle:hover:not(:disabled) {
  background: var(--surface-subtle);
  color: var(--ink);
}

.btn--lg {
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn--sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN 1: WELCOME
═══════════════════════════════════════════════════════════════ */
.welcome-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 44px;
  align-items: center;
  padding-top: 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(95deg, #e02424 0%, #ee7a1a 25%, #0e9e52 55%, #3b6fb6 80%, #6e2c91 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--ink-secondary);
  margin-bottom: 26px;
  max-width: 58ch;
}

.setup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.setup-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.perspective-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.perspective-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: all 0.16s ease;
  position: relative;
}

.perspective-option:hover {
  border-color: var(--border-strong);
  background: #fafcff;
}

.perspective-option.is-selected {
  border-color: var(--ink);
  background: #f8fafc;
}

.perspective-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.perspective-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perspective-body strong {
  font-size: 0.94rem;
  color: var(--ink);
}

.perspective-body span {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.perspective-check {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.16s ease;
}

.perspective-option.is-selected .perspective-check {
  opacity: 1;
  transform: scale(1);
}

.name-input-wrap {
  margin-bottom: 18px;
}

.input-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.disclaimer-box {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  background: #eef2f7;
  border-left: 3px solid var(--ink-muted);
  padding: 12px 15px;
  border-radius: 0 10px 10px 0;
}

.hero-wheel-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.wheel-preview-container svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.wheel-caption {
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.caption-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0e9e52;
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN 2: INTERACTIVE SPECTRUM JOURNEY (QUIZ)
═══════════════════════════════════════════════════════════════ */
.quiz-header {
  margin-bottom: 20px;
}

.quiz-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.quiz-counter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chapter-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}

.progress-count {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.domain-progress-bar {
  display: grid;
  grid-template-columns: 7fr 3fr 4fr 3fr 4fr 3fr 4fr 3fr 4fr 4fr;
  gap: 5px;
  height: 8px;
}

.domain-seg {
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.domain-seg-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.chapter-banner {
  margin-bottom: 16px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  animation: fadeIn 0.28s ease;
}

.quiz-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--active-domain-color, var(--accent));
  border-radius: var(--radius-lg);
  padding: 32px 34px 28px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s ease;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--active-domain-color, var(--accent));
}

.trait-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.question-stem {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.question-text {
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
}

.question-example {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  font-style: italic;
  background: var(--surface-subtle);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 22px;
}

.rating-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 26px;
}

.rating-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.14s ease;
}

.rating-btn:hover {
  border-color: var(--active-domain-color, var(--accent));
  background: #fafcff;
  transform: translateX(3px);
}

.rating-btn.is-selected {
  border-color: var(--active-domain-color, var(--accent));
  background: var(--active-domain-soft, var(--accent-soft));
  box-shadow: 0 0 0 2px var(--active-domain-soft, var(--accent-soft));
}

.rating-btn--na {
  border-style: dashed;
  color: var(--ink-secondary);
  font-weight: 500;
  margin-top: 4px;
}

.rating-key {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
  flex-shrink: 0;
}

.rating-btn.is-selected .rating-key {
  background: var(--active-domain-color, var(--accent));
  border-color: var(--active-domain-color, var(--accent));
  color: #ffffff;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.kbd-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.74rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--ink-secondary);
}

.age-note {
  margin-top: 14px;
  font-size: 0.83rem;
  color: var(--ink-muted);
  text-align: center;
}

/* Live Sidebar */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 20px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sidebar-header h3 {
  font-size: 0.96rem;
  font-weight: 700;
}

.answered-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
}

.mini-wheel-container svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.active-wedge-ring {
  animation: pulseStroke 1.6s ease-in-out infinite;
}

@keyframes pulseStroke {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.35; }
}

.sidebar-domain-info {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-bottom: 14px;
}

.sidebar-domain-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.sidebar-domain-desc {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.sidebar-dots-wrap {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.dots-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.chapter-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.q-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.q-dot:hover {
  border-color: var(--ink);
}

.q-dot.is-answered {
  color: #ffffff;
  border-color: transparent;
}

.q-dot.is-current {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.18);
  transform: scale(1.08);
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN 3: RESULTS DASHBOARD
═══════════════════════════════════════════════════════════════ */
.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.results-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.results-meta {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Validity Banner */
.validity-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
  font-size: 0.88rem;
}

.validity-banner.is-valid {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.validity-banner.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.validity-banner.is-invalid {
  border-color: #fecaca;
  background: #fef2f2;
}

.validity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

/* Results Hero Grid */
.results-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.chart-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.full-wheel-wrap {
  position: relative;
  margin: 8px 0 16px;
}

.full-wheel-container svg {
  width: 100%;
  max-width: 610px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.spectrum-hit-wedge {
  cursor: pointer;
  transition: fill 0.12s ease;
}

.chart-tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  max-width: 290px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.83rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
  line-height: 1.45;
}

.tooltip-domain {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.tooltip-trait {
  font-weight: 600;
  margin-bottom: 8px;
}

.tooltip-scores {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  color: #cbd5e1;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.legend-pill:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.legend-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Summary Column */
.summary-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.composite-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.composite-item {
  padding: 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.composite-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.composite-name {
  font-weight: 700;
  font-size: 0.96rem;
}

.composite-score {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.composite-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.score-bar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.composite-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.standout-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.standout-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border-left: 4px solid var(--domain-color);
  cursor: pointer;
  transition: background 0.15s ease;
}

.standout-row:hover {
  background: #edf2f7;
}

.standout-rank {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink-muted);
  width: 20px;
}

.standout-info {
  flex: 1;
}

.standout-info strong {
  display: block;
  font-size: 0.9rem;
}

.standout-info span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.standout-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}

.callout-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%);
  border-color: #99f6e4;
}

.callout-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f766e;
  margin-bottom: 6px;
}

.callout-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.callout-card p {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* Recommendations & Sections */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.section-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  padding: 4px 10px;
  border-radius: 999px;
}

.recommendations-section {
  margin-bottom: 24px;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.rec-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--domain-color);
}

.rec-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rec-card-head strong {
  font-size: 0.92rem;
}

.rec-card-score {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--domain-color);
}

.rec-card p {
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.rec-empty {
  padding: 16px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

/* Domains Grid */
.domains-section {
  margin-bottom: 24px;
}

.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.domain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--domain-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.16s ease;
}

.domain-card:hover {
  box-shadow: var(--shadow-md);
}

.domain-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.domain-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.domain-card-group {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.domain-card-score {
  text-align: right;
}

.domain-card-score strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  display: block;
}

.domain-card-score span {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.domain-card-desc {
  font-size: 0.83rem;
  color: var(--ink-secondary);
  margin: 8px 0 12px;
}

.domain-toggle {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.domain-toggle:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.domain-items-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trait-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.81rem;
}

.trait-row-text {
  color: var(--ink-secondary);
}

.trait-row-num {
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}

.trait-row-score {
  flex-shrink: 0;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.76rem;
}

/* DSM-5 Grid */
.dsm5-section {
  margin-bottom: 24px;
}

.dsm5-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.dsm5-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.dsm5-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dsm5-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
}

.dsm5-val {
  font-weight: 800;
  font-size: 1rem;
}

.dsm5-desc {
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.results-footer {
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-muted);
  padding: 16px 0;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .welcome-grid,
  .quiz-layout,
  .results-hero {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }

  .mini-wheel-container svg {
    max-width: 210px;
  }
}

@media (max-width: 600px) {
  .app-shell {
    padding: 16px 14px 48px;
  }

  .perspective-grid {
    grid-template-columns: 1fr;
  }

  .question-card {
    padding: 22px 18px;
  }

  .kbd-hint {
    display: none;
  }
}

/* ── Print Styles ── */
@media print {
  body {
    background: #ffffff;
  }
  .no-print {
    display: none !important;
  }
  .card,
  .domain-card {
    box-shadow: none;
    break-inside: avoid;
  }
  .results-hero {
    grid-template-columns: 1fr;
  }
}
