/* === TROTH APP STYLES ===
   Design tokens inherited from landing page */

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

:root {
  --ink: #0f0f0f;
  --paper: #faf9f7;
  --warm: #c8a87c;
  --warm-light: #f0e6d6;
  --accent: #3d5a4c;
  --accent-light: #e8efe9;
  --muted: #6b6560;
  --border: #e0dbd5;
  --error: #c0392b;
  --error-light: #fde8e8;
  --success: #3d5a4c;
  --success-light: #e8efe9;
  --white: #ffffff;

  /* Fit-label palette: sage-to-stone spectrum (ADA AA compliant, colorblind-safe) */
  --fit-strong-bg: #E2EBE0;
  --fit-strong-text: #2D4A32;
  --fit-promising-bg: #E7ECE3;
  --fit-promising-text: #3D5A40;
  --fit-mixed-bg: #EAECE6;
  --fit-mixed-text: #4A5544;
  --fit-discuss-bg: #EDEBE7;
  --fit-discuss-text: #585247;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

/* --- App Shell --- */
.app-nav {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.app-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.app-nav .logo-dot {
  color: var(--warm);
}

.app-nav .nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-user {
  font-size: 0.85rem;
  color: var(--muted);
}

.nav-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover {
  text-decoration: underline;
}

/* --- Main Container --- */
.app-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: calc(100vh - 60px);
}

/* --- Auth Pages --- */
.auth-page {
  max-width: 420px;
  margin: 3rem auto;
}

.auth-page h1 {
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.auth-page .subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

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

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s;
  min-height: 2.6rem;
}

/* Freetext input fields for custom labels (gender, pronouns, orientation, etc) */
/* Make them roughly 75% of the adjacent pill button height for visual balance */
input[id$="-writein"] {
  min-height: 2.5rem;
  padding: 0.8rem 1rem;
  line-height: 1.4;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group .hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.form-error {
  background: var(--error-light);
  color: var(--error);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  width: 100%;
}

.btn-primary:hover {
  background: #2a2a2a;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
}

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

.btn-accent {
  background: var(--accent);
  color: var(--white);
  width: 100%;
}

.btn-accent:hover {
  background: #345248;
  transform: translateY(-1px);
}

.btn-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-row .btn {
  flex: 1;
}

/* --- Progress Bar --- */
.progress-container {
  margin-bottom: 2.5rem;
}

.progress-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.progress-step {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}

.progress-step.active {
  background: var(--warm);
}

.progress-step.complete {
  background: var(--accent);
}

.progress-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* --- Onboarding Steps --- */
.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.step-card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.step-card .step-desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* --- Option Cards (radio/checkbox style) --- */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.option-grid.single-col {
  grid-template-columns: 1fr;
}

/* Compact chip grid for multi-select identity/attraction chips */
.option-grid.chip-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.option-card.chip {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  text-align: center;
}

.option-card.chip .option-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0;
}

.option-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.option-card:hover {
  border-color: var(--warm);
  background: var(--warm-light);
}

.option-card.selected,
.option-card.selected:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.option-card .option-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.option-card .option-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Quiz --- */
.quiz-question {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.quiz-question:last-of-type {
  border-bottom: none;
}

.quiz-question .q-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--warm);
  margin-bottom: 0.4rem;
}

.quiz-question .q-text {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.likert-scale {
  display: flex;
  gap: 0.5rem;
}

.likert-option {
  flex: 1;
  text-align: center;
}

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

.likert-option label {
  display: block;
  padding: 0.5rem 0.25rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--muted);
  transition: all 0.2s;
  line-height: 1.3;
}

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

.likert-option label:hover {
  border-color: var(--warm);
}

/* Unanswered quiz question highlight — shown when user tries to submit with missing answers */
.quiz-question.quiz-unanswered {
  background: var(--error-light);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

.quiz-question.quiz-unanswered .q-num {
  color: var(--error);
}

/* --- Dashboard --- */
.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.dashboard-header .greeting {
  color: var(--muted);
  font-size: 1rem;
}

/* Score Overview */
.score-overview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.score-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.score-overview h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0;
}

.how-works-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
  white-space: nowrap;
}

.how-works-link:hover {
  color: var(--warm);
}

/* Tappable score bars */
.score-bar-tappable {
  cursor: pointer;
  border-radius: 8px;
  padding: 0.35rem 0.4rem;
  margin: -0.35rem -0.4rem;
  transition: background 0.15s;
}

.score-bar-tappable:hover,
.score-bar-tappable:focus {
  background: var(--warm-light);
  outline: none;
}

.score-bar-tappable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.score-bar-chevron {
  font-size: 1.1rem;
  color: var(--muted);
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  line-height: 1;
}

.score-bars {
  display: grid;
  gap: 0.75rem;
}

.score-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.score-bar .score-label {
  font-size: 0.85rem;
  width: 130px;
  flex-shrink: 0;
}

.score-bar .bar-track {
  flex: 1;
  height: 8px;
  background: var(--warm-light);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar .bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.6s ease;
}

.score-bar .score-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Assessment v2 Self-Profile ───────────────────────────────────────────── */

.v2-profile-section {
  margin-bottom: 2rem;
}

.v2-profile-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.v2-profile-header h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0;
}

.v2-date {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Confidence notes */
.v2-confidence-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--warm-light);
  border-radius: 8px;
}

.v2-confidence-note-low {
  background: var(--error-light);
  color: var(--error);
}

/* Card list */
.v2-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual card */
.v2-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.v2-card-open {
  border-color: var(--warm);
}

/* When expanded, show the full summary text (un-truncate) */
/* Safari iOS ignores display:block override for -webkit-box; keep the box model
   but raise the clamp ceiling to effectively unlimited and remove overflow:hidden */
.v2-card-open .v2-card-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 100;
  overflow: visible;
}

/* Card header (tappable button) */
.v2-card-header {
  width: 100%;
  background: none;
  border: none;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.v2-card-header:hover,
.v2-card-header:focus {
  background: var(--warm-light);
  outline: none;
}

.v2-card-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.v2-card-header-text {
  flex: 1;
  min-width: 0;
}

.v2-card-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.v2-card-summary {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Fit band chip inside summary */
.v2-fit-band {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-right: 0.3rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* Chevron */
.v2-card-chevron {
  font-size: 1.1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.v2-card-open .v2-card-chevron {
  transform: rotate(90deg);
}

/* Card body (expanded content) */
.v2-card-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.v2-card-body.hidden {
  display: none;
}

/* Explainer sections inside card body */
.v2-explainer-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.v2-explainer-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.v2-explainer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.v2-explainer-section p {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}

/* Growth prompt */
.v2-explainer-prompt {
  background: var(--warm-light);
  margin: 0 -1rem;
  padding: 0.75rem 1rem !important;
  border-bottom: none !important;
  border-radius: 0 0 11px 11px;
}

.v2-growth-prompt {
  font-style: italic;
  color: var(--ink) !important;
}

/* Life design spectrum */
.v2-spectrums {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.25rem;
}

.v2-spectrum-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.v2-spectrum-track {
  position: relative;
  height: 6px;
  background: var(--warm-light);
  border-radius: 3px;
}

.v2-spectrum-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.v2-spectrum-poles {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.v2-spectrum-pole {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
  flex: 1;
}

.v2-spectrum-pole-right {
  text-align: right;
}

/* Retake section */
.v2-retake-section {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.v2-retake-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* No assessment prompt */
.v2-no-assessment {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.v2-no-assessment p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

/* Match Cards */
.matches-section h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.matches-list {
  display: grid;
  gap: 1rem;
}

.match-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.2s;
}

.match-card:hover {
  border-color: var(--warm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

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

.match-info h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.match-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Tappable overall score button */
.match-score-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
  font: inherit;
  text-align: right;
  flex-shrink: 0;
}

.match-score-btn:hover {
  background: var(--paper);
  border-color: var(--border);
}

.match-score-btn:active {
  background: var(--border);
}

.match-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.match-score span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

.match-score-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.match-bio {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  font-style: italic;
}

.match-compat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.compat-dim {
  text-align: center;
  padding: 0.6rem 0.4rem 0.45rem;
  background: var(--paper);
  border-radius: 8px;
  /* Button reset */
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.compat-dim:hover {
  background: color-mix(in srgb, var(--paper) 70%, var(--border) 30%);
  border-color: var(--border);
}

.compat-dim:active {
  background: var(--border);
}

.compat-dim .dim-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.compat-dim .dim-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
}

.dim-chevron {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1;
  opacity: 0.6;
}

/* ── Match scoring footer (How scores work link) ─────────────────── */
.match-scoring-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 0.25rem;
  margin-top: -0.25rem;
}

.match-how-scoring-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.25rem 0.1rem;
  letter-spacing: 0.01em;
  opacity: 0.75;
  transition: opacity 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.match-how-scoring-btn:hover {
  opacity: 1;
  color: var(--accent);
}

/* ── Match highlight chips (overall sheet — strongest/weakest dims) ─ */
.match-highlight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.match-highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 500;
}

.match-highlight-chip strong {
  font-weight: 700;
}

.match-highlight-chip-strong {
  background: var(--accent-light);
  color: var(--accent);
}

.match-highlight-chip-discuss {
  background: color-mix(in srgb, var(--warm-light) 70%, #fff 30%);
  color: #7a5230;
}

/* ── Non-interactive compat dim variant (group info tile) ─────────── */
.compat-dim-info {
  cursor: default;
  pointer-events: none;
  opacity: 0.75;
}

/* ── v2 Assessment Fit Display ───────────────────────────────────────── */
.match-fit-summary {
  padding: 0.25rem 0 0.5rem;
}

.fit-label-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* Fit-tier labels: sage-to-stone palette (strongest = deepest sage, weakest = warm stone).
   Each tier has distinct background + text color for emotional tone and visual hierarchy.
   "Assessment pending" uses the -pending variant for a clearly different (neutral) state. */
.fit-label-chip-strong {
  background: var(--fit-strong-bg);
  color: var(--fit-strong-text);
  border: 1px solid var(--fit-strong-text);
}
.fit-label-chip-promising {
  background: var(--fit-promising-bg);
  color: var(--fit-promising-text);
  border: 1px solid var(--fit-promising-text);
}
.fit-label-chip-mixed {
  background: var(--fit-mixed-bg);
  color: var(--fit-mixed-text);
  border: 1px solid var(--fit-mixed-text);
}
.fit-label-chip-discuss {
  background: var(--fit-discuss-bg);
  color: var(--fit-discuss-text);
  border: 1px solid var(--fit-discuss-text);
}
.fit-label-chip-pending  { background: var(--paper); color: var(--muted); border: 1px solid var(--border); }

.match-fit-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.match-fit-strengths {
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.15rem;
}

.match-fit-discuss {
  font-size: 0.79rem;
  color: var(--warm);
  line-height: 1.45;
  margin-bottom: 0.2rem;
}

.match-fit-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0;
  margin-top: 0.1rem;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.01em;
}
.match-fit-expand-btn:active { opacity: 0.65; }

/* Skeleton loading pulse */
.fit-loading-pulse {
  height: 0.9rem;
  border-radius: 4px;
  background: var(--paper);
  animation: fit-pulse 1.5s ease-in-out infinite;
  width: 55%;
  margin: 0.3rem 0;
}

@keyframes fit-pulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.8; }
}

/* ── Fit Detail Sheet (5-tile expanded view) ─────────────────────────── */
.fit-tiles-container {
  padding: 0.25rem 0;
}

.fit-tile {
  background: var(--paper);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.fit-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fit-tile-header:active {
  background: color-mix(in srgb, var(--paper) 60%, var(--border) 40%);
}

.fit-tile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.fit-tile-category {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 500;
}

.fit-tile-chevron {
  color: var(--muted);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.fit-tile.open .fit-tile-chevron { transform: rotate(90deg); }

.fit-tile-body {
  padding: 0 1rem 0.9rem;
  display: none;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}
.fit-tile.open .fit-tile-body { display: block; }

.fit-tile-section {
  margin-bottom: 0.7rem;
}
.fit-tile-section:last-child { margin-bottom: 0; }

.fit-tile-section-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.fit-tile-section p {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}

.fit-tile-question {
  font-size: 0.875rem;
  color: var(--ink);
  font-style: italic;
  line-height: 1.55;
  margin: 0;
}

/* Life design sub-chips */
.fit-tile-sub-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.fit-sub-chip {
  flex: 1;
  background: var(--bg, #fafafa);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
}

.fit-sub-chip-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.95rem;
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Loading --- */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .app-container {
    padding: 1.5rem 1rem 3rem;
  }

  .auth-page h1 {
    font-size: 1.6rem;
  }

  .step-card {
    padding: 1.5rem;
  }

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

  .likert-scale {
    gap: 0.3rem;
  }

  .likert-option label {
    font-size: 0.65rem;
    padding: 0.4rem 0.15rem;
  }

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

  .btn-row {
    flex-direction: column;
  }
}

/* --- Trust Badges --- */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.trust-verified {
  background: var(--accent-light);
  color: var(--accent);
}

.trust-good {
  background: var(--warm-light);
  color: var(--warm);
}

.trust-new {
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* --- Match Actions --- */
.match-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.btn-report {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-report:hover {
  color: var(--error);
  background: var(--error-light);
}

/* --- Report Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-content h3 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.modal-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.modal-content .report-options {
  display: grid;
  gap: 0.5rem;
}

.modal-content .report-options .option-card {
  text-align: left;
  padding: 0.75rem 1rem;
}

.modal-content textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  resize: vertical;
  min-height: 60px;
}

.modal-content textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.modal-buttons .btn {
  flex: 1;
  padding: 0.7rem 1.5rem;
}

.btn-danger {
  background: var(--error);
  color: var(--white);
}

.btn-danger:hover {
  background: #a93226;
}

.btn-danger:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.85rem; }

/* --- Email Verification --- */

/* Persistent banner above dashboard */
.verify-banner {
  background: #fffbf0;
  border: 1px solid #e8d5a0;
  border-radius: 12px;
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem;
}

.verify-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.verify-banner-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.verify-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.verify-banner-text strong {
  font-size: 0.9rem;
  color: var(--ink);
}

.verify-banner-text span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Small button variant */
.btn-sm {
  padding: 0.4rem 0.875rem;
  font-size: 0.8rem;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Verified badge inline in match cards */
.verified-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 0.4rem;
}

@media (max-width: 600px) {
  .verify-banner-content {
    flex-wrap: wrap;
  }
  .verify-banner-text strong {
    font-size: 0.85rem;
  }
}

/* ================================================
   MESSAGING STYLES
   ================================================ */

/* Dashboard title row — flex between heading and messages link */
.dashboard-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Match card message button */
.btn-match-msg {
  width: auto;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Nav icon link (messages icon in header) */
.nav-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}

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

.unread-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--error);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* --- Messages Page --- */
.messages-page {
  max-width: 640px;
}

.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.messages-header h1 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--ink);
}

/* --- Conversation List --- */
.conversation-list {
  display: grid;
  gap: 0;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.conversation-item:hover {
  background: var(--warm-light);
}

.conversation-item:last-child {
  border-bottom: none;
}

.conversation-item.has-unread .conv-name {
  font-weight: 700;
}

.conversation-item.has-unread .conv-preview {
  color: var(--ink);
  font-weight: 500;
}

.conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.conv-content {
  flex: 1;
  min-width: 0;
}

.conv-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.conv-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.conv-time {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.conv-preview {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.conv-unread {
  background: var(--accent);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  flex-shrink: 0;
}

.conv-compat {
  /* Neutral wrapper — the .fit-label-chip inside handles its own typography and color.
     Keeping font-family and layout props only. */
  font-family: 'Space Grotesk', sans-serif;
  flex-shrink: 0;
  margin-left: 0.25rem;
  display: flex;
  align-items: center;
}

.mute-icon {
  font-size: 0.72rem;
  opacity: 0.5;
}

/* --- Chat Page --- */
.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  max-width: 640px;
  margin: -2rem -1.5rem;
  padding: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: relative;
  flex-shrink: 0;
}

.chat-header-info {
  flex: 1;
}

.chat-header-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.chat-header-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.chat-menu-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.chat-menu-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.chat-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 100;
  min-width: 200px;
}

.menu-item {
  padding: 0.625rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-item:hover {
  background: var(--paper);
}

.menu-item-danger {
  color: var(--error);
}

.menu-item-danger:hover {
  background: var(--error-light);
}

/* --- Chat Messages --- */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.chat-empty-icon {
  font-size: 2.5rem;
  opacity: 0.3;
  margin-bottom: 0.75rem;
}

.chat-empty p {
  font-size: 0.9rem;
  max-width: 280px;
  line-height: 1.5;
}

.chat-date-sep {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0.75rem 0;
}

/* --- Message Bubbles --- */
.msg-row {
  display: flex;
  margin-bottom: 0.15rem;
}

.msg-mine {
  justify-content: flex-end;
}

.msg-theirs {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 75%;
  padding: 0.625rem 0.875rem;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.msg-mine .msg-bubble {
  background: var(--accent);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.msg-theirs .msg-bubble {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.msg-flagged {
  opacity: 0.5;
  border: 1px dashed var(--error) !important;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
  justify-content: flex-end;
}

.msg-time {
  font-size: 0.65rem;
  opacity: 0.7;
}

.msg-read {
  font-size: 0.65rem;
  opacity: 0.7;
}

/* --- Chat Input --- */
.chat-input-area {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chat-input-row input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  background: var(--paper);
  color: var(--ink);
}

.chat-input-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-send:disabled {
  opacity: 0.4;
}

.chat-flag-warning {
  font-size: 0.78rem;
  color: var(--error);
  padding: 0.4rem 0.5rem 0;
  text-align: center;
}

/* --- Modal Card (messaging modals) --- */
.modal-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.modal-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* Report reasons grid */
.report-reasons {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.report-reasons .option-card {
  text-align: left;
  padding: 0.75rem 1rem;
}

/* --- Settings --- */
.settings-page {
  max-width: 640px;
}

.settings-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}

.settings-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.danger-zone-card {
  border-color: #e8d5d5;
}

.danger-zone-card h3 {
  color: var(--error);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
}

.setting-label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.setting-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* --- Toggle Switch --- */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: all 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
  pointer-events: none;
  white-space: nowrap;
}

.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Messaging Responsive --- */
@media (max-width: 600px) {
  .chat-page {
    margin: -1.5rem -1rem;
  }

  .msg-bubble {
    max-width: 85%;
  }

  .dashboard-title-row {
    flex-wrap: wrap;
  }
}

/* =====================================================
   COURTSHIP BANDWIDTH + FOCUS MODE + ACCOUNT STATUS
   ===================================================== */

/* --- Account Status Badge --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge-open {
  background: var(--accent-light);
  color: var(--accent);
}

.status-badge-selective {
  background: #fff3e0;
  color: #b45309;
}

.status-badge-focused {
  background: #fce4ec;
  color: #c2185b;
}

.status-badge-partnered {
  background: #f3e5f5;
  color: #7b1fa2;
}

.status-badge-paused {
  background: var(--warm-light);
  color: var(--muted);
}

.status-badge-hidden {
  background: #f0f0f0;
  color: #555;
}

/* --- Bandwidth Indicator --- */
.bandwidth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
}

.bandwidth-badge span {
  color: var(--warm);
  font-weight: 600;
}

/* --- Match Card Status Row --- */
.match-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

/* --- Matches Filter Bar --- */
.matches-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.filter-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  margin-right: 0.25rem;
}

.filter-chip {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Space Grotesk', sans-serif;
}

.filter-chip:hover {
  border-color: var(--warm);
  color: var(--ink);
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* --- Focus Mode Settings Card --- */
.focus-mode-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.focus-mode-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.focus-mode-card .focus-desc {
  font-size: 0.87rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.focus-state-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.focus-state-label {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.focus-state-partner {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

/* --- Account Status Selector (Settings) --- */
.status-selector {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.status-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--paper);
}

.status-option:hover {
  border-color: var(--warm);
  background: var(--warm-light);
}

.status-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.status-option-title {
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Space Grotesk', sans-serif;
}

.status-option-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.status-option-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}

.status-option.selected .status-option-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.status-option.selected .status-option-radio::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
}

/* --- Date Check-In Prompt Banner --- */
.checkin-banner {
  margin: 0.75rem 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-light), var(--warm-light));
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
}

.checkin-banner-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.checkin-banner-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.checkin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checkin-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s ease;
}

.checkin-btn-yes {
  background: var(--accent);
  color: white;
}

.checkin-btn-yes:hover {
  background: #2d4437;
}

.checkin-btn-maybe {
  background: transparent;
  border-color: var(--warm);
  color: var(--warm);
}

.checkin-btn-maybe:hover {
  background: var(--warm-light);
}

.checkin-btn-dismiss {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
  font-weight: 400;
}

.checkin-btn-dismiss:hover {
  background: var(--border);
  color: var(--ink);
}

/* --- Focus Request Banner (in chat) --- */
.focus-request-banner {
  margin: 0.75rem 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fce4ec, #fff3e0);
  border: 1px solid #f8bbd9;
  border-radius: 10px;
  text-align: center;
}

.focus-request-banner-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.focus-request-banner-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

/* --- Bandwidth Question in Onboarding --- */
.bandwidth-question {
  margin-top: 1.25rem;
}

.bandwidth-option-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --- Focus Mode Match Card Overlay --- */
.match-focus-btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid #f48fb1;
  background: transparent;
  color: #c2185b;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
  font-family: 'DM Sans', sans-serif;
}

.match-focus-btn:hover {
  background: #fce4ec;
}

/* --- Settings Account Status Section --- */
.settings-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.bandwidth-setting-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.bandwidth-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.15s ease;
}

.bandwidth-btn:hover {
  border-color: var(--warm);
  color: var(--ink);
}

.bandwidth-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* ============================================================
   LINKED PROFILES — Group match cards, badges, filter rows
   ============================================================ */

/* Group match card variant */
.match-card-group {
  border: 1.5px solid #c8a87a;
  background: linear-gradient(135deg, #fdf9f4 0%, #fff8ed 100%);
  position: relative;
}

.match-card-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.group-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b5e3c;
  background: #f4e8d9;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* Group member chips */
.group-members-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.group-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f8f2eb;
  border: 1px solid #e0d3c4;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  color: var(--ink);
}

.group-member-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--warm);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-member-age {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Link / dating-together badges */
.match-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0;
}

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}

.link-badge-link {
  background: #e8f4fd;
  border-color: #90c9f0;
  color: #1a5f8b;
}

.link-badge-pending {
  background: #fdf3e0;
  border-color: #e8c56e;
  color: #7a5200;
}

.link-badge-dt {
  background: #e8f5e9;
  border-color: #81c784;
  color: #1b5e20;
}

/* Filter bar rows */
.matches-filter-bar {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.2rem;
}

.filter-chip {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--warm);
  color: var(--ink);
}

.filter-chip.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* Group conversation item */
.conv-avatar-group {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4e8d9;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.conv-group-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b5e3c;
}

/* Message sender name (for group chats) */
.message-sender-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

/* Linked profiles settings nav entry */
.linked-settings-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

/* ===================================================
   BODIES & BOUNDARIES CARD
   =================================================== */

#bb-card-area {
  flex-shrink: 0;
}

.bb-card-panel {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #f9f7f4;
}

.bb-card-waiting {
  background: #f5f3f0;
  opacity: 0.85;
}

.bb-card-invite {
  background: linear-gradient(135deg, #f2ede6 0%, #eaf0ea 100%);
  border-color: var(--warm);
}

.bb-card-active {
  background: linear-gradient(135deg, #eaf0ea 0%, #f0f5f0 100%);
  border-color: var(--accent);
}

.bb-card-declined {
  background: #f8f6f3;
  opacity: 0.75;
}

.bb-card-revealed {
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--white);
  border-color: var(--accent);
}

.bb-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.bb-card-icon-lg {
  font-size: 2rem;
}

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

.bb-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.bb-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.bb-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Revealed layout */
.bb-revealed-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.bb-revealed-body {
  padding: 0.75rem 1.25rem 0;
}

.bb-reveal-section {
  padding-bottom: 0.75rem;
}

.bb-reveal-who {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.bb-reveal-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0 0.75rem;
}

.bb-reveal-empty {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.25rem 0;
}

.bb-answer-item {
  margin-bottom: 0.75rem;
}

.bb-answer-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.bb-answer-text {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.55;
  background: var(--accent-light);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  white-space: pre-line;
}

.bb-revealed-note {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* Fill modal */
.bb-fill-modal .modal-card {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bb-fill-card {
  max-width: 560px;
}

.bb-fill-header {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.bb-fill-header h3 {
  margin: 0.5rem 0 0.25rem;
}

.bb-fill-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.bb-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bb-question-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bb-question-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.bb-question-prompt {
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.bb-question-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.5;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s;
}

.bb-question-input:focus {
  outline: none;
  border-color: var(--accent);
}

.bb-fill-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.bb-privacy-note {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.btn-text-link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.5rem 0;
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-text-link:hover {
  color: var(--ink);
}


/* =========================================
   Identity & Privacy Settings
   ========================================= */

.openness-option,
.disclosure-option,
.t4t-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 0.5rem;
  background: var(--paper);
  transition: border-color 0.15s, background 0.15s;
}

.openness-option:hover,
.disclosure-option:hover,
.t4t-option:hover {
  border-color: var(--warm);
  background: #faf7f4;
}

.openness-option.selected,
.disclosure-option.selected,
.t4t-option.selected {
  border-color: var(--accent);
  background: #f8f0ee;
}

.openness-radio,
.disclosure-radio,
.t4t-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: border-color 0.15s;
}

.openness-option.selected .openness-radio,
.disclosure-option.selected .disclosure-radio,
.t4t-option.selected .t4t-radio {
  border-color: var(--accent);
}

.openness-option.selected .openness-radio::after,
.disclosure-option.selected .disclosure-radio::after,
.t4t-option.selected .t4t-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.setting-section {
  margin-bottom: 1rem;
}

/* --- Disclosure Profile Preview Card --- */
.disclosure-preview-card {
  margin-top: 0.875rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.875rem;
  background: var(--paper);
  transition: border-color 0.2s;
}

.disclosure-preview-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.disclosure-preview-profile {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.disclosure-preview-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--warm-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm);
  flex-shrink: 0;
}

.disclosure-preview-info {
  flex: 1;
  min-width: 0;
}

.disclosure-preview-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.disclosure-preview-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.disclosure-preview-bio {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.disclosure-preview-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  white-space: nowrap;
}

.disclosure-preview-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.disclosure-preview-note span:first-child {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Badge row inside the preview card */
.disclosure-preview-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

/* Reset the left margin that .verified-badge applies when used inline in names */
.disclosure-preview-badges .verified-badge {
  margin-left: 0;
}

/* ── Terms of Service UI ─────────────────────────────────────────────────── */

/* Nav terms link — sits near the user name */
.nav-terms-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.terms-link-label {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
}

.nav-terms-link:hover .terms-link-label {
  color: var(--accent, #8b6246);
}

/* Red badge dot on the Terms nav link when re-consent is needed */
.tos-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

/* TOS Table of Contents anchor links */
.tos-toc-link:hover {
  text-decoration: underline;
}

/* Smooth scroll for TOC anchor navigation */
html {
  scroll-behavior: smooth;
}

/* TOS consent scroll box — restrained height so user must scroll */
#tos-scroll-box {
  scroll-behavior: smooth;
}

#tos-scroll-box::-webkit-scrollbar {
  width: 6px;
}

#tos-scroll-box::-webkit-scrollbar-track {
  background: transparent;
}

#tos-scroll-box::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* TOS agree button disabled/loading state */
#tos-agree-btn:disabled {
  pointer-events: none;
}

/* TOS page — reduced whitespace on mobile (< 768px) */
@media (max-width: 768px) {
  .tos-content h1 {
    font-size: 1.3rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  .tos-content h2 {
    font-size: 1rem !important;
    margin-top: 1.1rem !important;
    margin-bottom: 0.4rem !important;
  }
  .tos-content p {
    font-size: 0.88rem !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
  }
}

/* ── Bottom Sheet (Reusable) ─────────────────────────────────────── */
/* Body scroll lock when any sheet is open */
body.sheet-open {
  overflow: hidden;
  /* Prevent layout shift on scrollbar removal */
  padding-right: var(--scrollbar-width, 0px);
}

.dim-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dim-sheet-overlay.dim-sheet-visible {
  background: rgba(0, 0, 0, 0.42);
}

.dim-sheet {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 640px;
  /* Use dvh so browser chrome doesn't overlap on mobile */
  max-height: 88dvh;
  max-height: 88vh; /* fallback */
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  /* Flex column: handle + sticky header + scrollable body */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dim-sheet-overlay.dim-sheet-visible .dim-sheet {
  transform: translateY(0);
}

/* Drag handle — always at top, never scrolls */
.dim-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0.75rem auto 0.25rem;
  flex-shrink: 0;
}

/* Sticky header — always visible, close button never scrolls away */
.dim-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dim-sheet-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.dim-sheet-close {
  background: var(--warm-light);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
}

.dim-sheet-close:hover {
  background: var(--border);
}

/* Scrollable content body — safe-area bottom padding */
.dim-sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1.5rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 1.25rem;
  /* Align-content start so short content doesn't stretch */
  align-content: start;
}

/* Legacy — kept for any edge cases referencing old wrapper */
.dim-sheet-content {
  padding: 0;
}

/* Placeholder for sheets with content coming soon */
.dim-placeholder-section {
  border-top: none;
  padding-top: 2rem;
  text-align: center;
}

.dim-placeholder-text {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 2rem 0;
}

.dim-section {
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}

.dim-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.dim-section p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #3a3632;
  margin: 0;
}

.dim-section-band {
  background: var(--accent-light);
  border-radius: 10px;
  padding: 1rem;
  border-top: none;
}

.dim-section-band .dim-section-label {
  color: var(--accent);
}

.dim-section-band p {
  color: var(--accent);
}

.dim-section-prompt {
  border-top: none;
  background: var(--warm-light);
  border-radius: 10px;
  padding: 1rem;
}

.dim-section-prompt .dim-section-label {
  color: var(--warm);
}

.dim-growth-prompt {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #5c3d1e;
  font-style: italic;
  margin: 0;
}

/* ── How This Works Modal ─────────────────────────────────────────── */

.how-works-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.how-works-overlay.how-works-visible {
  background: rgba(0, 0, 0, 0.42);
}

.how-works-modal {
  background: var(--white);
  border-radius: 18px;
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.how-works-overlay.how-works-visible .how-works-modal {
  transform: scale(1);
  opacity: 1;
}

.how-works-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.how-works-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.how-works-close {
  background: var(--warm-light);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
}

.how-works-close:hover {
  background: var(--border);
}

.how-works-body {
  display: grid;
  gap: 1.25rem;
}

.how-works-layer {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.how-works-layer-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.how-works-layer-text {
  flex: 1;
}

.how-works-layer-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.how-works-layer-text p {
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.how-works-note {
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}

.how-works-note p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 480px) {
  .how-works-modal {
    padding: 1.25rem;
  }
  .dim-sheet-body {
    padding: 1rem 1.1rem calc(2rem + env(safe-area-inset-bottom, 0px));
  }
  .dim-sheet-header {
    padding: 0.75rem 1.1rem;
  }
}

/* ===================================================
   NEW NAV: Matches / Messages / Profile Pill
   =================================================== */

/* Desktop nav links (Matches, Messages) */
.nav-main-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-main-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}

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

.nav-main-link.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Inline unread count next to Messages (e.g. "(3)") */
.unread-badge-inline {
  font-size: 0.78rem;
  color: var(--error);
  font-weight: 600;
  margin-left: 3px;
}

/* Profile pill wrapper — keeps dropdown in-flow for positioning */
.profile-pill-wrap {
  position: relative;
}

/* Profile pill button */
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem 0.35rem 0.45rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.profile-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.profile-pill-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-pill-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-pill-chevron {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.profile-pill[aria-expanded="true"] .profile-pill-chevron {
  transform: rotate(180deg);
}

/* TOS alert badge on pill */
.tos-pill-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

/* Profile dropdown menu */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  z-index: 500;
  padding: 0.4rem 0;
  animation: dropdown-appear 0.15s ease;
}

@keyframes dropdown-appear {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: var(--warm-light);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.3rem 0;
}

.dropdown-item-logout {
  color: var(--error);
}

.dropdown-item-logout:hover {
  background: var(--error-light);
}

/* ===================================================
   MOBILE BOTTOM TAB BAR
   =================================================== */

.bottom-tab-bar {
  display: none; /* hidden on desktop */
}

/* Tab unread badge (small red dot/number) */
.tab-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--error);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  padding: 0 3px;
  margin-left: 2px;
  vertical-align: middle;
  line-height: 1;
}

/* Mobile menu — bottom sheet overlay */
#mobile-menu-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.mobile-menu-sheet-inner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding: 0.5rem 0 2rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 92dvh;
  overflow-y: auto;
}

.mobile-menu-sheet-inner.open {
  transform: translateY(0);
}

.mobile-menu-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0.5rem auto 1rem;
}

.mobile-menu-tos-note {
  background: #fde8e8;
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  margin: 0 0.75rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.mobile-menu-item {
  display: block;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.mobile-menu-item:active {
  background: var(--warm-light);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 1.5rem;
}

.mobile-menu-item-logout {
  color: var(--error);
}

/* ===================================================
   RESPONSIVE BREAKPOINTS FOR NEW NAV
   =================================================== */

@media (max-width: 767px) {
  /* Hide desktop nav links and profile pill on mobile */
  .nav-main-links,
  .profile-pill-wrap {
    display: none;
  }

  /* Show bottom tab bar on mobile */
  .bottom-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: var(--white);
    border-top: 1px solid var(--border);
    z-index: 100;
    justify-content: space-around;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    font-size: 0.7rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .tab-item svg {
    transition: stroke 0.15s;
  }

  .tab-item.tab-active {
    color: var(--accent);
  }

  .tab-item.tab-active svg {
    stroke: var(--accent);
  }

  /* Extra bottom padding to keep content above tab bar */
  .app-container {
    padding-bottom: 80px;
  }
}

/* ── Current Fits UI ──────────────────────────────────────────────────────── */

/* Ghost button — used for Pass and secondary actions */
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Pass button — compact, secondary to Message */
.btn-pass-fit {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* Card exit animation — triggered by window.__passMatch */
@keyframes cardExitSlide {
  0%   { opacity: 1; transform: translateX(0) scale(1); }
  60%  { opacity: 0.3; transform: translateX(32px) scale(0.97); }
  100% { opacity: 0; transform: translateX(48px) scale(0.95); }
}

.match-card.card-exit {
  animation: cardExitSlide 0.32s ease-in forwards;
  pointer-events: none;
}

/* "See more current fits" button — centered below list */
.see-more-fits-btn {
  display: flex;
  margin: 1.25rem auto 0.5rem;
  width: auto;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  border-color: var(--accent);
  padding: 0.6rem 1.4rem;
}

.see-more-fits-btn:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  border-color: var(--accent);
}

/* Fits count label — slightly de-emphasised vs a plain h2 */
h2.fits-count-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

/* match-actions layout: message left, pass + report right */
.match-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.match-actions .btn-match-msg {
  flex: 1;
}

.match-actions .btn-pass-fit {
  flex-shrink: 0;
}

.match-actions .btn-report {
  flex-shrink: 0;
  margin-left: auto;
}

/* ========================================================
   DISAPPEARING PHOTO — Chat composer + bubbles
   ======================================================== */

/* --- Camera button (left of text input) --- */
.btn-camera {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-camera:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-camera:disabled {
  opacity: 0.35;
  cursor: default;
}

/* --- Media bubble base --- */
.msg-media-bubble {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.msg-media-label {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Outgoing: unopened */
.msg-mine .msg-media-unopened {
  background: var(--accent);
  color: var(--white);
}

/* Outgoing: opened */
.msg-mine .msg-media-opened {
  background: var(--accent-light);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

/* Outgoing/incoming: expired */
.msg-mine .msg-media-expired,
.msg-theirs .msg-media-expired {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}

/* Incoming: locked card */
.msg-theirs .msg-media-locked {
  background: var(--white);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  transition: background 0.12s;
}

.msg-theirs .msg-media-locked:hover {
  background: var(--accent-light);
}

.msg-media-lock-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.msg-media-lock-text {
  font-size: 0.82rem;
}

/* --- Photo sheet content --- */
.photo-sheet-file-label {
  display: block;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: border-color 0.15s, color 0.15s;
}

.photo-sheet-file-label:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hides the label (shown when no file selected, hidden after file chosen) */
.photo-sheet-file-label.hidden {
  display: none;
}

/*
 * Visually-hidden file input — iOS Safari compatible.
 * position:absolute + opacity:0 + zero dimensions keeps the input
 * interactable (label clicks reach it) while visually hidden.
 * DO NOT use display:none — iOS Safari suppresses file pickers that way.
 */
.photo-sheet-file-label > .photo-sheet-file-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.photo-sheet-preview-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.photo-sheet-preview {
  width: 100%;
  max-height: 200px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.photo-sheet-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-chips {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.timer-chip {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.timer-chip.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.photo-sheet-disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.photo-sheet-send-btn {
  width: 100%;
  padding: 0.7rem;
  font-size: 1rem;
}

/* ── Fullscreen secure photo viewer (Task 4) ─────────────────────────────── */

/* Lock scroll while viewer is open */
body.pv-open {
  overflow: hidden;
}

/* Main fullscreen overlay */
.pv-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fade in */
  animation: pv-fadein 0.15s ease both;
}

@keyframes pv-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Image — no right-click / long-press save */
.pv-img {
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none; /* no context-menu, no drag */
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pv-loaded .pv-img {
  opacity: 1;
}

/* Loading spinner */
.pv-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pv-spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: pv-spin 0.7s linear infinite;
}

@keyframes pv-spin {
  to { transform: rotate(360deg); }
}

/* Close button — top-right, keyboard-accessible */
.pv-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3010;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.pv-close:hover,
.pv-close:focus {
  background: rgba(255, 255, 255, 0.18);
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Countdown widget — top-right corner, below close button */
.pv-countdown {
  position: absolute;
  top: 1rem;
  right: 4.5rem; /* sits left of the close button */
  z-index: 3010;
  display: none; /* shown after img.onload */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
}

/* SVG ring */
.pv-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* start from top */
  overflow: visible;
}

.pv-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 3;
}

.pv-ring-progress {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

/* Numeric countdown */
.pv-num {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ===================================================
   ASSESSMENT V2 — 36-item psychometric + life design
   =================================================== */

/* Outer wrapper — replaces step-card chrome during taking */
.assessment-v2-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  width: 100%;
}

/* Progress bar */
.asm-progress-wrap {
  margin-bottom: 1.25rem;
}

.asm-progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.asm-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.35s ease;
}

.asm-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.asm-progress-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
}

.asm-progress-time {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Item card */
.asm-item-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
}

.asm-item-text {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Part A — option buttons */
.asm-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.asm-option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

.asm-option-btn:hover {
  border-color: var(--warm);
}

.asm-option-btn:active {
  background: var(--warm-light);
}

.asm-option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

/* Part B — bipolar slider */
.asm-bipolar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.asm-bipolar-poles {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.asm-bipolar-pole {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 44%;
}

.asm-bipolar-pole-right {
  text-align: right;
}

.asm-slider-row {
  padding: 0 0.25rem;
}

/* Custom range slider */
.asm-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--asm-track-fill, 50%),
    var(--border) var(--asm-track-fill, 50%),
    var(--border) 100%
  );
  outline: none;
  cursor: pointer;
  margin: 0.5rem 0;
}

.asm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.20);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.asm-slider::-webkit-slider-thumb:active {
  box-shadow: 0 0 0 6px rgba(61, 90, 76, 0.15);
}

.asm-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.20);
  cursor: pointer;
}

.asm-bipolar-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
}

/* Continue / Submit button */
.asm-next-btn {
  width: 100%;
  font-size: 1rem;
}

/* Privacy note (intro + forced retake) */
.asm-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 1rem;
}

/* Intro card adjustments */
.asm-intro-card {
  max-width: 520px;
  margin: 1.5rem auto;
}

/* Completion card */
.asm-complete-card {
  text-align: center;
  max-width: 480px;
  margin: 1.5rem auto;
}

.asm-complete-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  line-height: 1;
}

/* Mobile: keep option buttons comfortable to tap */
@media (max-width: 480px) {
  .assessment-v2-wrap {
    padding: 0 1rem 2rem;
  }

  .asm-item-text {
    font-size: 1rem;
  }

  .asm-option-btn {
    padding: 0.8rem 0.9rem;
    font-size: 0.88rem;
  }

  .asm-bipolar-pole {
    font-size: 0.79rem;
  }
}
