/* US FinanceCalc - Complete Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ===================== CSS VARIABLES ===================== */
:root {
  --primary: #1E3A5F;
  --primary-light: #2c5282;
  --secondary: #0F766E;
  --secondary-light: #14b8a6;
  --accent: #B45309;
  --success: #059669;
  --success-bg: #d1fae5;
  --warning: #D97706;
  --warning-bg: #fef3c7;
  --danger: #DC2626;
  --danger-bg: #fee2e2;
  --info: #3b82f6;
  --info-bg: #dbeafe;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --dark: #1E293B;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-inv: #FFFFFF;
  --border: #E2E8F0;
  --border-hover: #CBD5E1;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
  --transition: 220ms ease;
  --navbar-h: 64px;
}

/* ===================== DARK THEME ===================== */
[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-light: #93c5fd;
  --secondary: #2dd4bf;
  --secondary-light: #5eead4;
  --accent: #fbbf24;
  --success: #34d399;
  --success-bg: #064e3b;
  --warning: #fbbf24;
  --warning-bg: #78350f;
  --danger: #f87171;
  --danger-bg: #7f1d1d;
  --info: #60a5fa;
  --info-bg: #1e3a8a;
  --bg: #0F172A;
  --surface: #1E293B;
  --dark: #020617;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-inv: #FFFFFF;
  --border: #334155;
  --border-hover: #475569;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow: 0 4px 12px rgba(0,0,0,.5);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.7);
}

/* ===================== RESET ===================== */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; width: 100%; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; padding-top: var(--navbar-h); overflow-x: hidden; width: 100%; position: relative; }
img { max-width: 100%; display: block; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ===================== TYPOGRAPHY ===================== */
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { color: var(--text-muted); }

/* ===================== CONTAINER ===================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ===================== NAVBAR ===================== */
.navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--navbar-h); background: var(--surface); border-bottom: 1px solid var(--border); z-index: 100; transition: background var(--transition), box-shadow var(--transition), border-color var(--transition); }
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar-inner { display: flex; align-items: center; gap: 1rem; height: 100%; }
.navbar-logo { display: flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--text); flex-shrink: 0; }
.logo-icon { font-size: 1.4rem; }
.logo-accent { color: var(--secondary); }
.navbar-nav { display: flex; align-items: center; gap: .125rem; flex: 1; overflow: hidden; }
.nav-link { display: flex; align-items: center; gap: .3rem; padding: .4rem .6rem; border-radius: var(--radius-sm); font-weight: 500; font-size: .85rem; color: var(--text-muted); transition: all var(--transition); white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--info-bg); }
.nav-icon { font-size: .9rem; }
.navbar-controls { display: flex; align-items: center; gap: .75rem; margin-left: auto; }

/* PWA Install Button */
.btn-install-app { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; background: linear-gradient(135deg, var(--secondary), #0d9488); color: #ffffff; border: none; border-radius: var(--radius-xl); font-size: .8rem; font-weight: 600; cursor: pointer; transition: all var(--transition); box-shadow: 0 2px 6px rgba(15,118,110,.25); white-space: nowrap; }
.btn-install-app:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,118,110,.35); opacity: .95; }


/* Theme Toggle Button */
.theme-toggle-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: 1.1rem; transition: all var(--transition); color: var(--text); padding: 0; flex-shrink: 0; }
.theme-toggle-btn:hover { background: var(--border); transform: scale(1.05); }
[data-theme="dark"] .theme-icon-sun { display: inline-block; }
[data-theme="dark"] .theme-icon-moon { display: none; }
:root:not([data-theme="dark"]) .theme-icon-sun { display: none; }
:root:not([data-theme="dark"]) .theme-icon-moon { display: inline-block; }

/* Country Toggle */
.country-toggle { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2px; gap: 2px; }
.country-btn { padding: .3rem .7rem; border-radius: 20px; border: none; background: transparent; cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--text-muted); transition: all var(--transition); white-space: nowrap; }
.country-btn.active { background: var(--primary); color: var(--text-inv); }
.inline-country-toggle { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2px; gap: 2px; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .4rem; }
.hamburger-line { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* Mobile Menu */
.mobile-menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; }
.mobile-menu-overlay.visible { display: block; }
.mobile-menu { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background: var(--surface); z-index: 201; padding: 1.25rem; transition: right 350ms ease; overflow-y: auto; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 1.25rem; }
.mobile-menu.open { right: 0; }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-muted); }
.mobile-controls-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; }
.mobile-country-toggle { display: flex; gap: .5rem; }
.mobile-nav-links { display: flex; flex-direction: column; gap: .25rem; }
.mobile-nav-link { display: block; padding: .65rem 1rem; border-radius: var(--radius); color: var(--text); font-weight: 500; transition: background var(--transition); }
.mobile-nav-link:hover { background: var(--bg); color: var(--primary); }
.mobile-menu-footer { margin-top: auto; }

/* ===================== BREADCRUMB ===================== */
.breadcrumb-bar { background: var(--bg); border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; align-items: center; gap: .4rem; padding: .6rem 0; font-size: .8rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.bc-sep { color: var(--border-hover); }
.bc-current { color: var(--primary); font-weight: 600; }

/* ===================== HERO SECTION ===================== */
.hero-section { background: linear-gradient(135deg, var(--primary) 0%, #1a4a7a 40%, var(--secondary) 100%); color: var(--text-inv); padding: 5rem 1.25rem 3rem; }
.hero-content { max-width: 1200px; margin: 0 auto; text-align: center; }
.hero-badge { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); padding: .35rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; margin-bottom: 1.5rem; backdrop-filter: blur(8px); }
.hero-headline { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; color: white; margin-bottom: 1rem; }
.hero-accent { color: var(--secondary-light); }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.85); max-width: 600px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary { background: var(--secondary); color: white; padding: .85rem 2rem; border-radius: var(--radius); font-weight: 700; font-size: 1rem; transition: all var(--transition); }
.btn-hero-primary:hover { background: var(--secondary-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,118,110,.4); color: white; }
.btn-hero-secondary { background: rgba(255,255,255,.12); color: white; border: 1px solid rgba(255,255,255,.4); padding: .85rem 2rem; border-radius: var(--radius); font-weight: 600; font-size: 1rem; transition: all var(--transition); }
.btn-hero-secondary:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); color: white; }
.hero-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 3rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--secondary-light); font-family: var(--font-head); }
.stat-label { font-size: .85rem; color: rgba(255,255,255,.75); margin-top: .15rem; }

/* ===================== CATEGORIES GRID ===================== */
.categories-section { padding: 4rem 1.25rem; }
.section-title { text-align: center; margin-bottom: 2.5rem; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.cat-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.5rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); transition: all var(--transition); position: relative; overflow: hidden; color: var(--text); }
.cat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; border-radius: 4px 0 0 4px; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--text); }
.cat-card.cat-blue::before { background: var(--primary); }
.cat-card.cat-purple::before { background: #7c3aed; }
.cat-card.cat-green::before { background: var(--success); }
.cat-card.cat-red::before { background: var(--danger); }
.cat-card.cat-teal::before { background: var(--secondary); }
.cat-card.cat-orange::before { background: var(--accent); }
.cat-icon { font-size: 2rem; flex-shrink: 0; }
.cat-info { flex: 1; }
.cat-info h3 { margin-bottom: .35rem; }
.cat-info p { font-size: .875rem; color: var(--text-muted); margin-bottom: .75rem; }
.cat-tools { display: flex; flex-wrap: wrap; gap: .3rem; }
.tool-tag { background: var(--bg); border: 1px solid var(--border); padding: .15rem .5rem; border-radius: 999px; font-size: .73rem; color: var(--text-muted); }
.tool-tag-more { background: var(--info-bg); color: var(--info); border: 1px solid var(--info); padding: .15rem .5rem; border-radius: 999px; font-size: .73rem; font-weight: 600; }
.cat-arrow { font-size: 1.2rem; color: var(--text-muted); align-self: center; transition: transform var(--transition); }
.cat-card:hover .cat-arrow { transform: translateX(4px); }

/* ===================== HOW IT WORKS ===================== */
.how-it-works { background: var(--dark); color: white; padding: 4rem 1.25rem; }
.how-it-works .section-title { color: white; }
.steps-row { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.step { text-align: center; flex: 1; min-width: 180px; padding: 1.5rem; background: rgba(255,255,255,.06); border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,.12); }
.step-num { display: inline-block; width: 32px; height: 32px; line-height: 32px; background: var(--secondary); border-radius: 50%; font-weight: 700; font-size: .85rem; margin-bottom: .75rem; }
.step-icon { font-size: 2rem; margin-bottom: .75rem; }
.step h3 { color: white; margin-bottom: .5rem; }
.step p { font-size: .875rem; color: rgba(255,255,255,.7); }
.step-arrow { color: var(--secondary-light); font-size: 1.5rem; flex-shrink: 0; }

/* ===================== DISCLAIMER BAR ===================== */
.disclaimer-bar { background: var(--bg); border-top: 1px solid var(--border); padding: 1.25rem; }
.disclaimer-bar p { font-size: .8rem; color: var(--text-muted); max-width: 1200px; margin: 0 auto; }

/* ===================== CATEGORY HERO ===================== */
.cat-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; padding: 3rem 1.25rem 2rem; text-align: center; }
.cat-hero-icon { font-size: 3rem; margin-bottom: 1rem; }
.cat-hero h1 { color: white; margin-bottom: .75rem; }
.cat-hero p { color: rgba(255,255,255,.85); max-width: 600px; margin: 0 auto; }
.cat-tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; padding: 2.5rem 1.25rem; max-width: 1200px; margin: 0 auto; }
.tool-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); transition: all var(--transition); color: var(--text); }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--secondary); color: var(--text); }
.tool-card-icon { font-size: 1.8rem; flex-shrink: 0; }
.tool-card-info h3 { font-size: .95rem; margin-bottom: .25rem; }
.tool-card-info p { font-size: .8rem; color: var(--text-muted); margin-bottom: .25rem; }
.tool-time { font-size: .75rem; color: var(--secondary); font-weight: 500; }
.tool-arrow { margin-left: auto; color: var(--text-muted); transition: transform var(--transition); }
.tool-card:hover .tool-arrow { transform: translateX(3px); color: var(--secondary); }

/* ===================== CALCULATOR LAYOUT ===================== */
.calc-page { padding: 2rem 0 4rem; min-height: 60vh; }
.tool-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; padding: 1.5rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); flex-wrap: wrap; }
.tool-header-icon { font-size: 2.5rem; flex-shrink: 0; }
.tool-header-text { flex: 1; min-width: 200px; }
.tool-header-text h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.tool-header-text p { font-size: .9rem; }
.calc-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.calc-form-col { position: sticky; top: calc(var(--navbar-h) + 1rem); min-width: 0; }
.calc-form-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.calc-results-col { min-height: 300px; min-width: 0; }

/* ===================== FORM COMPONENTS ===================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group.span-2 { grid-column: 1 / -1; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--text); }
.form-group small { font-size: .72rem; color: var(--text-muted); }
.form-group input[type=number],
.form-group input[type=text],
.form-group select { width: 100%; padding: .65rem .85rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-size: .9rem; transition: border-color var(--transition), box-shadow var(--transition); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.input-prefix { position: relative; width: 100%; display: flex; align-items: center; }
.input-prefix span { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 600; font-size: 0.95rem; pointer-events: none; z-index: 2; line-height: 1; }
.input-prefix input { padding-left: 2.2rem !important; }
.form-group input[type=range] { padding: .35rem 0; accent-color: var(--primary); }
.slider { width: 100%; }


/* ===================== CALCULATE BUTTON ===================== */
.btn-calc { width: 100%; padding: .85rem 1.5rem; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 700; cursor: pointer; transition: all var(--transition); margin-top: .5rem; }
.btn-calc:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30,58,95,.3); }
.btn-calc:active { transform: translateY(0); }
.btn-sm { padding: .35rem .8rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .8rem; font-weight: 600; cursor: pointer; transition: all var(--transition); color: var(--text); }
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm.danger { border-color: var(--danger); color: var(--danger); }
.btn-sm.btn-download { background: var(--secondary); color: white; border-color: var(--secondary); }

/* ===================== RESULTS ===================== */
.results-section { animation: slideUp .3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.results-title { font-size: 1.3rem; margin-bottom: 1.25rem; color: var(--primary); }
.results-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius-lg); text-align: center; color: var(--text-muted); gap: .75rem; }
.placeholder-icon { font-size: 3rem; opacity: .4; }
.animate-in { animation: slideUp .3s ease; }

/* Metric Cards */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.metric-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 1rem; }
.metric-label { font-size: .72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.metric-value { font-size: 1.3rem; font-weight: 700; color: var(--text); font-family: var(--font-head); }
.metric-sub { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }
.metric-primary .metric-value { color: var(--primary); }
.metric-success .metric-value { color: var(--success); }
.metric-warn .metric-value { color: var(--warning); }
.metric-danger .metric-value { color: var(--danger); }

/* ===================== CHARTS ===================== */
.chart-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; height: 280px; position: relative; max-width: 100%; }
.chart-wrap { flex: 1; min-width: 0; }
.chart-row { display: flex; gap: 1rem; }

/* ===================== TABLES ===================== */
.table-wrap,
.compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 1.25rem; max-width: 100%; width: 100%; display: block; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 500px; }
.calc-table th { background: var(--primary); color: white; padding: .65rem 1rem; text-align: left; font-weight: 600; white-space: nowrap; }
.calc-table td { padding: .55rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.calc-table tbody tr:hover { background: var(--bg); }
.calc-table tbody tr:last-child td { border-bottom: none; }
.highlight-row { background: var(--info-bg) !important; font-weight: 600; }
.best-col { color: var(--success); font-weight: 700; }
.danger-row { color: var(--danger); font-weight: 700; }
.table-title { font-size: 1rem; margin-bottom: .75rem; }
.table-controls { display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; font-size: .85rem; flex-wrap: wrap; }
.compare-table th:not(:first-child), .compare-table td:not(:first-child) { text-align: center; }

/* ===================== INFO BOXES & TIPS ===================== */
.info-box { padding: 1rem 1.25rem; border-radius: var(--radius); font-size: .9rem; margin-bottom: 1.25rem; display: flex; align-items: flex-start; gap: .5rem; line-height: 1.5; }
.info-success { background: var(--success-bg); color: #065f46; border-left: 4px solid var(--success); }
.info-warn { background: var(--warning-bg); color: #92400e; border-left: 4px solid var(--warning); }
.info-danger { background: var(--danger-bg); color: #991b1b; border-left: 4px solid var(--danger); }
.info-info { background: var(--info-bg); color: #1e40af; border-left: 4px solid var(--info); }
.calc-error { padding: 1rem 1.25rem; background: var(--danger-bg); color: var(--danger); border-radius: var(--radius); border: 1px solid #fca5a5; font-size: .9rem; }
.calc-tip { padding: 1rem 1.25rem; background: var(--info-bg); color: #1e40af; border-radius: var(--radius); font-size: .875rem; margin-top: 1.25rem; border: 1px solid rgba(59,130,246,.2); line-height: 1.5; }

/* Dark Mode Overrides for Info Boxes & Tips */
[data-theme="dark"] .info-success { background: rgba(6, 78, 59, 0.45); color: #6ee7b7; border-left-color: #34d399; }
[data-theme="dark"] .info-warn { background: rgba(120, 53, 15, 0.45); color: #fde047; border-left-color: #fbbf24; }
[data-theme="dark"] .info-danger { background: rgba(127, 29, 29, 0.45); color: #fca5a5; border-left-color: #f87171; }
[data-theme="dark"] .info-info { background: rgba(30, 58, 138, 0.45); color: #93c5fd; border-left-color: #60a5fa; }
[data-theme="dark"] .calc-error { background: rgba(127, 29, 29, 0.45); color: #fca5a5; border-color: #ef4444; }
[data-theme="dark"] .calc-tip { background: rgba(30, 58, 138, 0.4); color: #93c5fd; border-color: #3b82f6; }

/* ===================== SEO ARTICLE & GUIDE SECTION ===================== */
.seo-article-wrapper { margin-top: 3rem; padding-top: 2rem; border-top: 2px dashed var(--border); }
.seo-article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.seo-article h2 { font-size: 1.5rem; color: var(--primary); margin-bottom: 1rem; border-bottom: 2px solid var(--border); padding-bottom: .5rem; }
.seo-article h3 { font-size: 1.15rem; color: var(--text); margin: 1.5rem 0 .75rem; }
.seo-article p { font-size: .95rem; color: var(--text); line-height: 1.7; margin-bottom: 1rem; }
.seo-article ul, .seo-article ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.seo-article li { font-size: .92rem; color: var(--text); margin-bottom: .4rem; line-height: 1.6; }
.seo-formula-box { background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--secondary); border-radius: var(--radius); padding: 1.25rem; margin: 1.25rem 0; font-family: monospace; font-size: .95rem; color: var(--primary); }
.seo-formula-title { font-family: var(--font-head); font-weight: 700; font-size: .85rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: .4rem; letter-spacing: .05em; }
.seo-faq-section { margin-top: 2rem; }
.seo-faq-section h3 { font-size: 1.25rem; color: var(--primary); margin-bottom: 1.25rem; }
.seo-faq-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: .85rem; }
.seo-faq-q { font-family: var(--font-head); font-weight: 700; font-size: .98rem; color: var(--text); margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; }
.seo-faq-q::before { content: '❓'; font-size: .9rem; }
.seo-faq-a { font-size: .9rem; color: var(--text-muted); line-height: 1.6; margin: 0; }


/* ===================== RATIO BARS ===================== */
.ratio-bars { margin-bottom: 1.25rem; }
.ratio-bars h3 { font-size: 1rem; margin-bottom: 1rem; }
.ratio-bar-item { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .85rem; font-size: .8rem; }
.ratio-bar { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.ratio-fill { height: 100%; background: var(--success); border-radius: 999px; transition: width .5s ease; }
.ratio-fill.over { background: var(--danger); }

/* ===================== PROGRESS BAR ===================== */
.progress-bar-wrap { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; font-size: .85rem; }
.progress-bar { flex: 1; height: 12px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-bar.lg { height: 18px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--secondary)); border-radius: 999px; transition: width .6s ease; }
.progress-fill.full { background: var(--success); }
.progress-fill.low { background: var(--danger); }

/* ===================== DTI GAUGE ===================== */
.dti-gauge { text-align: center; margin-bottom: 1rem; }
.dti-score { font-size: 3rem; font-weight: 800; font-family: var(--font-head); }
.dti-score.success { color: var(--success); }
.dti-score.warn { color: var(--warning); }
.dti-score.danger { color: var(--danger); }
.dti-rating { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.dti-bar-wrap { margin-bottom: 1.25rem; }
.dti-bar { height: 14px; background: linear-gradient(90deg, var(--success) 0%, #65a30d 30%, var(--warning) 60%, var(--danger) 100%); border-radius: 999px; position: relative; }
.dti-fill { display: none; }

/* ===================== DEDUCTIONS LIST ===================== */
.deductions-list { background: var(--bg); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; }
.deduct-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.deduct-row:last-child { border-bottom: none; }
.deduct-row.total { font-weight: 700; color: var(--text); border-top: 2px solid var(--border); }

/* ===================== BUDGET SUMMARY ===================== */
.budget-summary { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.budget-block { flex: 1; min-width: 120px; text-align: center; padding: 1.25rem; border-radius: var(--radius); background: var(--bg); border: 2px solid var(--border); }
.budget-block.over { border-color: var(--danger); background: var(--danger-bg); }
.budget-block.under { border-color: var(--warning); background: var(--warning-bg); }
.budget-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.budget-actual { font-size: 1.6rem; font-weight: 800; color: var(--primary); font-family: var(--font-head); margin: .25rem 0; }
.budget-target { font-size: .72rem; color: var(--text-muted); }
.budget-amt { font-size: .875rem; font-weight: 600; margin-top: .35rem; }
.section-label { font-size: .9rem; font-weight: 700; color: var(--text); margin: 1.25rem 0 .5rem; padding-bottom: .5rem; border-bottom: 2px solid var(--border); }

/* ===================== NET WORTH ===================== */
.nw-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.nw-col-title { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--border); }
.nw-big { font-size: 3rem; font-weight: 800; font-family: var(--font-head); text-align: center; margin: .5rem 0; }
.nw-big.success { color: var(--success); }
.nw-big.danger { color: var(--danger); }
.nw-rating { text-align: center; font-size: 1.1rem; font-weight: 600; color: var(--text-muted); margin-bottom: 1.5rem; }
.success-text { color: var(--success); }
.danger-text { color: var(--danger); }

/* ===================== CURRENCY ===================== */
.currency-row { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; }
.currency-row .form-group { flex: 1; min-width: 120px; }
.currency-arrow { font-size: 1.5rem; padding-bottom: .75rem; color: var(--text-muted); align-self: flex-end; }
.currency-result { text-align: center; padding: 2rem; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: var(--radius-lg); margin-bottom: 1.25rem; }
.currency-big { font-size: 1.6rem; font-weight: 700; color: white; }
.currency-big.primary { color: var(--secondary-light); font-size: 2rem; }
.currency-eq { color: rgba(255,255,255,.7); font-size: 1.1rem; margin: .35rem 0; }
.quick-pairs { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }

/* ===================== DANGER BOX (Payday) ===================== */
.danger-box { text-align: center; padding: 2rem; background: var(--danger-bg); border-radius: var(--radius-lg); border: 2px solid var(--danger); margin-bottom: 1.25rem; }
.danger-apr { font-size: 3.5rem; font-weight: 800; color: var(--danger); font-family: var(--font-head); }
.compare-alts { margin-bottom: 1.25rem; }

/* ===================== DEBT ROWS ===================== */
.debt-row, .debt-row-header { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.debt-row-header { font-size: .75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.debt-row input { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem; width: 100%; }
.debt-list { margin-bottom: 1rem; }
.loan-compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.loan-compare-col h3 { font-size: .9rem; color: var(--primary); margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--border); }

/* ===================== TWO-COLUMN RESULTS ===================== */
.two-col-results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.result-col { background: var(--bg); border-radius: var(--radius); padding: 1.25rem; min-width: 0; }
.result-col h3 { font-size: .9rem; margin-bottom: .75rem; color: var(--primary); }
.warn-col { background: var(--warning-bg); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }

/* ===================== EXCEPTIONS LIST ===================== */
.exceptions-list { background: var(--bg); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1rem; }
.exceptions-list h3 { font-size: .9rem; margin-bottom: .75rem; }
.exceptions-list ul { list-style: disc; padding-left: 1.25rem; }
.exceptions-list li { font-size: .875rem; color: var(--text-muted); margin-bottom: .35rem; }

/* ===================== TIP QUICK BUTTONS ===================== */
.tip-quick { display: flex; gap: .4rem; margin-bottom: .5rem; }
.tip-btn { flex: 1; padding: .4rem .3rem; border: 1.5px solid var(--border); background: var(--bg); border-radius: var(--radius-sm); font-size: .82rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.tip-btn.active, .tip-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===================== DEBTS / CONSOLIDATION ===================== */
.debts-list { background: var(--bg); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.debts-list h3 { font-size: .9rem; margin-bottom: 1rem; }
#debt-items { display: flex; flex-direction: column; gap: .5rem; }
.debt-row input { background: var(--surface); }

/* ===================== RATES TICKER ===================== */
.rates-ticker { position: fixed; bottom: 0; left: 0; right: 0; height: 36px; background: var(--dark); color: white; display: flex; align-items: center; gap: 1rem; z-index: 50; font-size: .78rem; padding: 0 1rem; overflow: hidden; }
.ticker-label { display: flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--secondary-light); flex-shrink: 0; }
.ticker-scroll { display: flex; gap: 2rem; overflow-x: auto; scrollbar-width: none; }
.ticker-scroll::-webkit-scrollbar { display: none; }
.ticker-item { white-space: nowrap; color: rgba(255,255,255,.8); }
.live-badge { color: #4ade80; font-weight: 600; }
.live-dot { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
body { padding-bottom: 36px; } /* Offset for ticker */

/* ===================== SCROLL TO TOP ===================== */
.scroll-top-btn { position: fixed; bottom: 52px; right: 1.5rem; width: 42px; height: 42px; background: var(--primary); color: white; border: none; border-radius: 50%; cursor: pointer; font-size: 1.1rem; display: none; z-index: 60; box-shadow: var(--shadow); transition: all var(--transition); }
.scroll-top-btn.visible { display: block; }
.scroll-top-btn:hover { background: var(--secondary); transform: translateY(-2px); }

/* ===================== TOAST ===================== */
.toast-container { position: fixed; top: calc(var(--navbar-h) + 1rem); right: 1rem; z-index: 500; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--dark); color: white; padding: .75rem 1.25rem; border-radius: var(--radius); font-size: .875rem; transform: translateX(120%); transition: transform .3s ease; max-width: 300px; }
.toast.show { transform: translateX(0); }
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-info { border-left: 4px solid var(--info); }
.toast.toast-error { border-left: 4px solid var(--danger); }

/* ===================== LOADING SCREEN ===================== */
.loading-screen { display: flex; align-items: center; justify-content: center; min-height: 60vh; text-align: center; }
.loading-logo { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.logo-icon.large { font-size: 4rem; animation: bounce 1s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.loading-text { color: var(--text-muted); font-size: .9rem; }
.loading-bar { width: 200px; height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; }
.loading-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 999px; animation: loadfill 1.5s ease infinite; }
@keyframes loadfill { 0% { width: 0; } 100% { width: 100%; } }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--dark); color: rgba(255,255,255,.8); padding: 3rem 1.25rem 2rem; margin-bottom: 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-logo { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.footer-logo .logo-text { font-size: 1.1rem; font-family: var(--font-head); font-weight: 800; color: white; }
.footer-tagline { font-size: .85rem; line-height: 1.7; color: rgba(255,255,255,.65); margin-bottom: 1rem; }
.footer-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge { padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.badge-green { background: rgba(5,150,105,.3); color: #6ee7b7; }
.badge-red { background: rgba(220,38,38,.2); color: #fca5a5; }
.badge-blue { background: rgba(30,58,95,.4); color: #93c5fd; }
.footer-col-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.5); margin-bottom: 1rem; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a { font-size: .85rem; color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-links a:hover { color: var(--secondary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; }
.footer-disclaimer { font-size: .75rem; color: rgba(255,255,255,.45); line-height: 1.7; margin-bottom: 1rem; }
.footer-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.footer-copyright { font-size: .8rem; color: rgba(255,255,255,.45); }
.footer-sources { display: flex; gap: .75rem; align-items: center; font-size: .75rem; color: rgba(255,255,255,.4); }
.footer-sources a { color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-sources a:hover { color: var(--secondary-light); }
.footer-legal-links { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; font-size: .78rem; }
.footer-legal-links a { color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-legal-links a:hover { color: var(--secondary-light); }


/* ===================== UTILITIES ===================== */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .875rem; }
.flex-1 { flex: 1; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .navbar-nav { gap: 0; }
  .nav-link { padding: .35rem .45rem; font-size: .78rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  
  /* Hero & Header Center Alignment */
  .hero-section, .cat-hero { text-align: center; padding: 3rem 1rem 2rem; }
  .hero-content { text-align: center; }
  .hero-headline { font-size: 2.2rem; text-align: center; }
  .hero-sub { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; width: 100%; }
  .btn-hero-primary, .btn-hero-secondary { width: 100%; max-width: 320px; text-align: center; justify-content: center; }
  .hero-stats { justify-content: center; gap: 1.25rem; }
  .cat-hero-icon { text-align: center; }
  .cat-hero h1 { text-align: center; }
  .cat-hero p { text-align: center; }

  /* Tool Header Centering on Mobile */
  .tool-header { flex-direction: column; align-items: center; text-align: center; justify-content: center; padding: 1.25rem; }
  .tool-header-icon { margin-bottom: .25rem; }
  .tool-header-text { text-align: center; width: 100%; }
  .tool-header-text h1 { text-align: center; font-size: 1.45rem; }
  .tool-header-text p { text-align: center; }
  .inline-country-toggle { margin: .75rem auto 0; justify-content: center; }

  /* Layout & Grid */
  .calc-body { grid-template-columns: minmax(0, 1fr); }
  .calc-form-col { position: static; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-group.span-2 { grid-column: 1; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .steps-row { flex-direction: column; }
  .step-arrow { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-row { flex-direction: column; }
  .two-col-results { grid-template-columns: minmax(0, 1fr); }
  .nw-split { grid-template-columns: minmax(0, 1fr); }
  /* Footer Grid for iPad / Tablet (2 columns / 2 sections) */
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; text-align: center; }
  .footer-brand { grid-column: 1 / -1; text-align: center; margin-bottom: .5rem; }
  .footer-logo { justify-content: center; }
  .footer-badges { justify-content: center; }
  .footer-tagline { max-width: 500px; margin: 0 auto 1rem; text-align: center; }
  .footer-meta { flex-direction: column; text-align: center; gap: .75rem; }
  .footer-sources { justify-content: center; }
  .loan-compare-grid { grid-template-columns: 1fr; }
  .debt-row, .debt-row-header { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .budget-summary { flex-direction: column; }


  /* SEO Articles & FAQs Mobile Center Alignment */
  .seo-article-wrapper { margin-top: 2rem; padding-top: 1.5rem; }
  .seo-article { padding: 1.25rem; }
  .seo-article h2 { text-align: center; font-size: 1.35rem; }
  .seo-article h3 { text-align: center; font-size: 1.12rem; }
  .seo-formula-box { text-align: center; padding: 1rem; overflow-x: auto; }
  .seo-formula-title { text-align: center; }
  .seo-faq-section h3 { text-align: center; font-size: 1.25rem; }
  .seo-faq-item { padding: 1rem; }
  .seo-faq-q { justify-content: center; text-align: center; flex-wrap: wrap; }
  .seo-faq-a { text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .country-toggle { display: none; }
  .hero-section { padding: 2.5rem 1rem 1.75rem; text-align: center; }
  .hero-headline { font-size: 1.8rem; text-align: center; }
  .hero-sub { font-size: .95rem; text-align: center; }
  .calc-form-card { padding: 1.25rem; }
  .tool-header-text h1 { font-size: 1.3rem; text-align: center; }
  .seo-article h2 { font-size: 1.2rem; text-align: center; }
  .seo-article h3 { font-size: 1.05rem; text-align: center; }
  .seo-article p, .seo-article li { font-size: .88rem; }
}



/* ===================== PRINT STYLES ===================== */
@media print {
  .navbar, .rates-ticker, .scroll-top-btn, .toast-container, .btn-calc, .hamburger, .site-footer { display: none !important; }
  body { padding: 0; background: white; color: black; }
  .calc-body { grid-template-columns: 1fr; }
  .metric-card, .info-box { break-inside: avoid; }
}


/* ===================== MOBILE RESULT CONTENT FIXES ===================== */
/* Prevent any generated result text from overflowing the viewport */
.results-section, .calc-results-col, .result-col, .warn-col,
.metric-card, .info-box, .calc-tip, .calc-error,
.deductions-list, .budget-summary, .danger-box,
.loan-compare-col, .nw-split, .two-col-results {
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Prevent tables and wide content from breaking the page width */
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.calc-table { min-width: 400px; }

@media (max-width: 768px) {
  /* Fix result column inner padding on mobile */
  .calc-results-col { padding: 0; }
  .calc-results-col > * { max-width: 100%; }

  /* Metric cards: 2 per row on mobile, not 1 */
  .metrics-grid { grid-template-columns: 1fr 1fr !important; gap: .5rem; }
  .metric-card { padding: .75rem; }
  .metric-value { font-size: 1.1rem; }
  .metric-label { font-size: .68rem; }

  /* Result info boxes */
  .info-box { flex-direction: column; gap: .35rem; font-size: .85rem; }

  /* Deduct rows — prevent overflow on paycheck / tax pages */
  .deduct-row { font-size: .82rem; gap: .25rem; }
  .deduct-row span:last-child { text-align: right; min-width: 80px; }

  /* Budget summary — wrap into 2x2 grid on mobile */
  .budget-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
  .budget-block { min-width: unset; padding: .9rem .6rem; }
  .budget-actual { font-size: 1.3rem; }

  /* Net Worth page */
  .nw-split { grid-template-columns: 1fr !important; gap: 1rem; }
  .nw-big { font-size: 2.2rem; }

  /* Loan comparison grid */
  .loan-compare-grid { grid-template-columns: 1fr !important; gap: .85rem; }

  /* Payday / danger box — shrink huge APR number */
  .danger-box { padding: 1.25rem; }
  .danger-apr { font-size: 2.5rem; }

  /* Debt payoff rows */
  .debt-row, .debt-row-header { 
    grid-template-columns: 1.5fr 1fr 1fr auto; 
    font-size: .8rem; 
    gap: .3rem;
  }
  .debt-row input { font-size: .8rem; padding: .35rem .4rem; }

  /* Two column result split */
  .two-col-results { grid-template-columns: minmax(0, 1fr) !important; gap: .75rem; }

  /* Currency result */
  .currency-big { font-size: 1.3rem; }
  .currency-big.primary { font-size: 1.6rem; }
  .currency-row { flex-direction: column; gap: .5rem; }
  .currency-arrow { display: none; }

  /* Progress bars — ensure they don't overflow */
  .progress-bar-wrap { flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
  .progress-bar { min-width: 0; }

  /* DTI score */
  .dti-score { font-size: 2.25rem; }

  /* Ratio bars */
  .ratio-bar-item { font-size: .78rem; }

  /* Chart containers — full width on mobile */
  .chart-box { height: 220px; padding: .85rem; }
  .chart-row { flex-direction: column; }

  /* Tip quick buttons */
  .tip-quick { flex-wrap: wrap; }
  .tip-btn { font-size: .78rem; padding: .35rem .25rem; }

  /* Section labels */
  .section-label { font-size: .85rem; }

  /* Results title */
  .results-title { font-size: 1.1rem; }

  /* Table fonts on mobile */
  .calc-table th, .calc-table td { padding: .45rem .6rem; font-size: .8rem; }

  /* Loan payoff table  */
  .table-controls { flex-wrap: wrap; gap: .35rem; }

  /* Form card inner padding reduction on small phones */
  .calc-form-card { padding: 1.1rem; }

  /* Ensure sliders are always full width */
  .slider, input[type=range] { width: 100%; }
}

@media (max-width: 480px) {
  /* Single column metrics on very small screens */
  .metrics-grid { grid-template-columns: 1fr !important; }
  .metric-value { font-size: 1.3rem; }

  /* Budget summary single column on very small phones */
  .budget-summary { grid-template-columns: 1fr; }

  /* Debt rows — simplify to 3 cols */
  .debt-row, .debt-row-header { 
    grid-template-columns: 1fr 1fr auto; 
  }
  /* Hide 3rd column data on very small screens */
  .debt-row > *:nth-child(3), .debt-row-header > *:nth-child(3) { display: none; }

  /* Net worth big number */
  .nw-big { font-size: 1.85rem; }

  /* Danger APR */
  .danger-apr { font-size: 2rem; }

  /* Chart height reduction */
  .chart-box { height: 180px; }

  /* Deduct row font */
  .deduct-row { font-size: .78rem; }
  .deductions-list { padding: .75rem; }

  /* DTI score */
  .dti-score { font-size: 1.85rem; }

  /* Calculator body padding */
  .calc-page { padding: 1rem 0 3rem; }

  /* Seo article on very small */
  .seo-article { padding: 1rem; }

  /* Quick pairs (currency) */
  .quick-pairs { font-size: .75rem; }

  /* Form card */
  .calc-form-card { padding: .9rem; }

  /* Results placeholder */
  .results-placeholder { min-height: 180px; }
  .placeholder-icon { font-size: 2.25rem; }
}
