/* apps/web/static/web/css/web.css */

/*
  FONT STRATEGY
  Brand fonts (licensed): US Blaak Bold, Moderat Regular, Termina Heavy
  Google Fonts fallbacks (active until licensed fonts are available):
    US Blaak Bold    → Cormorant Garamond (700)  — display / wordmark
    Moderat Regular  → DM Sans (400, 500)         — body / UI
    Termina Heavy    → Barlow Condensed (800)     — labels / caps / eyebrows

  To swap in licensed fonts: replace the @import below with @font-face blocks
  and update the font-family values in :root.
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600;1,700&family=DM+Sans:wght@300;400;500;600&family=Barlow+Condensed:wght@600;800&display=swap');

:root {
  /* Brand palette — EnneagramEQ brand guidelines */
  --emerald:        #274D3F;
  --emerald-soft:   #3a6b57;
  --emerald-muted:  #eaf1ee;
  --mulberry:       #74384E;
  --mulberry-soft:  #8f4a63;
  --mulberry-muted: #f5ecef;
  --tan:            #D9CCB9;
  --tan-soft:       #ece4d6;
  --offwhite:       #F4F0E9;
  --surface:        #FFFFFF;
  --ink:            #231F20;
  --ink-soft:       #4a3f40;
  --ink-muted:      #8a7a7c;

  /* Font families */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;      /* → US Blaak Bold */
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;     /* → Moderat Regular */
  --font-label:   'Barlow Condensed', 'Arial Narrow', sans-serif; /* → Termina Heavy */

  /* Spacing & shape */
  --radius:    6px;
  --radius-lg: 10px;
  --shadow:    0 1px 3px rgba(35,31,32,0.08), 0 1px 2px rgba(35,31,32,0.05);
  --shadow-md: 0 4px 12px rgba(35,31,32,0.10), 0 2px 4px rgba(35,31,32,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--offwhite);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

/* ── Nav ─────────────────────────────────────── */

.nav {
  background: var(--emerald);
  padding: 0 40px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(255,255,255,0.06);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--offwhite);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-brand em {
  font-style: italic;
  color: var(--tan);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(244,240,233,0.65);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--offwhite); }

.nav-user {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(244,240,233,0.5);
}

/* ── Page shell ───────────────────────────────── */

.page {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

/* ── Auth card (login / register / demographics) */

.auth-card {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 52px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.auth-brand {
  text-align: center;
  margin-bottom: 36px;
}

.auth-brand .wordmark {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.auth-brand .wordmark em {
  font-style: italic;
  color: var(--mulberry);
}

.auth-brand .tagline {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Forms ────────────────────────────────────── */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.form-group input[type=email],
.form-group input[type=password],
.form-group input[type=text],
.form-group input[type=number],
.form-group select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--offwhite);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7a7c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(39,77,63,0.12);
  background: var(--surface);
}

.form-group .hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 5px;
}

/* Radio group (gender / birth precision) */
.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-option {
  flex: 1;
  min-width: 80px;
}

.radio-option input[type=radio] {
  display: none;
}

.radio-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  background: var(--offwhite);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  transition: all 0.15s;
  text-align: center;
}

.radio-option input[type=radio]:checked + label {
  background: var(--emerald-muted);
  border-color: var(--emerald);
  color: var(--emerald);
  font-weight: 500;
}

/* Birth date precision selector */
.birth-precision {
  margin-bottom: 16px;
}

.birth-fields {
  display: grid;
  gap: 10px;
}

.birth-fields.month-year { grid-template-columns: 1fr 1fr; }
.birth-fields.day-month-year { grid-template-columns: 1fr 1fr 1fr; }

/* ── Buttons ──────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--emerald);
  color: var(--offwhite);
  width: 100%;
  margin-top: 8px;
}

.btn-primary:hover { background: var(--emerald-soft); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--tan);
  width: 100%;
  margin-top: 6px;
}

.btn-secondary:hover {
  border-color: var(--ink-muted);
  color: var(--ink-soft);
}

/* ── Alerts ───────────────────────────────────── */

.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.alert-error {
  background: var(--mulberry-muted);
  color: var(--mulberry);
  border: 1px solid rgba(116,56,78,0.2);
}

.alert-success {
  background: var(--emerald-muted);
  color: var(--emerald);
  border: 1px solid rgba(39,77,63,0.2);
}

/* ── Auth footer links ────────────────────────── */

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.auth-footer a {
  color: var(--emerald);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Dashboard ────────────────────────────────── */

.dashboard-wrap {
  min-height: calc(100vh - 58px);
  padding: 48px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.dashboard-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--tan);
}

.dashboard-greeting {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 6px;
}

.dashboard-greeting em {
  font-style: italic;
  color: var(--emerald);
}

.dashboard-eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.dashboard-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* ── Cards ────────────────────────────────────── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: border-left-color 0.15s;
  border-left: 3px solid transparent;
}

.card:hover { border-left-color: var(--emerald); }

.card-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.card-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.card-value-sm {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* ── Score grids ──────────────────────────────── */

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

.score-item {
  background: var(--offwhite);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  transition: border-color 0.15s;
}

.score-item:hover { border-color: var(--emerald); }

.score-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.score-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.score-dominant {
  border-color: var(--emerald);
  background: var(--emerald-muted);
}

.score-dominant .score-num { color: var(--emerald); }

/* ── Two-col layout ───────────────────────────── */

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

/* ── Loading / empty states ───────────────────── */

.loading {
  text-align: center;
  padding: 72px;
  color: var(--ink-muted);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.empty-state {
  text-align: center;
  padding: 48px 32px;
  color: var(--ink-muted);
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

.error-msg {
  background: var(--mulberry-muted);
  color: var(--mulberry);
  border: 1px solid rgba(116,56,78,0.2);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 20px;
  font-size: 13.5px;
}

/* ── Section divider ──────────────────────────── */

.section-divider {
  height: 1px;
  background: var(--tan);
  margin: 28px 0;
}

.section-eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

/* ── Profile page ─────────────────────────────── */

.profile-wrap {
  min-height: calc(100vh - 58px);
  padding: 48px 40px;
  max-width: 680px;
  margin: 0 auto;
}

.profile-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--tan);
}

.profile-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.profile-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* ── Footer ───────────────────────────────────── */

.site-footer {
  background: var(--ink);
  color: rgba(244,240,233,0.3);
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
  padding: 14px;
}

/* ── Responsive ───────────────────────────────── */

@media (max-width: 640px) {
  .nav { padding: 0 20px; }
  .auth-card { padding: 36px 24px; }
  .dashboard-wrap { padding: 32px 20px; }
  .profile-wrap { padding: 32px 20px; }
  .two-col { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Assessment ───────────────────────────────── */

.assessment-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* Progress */
.assessment-progress-rail {
  height: 3px;
  background: var(--tan);
  width: 100%;
  margin-bottom: 0;
}

.assessment-progress-bar {
  height: 3px;
  background: var(--emerald);
  transition: width 0.4s ease;
}

.assessment-progress-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: right;
  padding: 10px 0 20px;
}

/* Provisional banner */
.assessment-banner {
  background: var(--tan-soft);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Loading indicator */
.assessment-loading {
  text-align: center;
  padding: 80px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Choice card */
.choice-card {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.choice-eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 20px 28px 0;
  margin-bottom: 4px;
}

.choice-instruction {
  font-size: 13px;
  color: var(--ink-muted);
  padding: 0 28px 20px;
  border-bottom: 1px solid var(--tan-soft);
}

/* Option buttons */
.choice-options {
  display: flex;
  flex-direction: column;
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background 0.12s;
  border-bottom: 1px solid var(--tan-soft);
  font-family: var(--font-body);
}

.choice-option:last-child {
  border-bottom: none;
}

.choice-option:hover {
  background: var(--emerald-muted);
}

.choice-option:hover .choice-letter {
  background: var(--emerald);
  color: var(--offwhite);
  border-color: var(--emerald);
}

.choice-option:active {
  background: var(--emerald-muted);
}

.choice-option.selected {
  background: var(--emerald-muted);
  pointer-events: none;
}

.choice-option.selected .choice-letter {
  background: var(--emerald);
  color: var(--offwhite);
  border-color: var(--emerald);
}

.choice-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--tan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  transition: all 0.12s;
  margin-top: 2px;
}

.choice-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

/* Submitting state */
.choice-submitting {
  opacity: 0.5;
  pointer-events: none;
}

/* Break screen */
.break-card {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 24px;
}

.break-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.break-body {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 28px;
}

/* Result screen */
.result-card {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  margin-bottom: 24px;
}

.result-eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.result-type {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  color: var(--emerald);
  line-height: 1;
  margin-bottom: 4px;
}

.result-type-label {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.result-provisional {
  background: var(--tan-soft);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.result-flags {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.result-flag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.result-flag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mulberry);
  flex-shrink: 0;
  margin-top: 6px;
}

/* Scoring-in-progress screen */
.scoring-card {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 64px 40px;
  text-align: center;
  margin-bottom: 24px;
}

.scoring-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.scoring-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  .assessment-wrap { padding: 0 16px 48px; }
  .choice-option { padding: 20px; }
  .choice-text { font-size: 14px; }
  .result-card { padding: 32px 24px; }
  .break-card { padding: 36px 24px; }
}
/* ── Mobile nav fixes ─────────────────────────── */
.nav-user {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .nav-user { display: none; }
  .nav { padding: 0 16px; }
  .nav-brand { font-size: 19px; }
}

/* ── Assessment shell spacing ─────────────────── */
.assessment-wrap {
  padding-top: 32px;
}

@media (max-width: 640px) {
  .assessment-wrap {
    padding-top: 24px;
  }
}

/* ── Provisional banner — demote visually ─────── */
.assessment-banner {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-top: 1px solid var(--tan-soft);
  border-radius: 0;
  padding: 8px 0 16px;
  margin-bottom: 20px;
}

/* ── Dev badge (staff only) ───────────────────── */
.dev-badge {
  position: fixed;
  bottom: 0;
  right: 0;
  background: rgba(35,31,32,0.85);
  color: rgba(244,240,233,0.5);
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.8px;
  padding: 5px 10px;
  border-top-left-radius: 4px;
  display: flex;
  gap: 12px;
  z-index: 9999;
}

/* ── Assessment viewport fill ─────────────────── */
.assessment-wrap {
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
}

#choice-area {
  flex: 1;
}

/* ── Banner repositioned below card ───────────── */
.assessment-banner {
  margin-top: 24px;
  margin-bottom: 0;
  padding-bottom: 32px;
}

/* ── Prevent touch state persistence between questions ─── */
.choice-option {
  -webkit-tap-highlight-color: transparent;
}

.choice-option:active {
  background: var(--emerald-muted);
}

/* ── Dashboard v2 ─────────────────────────────── */

.db-type-header {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.db-eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.db-type-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.db-type-badge-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
}

.db-type-badge-lg.body { background: #3C3489; color: rgba(255,255,255,0.9); }
.db-type-badge-lg.heart { background: #993556; color: rgba(255,255,255,0.9); }
.db-type-badge-lg.head { background: #0F6E56; color: rgba(255,255,255,0.9); }

.db-type-label {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.db-confidence {
  font-size: 14px;
  color: var(--ink-muted);
}

.db-confidence strong {
  color: var(--ink);
  font-weight: 600;
}

.db-provisional-badge {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--tan-soft);
  color: var(--ink-muted);
  border: 1px solid var(--tan);
  border-radius: 3px;
  padding: 2px 6px;
  margin-left: 4px;
}

.db-meta {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.db-sub-row {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--tan-soft);
  flex-wrap: wrap;
}

.db-sub-item {}

.db-sub-label {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.db-sub-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.db-section {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.db-section-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.db-axis-note {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 14px;
}

.db-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.db-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

.db-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.db-legend-dot.body { background: #7F77DD; }
.db-legend-dot.heart { background: #D4537E; }
.db-legend-dot.head { background: #1D9E75; }

/* ── Motivational profile bar row ───────────────────────────────────────────
   Two fixed-width divs: meta (badge + name + score) | track
   Meta is fixed at 220px so tracks always start at the same position.
   ─────────────────────────────────────────────────────────────────────── */
 
.db-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
 
.db-bar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  flex-shrink: 0;
}
 
.db-bar-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.db-bar-score {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}
 
.db-bar-track {
  flex: 1;
}
 
/* ── Centers + Instincts small bar row ──────────────────────────────────────
   Same pattern: fixed-width left side | track
   ─────────────────────────────────────────────────────────────────────── */
 
.db-bar-row-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
 
.db-bar-meta-sm {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 90px;
  flex-shrink: 0;
}
 
.db-bar-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: right;
}
 
.db-bar-score-sm {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}
 
/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .db-bar-meta  { width: 160px; }
  .db-bar-name  { font-size: 10px; }
  .db-bar-meta-sm { width: 72px; }
}


.db-bar-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  width: 52px;
  flex-shrink: 0;
  text-align: right;
}

.db-bar-fill-sm {
  height: 100%;
  border-radius: 3px;
  background: var(--tan);
  transition: width 0.5s ease;
}

.db-bar-fill-sm.dominant { background: var(--emerald); }

.db-tie-note {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 6px;
}

.db-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.db-validity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.db-validity-item {
  background: var(--offwhite);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  padding: 12px;
}

.db-validity-lbl {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.db-validity-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .db-two-col { grid-template-columns: 1fr; }
  .db-validity-grid { grid-template-columns: repeat(2, 1fr); }
  .db-type-header { padding: 20px; }
  .db-section { padding: 20px; }
  .db-sub-row { gap: 16px; }
}

/* ── Dashboard v2 ─────────────────────────────── */

.db-type-header {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.db-eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.db-type-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.db-type-badge-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
}

.db-type-badge-lg.body { background: #3C3489; color: rgba(255,255,255,0.9); }
.db-type-badge-lg.heart { background: #993556; color: rgba(255,255,255,0.9); }
.db-type-badge-lg.head { background: #0F6E56; color: rgba(255,255,255,0.9); }

.db-type-label {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.db-confidence {
  font-size: 14px;
  color: var(--ink-muted);
}

.db-confidence strong {
  color: var(--ink);
  font-weight: 600;
}

.db-provisional-badge {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--tan-soft);
  color: var(--ink-muted);
  border: 1px solid var(--tan);
  border-radius: 3px;
  padding: 2px 6px;
  margin-left: 4px;
}

.db-meta {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.db-sub-row {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--tan-soft);
  flex-wrap: wrap;
}

.db-sub-item {}

.db-sub-label {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.db-sub-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.db-section {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.db-section-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.db-axis-note {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 14px;
}

.db-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.db-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

.db-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.db-legend-dot.body { background: #7F77DD; }
.db-legend-dot.heart { background: #D4537E; }
.db-legend-dot.head { background: #1D9E75; }

.db-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.db-bar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.db-bar-badge.body { background: #3C3489; color: rgba(255,255,255,0.9); }
.db-bar-badge.heart { background: #993556; color: rgba(255,255,255,0.9); }
.db-bar-badge.head { background: #0F6E56; color: rgba(255,255,255,0.9); }

.db-bar-track {
  flex: 1;
  background: var(--offwhite);
  border-radius: 3px;
  height: 20px;
  border: 1px solid var(--tan);
  overflow: hidden;
}

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

.db-bar-fill.body { background: #7F77DD; }
.db-bar-fill.body-near { background: #AFA9EC; }
.db-bar-fill.heart { background: #D4537E; }
.db-bar-fill.heart-near { background: #ED93B1; }
.db-bar-fill.head { background: #1D9E75; }
.db-bar-fill.head-near { background: #5DCAA5; }
.db-bar-fill.rest { background: var(--tan); }

.db-bar-row-sm {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.db-bar-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  width: 52px;
  flex-shrink: 0;
  text-align: right;
}

.db-bar-fill-sm {
  height: 100%;
  border-radius: 3px;
  background: var(--tan);
  transition: width 0.5s ease;
}

.db-bar-fill-sm.dominant { background: var(--emerald); }

.db-tie-note {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 6px;
}

.db-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.db-validity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.db-validity-item {
  background: var(--offwhite);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  padding: 12px;
}

.db-validity-lbl {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.db-validity-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .db-two-col { grid-template-columns: 1fr; }
  .db-validity-grid { grid-template-columns: repeat(2, 1fr); }
  .db-type-header { padding: 20px; }
  .db-section { padding: 20px; }
  .db-sub-row { gap: 16px; }
}

/* ── Dashboard v2 ─────────────────────────────── */

.db-type-header {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.db-eyebrow {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.db-type-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.db-type-badge-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
}

.db-type-badge-lg.body { background: #3C3489; color: rgba(255,255,255,0.9); }
.db-type-badge-lg.heart { background: #993556; color: rgba(255,255,255,0.9); }
.db-type-badge-lg.head { background: #0F6E56; color: rgba(255,255,255,0.9); }

.db-type-label {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.db-confidence {
  font-size: 14px;
  color: var(--ink-muted);
}

.db-confidence strong {
  color: var(--ink);
  font-weight: 600;
}

.db-provisional-badge {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--tan-soft);
  color: var(--ink-muted);
  border: 1px solid var(--tan);
  border-radius: 3px;
  padding: 2px 6px;
  margin-left: 4px;
}

.db-meta {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.db-sub-row {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--tan-soft);
  flex-wrap: wrap;
}

.db-sub-item {}

.db-sub-label {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.db-sub-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.db-section {
  background: var(--surface);
  border: 1px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.db-section-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.db-axis-note {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 14px;
}

.db-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.db-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

.db-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.db-legend-dot.body { background: #7F77DD; }
.db-legend-dot.heart { background: #D4537E; }
.db-legend-dot.head { background: #1D9E75; }

.db-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.db-bar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.db-bar-badge.body { background: #3C3489; color: rgba(255,255,255,0.9); }
.db-bar-badge.heart { background: #993556; color: rgba(255,255,255,0.9); }
.db-bar-badge.head { background: #0F6E56; color: rgba(255,255,255,0.9); }

.db-bar-track {
  flex: 1;
  background: var(--offwhite);
  border-radius: 3px;
  height: 20px;
  border: 1px solid var(--tan);
  overflow: hidden;
}

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

.db-bar-fill.body { background: #7F77DD; }
.db-bar-fill.body-near { background: #AFA9EC; }
.db-bar-fill.heart { background: #D4537E; }
.db-bar-fill.heart-near { background: #ED93B1; }
.db-bar-fill.head { background: #1D9E75; }
.db-bar-fill.head-near { background: #5DCAA5; }
.db-bar-fill.rest { background: var(--tan); }

.db-bar-row-sm {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.db-bar-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  width: 52px;
  flex-shrink: 0;
  text-align: right;
}

.db-bar-fill-sm {
  height: 100%;
  border-radius: 3px;
  background: var(--tan);
  transition: width 0.5s ease;
}

.db-bar-fill-sm.dominant { background: var(--emerald); }

.db-tie-note {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 6px;
}

.db-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.db-validity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.db-validity-item {
  background: var(--offwhite);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  padding: 12px;
}

.db-validity-lbl {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.db-validity-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .db-two-col { grid-template-columns: 1fr; }
  .db-validity-grid { grid-template-columns: repeat(2, 1fr); }
  .db-type-header { padding: 20px; }
  .db-section { padding: 20px; }
  .db-sub-row { gap: 16px; }
}

/* ── Center group headers in type profile ─────── */
.db-center-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 8px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.db-center-header:first-child { margin-top: 0; }

.db-center-header i {
  font-size: 14px;
}

.db-center-header.body { color: #7F77DD; }
.db-center-header.heart { color: #D4537E; }
.db-center-header.head { color: #1D9E75; }
