/* ==========================================================================
   Mental Health Score — Design System & Master Stylesheet
   Theme: Warm Orange + White & Warm Neutrals
   Aesthetic: Modern SaaS + Mindful Editorial + Interactive Glassmorphic Dashboard
   ========================================================================== */

:root {
  /* Brand Palette: Warm Orange & Amber Accents */
  --color-primary: #ea580c;        /* Deep rich solar orange */
  --color-primary-hover: #c2410c;  /* Burnished orange */
  --color-primary-light: #f97316;  /* Vivid solar orange */
  --color-primary-subtle: #ffedd5; /* Soft warm peach tint */
  --color-primary-glow: rgba(234, 88, 12, 0.28);

  --color-amber: #f59e0b;
  --color-amber-light: #fef3c7;
  
  /* Warm Whites & Neutrals */
  --color-bg: #0b0d13;             /* Deep cosmic canvas under Sun */
  --color-surface-white: #ffffff;
  --color-surface-warm: #faf8f5;   /* Warm off-white / editorial paper */
  --color-surface-card: rgba(255, 255, 255, 0.95);
  --color-surface-glass: rgba(255, 255, 255, 0.88);
  --color-surface-glass-border: rgba(255, 255, 255, 0.65);
  
  --color-dark-glass: rgba(15, 23, 42, 0.65);
  --color-dark-border: rgba(255, 255, 255, 0.12);

  /* Typography Colors (High Contrast WCAG AAA compliant) */
  --color-text-main: #0f172a;       /* Deep slate ink for maximum readability */
  --color-text-muted: #475569;      /* Muted charcoal */
  --color-text-light: #64748b;      /* Subtle slate */
  --color-text-inverse: #f8fafc;    /* Crisp off-white on dark badges */

  /* Functional Status */
  --color-status-optimal: #15803d;
  --color-status-stable: #ea580c;
  --color-status-warning: #d97706;
  --color-status-alert: #dc2626;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 38px -6px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
  --shadow-orange-glow: 0 8px 28px -4px rgba(234, 88, 12, 0.35);

  /* Layout */
  --max-width: 1140px;
  --header-height: 72px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Background Sun Visual Layering
   ========================================================================== */
.sun-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#sun-bg {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Adaptive Atmospheric Vignette for readability */
.sun-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, rgba(15, 23, 42, 0.45) 0%, rgba(11, 13, 19, 0.82) 80%, rgba(8, 10, 15, 0.94) 100%);
  pointer-events: none;
  transition: background 0.6s ease;
}

/* Ambient Grain Texture */
.ambient-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.7;
}

/* Main Application Layer */
.app-root {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.5);
}

.brand-logo-icon svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-title em {
  font-style: normal;
  color: var(--color-primary-light);
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: #ea580c;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta-btn:hover {
  background: #d9480f;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.38);
  transform: translateY(-1px);
}

.nav-cta-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(234, 88, 12, 0.2);
}

.nav-cta-arrow {
  transition: transform 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

.nav-cta-btn:hover .nav-cta-arrow {
  transform: translateX(3px);
}

/* Header Progress Bar for Active Assessment */
.header-progress-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  display: none;
}

.header-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f97316, #ea580c);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Main Content Layout & Views
   ========================================================================== */
.main-container {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view-section.active {
  display: block;
}

/* ==========================================================================
   1. LANDING VIEW
   ========================================================================== */
.hero-content {
  text-align: center;
  max-width: 820px;
  margin: 1.5rem auto 3.5rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fdba74;
  margin-bottom: 1.5rem;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 8px #f97316;
  animation: pulseGlow 2s infinite;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.hero-title em {
  font-style: italic;
  color: #fdba74;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 680px;
  margin: 0 auto 2.25rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-primary-large {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-orange-glow);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -4px rgba(234, 88, 12, 0.55);
}

.btn-primary-large svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.btn-primary-large:hover svg {
  transform: translateX(3px);
}

.btn-secondary-large {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-secondary-large:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Previous Score Alert Banner */
.previous-score-banner {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.prev-score-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.prev-score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--color-primary);
}

.prev-score-details {
  font-size: 0.9375rem;
  color: var(--color-text-main);
  font-weight: 600;
}

.btn-prev-view {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-surface-warm);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  color: var(--color-text-main);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-prev-view:hover {
  background: #ffffff;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Trust & Privacy Badges */
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #cbd5e1;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.trust-item svg {
  width: 16px;
  height: 16px;
  color: #fdba74;
}

/* Features Grid */
.features-section {
  margin-top: 4rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fdba74;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 500;
  text-align: center;
  color: #ffffff;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-surface-glass-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px -6px rgba(0, 0, 0, 0.16);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f97316, #ea580c);
}

.feature-icon-bubble {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon-bubble svg {
  width: 26px;
  height: 26px;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Dimensions Showcase Cards */
.dimensions-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.dim-preview-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border-left: 5px solid var(--card-color, #ea580c);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.dim-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dim-preview-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.4rem;
}

.dim-preview-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   OFFICIAL GOVERNMENT HELPLINES SECTION (LANDING PAGE)
   ========================================================================== */
.safety-helpline-section {
  margin-top: 5rem;
  padding-top: 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.safety-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.helplines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.helpline-card {
  background: var(--color-surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-surface-glass-border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.helpline-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #fdba74;
}

.helpline-card.highlight-card {
  border-left: 4px solid #15803d;
}

.card-top-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.badge-green {
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
  border: 1px solid rgba(21, 128, 61, 0.3);
}

.badge-orange {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.3);
}

.badge-red {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-blue {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.helpline-body {
  margin-bottom: 1.5rem;
}

.helpline-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.25rem;
}

.helpline-authority {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.helpline-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.helpline-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.helpline-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.helpline-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.helpline-call-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-helpline-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
  transition: all 0.18s ease;
}

.btn-helpline-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
  color: #ffffff;
}

.btn-emergency-call {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-emergency-call:hover {
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
}

.btn-helpline-alt {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  color: var(--color-text-main);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-helpline-alt:hover {
  background: #f1f5f9;
}

.landing-ethics-banner {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-surface-glass-border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.ethics-icon {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.ethics-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   2. SINGLE-PAGE COMPACT ASSESSMENT EXPERIENCE
   ========================================================================== */
.assessment-container {
  max-width: 860px;
  margin: 0 auto;
}

.single-page-assessment {
  position: relative;
}

/* Sticky Top Navigation & Progress Bar */
.assessment-sticky-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.sticky-bar-inner {
  padding: 0.65rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.sticky-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sticky-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ea580c;
  background: #fff7ed;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(234, 88, 12, 0.2);
}

.sticky-progress-meta {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.sticky-count {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.sticky-pct {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ea580c;
}

.sticky-section-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  max-width: 100%;
}

.sticky-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sticky-jump-btn:hover {
  background: #ffffff;
  border-color: #ea580c;
  color: #ea580c;
  transform: translateY(-1px);
}

.jump-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sticky-progress-track {
  width: 100%;
  height: 3px;
  background: #f1f5f9;
}

.sticky-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #ea580c);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Assessment Intro Banner (Directly above questions) */
.assessment-intro-banner {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem 0;
}

.intro-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.2rem);
  font-weight: 600;
  color: var(--color-text-inverse);
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.intro-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Grouped Dimension Cards (Sections Container) */
.assessment-sections-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.dimension-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--dim-theme, #ea580c);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
  scroll-margin-top: 130px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dimension-card:hover {
  box-shadow: 0 6px 24px -2px rgba(0, 0, 0, 0.08);
}

.dim-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.dim-header-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dim-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--dim-theme, #ea580c);
  background: #fff7ed;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.dim-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin: 0;
  line-height: 1.25;
}

.dim-weight-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.dim-questions-list {
  display: flex;
  flex-direction: column;
}

/* Compact Question Item */
.q-compact-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s ease;
}

.q-compact-item:last-child {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.q-compact-item:first-child {
  padding-top: 0.4rem;
}

.q-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.q-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.q-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ea580c;
  background: #fff7ed;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.q-title-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  line-height: 1.35;
}

.q-check-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.q-check-pill.visible {
  opacity: 1;
  transform: scale(1);
}

.q-compact-control {
  margin-top: 0.35rem;
}

/* 1. Pill Select Buttons */
.q-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.q-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.q-pill-btn:hover {
  background: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
  transform: translateY(-1px);
}

.q-pill-btn:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

.q-pill-btn.selected {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.28);
}

/* 2. Compact Sliders */
.q-compact-slider {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
}

.slider-track-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}

.bound-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.compact-range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  transition: background 0.15s ease;
  cursor: pointer;
}

.compact-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ea580c;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.compact-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.compact-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ea580c;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
  cursor: pointer;
}

.slider-badge-val {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.775rem;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.slider-badge-val.active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
}

.slider-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

.slider-desc {
  font-weight: 500;
}

/* Submit & Validation Panel */
.assessment-submit-panel {
  margin-top: 0.5rem;
  margin-bottom: 3.5rem;
}

.assessment-validation-notice {
  display: none;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  align-items: center;
  gap: 0.75rem;
  color: #991b1b;
  font-size: 0.875rem;
}

.assessment-validation-notice.visible {
  display: flex;
}

.val-alert-icon {
  color: #dc2626;
  flex-shrink: 0;
}

.val-alert-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.submit-action-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.submit-info {
  flex: 1;
}

.submit-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.25rem;
}

.submit-sub {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.btn-calculate-score {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  background: #ea580c;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-calculate-score:hover {
  background: #d9480f;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.btn-calculate-score:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

/* ==========================================================================
   3. CALCULATING COSMIC STATE
   ========================================================================== */
.calculating-card {
  max-width: 520px;
  margin: 3rem auto;
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-surface-glass-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  padding: 3.5rem 2rem;
  text-align: center;
}

.calculating-pulse {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  background: radial-gradient(circle, #f97316 0%, #ea580c 100%);
  box-shadow: 0 0 32px rgba(234, 88, 12, 0.6);
  animation: pulseBig 1.5s infinite ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.calculating-pulse svg {
  width: 36px;
  height: 36px;
  animation: spinSlow 8s linear infinite;
}

.calculating-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
}

.calculating-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   4. RESULTS DASHBOARD
   ========================================================================== */
.result-dashboard {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Score Reveal Banner */
.score-hero-card {
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-surface-glass-border);
  box-shadow: 0 20px 44px -8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(24px);
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
}

.gauge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.circular-gauge {
  width: 220px;
  height: 220px;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 14;
}

.gauge-fill {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.6s ease;
}

.gauge-center-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-big-number {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-main);
  letter-spacing: -0.03em;
}

.score-max-sub {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.score-scaled-pill {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--color-surface-warm);
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  color: var(--color-text-main);
}

.score-summary-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tier-badge {
  align-self: flex-start;
  padding: 0.4rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid currentColor;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  font-weight: 500;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.result-summary-text {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.result-reflection-box {
  background: #fffaf5;
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.9375rem;
  color: #7c2d12;
  font-style: italic;
  line-height: 1.55;
}

.result-action-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-result-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-retake {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-retake:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}

.btn-export {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--color-text-main);
}

.btn-export:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-clear-data {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.5rem;
  text-decoration: underline;
}

.btn-clear-data:hover {
  color: var(--color-status-alert);
}

/* Category Cards Grid & Radar Visualization */
.dashboard-middle-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.dashboard-card-panel {
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-surface-glass-border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  padding: 2.25rem 2rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-main);
  letter-spacing: -0.015em;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.cat-title-group {
  display: flex;
  flex-direction: column;
}

.cat-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.cat-pts {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.cat-badge {
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.status-optimal { background: #dcfce7; color: #166534; }
.status-stable { background: #ffedd5; color: #9a3412; }
.status-warning { background: #fef3c7; color: #92400e; }
.status-alert { background: #fee2e2; color: #991b1b; }

.cat-meter-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cat-meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.cat-score-text {
  color: var(--color-text-main);
}

.cat-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Radar / Spider Chart Panel */
.radar-panel-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

#radar-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  overflow: visible;
}

.radar-grid-poly {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 1;
}

.radar-axis-line {
  stroke: #cbd5e1;
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.radar-label {
  font-size: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  fill: #64748b;
}

.radar-data-polygon {
  fill: rgba(249, 115, 22, 0.25);
  stroke: #ea580c;
  stroke-width: 2.5;
  transition: all 0.6s ease;
}

.radar-data-dot {
  fill: #ffffff;
  stroke: #ea580c;
  stroke-width: 2.5;
}

/* Strengths & Focus Areas Section */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.insight-panel {
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-surface-glass-border);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

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

.insight-item {
  display: flex;
  gap: 1rem;
  padding: 1.15rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
}

.insight-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.insight-icon svg {
  width: 20px;
  height: 20px;
}

.insight-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.25rem;
}

.insight-body {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Actionable Recommendations Grid */
.recommendations-section {
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-surface-glass-border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
}

.recs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.rec-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.rec-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rec-dim-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.rec-timing {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.rec-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.rec-action {
  font-size: 0.875rem;
  color: var(--color-text-main);
  line-height: 1.5;
}

.rec-rationale {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Interactive Breathing Widget */
.breathing-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(254, 243, 199, 0.95) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.breathing-visual-container {
  width: 180px;
  height: 180px;
  margin: 1.5rem auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breath-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, #f97316 0%, #ea580c 100%);
  box-shadow: 0 0 32px rgba(234, 88, 12, 0.5);
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.breath-timer {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}

.breath-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 1.25rem;
}

.breath-start-btn {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  background: var(--color-text-main);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.breath-start-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.breath-start-btn.running {
  background: var(--color-primary);
}

/* Crisis Helplines & Medical Disclaimer */
.safety-disclaimer-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(16px);
  padding: 2.5rem;
  color: #f8fafc;
  margin-bottom: 2rem;
}

.safety-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.safety-icon {
  color: #fdba74;
}

.safety-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.safety-text {
  font-size: 0.9375rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.crisis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.crisis-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.crisis-region {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #fdba74;
}

.crisis-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
}

.crisis-contact a {
  font-size: 0.875rem;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
}

.crisis-contact a:hover {
  text-decoration: underline;
}

.crisis-detail {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ==========================================================================
   Footer — Warm & Minimalist Architectural Design with "scripted by dev"
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(10, 14, 23, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 4rem 1.5rem 2.5rem;
  color: #94a3b8;
  font-size: 0.875rem;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
}

.footer-brand-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-brand-title {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.015em;
  transition: opacity 0.2s ease;
}

.footer-brand-title em {
  font-style: italic;
  color: #f97316;
}

.footer-brand-title:hover {
  opacity: 0.9;
}

.footer-brand-tagline {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fdba74;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  max-width: 520px;
  line-height: 1.6;
  margin-top: 0.35rem;
}

.footer-contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 380px;
}

.footer-contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

.footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fdba74;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.3);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  word-break: break-all;
}

.footer-email-link svg {
  flex-shrink: 0;
  color: #f97316;
}

.footer-email-link:hover {
  background: rgba(234, 88, 12, 0.24);
  border-color: #f97316;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.footer-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.875rem;
  padding-top: 0.5rem;
}

.footer-link {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: #f97316;
}

.footer-link-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
}

/* Centered Developer Credit: "scripted by dev" */
.footer-credit-block {
  margin: 0.5rem 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.footer-credit-block::before,
.footer-credit-block::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-scripted-by {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0.4rem 1.4rem;
  margin: 0 1rem;
  border-radius: var(--radius-full);
  background: rgba(249, 115, 22, 0.06);
  border: 1px solid rgba(249, 115, 22, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.footer-scripted-by:hover {
  color: #ffffff;
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
  transform: translateY(-1px);
}

.footer-bottom-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  padding-top: 0.5rem;
}

.footer-copy {
  color: #94a3b8;
}

.footer-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  font-size: 0.6875rem;
  font-weight: 600;
}

/* ==========================================================================
   Legal & Transparency Pages (Terms & Conditions, Privacy Policy)
   Aesthetic: Warm Off-White Editorial Paper, Deep Slate Ink, Warm Accents
   ========================================================================== */
.legal-page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Top Action Bar (Back button, Print button) */
.legal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: #ffffff;
  color: var(--color-text-main);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-legal-back:hover {
  background: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
  transform: translateX(-2px);
}

.legal-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-legal-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: #f8fafc;
  color: var(--color-text-muted);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-legal-action:hover {
  background: #ffffff;
  color: var(--color-text-main);
  border-color: #cbd5e1;
}

/* Legal Header Card */
.legal-header-card {
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-surface-glass-border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: #ffedd5;
  color: #9a3412;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.legal-badge.badge-privacy {
  background: #dcfce7;
  color: #166534;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  color: var(--color-text-main);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

.legal-subtitle {
  font-size: 1.0625rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

.legal-meta-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #64748b;
  padding-top: 0.25rem;
}

.legal-meta-strip strong {
  color: var(--color-text-main);
}

.legal-meta-strip a {
  color: #ea580c;
  text-decoration: none;
}

.legal-meta-strip a:hover {
  text-decoration: underline;
}

.legal-advisory-callout {
  background: #fffaf5;
  border: 1px solid #fed7aa;
  border-left: 4px solid #ea580c;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  font-size: 0.875rem;
  color: #7c2d12;
  line-height: 1.55;
  margin-top: 0.5rem;
}

/* Table of Contents Card */
.legal-toc-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}

.toc-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem 0;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem 1.25rem;
}

.toc-link {
  color: #ea580c;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
  line-height: 1.4;
}

.toc-link:hover {
  color: #c2410c;
  text-decoration: underline;
}

/* Legal Body Article Card */
.legal-body-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-md);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  color: var(--color-text-main);
  line-height: 1.7;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-margin-top: 90px;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.legal-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-text-main);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.section-heading::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.2rem;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.legal-section p {
  font-size: 0.9375rem;
  color: #334155;
  margin: 0;
}

.legal-section strong {
  color: var(--color-text-main);
}

.legal-section ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-section li {
  font-size: 0.9375rem;
  color: #334155;
}

/* Alert Boxes in Legal Pages */
.legal-alert-box {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.legal-alert-box.alert-warning {
  background: #fffaf0;
  border: 1px solid #fed7aa;
  border-left: 5px solid #ea580c;
}

.legal-alert-box.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
}

.legal-alert-box.alert-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #64748b;
}

.legal-alert-box.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 5px solid #10b981;
}

.legal-alert-box.alert-dpdp {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-left: 5px solid #a855f7;
}

.legal-alert-box strong {
  font-size: 0.9375rem;
  color: var(--color-text-main);
}

.legal-alert-box ul {
  margin: 0.25rem 0 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legal-alert-box li {
  font-size: 0.875rem;
  color: #475569;
}

/* Table Wrapper for Storage Breakdown */
.legal-table-box {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  margin: 0.75rem 0;
}

.legal-storage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.legal-storage-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--color-text-main);
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.legal-storage-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  line-height: 1.5;
  vertical-align: top;
}

.legal-storage-table tr:last-child td {
  border-bottom: none;
}

.legal-storage-table tr:nth-child(even) td {
  background: #fafaf9;
}

.legal-storage-table code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #0f172a;
}

/* Contact Developer Box in Legal Sections */
.legal-contact-card {
  background: linear-gradient(135deg, #fffaf5 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.contact-card-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-card-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ea580c;
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  width: fit-content;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
  transition: all 0.2s ease;
}

.contact-card-email:hover {
  background: #c2410c;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}

.inline-view-trigger {
  color: #ea580c;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}

.inline-view-trigger:hover {
  color: #c2410c;
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(249, 115, 22, 0.4);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-notice.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .score-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .tier-badge {
    align-self: center;
  }
  .result-action-row {
    justify-content: center;
  }
  .dashboard-middle-grid {
    grid-template-columns: 1fr;
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .helplines-grid {
    grid-template-columns: 1fr;
  }
  .submit-action-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 1.75rem 1.25rem;
  }
  .btn-calculate-score {
    width: 100%;
    justify-content: center;
  }
  .footer-inner-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
  .legal-body-card {
    padding: 2.25rem 1.75rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }
  .header-nav {
    display: none;
  }
  .main-container {
    padding: 1rem 0.85rem 3rem;
  }
  .dimension-card {
    padding: 1rem 1rem;
    border-radius: var(--radius-md);
  }
  .dim-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .q-compact-header {
    flex-wrap: wrap;
  }
  .q-compact-slider {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .slider-badge-val {
    align-self: flex-start;
  }
  .q-pill-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  .sticky-bar-inner {
    padding: 0.5rem 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .sticky-left {
    justify-content: space-between;
  }
  .sticky-section-nav {
    gap: 0.25rem;
  }
  .sticky-jump-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }
  .helpline-card {
    padding: 1.35rem 1rem;
  }
  .helpline-call-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-helpline-call,
  .btn-helpline-alt {
    width: 100%;
    justify-content: center;
  }
  .score-hero-card {
    padding: 2rem 1.25rem;
  }
  .recommendations-section {
    padding: 1.75rem 1.25rem;
  }
  .safety-disclaimer-panel {
    padding: 1.75rem 1.25rem;
  }
  .circular-gauge {
    width: 180px;
    height: 180px;
  }
  .score-big-number {
    font-size: 2.75rem;
  }
  .footer-inner-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-middle-bar {
    padding: 1.5rem 0 1rem;
  }
  .footer-scripted-by {
    margin: 0 0.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .legal-header-card {
    padding: 1.75rem 1.25rem;
  }
  .legal-title {
    font-size: 1.75rem;
  }
  .legal-body-card {
    padding: 1.75rem 1.25rem;
    gap: 2rem;
  }
  .legal-toc-card {
    padding: 1.25rem 1rem;
  }
  .legal-contact-card {
    padding: 1.5rem 1.25rem;
  }
  .legal-bottom-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .btn-legal-back {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Print Optimization
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .sun-container, .site-header, .site-footer, .result-action-row, .breathing-card, #toast {
    display: none !important;
  }
  .main-container {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .score-hero-card, .dashboard-card-panel, .insight-panel, .recommendations-section, .safety-disclaimer-panel {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    backdrop-filter: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid;
  }
}
