/* ==========================================================================
   NET WORTH & INCOME COMPARATOR - DESIGN SYSTEM
   Vanilla CSS Styling | Premium Dark Glassmorphism Mode
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --bg-gradient: radial-gradient(circle at 80% 20%, #1e1b4b 0%, #0f172a 100%);
  
  /* Color Palette */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-350: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  
  /* Accent Colors */
  --color-primary: #6366f1;       /* Indigo for base tier / Income */
  --color-secondary: #a855f7;     /* Purple for higher tier / Net Worth */
  --color-gold: #f59e0b;          /* Gold for top tier vanity achievements */
  --color-teal: #14b8a6;          /* Teal for success notifications */
  --color-danger: #ef4444;        /* Crimson for invalid input fields */
  
  /* Glassmorphism Accents */
  --glass-bg: rgba(30, 41, 59, 0.6);
  --glass-bg-hover: rgba(30, 41, 59, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(99, 102, 241, 0.4);
  
  /* Typography */
  --font-family-headings: 'Outfit', sans-serif;
  --font-family-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-family-body);
  background: var(--bg-gradient);
  color: var(--slate-100);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* App Container Layout */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 2rem;
  z-index: 10;
  position: relative;
}

/* Header Styles */
.app-header {
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.logo-icon {
  font-size: 2.25rem;
}

.app-header h1 {
  font-family: var(--font-family-headings);
  font-weight: 800;
  font-size: 2.25rem;
  letter-spacing: -0.025em;
  display: inline-flex;
  align-items: center;
}

.brand-fina {
  background: linear-gradient(45deg, #00f2fe 0%, #4facfe 45%, #34d399 100%);
  background-size: 200% 200%;
  animation: finaGlow 6s ease infinite alternate;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 2px;
}

@keyframes finaGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.brand-benchlabs {
  background: linear-gradient(135deg, #c084fc 0%, #818cf8 60%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--slate-400);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 0.75rem;
  font-weight: 300;
}

.header-nav-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 0.35rem 0.6rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 105;
}

.nav-pill {
  position: relative;
  z-index: 110;
  pointer-events: auto !important;
  background: transparent;
  border: 1px solid transparent;
  color: var(--slate-300);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
}

.nav-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-pill.coffee-pill {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-weight: 600;
}
.nav-pill.coffee-pill:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.nav-pill.nurty-pill {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #4ee0b3;
  font-weight: 600;
}
.nav-pill.nurty-pill:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #ffffff;
  border-color: rgba(78, 224, 179, 0.6);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.nav-pill.author-pill {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-weight: 500;
}
.nav-pill.author-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.nav-pill.email-pill {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-weight: 600;
}
.nav-pill.email-pill:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

/* Single Dashboard Container & 2-Column Tab Panel Grid */
.dashboard-single-container, .dashboard-grid {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.tab-panel-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .tab-panel-grid {
    grid-template-columns: 1fr;
  }
}

.tab-left-col {
  width: 100%;
}

.tab-right-col {
  width: 100%;
  min-width: 0;
}

.dashboard-main-card {
  width: 100%;
}

.header-brand-title {
  margin-bottom: 1.25rem;
}

.card-subheading {
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Tab Embedded Input Card Styling */
.tab-input-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.25);
}

.tab-input-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.tab-input-header label {
  font-family: var(--font-family-headings);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.tab-input-field input {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  padding: 0.85rem 1rem 0.85rem 2.5rem !important;
  color: #38bdf8 !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.tab-input-field input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35) !important;
}

/* Cards (Glassmorphism Core) */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
  position: relative;
}

.card:hover {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-family: var(--font-family-headings);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--slate-50);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}

/* Inputs Form Elements */
fieldset {
  border: none;
}

/* Gestalt Proximity: Keep label close to input, but leave space between groups */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem; /* tight gap for label-input correlation */
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-200);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* Inputs styling */
input[type="number"],
input[type="text"],
select {
  width: 100%;
  min-height: 48px; /* Touch target accessibility friendly */
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-family-body);
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--slate-50);
  box-sizing: border-box;
  transition: all 0.2s ease;
}

input[type="number"]:hover,
input[type="text"]:hover,
select:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Focus Indicator Accessibility */
input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 1px;
  border-color: transparent;
}

/* Currency Input Prefix wrapper */
.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-container.prefix input {
  padding-left: 2rem;
}

.input-prefix {
  position: absolute;
  left: 0.85rem;
  color: var(--slate-400);
  font-size: 1.1rem;
  pointer-events: none;
  font-weight: 500;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--slate-400);
  margin-top: 0.15rem;
}

/* Required Fields styling */
input:invalid:user-invalid {
  border-color: var(--color-danger);
}

/* Optional Group & Premium badge */
.optional-tag {
  color: var(--slate-400);
  font-weight: 400;
  font-size: 0.8rem;
}

.premium-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.optional-fieldset {
  border: 1px dashed rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  padding: 1.25rem 1rem 0.75rem;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(168, 85, 247, 0.02);
}

.optional-legend {
  font-family: var(--font-family-headings);
  font-size: 0.85rem;
  font-weight: 600;
  color: #e9d5ff;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inline-paywall-notice {
  font-size: 0.75rem;
  color: var(--slate-400);
  background: rgba(168, 85, 247, 0.05);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 2px solid var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.35;
}

.lock-icon-inline {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Privacy & GDPR Security Callout */
.security-privacy-callout {
  background: rgba(20, 184, 166, 0.06);
  border-left: 3px solid var(--color-teal);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  color: var(--slate-350);
  line-height: 1.45;
}

/* Buttons */
.primary-btn {
  width: 100%;
  min-height: 50px;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, #4f46e5 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, #7477f8 0%, #5f57ef 100%);
}

.primary-btn:active {
  transform: translateY(1px);
}

/* Results Section & Header Tabs */
.results-card {
  display: flex;
  flex-direction: column;
  min-height: 580px;
}

/* Vivid, Ultra-Obvious Segmented Control Active Tabs (Evenly Spaced 100% Width) */
.results-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.tab-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  background: #090d16;
  padding: 0.5rem;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.5);
  gap: 0.5rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--slate-300);
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-family: var(--font-family-headings);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 0.65rem;
  min-height: 56px;
  width: 100%;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.tab-step-tag {
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-300);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.tab-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tab-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  text-align: left;
  min-width: 0;
}

.tab-title-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: inherit;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-prompt-text {
  font-size: 0.72rem;
  color: var(--slate-400);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-help-qmark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-400);
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: all 0.2s ease;
  cursor: help;
}

.tab-help-qmark:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.1);
}

.tab-btn.active {
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.tab-btn.active .tab-step-tag {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.tab-btn.active .tab-prompt-text {
  color: rgba(255, 255, 255, 0.88);
}

.tab-btn.active .tab-help-qmark {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

#tab-income.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

#tab-networth.active {
  background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 100%);
  border-color: #c084fc;
  box-shadow: 0 6px 20px rgba(126, 34, 206, 0.5);
}

#tab-advice.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #fbbf24;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5);
}

@media (max-width: 820px) {
  .tab-container {
    grid-template-columns: 1fr;
  }
  .tab-btn {
    min-height: 48px;
  }
}

/* Placeholder State */
.results-placeholder-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--slate-400);
  padding: 3rem;
}

.placeholder-art {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.results-placeholder-state h3 {
  color: var(--slate-200);
  font-family: var(--font-family-headings);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.results-placeholder-state p {
  font-size: 0.95rem;
  max-width: 320px;
}

/* Realized Results Layout */
.results-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cohort-filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.filter-label {
  color: var(--slate-400);
}

.toggle-group {
  display: flex;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.15rem;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* Vanity Card / Badge System */
.vanity-card {
  position: relative;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Animated shine on vanity card */
.vanity-shine {
  position: absolute;
  top: 0;
  left: -50%;
  width: 20%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: skewX(-30deg);
  animation: shine 6s infinite ease-in-out;
}

@keyframes shine {
  0% { left: -50%; }
  30% { left: 150%; }
  100% { left: 150%; }
}

/* --- Compact Standing Pills Bar (Ultra-Sharp & Space-Efficient) --- */
.compact-standings-bar {
  margin: 0.85rem 0 1.25rem;
}

.standing-pills-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.standing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.standing-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.standing-pill-tag {
  font-family: var(--font-family-headings);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-350);
}

.standing-pill-val {
  font-family: var(--font-family-headings);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.standing-pill-sub {
  font-size: 0.7rem;
  color: var(--slate-400);
  font-weight: 500;
}

/* Theme Pill Variations */
.standing-pill.global-pill {
  border-radius: 4px !important; /* Sharp Square Edges for Global Standing Banner */
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.5) 0%, rgba(4, 120, 87, 0.3) 100%);
}
.standing-pill.global-pill .standing-pill-val {
  color: #34d399;
}

.standing-pill.national-pill {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.5) 0%, rgba(67, 56, 202, 0.3) 100%);
}
.standing-pill.national-pill .standing-pill-val {
  color: #818cf8;
}

.standing-pill.state-pill {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.5) 0%, rgba(126, 34, 206, 0.3) 100%);
}
.standing-pill.state-pill .standing-pill-val {
  color: #c084fc;
}

.global-color {
  color: #34d399 !important;
}

.experimental-badge-tag {
  font-size: 0.6rem;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fef08a;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.35rem;
  letter-spacing: 0.03em;
}

.experimental-pill {
  font-size: 0.65rem;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.25rem;
  font-weight: 600;
}

/* Premium tiers badges */
.victory-badge.tier-elite {
  border: 2px solid #fbbf24 !important; /* Gold border */
  box-shadow: 0 10px 35px rgba(251, 191, 36, 0.5) !important;
}

.victory-badge.tier-gold {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3) !important;
}

.victory-badge.tier-silver {
  border: 2px solid #cbd5e1 !important;
  box-shadow: 0 8px 30px rgba(203, 213, 225, 0.25) !important;
}

.victory-badge-title {
  font-family: var(--font-family-headings);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.35rem;
}

.victory-badge-number {
  font-family: var(--font-family-headings);
  font-size: 2.25rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.25rem;
}

.victory-badge-subtitle {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.victory-badge-tier-label {
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  color: #fff;
  margin-top: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Specialize Elite gold text and shine */
.victory-badge.tier-elite .victory-badge-tier-label {
  background: #fbbf24;
  color: #1e1b4b;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.vanity-text {
  flex: 1;
}

.vanity-heading {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  margin-bottom: 0.15rem;
}

.vanity-body {
  font-size: 1rem;
  color: var(--slate-100);
}

.vanity-body strong {
  color: white;
  font-weight: 600;
}

/* Dynamic Vanity Color overrides for High Percentiles */
.top-tier-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%) !important;
  color: #1e1b4b !important;
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4) !important;
}

.mid-high-badge {
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%) !important;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4) !important;
}

.chart-wrapper {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 0.5rem;
  position: relative;
}
.chart-desc {
  font-size: 0.8rem;
  color: var(--slate-400);
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

.distribution-curve {
  overflow: visible;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}

/* Bloomberg-tier Smooth Path Morphing for Cohort Toggles */
path.curve-path, path.curve-shade {
  transition: d 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), stroke-opacity 0.2s ease, fill-opacity 0.2s ease;
}

/* User markers, dashed crosshairs, and hover indicators must update synchronously with zero latency */
g.user-marker,
.marker-guideline-x,
.marker-guideline-y,
.marker-dot,
.marker-pulse-ring,
.hover-guideline,
.hover-intersection-dot {
  transition: none !important;
}

.curve-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.curve-path.national-line {
  stroke-width: 3.5;
}

.curve-path.state-line {
  stroke-dasharray: 6, 4;
  stroke-width: 2.5;
}

.curve-path.global-line {
  stroke-dasharray: 4, 4;
  stroke-width: 2.5;
}

.curve-path.age-line {
  stroke-dasharray: 7, 4;
  stroke-width: 2.5;
}

.curve-shade {
  opacity: 0.12;
}

.curve-shade:not([id*="national"]) {
  display: none; /* Keep area clean: only fill primary baseline curve */
}

.chart-axis-line {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

/* Grid gradient definitions will be appended to SVG */
.marker-guideline-x,
.marker-guideline-y {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1.5;
  stroke-dasharray: 4,4;
}

.marker-dot {
  fill: white;
  stroke: var(--color-primary);
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.8));
  transition: all 0.3s ease;
}

.marker-label {
  font-family: var(--font-family-headings);
  font-size: 0.72rem;
  font-weight: 700;
  fill: white;
  text-anchor: middle;
  background: rgba(15, 23, 42, 0.8);
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--slate-400);
}

/* Tab Panels */
.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel-subtitle {
  font-family: var(--font-family-headings);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--slate-100);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Benchmarks Bar Charts */
.bar-chart-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.bar-label {
  font-weight: 500;
  color: var(--slate-200);
}

.bar-value {
  color: var(--slate-400);
}

.bar-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  width: 0; /* Animated dynamically */
  transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  background: linear-gradient(to right, rgba(99, 102, 241, 0.4), var(--color-primary));
}

/* Highlight row for user value inside bar chart */
.bar-row.user-row .bar-label {
  color: white;
  font-weight: 600;
}

.bar-row.user-row .bar-value {
  color: var(--slate-50);
  font-weight: 600;
}

.bar-row.user-row .bar-track {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  height: 14px;
}

.bar-row.user-row .bar-fill {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

/* Premium Gated Paywall Overlay */
.paywall-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.paywall-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 16px;
  padding: 2rem;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.1);
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: pulseLock 2s infinite ease-in-out;
}

@keyframes pulseLock {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(168, 85, 247, 0)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(168, 85, 247, 0)); }
}

.paywall-box h3 {
  font-family: var(--font-family-headings);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
}

.paywall-feature-tag {
  display: inline-block;
  font-size: 0.78rem;
  background: rgba(168, 85, 247, 0.15);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.paywall-box p {
  font-size: 0.88rem;
  color: var(--slate-350);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.paywall-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.premium-cta-btn {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, #8b5cf6 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
  transition: all 0.2s ease;
}

.premium-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.45);
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--slate-300);
  padding: 0.75rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 46px;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Confetti Canvas overlays background */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
  display: none;
  z-index: 999;
}

/* Footer Styling */
.app-footer {
  margin-top: auto;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  color: var(--slate-400);
  font-size: 0.8rem;
}

.footer-notes {
  margin-top: 0.5rem;
  font-weight: 300;
  line-height: 1.4;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.footer-legal-links {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Premium Cohort Notice Banner */
.premium-cohort-notice {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--slate-200);
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.premium-cohort-notice .lock-icon-inline {
  font-size: 1.1rem;
  color: #c084fc;
}

.notice-text strong {
  color: #e9d5ff;
}

/* Chart SVG Gridlines & Axes */
.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
  stroke-dasharray: 4, 4;
}

.chart-y-axis-text {
  font-size: 0.68rem;
  fill: #cbd5e1 !important;
  font-weight: 500;
  text-anchor: end;
}

/* Sponsor Card & Minimal Ad Showcase */
.sponsor-card {
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
}

.sponsor-header {
  margin-bottom: 0.75rem;
  display: flex;
}

.sponsor-tag {
  font-family: var(--font-family-headings);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.sponsor-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sponsor-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.sponsor-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.sponsor-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sponsor-link {
  font-family: var(--font-family-headings);
  font-size: 0.88rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.sponsor-link:hover {
  color: white;
}

.sponsor-text p {
  font-size: 0.78rem;
  color: var(--slate-400);
  line-height: 1.35;
}

.sponsor-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
}

/* Tasteful Sponsor Showcase horizontal layout */
.sponsor-card {
  margin-top: 1.5rem;
  padding: 1.5rem 2rem;
  width: 100%;
}

.sponsor-header {
  margin-bottom: 1rem;
  display: flex;
}

.sponsor-tag {
  font-family: var(--font-family-headings);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.sponsor-content.horizontal-stream {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .sponsor-content.horizontal-stream {
    flex-direction: column;
    gap: 1rem;
  }
  .sponsor-divider {
    display: none;
  }
}

.sponsor-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  flex: 1;
}

.sponsor-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.sponsor-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sponsor-link {
  font-family: var(--font-family-headings);
  font-size: 0.88rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.sponsor-link:hover {
  color: white;
}

.sponsor-text p {
  font-size: 0.78rem;
  color: var(--slate-400);
  line-height: 1.35;
}

.sponsor-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  align-self: stretch;
}

/* Net Worth Estimator Tool in Left Column */
.estimator-details {
  margin: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
}

.estimator-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  user-select: none;
}

.estimator-summary::-webkit-details-marker {
  display: none;
}

.summary-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #c084fc;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.summary-title:hover {
  color: #d8b4fe;
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
  animation: slideDown 0.25s ease;
}

@media (max-width: 400px) {
  .estimator-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.estimator-column h4 {
  font-family: var(--font-family-headings);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.2rem;
}

.estimator-column:first-of-type h4 {
  color: var(--color-teal);
}

.estimator-column:last-of-type h4 {
  color: #fca5a5;
}

.estimator-column .form-group {
  margin-bottom: 0.75rem;
}

.estimator-column .form-group label {
  font-size: 0.75rem;
  color: var(--slate-350);
}

.estimator-input {
  min-height: 36px !important;
  padding: 0.4rem 0.65rem !important;
  font-size: 0.85rem !important;
  border-radius: 8px !important;
}

/* Checkbox alignment */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.checkbox-container input[type="checkbox"] {
  accent-color: var(--color-teal);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.7rem !important;
  color: var(--slate-400) !important;
  cursor: pointer;
  user-select: none;
}

/* Estimator summary row output cards */
.estimator-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.est-sum-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.est-sum-card span {
  font-size: 0.68rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.1rem;
}

.est-sum-card strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-100);
}

.est-sum-card.highlight {
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.est-sum-card.highlight strong {
  color: #e9d5ff;
  font-weight: 700;
  font-size: 1.05rem;
}

/* Slide Rule Sliders (Interactive Dual Sync) */
.slider-container {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(9, 13, 22, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.slider-header-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--slate-400);
}

.slider-header-label strong {
  font-family: var(--font-family-headings);
  font-size: 0.9rem;
  color: #38bdf8;
}

.input-slider {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  transition: background 0.2s ease;
}

.input-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.input-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.networth-slider::-webkit-slider-thumb {
  background: linear-gradient(135deg, #c084fc 0%, #7e22ce 100%);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.investable-slider::-webkit-slider-thumb {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--slate-400);
  font-weight: 500;
}

/* Chart Cohort Slicing Toolbar (Redesigned & Sleek) */
.chart-slicing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 0.6rem 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slicing-label {
  font-family: var(--font-family-headings);
  font-size: 0.85rem;
  color: #fff;
  font-weight: 700;
}

.slicing-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.slicing-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.slicing-checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.slicing-checkbox-custom {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--slate-400);
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
  background: rgba(15, 23, 42, 0.5);
}

.slicing-checkbox-wrapper input[type="checkbox"]:checked + .slicing-checkbox-custom::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Color Coding for Overlay Lines and Toggles */
.age-color {
  color: #2dd4bf;
}
.slicing-checkbox-wrapper.age-color input[type="checkbox"]:checked + .slicing-checkbox-custom {
  background: #14b8a6;
  border-color: #14b8a6;
}
.age-line {
  stroke: #14b8a6;
}
.age-dot {
  stroke: #14b8a6 !important;
  filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.8));
}
.age-marker .marker-label {
  fill: #5eead4;
}

.global-color {
  color: #6ee7b7;
}
.slicing-checkbox-wrapper.global-color input[type="checkbox"]:checked + .slicing-checkbox-custom {
  background: #34d399;
  border-color: #34d399;
}
.global-dot {
  stroke: #34d399 !important;
  fill: #34d399 !important;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.8));
}
.global-pulse {
  stroke: #34d399 !important;
}
.global-marker .marker-label {
  fill: #a7f3d0;
}
.hover-intersection-dot.global {
  fill: #34d399;
  stroke: #ffffff;
}

.national-color {
  color: #a5b4fc;
}
.slicing-checkbox-wrapper.national-color input[type="checkbox"]:checked + .slicing-checkbox-custom {
  background: #6366f1;
  border-color: #6366f1;
}
.national-line {
}
.national-dot {
  stroke: #6366f1 !important;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.8));
}
.national-marker .marker-label {
  fill: #c7d2fe;
}

.state-color {
  color: #e9d5ff;
}
.slicing-checkbox-wrapper.state-color input[type="checkbox"]:checked + .slicing-checkbox-custom {
  background: #a855f7;
  border-color: #a855f7;
}
.state-line {
}
.state-dot {
  stroke: #a855f7 !important;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8));
}
.state-marker .marker-label {
  fill: #f5f3ff;
}

.age-color {
  color: #fde68a;
}
.slicing-checkbox-wrapper.age-color input[type="checkbox"]:checked + .slicing-checkbox-custom {
  background: #f59e0b;
  border-color: #f59e0b;
}
.age-dot {
  stroke: #f59e0b !important;
  fill: #f59e0b !important;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8));
}
.age-pulse {
  stroke: #f59e0b !important;
}
.age-marker .marker-label {
  fill: #fef08a;
}
.standing-pill.age-pill {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.state-slicing-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-state-select {
  min-height: 28px !important;
  padding: 0.15rem 1.75rem 0.15rem 0.5rem !important;
  font-size: 0.78rem !important;
  border-radius: 6px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  width: auto !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  cursor: pointer;
  color: var(--slate-100) !important;
}

.chart-axis-label {
  font-size: 0.72rem;
  fill: #38bdf8 !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Income Guidance FAQ Accordion */
.income-faq-accordion {
  margin-top: 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1.15rem;
  transition: all 0.2s ease;
}

.income-faq-accordion[open] {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.income-faq-summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #38bdf8;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.income-faq-summary::-webkit-details-marker {
  display: none;
}

.income-faq-content {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--slate-300);
  font-size: 0.85rem;
  line-height: 1.6;
}

.income-faq-content p {
  margin-bottom: 0.75rem;
}

.income-faq-content ul {
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.income-faq-content li {
  margin-bottom: 0.5rem;
}

/* Hover Interactivity & Tooltip Styles */
.chart-hover-overlay {
  cursor: crosshair;
  pointer-events: all !important;
  fill: rgba(0, 0, 0, 0.001) !important;
}

.chart-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  pointer-events: none;
  z-index: 10;
  color: #fff;
  font-size: 0.78rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 170px;
  transition: opacity 0.1s ease;
}

.tooltip-title {
  font-weight: 600;
  color: var(--slate-300);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.25rem;
  margin-bottom: 0.15rem;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.tooltip-row.national {
  color: #a5b4fc;
}

.tooltip-row.state {
  color: #e9d5ff;
}

/* Hover vertical guideline */
.hover-guideline {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-dasharray: 3,3;
  stroke-width: 1.5;
  pointer-events: none;
}

/* Hover indicator dots (dynamic cursors - smaller & translucent to not clash with static markers) */
.hover-intersection-dot {
  fill: #1e1b4b;
  stroke-width: 1.5;
  r: 4;
  pointer-events: none;
  opacity: 0.85;
}

.hover-intersection-dot.national {
  stroke: #818cf8;
}

.hover-intersection-dot.state {
  stroke: #c084fc;
}

/* Pulse rings for the permanent static user markers */
.marker-pulse-ring {
  fill: none;
  transform-origin: center;
  transform-box: fill-box;
  animation: svgPulse 2s infinite ease-out;
  pointer-events: none;
}

.national-pulse {
  stroke: rgba(99, 102, 241, 0.7);
}

.state-pulse {
  stroke: rgba(168, 85, 247, 0.7);
}

@keyframes svgPulse {
  0% {
    r: 6;
    stroke-width: 3.5;
    opacity: 0.85;
  }
  100% {
    r: 16;
    stroke-width: 0.5;
    opacity: 0;
  }
}

/* --- Advice Waterfall Styles --- */
.waterfall-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
  position: relative;
}

.waterfall-container::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, #6366f1 0%, #a855f7 50%, #10b981 100%);
  opacity: 0.3;
}

.waterfall-step {
  display: flex;
  gap: 1.25rem;
  position: relative;
}

.step-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--slate-800);
  border: 2px solid #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-headings);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  z-index: 1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.waterfall-step:hover .step-badge {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
  border-color: #a855f7;
}

.step-content {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  flex: 1;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.waterfall-step:hover .step-content {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.45);
}

.step-content h4 {
  font-family: var(--font-family-headings);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-100);
  margin-bottom: 0.35rem;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--slate-300);
  line-height: 1.5;
}

/* Advice Notes & Table */
.advice-notes-section {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
}

.notes-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.note-card {
  flex: 1;
  min-width: 240px;
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem;
}

.note-card h5 {
  font-family: var(--font-family-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-100);
  margin-bottom: 0.5rem;
}

.note-card p {
  font-size: 0.82rem;
  color: var(--slate-300);
  line-height: 1.55;
}

/* Comparison Table */
.advice-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--slate-200);
}

.advice-table th,
.advice-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.advice-table th {
  background: rgba(15, 23, 42, 0.5);
  font-family: var(--font-family-headings);
  font-weight: 700;
  color: var(--slate-100);
}

.advice-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* --- Disclaimer & Advisor Ads Styles --- */
.disclaimer-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  backdrop-filter: blur(8px);
}

.disclaimer-banner h3 {
  font-family: var(--font-family-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.disclaimer-banner p {
  font-size: 0.8rem;
  color: var(--slate-300);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.disclosure-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.disclosure-checkbox {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
}

.disclosure-label-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a5b4fc;
  cursor: pointer;
  transition: color 0.2s ease;
}

.disclosure-label-btn:hover {
  color: #818cf8;
}

/* Advisor Ads Grid */
.advisor-ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  animation: fadeIn 0.4s ease-out both;
}

.advisor-ad-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.advisor-ad-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.advisor-ad-card h5 {
  font-family: var(--font-family-headings);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.advisor-ad-card p {
  font-size: 0.74rem;
  color: var(--slate-400);
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.ad-link-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Progress vial / container gauges */
.step-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.step-limit-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  color: var(--slate-300);
}

.step-progress-wrapper {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.step-progress-fill {
  height: 100%;
  width: 0%; /* Dynamic fill */
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.74rem;
}

.step-metric-item {
  color: var(--slate-400);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.step-metric-item .metric-label {
  color: var(--slate-500);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.step-metric-item strong {
  color: var(--slate-200);
  font-family: var(--font-family-headings);
  font-weight: 700;
}

.step-metric-item.cumulative {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
}

.step-metric-item.cumulative .metric-label {
  color: #34d399;
}

.step-metric-item.cumulative strong {
  color: #6ee7b7;
}

/* Savings Rate Shortcuts & Waterfall Summary Card */
.savings-shortcuts-container {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shortcut-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-400);
  display: block;
  margin-bottom: 0.5rem;
}

.shortcut-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.shortcut-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--slate-300);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-family-headings);
  cursor: pointer;
  transition: all 0.2s ease;
}

.shortcut-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

.shortcut-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.waterfall-allocation-card {
  margin-top: 1.15rem;
  background: rgba(9, 13, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.allocation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--slate-350);
}

.allocation-item strong {
  font-family: var(--font-family-headings);
  font-size: 0.92rem;
  color: #fff;
}

.allocation-item.highlight strong {
  color: #34d399;
}

/* Conversion Badges & Section Divider */
.conversion-badge {
  background: var(--slate-800);
  border-color: #a855f7 !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

.advice-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}

/* --- Strategy Selector (Die with Zero vs Dynasty Roth) --- */
.strategy-selector-section {
  margin-bottom: 2rem;
}

.strategy-header {
  margin-bottom: 1.25rem;
}

.strategy-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.strategy-version-badge {
  font-family: var(--font-family-headings);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

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

.strategy-card {
  background: rgba(15, 23, 42, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.35rem 1.25rem;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.strategy-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.75);
  transform: translateY(-2px);
}

.strategy-card.active {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
}

.strategy-card#strategy-card-roth.active {
  border-color: #fbbf24;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.25);
}

.strategy-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.strategy-card-badge {
  font-family: var(--font-family-headings);
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strategy-card-badge.gold {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.35);
}

.strategy-card h4 {
  font-family: var(--font-family-headings);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
  letter-spacing: -0.015em;
}

.strategy-tagline {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate-400);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.strategy-summary-text {
  font-size: 0.84rem;
  color: var(--slate-300);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.strategy-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.feat-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.feat-pill.gold {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.strategy-select-indicator {
  font-family: var(--font-family-headings);
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.2s ease;
}

.strategy-card.active .strategy-select-indicator {
  opacity: 1;
  transform: scale(1);
}

.strategy-card#strategy-card-roth.active .strategy-select-indicator {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.35);
}

/* Detailed Strategy Card Playbook */
.strategy-detail-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.35rem;
  animation: fadeIn 0.3s ease;
}

.detail-header {
  margin-bottom: 0.85rem;
}

.detail-pill {
  display: inline-block;
  font-family: var(--font-family-headings);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-pill.pill-zero {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.detail-pill.pill-roth {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.detail-header h4 {
  font-family: var(--font-family-headings);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.strategy-detail-body p {
  font-size: 0.82rem;
  color: var(--slate-300);
  line-height: 1.55;
  margin-bottom: 1rem;
}

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

.detail-subcard {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.95rem;
}

.detail-subcard h5 {
  font-family: var(--font-family-headings);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-100);
  margin-bottom: 0.35rem;
}

.detail-subcard p {
  font-size: 0.78rem;
  color: var(--slate-350);
  line-height: 1.45;
  margin-bottom: 0;
}

/* Audience Scope Banner */
.audience-scope-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(30, 58, 138, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.5rem;
}

.scope-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.scope-content strong {
  display: block;
  font-size: 0.85rem;
  font-family: var(--font-family-headings);
  color: #93c5fd;
  margin-bottom: 0.2rem;
}

.scope-content p {
  font-size: 0.78rem;
  color: var(--slate-300);
  line-height: 1.45;
  margin: 0;
}

/* Household Profile & Account Access Configurator */
.household-config-panel {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
}

.config-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.config-icon {
  font-size: 1.25rem;
}

.config-title-row h5 {
  font-family: var(--font-family-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.15rem;
}

.config-subtext {
  font-size: 0.74rem;
  color: var(--slate-400);
  margin: 0;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.config-grid-stacked {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.config-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
}

.status-toggle-group {
  display: flex;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--slate-400);
  padding: 0.4rem 0.65rem;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-family-headings);
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-btn:hover {
  color: #fff;
}

.status-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.checkbox-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--slate-300);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.checkbox-pill:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.8);
}

.checkbox-pill input[type="checkbox"] {
  display: none;
}

.checkbox-pill .pill-check {
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.checkbox-pill input[type="checkbox"]:checked ~ .pill-check {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.checkbox-pill:has(input[type="checkbox"]:checked) {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
  color: #fff;
}

/* Other Specialized Accounts Grid */
.other-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}

.other-account-card {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.15rem;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.other-account-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(15, 23, 42, 0.5);
  transform: translateY(-2px);
}

.other-acc-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.other-acc-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.other-acc-header h5 {
  font-family: var(--font-family-headings);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.15rem;
}

.acc-type-tag {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c084fc;
}

.other-account-card p {
  font-size: 0.78rem;
  color: var(--slate-350);
  line-height: 1.5;
  margin: 0;
}

/* Spend Down Grid & Cards */
.spend-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.spend-phase-card {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.spend-phase-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(15, 23, 42, 0.45);
}

.spend-phase-num {
  font-family: var(--font-family-headings);
  font-size: 0.64rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  width: fit-content;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spend-phase-card h5 {
  font-family: var(--font-family-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.45rem;
}

.spend-phase-card p {
  font-size: 0.8rem;
  color: var(--slate-300);
  line-height: 1.5;
}

/* --- Limits Year Notice Banner --- */
.limits-year-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.limits-year-notice .calendar-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.limits-notice-content strong {
  font-family: var(--font-family-headings);
  font-size: 0.88rem;
  font-weight: 700;
  color: #a5b4fc;
}

/* Header Premium & Export Buttons */
.coffee-header-btn {
  background: linear-gradient(135deg, #ffdd00 0%, #f59e0b 100%);
  color: #1e1b4b;
  text-decoration: none;
  font-family: var(--font-family-headings);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.coffee-header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
  color: #0f172a;
}

/* Buy Me a Coffee Support & Donation Card */
.support-coffee-card {
  margin: 2rem 0 1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.22) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.15);
}

.support-coffee-badge {
  font-family: var(--font-family-headings);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fbbf24;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.support-coffee-content h3 {
  font-family: var(--font-family-headings);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.support-coffee-content p {
  color: var(--slate-300);
  font-size: 0.92rem;
  max-width: 620px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}

.coffee-donate-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  text-decoration: none !important;
  box-shadow: 0 8px 25px -4px rgba(245, 158, 11, 0.5);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.coffee-donate-primary-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px -2px rgba(245, 158, 11, 0.65);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.brand-subtag-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -0.2rem;
  margin-bottom: 0.75rem;
}

.brand-subtag {
  font-family: var(--font-family-headings);
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.15);
}

.share-header-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-family: var(--font-family-headings);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.share-header-btn:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.share-header-btn.copied {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6) !important;
}

.secondary-header-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-200);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-family-headings);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-header-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* --- Form Section Blocks & Income vs Net Worth Explainer --- */
.form-section-block {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  margin: 1.25rem 0;
  transition: border-color 0.25s ease;
}

.form-section-block:focus-within {
  border-color: rgba(56, 189, 248, 0.35);
}

.section-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.section-block-header h3 {
  font-family: var(--font-family-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.section-block-tag {
  font-family: var(--font-family-headings);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
}

.income-nw-explainer {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
}

.explainer-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-family-headings);
  font-size: 0.85rem;
  color: #38bdf8;
  margin-bottom: 0.35rem;
}

.income-nw-explainer p {
  font-size: 0.8rem;
  color: var(--slate-300);
  line-height: 1.55;
  margin: 0;
}

.header-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* AdSense Slot Wrapper */
.adsense-slot-wrapper {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.85rem;
}

.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-500);
  display: block;
  margin-bottom: 0.35rem;
  text-align: center;
}

.adsense-placeholder-box {
  background: rgba(15, 23, 42, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.adsense-stub-text {
  font-size: 0.75rem;
  color: var(--slate-400);
}

/* Stripe Paywall Modal Dialog */
.paywall-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 650px;
  width: 90%;
  margin: auto;
}

.paywall-dialog::backdrop {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
}

.paywall-modal-content {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2rem;
  color: #fff;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.modal-close-icon {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--slate-400);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-icon:hover {
  color: #fff;
}

.paywall-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.paywall-crown-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.35rem;
}

.paywall-header h2 {
  font-family: var(--font-family-headings);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.paywall-header p {
  font-size: 0.85rem;
  color: var(--slate-300);
}

.paywall-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.paywall-feature-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: 10px;
}

.feature-icon {
  font-size: 1.25rem;
}

.feature-text strong {
  font-size: 0.88rem;
  color: #fff;
  display: block;
}

.feature-text p {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: 0.15rem;
}

.paywall-pricing-grid {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pricing-card {
  flex: 1;
  min-width: 200px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  position: relative;
}

.pricing-card.featured {
  border-color: #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, rgba(30, 41, 59, 0.6) 100%);
}

.pricing-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.1);
  color: var(--slate-300);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  width: fit-content;
  margin: 0 auto 0.5rem auto;
}

.pricing-badge.gold {
  background: #f59e0b;
  color: #1e1b4b;
}

.pricing-card h4 {
  font-family: var(--font-family-headings);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.price-val {
  font-family: var(--font-family-headings);
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
}

.price-val span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate-400);
}

.pricing-card p {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin: 0.35rem 0 1rem 0;
}

.paywall-buy-btn {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: none;
  background: #6366f1;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-family-headings);
  cursor: pointer;
  transition: all 0.2s ease;
}

.paywall-buy-btn.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1e1b4b;
}

.paywall-buy-btn:hover {
  transform: scale(1.02);
}

.paywall-security-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--slate-400);
}

/* ==========================================================================
   Comprehensive Mobile & Small Tablet Optimization Overhaul (320px - 768px)
   ========================================================================== */

@media (max-width: 768px) {
  /* Container spacing & Header layout */
  .app-container {
    padding: 0.75rem 0.5rem;
  }

  .app-header {
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
  }

  .logo-area {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
  }

  .logo-area h1 {
    font-size: 1.65rem;
    letter-spacing: -0.02em;
  }

  .brand-subtag {
    font-size: 0.65rem;
  }

  .subtitle {
    font-size: 0.82rem;
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
    text-align: center;
  }

  .header-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
  }

  .header-sep {
    display: none;
  }

  .coffee-header-btn, 
  .share-header-btn, 
  .secondary-header-btn, 
  .text-link {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  /* Single-column grid stack */
  .dashboard-single-container, .dashboard-grid {
    padding: 0;
  }

  .tab-panel-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .card {
    padding: 1.15rem 0.85rem;
    border-radius: 14px;
  }

  /* Tab Header Bar */
  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .header-brand-title {
    text-align: center;
    margin-bottom: 0.25rem;
  }

  .header-brand-title .card-title {
    font-size: 1.25rem;
  }

  .header-brand-title .card-subheading {
    font-size: 0.85rem;
    margin-top: 0.85rem !important;
    margin-bottom: 1.15rem !important;
    color: #cbd5e1;
    font-weight: 500;
    line-height: 1.4;
  }

  .tab-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    padding: 0.25rem;
    background: #090d16;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.3);
  }

  .tab-btn {
    padding: 0.5rem 0.3rem;
    font-size: 0.75rem;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    min-height: 38px;
  }

  .tab-icon {
    font-size: 0.82rem;
  }

  /* Cohort Slicing Controls */
  .chart-slicing-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
  }

  .slicing-controls {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .slicing-checkbox-wrapper {
    font-size: 0.72rem;
  }

  .state-slicing-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .chart-state-select {
    flex: 1;
    max-width: none;
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
  }

  /* Compact Standing Pills Row (Scrunched 3-Column Mini Bar on Mobile) */
  .compact-standings-bar {
    margin: 0.35rem 0 0.6rem;
  }

  .standing-pills-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }

  .standing-pill {
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0.35rem 0.25rem;
    border-radius: 8px;
    gap: 0.1rem;
  }

  .standing-pill-tag {
    font-size: 0.62rem;
    letter-spacing: 0;
  }

  .standing-pill-val {
    font-size: 0.88rem;
  }

  .standing-pill-sub {
    display: none;
  }

  /* Scrunched Input Card */
  .tab-input-card {
    padding: 0.75rem 0.75rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
  }

  .tab-input-header label {
    font-size: 0.85rem;
  }

  .tab-input-field input {
    font-size: 1.15rem !important;
    padding: 0.6rem 0.75rem 0.6rem 2.2rem !important;
  }

  .field-hint {
    font-size: 0.72rem;
  }

  /* Net Worth Estimator Grid on Mobile */
  .estimator-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .estimator-summary-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .est-sum-card {
    width: 100%;
  }

  /* SVG Distribution Chart */
  .chart-wrapper {
    margin: 0.6rem 0;
    padding: 0.4rem 0.2rem;
    border-radius: 12px;
  }

  .panel-subtitle {
    font-size: 1.05rem;
  }

  .chart-desc {
    font-size: 0.78rem;
  }

  /* Bar Charts */
  .benchmark-bar-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.65rem;
  }

  .bar-label-group {
    width: 100%;
    justify-content: space-between;
  }

  .bar-track-wrapper {
    width: 100%;
  }

  /* Advice Waterfall Steps */
  .waterfall-step {
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 0.85rem;
  }

  .step-badge {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .step-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  /* Buy Me a Coffee Support Card */
  .support-coffee-card {
    padding: 1.15rem 0.85rem;
    border-radius: 14px;
    margin-top: 2rem;
  }

  .support-coffee-content h3 {
    font-size: 1.1rem;
  }

  .support-coffee-content p {
    font-size: 0.8rem;
  }

  .coffee-btn-cta {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
  }

  /* Footer */
  .app-footer {
    margin-top: 2rem;
    padding: 1.5rem 0.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Print / PDF Export Styles */
@media print {
  body {
    background: #0f172a !important;
    color: #f8fafc !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .header-nav-toolbar, #export-pdf-btn, .modal-overlay, #confetti-canvas,
  .slider-container, .savings-shortcuts-container, .tab-container,
  .chart-hover-overlay, .hover-guideline, .hover-intersection-dot {
    display: none !important;
  }
  .app-container {
    padding: 0.5rem !important;
    max-width: 100% !important;
  }
  .card, .results-card, .form-card {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    break-inside: avoid;
  }
  .chart-wrapper {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .hidden {
    display: none !important;
  }
}

.limits-notice-content p {
  font-size: 0.78rem;
  color: var(--slate-300);
  line-height: 1.4;
  margin-top: 0.2rem;
}

/* How It Was Built & Data Sources Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.modal-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--slate-300);
  font-size: 1.5rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--slate-100);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-icon {
  font-size: 1.75rem;
}

.modal-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-100);
  margin: 0;
}

.techstack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.tech-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
}

.tech-emoji {
  font-size: 1.6rem;
  line-height: 1;
  padding-top: 0.15rem;
}

.tech-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--slate-100);
  margin-bottom: 0.25rem;
}

.tech-item p {
  font-size: 0.85rem;
  color: var(--slate-400);
  margin: 0;
  line-height: 1.45;
}

.text-link-btn {
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}
.text-link-btn:hover {
  color: var(--slate-200);
}

.modal-card-lg {
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
}

.datasources-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.datasource-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.15rem;
}

.datasource-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.datasource-item p {
  font-size: 0.85rem;
  color: var(--slate-300);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.datasource-item p:last-child {
  margin-bottom: 0;
}

/* Origin Story Backstory Modal Card */
.origin-story-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
}

.origin-badge-tag {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.origin-heading {
  font-family: var(--font-family-headings);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.origin-p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--slate-300);
  margin-bottom: 0.85rem;
}

.origin-reasons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .origin-reasons-grid {
    grid-template-columns: 1fr;
  }
}

.origin-reason-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem;
}

.origin-reason-box .reason-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.origin-reason-box strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.origin-reason-box p {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--slate-400);
  margin: 0;
}

.origin-quote-box {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid #6366f1;
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1rem;
}

.origin-quote-box p {
  font-size: 0.84rem;
  font-style: italic;
  color: #c7d2fe;
  margin: 0;
  line-height: 1.5;
}

.modal-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  margin: 1.5rem 0;
}

.tech-section-title {
  font-family: var(--font-family-headings);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
}

/* Email Me Results Modal & Preview Box */
.modal-intro-text {
  font-size: 0.88rem;
  color: var(--slate-300);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.email-preview-container {
  margin-bottom: 1.25rem;
}

.email-preview-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  margin-bottom: 0.4rem;
}

.email-preview-content {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1rem;
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

.email-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-action-lg {
  flex: 1;
  min-width: 180px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-action-lg:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   INFORMATIONAL & ADMINISTRATIVE CENTER (IN-PAGE HUB)
   ========================================================================== */
.info-center-section {
  max-width: 1200px;
  margin: 3.5rem auto 2rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  scroll-margin-top: 2rem;
  position: relative;
  z-index: 10;
}

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

.info-super-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.info-main-title {
  font-family: var(--font-family-headings);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.info-main-subtitle {
  color: var(--slate-400);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   ACCOUNT ACCESS & QUALIFICATION MATRIX TABLE
   ========================================================================== */
.eligibility-matrix-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.matrix-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.status-toggle-group-inline {
  display: inline-flex;
  gap: 0.35rem;
  background: #090d16;
  padding: 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.status-toggle-group-inline .status-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--slate-400);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-family-headings);
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-toggle-group-inline .status-btn:hover {
  color: #fff;
}

.status-toggle-group-inline .status-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.matrix-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.matrix-table thead {
  background: rgba(30, 41, 59, 0.7);
}

.matrix-table th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-300);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.matrix-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.matrix-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.matrix-table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

.matrix-acc-info strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.matrix-acc-info span {
  display: block;
  font-size: 0.76rem;
  color: var(--slate-400);
}

.matrix-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-300);
}

.matrix-check-label input[type="checkbox"] {
  display: none;
}

.matrix-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: transparent;
  font-size: 0.75rem;
  font-weight: 800;
  transition: all 0.2s ease;
}

.matrix-check-label input[type="checkbox"]:checked ~ .matrix-checkbox {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.matrix-check-label input[type="checkbox"]:checked ~ .matrix-check-text {
  color: #34d399;
}

.matrix-limit-cell {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  white-space: nowrap;
}

/* Single vs Married dynamic column collapse */
.matrix-col-p2.single-hidden, 
#matrix-th-spouse.single-hidden {
  display: none !important;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--font-family-headings);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a5b4fc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.7);
}

.matrix-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.calendar-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-right: 0.5rem;
}

/* Strategy Summary Text */
.strategy-summary-text {
  font-size: 0.84rem;
  color: var(--slate-300);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

/* ==========================================================================
   MINIMALIST MODERN SAAS FOOTER
   ========================================================================== */
.app-footer-minimal {
  max-width: 1200px;
  margin: 3.5rem auto 2.5rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-minimal-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-minimal-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-logo {
  font-family: var(--font-family-headings);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--slate-400);
}

.footer-minimal-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-link-btn {
  background: transparent;
  border: none;
  color: var(--slate-300);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.footer-link-btn:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.footer-link-btn.highlight {
  color: #fbbf24;
  font-weight: 700;
}

.footer-link-btn.highlight:hover {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

.footer-dot {
  color: var(--slate-500);
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .footer-minimal-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .footer-minimal-links {
    justify-content: center;
  }
}

/* ==========================================================================
   SLIDE-OVER INSPECTOR DRAWER (MODERN SAAS / LINEAR AESTHETIC)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.app-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 580px;
  background: rgba(10, 15, 29, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -15px 0 60px rgba(0, 0, 0, 0.75);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-drawer.open {
  transform: translateX(0);
}

body.drawer-open {
  overflow: hidden;
}

.drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Drawer Header */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-super-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.35rem;
}

.drawer-title {
  font-family: var(--font-family-headings);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--slate-300);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: scale(1.05);
}

/* Drawer Segmented Nav Toolbar */
.drawer-nav-container {
  padding: 0.85rem 1.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-nav-toolbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #060911;
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.25rem;
}

.drawer-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--slate-400);
  padding: 0.45rem 0.35rem;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-family-headings);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.drawer-tab-btn:hover {
  color: #fff;
}

.drawer-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.drawer-tab-btn.coffee-drawer-btn {
  color: #fbbf24;
}

.drawer-tab-btn.coffee-drawer-btn.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
  color: #fff !important;
}

/* Drawer Content Body */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  scroll-behavior: smooth;
}

.drawer-body::-webkit-scrollbar {
  width: 6px;
}
.drawer-body::-webkit-scrollbar-track {
  background: transparent;
}
.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.drawer-panel {
  animation: fadeInPanel 0.2s ease-out forwards;
}

.drawer-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.4rem;
}

.drawer-section-heading {
  font-family: var(--font-family-headings);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}

.drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 1.5rem 0;
}

.datasource-drawer-item {
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.datasource-drawer-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.datasource-drawer-item h5 {
  font-family: var(--font-family-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem;
}
.datasource-drawer-item p {
  font-size: 0.84rem;
  color: var(--slate-300);
  line-height: 1.55;
  margin: 0.5rem 0 0;
}

/* ==========================================================================
   HIGH-POLISH TYPOGRAPHY & STRUCTURED COMPONENT SYSTEM
   ========================================================================== */

/* Crisp SVG Icon Elements */
.brand-logo-svg {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.4));
}

.nav-pill-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
}

.tab-btn-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -2.5px;
  margin-right: 6px;
}

.btn-icon-svg {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
}

/* Income Calculation Guide Grid */
.income-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.income-guide-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
}

.income-guide-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.8);
}

.income-guide-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.income-guide-card-title {
  font-family: var(--font-family-headings);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.income-guide-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.income-guide-card p {
  font-size: 0.78rem;
  color: var(--slate-300);
  line-height: 1.5;
  margin: 0;
}

.income-exclude-banner {
  margin-top: 0.85rem;
  padding: 0.7rem 0.9rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--slate-300);
}

.income-exclude-tag {
  font-weight: 700;
  color: #f87171;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Strategy Phase Execution Grid */
.strategy-phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (max-width: 820px) {
  .strategy-phase-grid {
    grid-template-columns: 1fr;
  }
}

.strategy-phase-card {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.phase-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #38bdf8;
  margin-bottom: 0.25rem;
  display: block;
}

.phase-tag.gold {
  color: #fbbf24;
}

.phase-title {
  font-family: var(--font-family-headings);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.phase-desc {
  font-size: 0.76rem;
  color: var(--slate-300);
  line-height: 1.5;
  margin: 0;
}

.strategy-axiom-callout {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid #6366f1;
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: #c7d2fe;
}

.strategy-axiom-callout.gold {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: #f59e0b;
  color: #fde68a;
}

/* Specialized & Self-Employed Tax Shelters Catalog */
.other-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.other-account-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.other-account-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(15, 23, 42, 0.75);
}

.other-acc-header h5 {
  font-family: var(--font-family-headings);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.acc-type-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.acc-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.65rem;
  font-size: 0.75rem;
}

.acc-spec-table td {
  padding: 0.35rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.acc-spec-table td.spec-k {
  color: var(--slate-400);
  font-weight: 600;
  width: 38%;
}

.acc-spec-table td.spec-v {
  color: var(--slate-200);
  font-weight: 500;
}

/* Architecture Metric Strip & Pillars (Drawer) */
.arch-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 1.15rem 0;
}

@media (max-width: 600px) {
  .arch-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.arch-stat-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.arch-stat-val {
  font-family: var(--font-family-headings);
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  display: block;
}

.arch-stat-lbl {
  font-size: 0.65rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arch-pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.arch-pillar-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.arch-pillar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.arch-pillar-title {
  font-family: var(--font-family-headings);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.arch-pillar-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.arch-pillar-item p {
  font-size: 0.76rem;
  color: var(--slate-300);
  line-height: 1.5;
  margin: 0;
}

/* Dataset Specification Cards (Data Sources Drawer) */
.datasource-spec-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  transition: all 0.2s ease;
}

.datasource-spec-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.datasource-spec-card:last-child {
  margin-bottom: 0;
}

.datasource-spec-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.datasource-spec-header h5 {
  font-family: var(--font-family-headings);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.datasource-spec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.spec-meta-tag {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--slate-300);
}

.spec-meta-tag.source-agency {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.datasource-spec-details p {
  font-size: 0.78rem;
  color: var(--slate-300);
  line-height: 1.5;
  margin: 0 0 0.4rem;
}

.datasource-spec-details p:last-child {
  margin-bottom: 0;
}

/* Perks List for Donation Drawer */
.refined-perk-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.refined-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  color: var(--slate-200);
  line-height: 1.5;
}

.refined-perk-item svg {
  flex-shrink: 0;
  margin-top: 3px;
}

/* Trust Disclaimers in Legal Drawer */
.legal-card-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.legal-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.legal-card-header h4 {
  font-family: var(--font-family-headings);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.legal-card-item p {
  font-size: 0.8rem;
  color: var(--slate-300);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

/* Drawer Footer */
.drawer-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 9, 17, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-esc-hint {
  font-size: 0.74rem;
  color: var(--slate-500);
}

.drawer-esc-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--slate-300);
  font-family: monospace;
}

.drawer-coffee-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.drawer-coffee-link:hover {
  color: #fde68a;
  text-decoration: underline;
}

/* Mobile Drawer Responsiveness */
@media (max-width: 640px) {
  .app-drawer {
    max-width: 100%;
  }
  .drawer-nav-toolbar {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   CLEAN COMPREHENSIVE SAAS FOOTER
   ========================================================================== */

.app-footer-full {
  max-width: 1200px;
  margin: 3.5rem auto 3rem;
  padding: 3rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-headings);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.footer-brand-desc {
  font-size: 0.82rem;
  color: var(--slate-400);
  line-height: 1.6;
  max-width: 320px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.74rem;
  font-weight: 600;
  color: #4ee0b3;
  width: fit-content;
  margin-top: 0.5rem;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ee0b3;
  box-shadow: 0 0 8px #4ee0b3;
  animation: pulse 2s infinite ease-in-out;
}

.footer-col-heading {
  font-family: var(--font-family-headings);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 1.15rem;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav-link {
  color: var(--slate-400);
  font-size: 0.82rem;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-nav-link:hover {
  color: #38bdf8;
  transform: translateX(2px);
}

.footer-nav-link.highlight {
  color: #fbbf24;
  font-weight: 600;
}

.footer-nav-link.highlight:hover {
  color: #fde68a;
}

.footer-meta-pill {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-300);
}

/* Sub-Footer Row */
.sub-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 1rem;
}

.sub-footer-left {
  font-size: 0.76rem;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.back-to-top-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--slate-300);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.back-to-top-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

/* Responsive Footer */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .sub-footer-row {
    flex-direction: column;
    text-align: center;
  }
}



