/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-darker: #1e3a8a;
  --primary-light: #dbeafe;
  --primary-50: #eff6ff;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-light: #ffedd5;
  --success: #10b981;
  --success-light: #d1fae5;
  --light-gray: #f8fafc;
  --mid-gray: #e2e8f0;
  --border: #cbd5e1;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-gray: #64748b;
  --text-light: #94a3b8;
  --white: #ffffff;
  --dark-bg: #0f172a;
  --dark-bg-light: #1e293b;
  --max-w: 1200px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-blue: 0 4px 14px rgba(37,99,235,0.25);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--light-gray); color: var(--text-body); line-height: 1.7; font-size: 15px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
p { line-height: 1.75; margin: 16px 0; }
h1, h2, h3, h4 { margin-top: 40px; margin-bottom: 20px; color: var(--text-dark); }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 17px; font-weight: 600; margin-top: 28px; }

/* ===== Container (1200px site-wide) ===== */
.container { max-width: var(--max-w); width: 92%; margin: 0 auto; padding: 0 12px; }


.site-header {
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 22px; font-weight: 800; color: var(--primary);
  letter-spacing: -0.8px; text-decoration: none;
  display: flex; align-items: center; gap: 3px; white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--primary-dark); }
.logo .logo-dot { color: var(--accent); font-weight: 900; margin-left: -3px; }
.logo-svg {
  width: 30px; height: 30px; flex-shrink: 0;
}
.nav-top { display: flex; align-items: center; justify-content: space-between; height: 56px; border-bottom: 1px solid #eef2f7; }
.nav-utility { display: flex; align-items: center; gap: 10px; }
.nav-row { background: #ffffff; border-bottom: 1px solid #eef2f7; }
.nav-row-info { background: #f8fafc; }
.nav-row .nav-links { padding: 9px 0; }
.nav-tag { font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 6px; white-space: nowrap; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.nav-links a {
  font-size: 13.5px; color: var(--text-gray); font-weight: 500; text-decoration: none;
  padding: 6px 11px; border-radius: 8px; transition: all 0.2s; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.nav-ico { margin-right: 5px; font-size: 14px; line-height: 1; }
.nav-links a:hover { color: var(--primary); background: var(--primary-50); text-decoration: none; }
.nav-links a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* Hamburger */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
  align-items: center; justify-content: center; transition: background 0.2s;
}
.hamburger:hover { background: var(--light-gray); }
.hamburger svg { width: 22px; height: 22px; color: var(--text-dark); }

/* Mobile Menu */
.mobile-menu { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.5); z-index: 200; }
.mobile-menu.open { display: block; }
.mobile-menu-panel {
  position: absolute; top: 0; right: 0; width: 280px; height: 100%;
  background: var(--white); box-shadow: var(--shadow-lg); padding: 24px; overflow-y: auto;
}
.mobile-menu-close { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 16px; }
.mobile-menu-close button { background: none; border: none; cursor: pointer; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.mobile-menu-close button:hover { background: var(--light-gray); }
.mobile-menu-close button svg { width: 22px; height: 22px; color: var(--text-dark); }
.mobile-menu-panel a { display: block; padding: 12px 14px; border-radius: var(--radius); font-size: 14.5px; color: var(--text-body); font-weight: 500; text-decoration: none; transition: all 0.2s; }
.mobile-menu-panel a:hover { background: var(--primary-50); color: var(--primary); }
.mobile-menu-panel a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.mobile-menu-panel .menu-label { font-size: 11px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; padding: 16px 14px 8px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 40%, #3b82f6 100%);
  padding: 44px 0 40px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.95);
  font-size: 13px; font-weight: 600; padding: 5px 16px; border-radius: 20px;
  margin-bottom: 14px; letter-spacing: 0.3px; backdrop-filter: blur(4px);
}
.hero h1 { font-size: 32px; font-weight: 800; color: var(--white); margin-bottom: 12px; letter-spacing: -0.5px; line-height: 1.2; }
.hero p { font-size: 15px; color: rgba(255,255,255,0.85); max-width: var(--max-w); margin: 0 auto; line-height: 1.6; font-weight: 400; }

/* Trust Row */
.trust-row { display: flex; justify-content: center; gap: 48px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); }
.trust-item { text-align: center; }
.trust-number { font-size: 26px; font-weight: 800; color: var(--white); display: block; line-height: 1; margin-bottom: 6px; }
.trust-label { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 400; }


/* Calculator Box (AdSense exclusion wrapper) */
.calculator-box { width: 100%; position: relative; z-index: 1; }
/* Card style only when .calc-form is a direct child (homepage tabs) */
.calculator-box > .calc-form:first-child {
  padding: 32px; margin: 36px 0;
  background: var(--white); border-radius: 16px;
  box-shadow: 0 6px 18px rgba(37,99,235,0.08); border: 1px solid #f1f5f9;
}

/* ===== Page Intro Content (450+ words above calculator) ===== */
.page-intro { padding: 48px 0; background: var(--white); }
.page-intro-inner { max-width: var(--max-w); margin: 0 auto; }
.page-intro h1 { font-size: 26px; font-weight: 800; color: var(--text-dark); margin-bottom: 12px; text-align: left; }
.page-intro h2 { font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; text-align: left; }
.page-intro p { font-size: 15px; color: var(--text-body); line-height: 1.8; margin-bottom: 14px; }
.page-intro ul { padding-left: 24px; margin: 12px 0; }
.page-intro li { font-size: 14.5px; color: var(--text-body); line-height: 1.8; margin-bottom: 8px; }
.page-intro .intro-highlight {
  background: var(--primary-50); border-left: 4px solid var(--primary);
  padding: 16px 20px; margin: 20px 0; border-radius: 0 10px 10px 0; font-size: 14.5px; line-height: 1.8;
}

/* ===== Tool Cards Grid ===== */
.tools-section { background: var(--light-gray); padding: 56px 0; position: relative; z-index: 1; }
.tools-section-title { text-align: center; font-size: 24px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.tools-section-sub { text-align: center; font-size: 15px; color: var(--text-gray); margin-bottom: 40px; max-width: 540px; margin-left: auto; margin-right: auto; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tool-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 28px 24px; text-align: center; transition: all 0.3s ease;
  text-decoration: none; display: block; position: relative; overflow: hidden;
}
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--primary); opacity: 0; transition: opacity 0.3s; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); text-decoration: none; }
.tool-card:hover::before { opacity: 1; }
.tool-icon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.tool-icon.blue { background: var(--primary-light); color: var(--primary); }
.tool-icon.orange { background: var(--accent-light); color: var(--accent); }
.tool-icon.green { background: var(--success-light); color: var(--success); }
.tool-card h3 { font-size: 17px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.tool-card p { font-size: 13.5px; color: var(--text-gray); line-height: 1.7; margin-bottom: 16px; }
.tool-card .btn-card { display: inline-block; padding: 8px 20px; background: var(--primary); color: var(--white); border-radius: 10px; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.tool-card:hover .btn-card { background: var(--primary-dark); }

/* ===== Calculator Hero (inner pages) ===== */
.calc-hero {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  padding: 40px 0 36px; position: relative; overflow: hidden;
  text-align: center;
}
.calc-hero h1 { font-size: 28px; font-weight: 800; color: var(--white); margin-bottom: 10px; letter-spacing: -0.3px; }
.calc-hero p { font-size: 15px; color: rgba(255,255,255,0.8); max-width: 640px; line-height: 1.7; margin-left: auto; margin-right: auto; }

/* ===== Calculator Layout ===== */
.calc-body { padding: 40px 0 56px; position: relative; z-index: 1; }
.calc-wrapper {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 28px; align-items: start;
}
.calc-left { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.calc-form { position: relative; z-index: 2; pointer-events: auto; }

/* Canvas inside calculator box — ensure it doesn't overlay */
.calculator-box canvas { position: relative; z-index: 0; display: block; max-width: 100%; max-height: 380px; margin: 20px auto 0; }

/* ===== Form ===== */
.calc-form {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 32px; box-shadow: var(--shadow-sm);
}
.calc-form h2 { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.calc-form h2 .form-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 16px; color: var(--text-dark); background: var(--white); outline: none; transition: all 0.2s;
}
/* Checkbox/radio fields: keep label + input inline */
.field:has(input[type="checkbox"], input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}
.field:has(input[type="checkbox"], input[type="radio"]) label {
  display: inline;
  margin-bottom: 0;
  font-weight: 500;
  cursor: pointer;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.btn-calc {
  width: 100%; padding: 14px; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--white); border: none; border-radius: var(--radius); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.25s; letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3); margin-top: 4px;
}
.btn-calc:hover { background: linear-gradient(135deg, var(--accent-dark) 0%, #c2410c 100%); box-shadow: 0 4px 14px rgba(249,115,22,0.4); transform: translateY(-1px); }
.btn-reset {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 10px; padding: 10px 0;
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  background: transparent; color: var(--text-gray); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.btn-reset:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ===== Results ===== */
.results-panel {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 32px; box-shadow: var(--shadow-sm); animation: fadeSlideIn 0.4s ease;
}
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.results-panel h2 { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--light-gray); }
.result-row:last-child { border-bottom: none; }
.result-label { font-size: 14px; color: var(--text-gray); font-weight: 500; }
.result-value { font-size: 17px; font-weight: 700; color: var(--text-dark); font-variant-numeric: tabular-nums; }
.result-row.highlight { background: linear-gradient(135deg, var(--primary-light) 0%, #bfdbfe 100%); margin: 0 -32px; padding: 18px 32px; border-bottom: none; border-radius: 12px; }
.result-row.highlight .result-label { font-size: 15px; font-weight: 600; color: var(--primary-dark); }
.result-row.highlight .result-value { color: var(--primary-darker); font-size: 22px; }

/* ===== Disclaimer ===== */
.disclaimer-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 14px 16px; margin-top: 20px; font-size: 13px; color: #92400e; line-height: 1.7; }
.disclaimer-box strong { color: #78350f; }

/* ===== FAQ ===== */
.faq-section { padding: 56px 0; background: var(--white); }
.faq-inner { max-width: var(--max-w); margin: 0 auto; }
.faq-section h2 { font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 28px; text-align: center; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; transition: all 0.2s; }
.faq-item:hover { border-color: var(--primary); }
.faq-item.open { border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,0.1); }
.faq-q {
  padding: 16px 20px; font-size: 15px; font-weight: 600; color: var(--text-dark);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  user-select: none; background: var(--white); transition: background 0.2s;
}
.faq-q:hover { background: var(--primary-50); }
.faq-q .faq-arrow { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; transition: transform 0.3s; color: var(--text-light); font-size: 12px; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.faq-a-inner { padding: 0 20px 16px; font-size: 14px; color: var(--text-gray); line-height: 1.7; }
.faq-item.open .faq-a { max-height: 400px; }

/* ===== Government Links & Site Network ===== */
.gov-links { padding: 48px 0; background: var(--light-gray); }
.gov-links-inner { max-width: var(--max-w); margin: 0 auto; }
.gov-links h3 { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; }
.gov-links ul { list-style: none; padding: 0; }
.gov-links li { margin-bottom: 10px; }
.gov-links a { font-size: 14.5px; color: var(--primary); font-weight: 500; }
.gov-links a:hover { text-decoration: underline; }
.site-network { padding: 32px 0 48px; background: var(--light-gray); }
.site-network-inner { max-width: var(--max-w); margin: 0 auto; }
.site-network h3 { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; }
.network-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.network-card {
  display: block; padding: 14px 18px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; color: var(--primary); font-weight: 600;
  text-decoration: none; transition: all 0.2s;
}
.network-card:hover { border-color: var(--primary); box-shadow: var(--shadow-blue); background: var(--primary-50); text-decoration: none; }

/* ===== Footer (Unified) ===== */
.site-footer { background: var(--dark-bg); padding: 48px 0 28px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.footer-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 32px;
  padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .footer-logo {
  font-size: 22px; font-weight: 800; color: var(--white); letter-spacing: -0.5px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.footer-brand .footer-logo .logo-dot { color: var(--accent); margin-left: -3px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.6; max-width: 280px; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13.5px; color: rgba(255,255,255,0.5); margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom { padding-top: 20px; text-align: center; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-disclaimer { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 8px; line-height: 1.6; max-width: var(--max-w); margin-left: auto; margin-right: auto; }

/* ===== Content Pages ===== */
.page-body { padding: 48px 0 64px; }
.page-content {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 40px 44px; max-width: var(--max-w); margin: 0 auto; box-shadow: var(--shadow-sm);
}
.page-content h1 { font-size: 26px; font-weight: 800; color: var(--text-dark); margin-bottom: 8px; }
.page-content .page-meta { font-size: 14px; color: var(--text-light); margin-bottom: 28px; }
.page-content h2 { font-size: 20px; font-weight: 700; color: var(--text-dark); margin: 32px 0 12px; }
.page-content p, .page-content li { font-size: 15px; color: var(--text-body); line-height: 1.8; }
.page-content ul { padding-left: 24px; margin: 10px 0; }
.page-content li { margin-bottom: 8px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { width: 94%; padding: 0 16px; }
  .nav-row { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 36px 0 32px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .trust-row { gap: 24px; flex-wrap: wrap; }
  .tools-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .calc-wrapper { max-width: 100%; }
  .calc-hero { padding: 32px 0 28px; }
  .calc-hero h1 { font-size: 22px; }
  .network-grid { grid-template-columns: 1fr; }
  .footer-container { flex-direction: column; }
  .page-content { padding: 28px 24px; }
  .result-row.highlight { margin: 0 -20px; padding: 16px 20px; }
  h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 18px; }
}
@media (max-width: 480px) {
  .header-inner { height: 56px; }
  .logo { font-size: 20px; }
  .hero h1 { font-size: 22px; }
  .calc-form, .results-panel { padding: 24px 20px; }
  .faq-q { padding: 14px 16px; font-size: 14px; }
  .faq-a-inner { padding: 0 16px 14px; font-size: 13px; }
}

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .faq-section, .gov-links, .site-network,
  .calc-hero, .btn-calc, .btn-reset, .hamburger, .mobile-menu,
  .disclaimer-box, nav, .hero { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; line-height: 1.5; }
  .page-intro, .calc-body { padding: 0 !important; }
  .container { max-width: 100% !important; padding: 0 20px !important; }
}

/* ===== Missing Class Definitions (added for HTML compatibility) ===== */
.main-nav { flex: 1; display: flex; justify-content: flex-end; }
.nav-container { display: flex; align-items: center; width: 100%; gap: 16px; }
.logo-text { font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }

/* Input with prefix/suffix wrapper */
.input-wrap {
  position: relative; display: flex; align-items: center;
}
.input-wrap input {
  width: 100% !important; padding-left: 32px !important;
}
.input-wrap input.has-prefix { padding-left: 32px !important; }
.input-wrap .input-prefix {
  position: absolute; left: 14px; color: var(--text-gray); font-weight: 600;
  font-size: 15px; pointer-events: none; z-index: 1;
}
.input-wrap .input-suffix {
  position: absolute; right: 14px; color: var(--text-gray); font-weight: 500;
  font-size: 14px; pointer-events: none; z-index: 1;
}
/* When both prefix and suffix, adjust input padding */
.input-wrap:has(.input-suffix) input {
  padding-right: 36px !important;
}

/* Results Placeholder (below form in column layout) */
.results-placeholder {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 40px 28px; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  width: 100%;
}

/* Calculator canvases — hide until a chart is rendered on them */
.calc-left > canvas { display: none; max-width: 100%; }
.calc-left > canvas.has-chart { display: block; max-height: 380px; width: auto !important; margin: 20px auto 0; }

/* Mobile Menu Overlay — MUST stay hidden unless .open class added */
.mobile-menu-overlay {
  display: none !important; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,0.5); z-index: 200;
}
.mobile-menu-overlay.open {
  display: block !important;
}
.mobile-menu-content {
  position: absolute; top: 0; right: 0; width: 280px; height: 100%;
  background: var(--white); box-shadow: var(--shadow-lg); padding: 24px;
  overflow-y: auto;
}
.mobile-menu-close {
  display: flex; align-items: center; justify-content: flex-end; margin-bottom: 16px;
  background: none; border: none; cursor: pointer; font-size: 28px;
  color: var(--text-dark); line-height: 1;
}
.mobile-menu-content > a {
  display: block; padding: 12px 14px; border-radius: var(--radius);
  font-size: 14.5px; color: var(--text-body); font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.mobile-menu-content > a:hover { background: var(--primary-50); color: var(--primary); }
.mobile-menu-content > a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Footer (matches HTML class names) */
.footer-container {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 32px;
  padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-section { min-width: 180px; }
.footer-section h3 {
  font-size: 15px; font-weight: 700; color: var(--white);
  margin-bottom: 14px; letter-spacing: 0.3px;
}
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 8px; }
.footer-section a {
  display: block; font-size: 13.5px; color: rgba(255,255,255,0.5);
  transition: color 0.2s; text-decoration: none;
}
.footer-section a:hover { color: var(--white); }

/* Print: also hide new classes */
@media print {
  .mobile-menu-overlay, .nav-container, .theme-toggle { display: none !important; }
}

/* ===== Theme Toggle (Dark Mode) Button ===== */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--white);
  cursor: pointer; font-size: 18px; flex-shrink: 0;
  transition: all 0.3s ease; margin-left: 12px;
  position: relative; overflow: hidden;
}
.theme-toggle:hover {
  background: var(--primary-50); border-color: var(--primary);
  transform: rotate(15deg) scale(1.08);
}
.theme-toggle:active { transform: scale(0.92) rotate(-10deg); }
.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-moon {
  position: absolute; transition: all 0.35s cubic-bezier(.4,0,.2,1);
}
.theme-toggle .theme-icon-moon { opacity: 1; transform: scale(1) rotate(0deg); }
.theme-toggle .theme-icon-sun { opacity: 0; transform: scale(0.5) rotate(-90deg); }

/* ===== Active Nav Highlight Enhancement ===== */
.nav-links a.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37,99,235,0.35);
  border-radius: 8px;
  padding: 6px 13px;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --light-gray: #0f172a;
  --mid-gray: #1e293b;
  --border: #334155;
  --text-dark: #e2e8f0;
  --text-body: #cbd5e1;
  --text-gray: #94a3b8;
  --text-light: #64748b;
  --white: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.5), 0 8px 10px -6px rgba(0,0,0,0.4);
  --primary-50: #172554;
  --primary-light: #1e3a5f;
  color-scheme: dark;
}

[data-theme="dark"] body { background: #0a0f1e; color: var(--text-body); }
[data-theme="dark"] .site-header {
  background: rgba(15,23,42,0.95);
  border-bottom-color: #334155;
}
[data-theme="dark"] .hero { background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #2563eb 100%); }
[data-theme="dark"] .calc-hero { background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #2563eb 100%); }
[data-theme="dark"] .page-content,
[data-theme="dark"] .calculator-box,
[data-theme="dark"] .results-placeholder,
[data-theme="dark"] .calc-form,
[data-theme="dark"] .results-panel {
  background: var(--white);
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
[data-theme="dark"] .tool-card,
[data-theme="dark"] .trust-card {
  background: var(--white);
  border-color: var(--border);
}
[data-theme="dark"] .faq-a-inner { background: var(--white); }
[data-theme="dark"] .footer-brand .footer-logo { color: #93c5fd; }
[data-theme="dark"] .footer-brand p { color: #94a3b8; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 { color: var(--text-dark); }
[data-theme="dark"] .site-footer { background: #0a0f1e; border-top-color: #1e293b; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: #0f172a; color: var(--text-body); border-color: #334155;
}
.ad-top { background: transparent; }
[data-theme="dark"] .tools-section { background: #0c1222; }
[data-theme="dark"] .network-section { background: #0c1222; }
[data-theme="dark"] .faq-section { background: #0c1222; }
[data-theme="dark"] .gov-links { background: #0c1222; }
[data-theme="dark"] .mobile-menu-content { background: #1e293b; }
[data-theme="dark"] .theme-toggle {
  background: #1e293b; border-color: #334155; color: #fbbf24;
}
[data-theme="dark"] .theme-toggle:hover { background: #334155; }
[data-theme="dark"] .nav-links a.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  box-shadow: 0 2px 12px rgba(59,130,246,0.5);
}
[data-theme="dark"] a { color: #60a5fa; }
[data-theme="dark"] a:hover { color: #93c5fd; }
[data-theme="dark"] .logo { color: #60a5fa; }
[data-theme="dark"] .btn-calc { box-shadow: 0 4px 14px rgba(37,99,235,0.4); }
[data-theme="dark"] .breadcrumb-item a { color: #60a5fa; }
[data-theme="dark"] table { border-color: var(--border); }
[data-theme="dark"] th, [data-theme="dark"] td { border-color: var(--border); color: var(--text-body); }
[data-theme="dark"] th { background: #172554; color: #e2e8f0; }
[data-theme="dark"] tr:nth-child(even) { background: rgba(30,41,59,0.5); }
[data-theme="dark"] tr:hover { background: rgba(37,99,235,0.12); }
[data-theme="dark"] .faq-item.open .faq-q { background: rgba(37,99,235,0.15); }
[data-theme="dark"] .result-row.highlight { background: rgba(16,185,129,0.12); border-left-color: #10b981; }
[data-theme="dark"] .disclaimer-box { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .state-badge { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .nav-links a { color: var(--text-gray); }
[data-theme="dark"] .nav-links a:hover { color: #60a5fa; background: #172554; }

/* Dark mode theme toggle icon swap */
[data-theme="dark"] .theme-toggle .theme-icon-moon { opacity: 0; transform: scale(0.5) rotate(90deg); }
[data-theme="dark"] .theme-toggle .theme-icon-sun { opacity: 1; transform: scale(1) rotate(0deg); }

/* Smooth transition for theme switch */
body, .site-header, .page-content, .calculator-box, .calc-form, .results-panel,
.results-placeholder, .tool-card, .trust-card, .footer-container, .site-footer,
input, select, textarea, .nav-links a, .theme-toggle {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease;
}

/* ===== Floating Action Panel (Bottom-Right) ===== */
.fab-panel {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.fab-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
  font-size: 20px; transition: all 0.25s ease;
  position: relative;
}
.fab-btn:hover { transform: scale(1.12); box-shadow: 0 6px 24px rgba(37,99,235,0.5); }
.fab-btn:active { transform: scale(0.95); }
.fab-btn .fab-tooltip {
  position: absolute; right: 58px; top: 50%; transform: translateY(-50%);
  background: var(--text-dark); color: #fff; font-size: 12px; font-weight: 500;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.fab-btn .fab-tooltip::after {
  content: ''; position: absolute; top: 50%; right: -5px;
  transform: translateY(-50%);
  border-left: 5px solid var(--text-dark); border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.fab-btn:hover .fab-tooltip { opacity: 1; }

/* Print toast notification */
.fab-toast {
  position: fixed; bottom: 90px; right: 28px; z-index: 10000;
  background: var(--text-dark); color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 12px 20px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  display: none; max-width: 300px; line-height: 1.5;
  animation: fabToastIn 0.3s ease;
}
.fab-toast.show { display: block; }
.fab-toast .toast-hint { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; }
@keyframes fabToastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* Hide toast and FAB when printing */
@media print {
  .fab-panel, .fab-toast { display: none !important; }
}

/* Dark mode FAB */
[data-theme="dark"] .fab-btn { background: #3b82f6; box-shadow: 0 4px 16px rgba(59,130,246,0.5); }
[data-theme="dark"] .fab-toast { background: #e2e8f0; color: #0f172a; }
[data-theme="dark"] .fab-toast .toast-hint { color: rgba(15,23,42,0.5); }
[data-theme="dark"] .fab-btn .fab-tooltip { background: #e2e8f0; color: #0f172a; }
[data-theme="dark"] .fab-btn .fab-tooltip::after { border-left-color: #e2e8f0; }

@media (max-width: 768px) {
  .fab-panel { bottom: 18px; right: 18px; }
  .fab-btn { width: 42px; height: 42px; font-size: 18px; }
  .fab-toast { right: 18px; bottom: 72px; font-size: 12.5px; }
  .fab-btn .fab-tooltip { display: none; }
}

.mobile-menu-content a { display: inline-flex; align-items: center; }
.mobile-menu-content a .nav-ico { margin-right: 6px; font-size: 15px; }
