/* ==========================================================================
   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;
}

.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-links {
  margin-top: 0.5rem;
}

.text-link {
  color: var(--slate-350);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.text-link:hover {
  color: var(--slate-100);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

/* 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.35rem;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  gap: 0.35rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--slate-400);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-weight: 700;
  font-family: var(--font-family-headings);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  min-height: 44px;
  width: 100%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn:hover {
  color: var(--slate-100);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#tab-income.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
}

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

#tab-advice.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.45);
}

/* 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;
}

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

#income-curve-path {
  stroke: url(#income-curve-stroke-grad);
}

#networth-curve-path {
  stroke: url(#networth-curve-stroke-grad);
}

.curve-shade {
  opacity: 0.15;
}

#income-curve-shade {
  fill: url(#income-curve-fill-grad);
}

#networth-curve-shade {
  fill: url(#networth-curve-fill-grad);
}

.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;
  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;
}

.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;
}

.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;
}

.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;
  align-items: center;
  gap: 0.85rem;
}

.step-progress-track {
  flex: 1;
  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 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.step-progress-details {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-400);
  white-space: nowrap;
  min-width: 110px;
  text-align: right;
}

/* 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: 2.25rem 0 1.75rem 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 {
  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.2rem 0.6rem;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.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-links, #export-pdf-btn, .coffee-header-btn {
    display: none !important;
  }
  .app-container {
    padding: 1rem !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;
  }
  .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;
}


