/* ============================================
   RentCostCalc.com - Global Stylesheet v2.0
   Design System: Modern Mint + Warm Accent
   Primary: #10B981 | Accent: #F59E0B | CTA: #EF4444
   Background: #F0FDF4 (warmer light green-white)
   Cards: #FFFFFF | Dark: #064E3B
   ============================================ */

/* --- CSS Custom Properties v2 --- */
:root {
  --primary: #10B981;
  --primary-dark: #047857;
  --primary-darker: #064E3B;
  --primary-light: #D1FAE5;
  --primary-lighter: #ECFDF5;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --cta: #EF4444;
  --cta-dark: #DC2626;
  --bg: #F0FDF4;
  --bg-alt: #F9FAFB;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow: 0 4px 14px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 30px rgba(16,185,129,0.15);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header v2 --- */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text) !important;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

/* --- Desktop Nav --- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: var(--primary-lighter);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* --- Mobile Menu Button --- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: var(--primary-lighter);
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero v2 --- */
.hero {
  background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  color: #fff;
  padding: 4rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
  letter-spacing: -0.03em;
  position: relative;
  line-height: 1.15;
}

.hero-sub {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.65;
  position: relative;
}

/* --- Intro Section --- */
.intro-section {
  padding: 3.5rem 0;
  background: var(--card);
  border-bottom: 1px solid var(--border-light);
}

.intro-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.intro-section h2 .icon {
  color: var(--primary);
  font-size: 1.4rem;
}

.intro-section p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.85;
  font-size: 0.97rem;
}

/* --- Tab Navigation v2 --- */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.9rem 1.6rem;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--primary-dark);
  background: var(--primary-lighter);
}

.tab-btn.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  background: var(--primary-lighter);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Calculator Box v2 --- */
.calculator-box {
  padding: 2.2rem;
  border-radius: var(--radius);
  background: var(--card);
  margin: 2rem 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  transition: var(--transition);
}

.calculator-box:hover {
  box-shadow: var(--shadow-lg);
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.calc-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.calc-title .icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* --- Form Elements v2 --- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 0.3rem;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.78rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-alt);
  transition: var(--transition);
  outline: none;
  font-family: var(--font);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
  background: var(--card);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group small {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* --- Buttons v2 --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font);
  box-shadow: 0 4px 14px rgba(16,185,129,0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16,185,129,0.35);
  color: #fff !important;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 2rem;
  background: var(--card);
  color: var(--primary-dark) !important;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font);
}

.btn-secondary:hover {
  background: var(--primary-lighter);
  color: var(--primary-dark) !important;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  color: #fff !important;
}

/* --- Result Area v2 --- */
.result-area {
  margin-top: 1.8rem;
  padding: 1.8rem;
  background: linear-gradient(135deg, var(--primary-lighter), var(--primary-light));
  border-radius: var(--radius-sm);
  border-left: 5px solid var(--primary);
  display: none;
  animation: slideUp 0.4s ease;
}

.result-area.show {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-area h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.result-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}

.result-breakdown {
  margin-top: 1.2rem;
}

.result-breakdown .row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(16,185,129,0.15);
  font-size: 0.93rem;
}

.result-breakdown .row:last-child {
  border-bottom: none;
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 1.02rem;
  padding-top: 0.8rem;
  margin-top: 0.3rem;
  border-top: 2px solid rgba(16,185,129,0.25);
}

/* --- Chart Container --- */
.chart-container {
  margin-top: 1.8rem;
  padding: 1.2rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  max-width: 560px;
  height: auto;
  position: relative;
}

.chart-container canvas {
  max-width: 100%;
  height: auto !important;
}

.chart-container::before {
  content: '📊 Visualization';
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Result Actions Bar (Share/Print/Copy) --- */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(16,185,129,0.2);
}

.result-actions .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.result-actions .action-btn:hover {
  background: var(--primary-lighter);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.result-actions .action-btn.copied {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- Tools Grid v2 --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.tool-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text) !important;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  opacity: 0;
  transition: var(--transition);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  color: var(--text) !important;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 12px;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  transition: var(--transition);
}

.tool-card:hover .tool-card-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
  line-height: 1.3;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex-grow: 1;
}

/* --- FAQ Section v2 --- */
.faq-section {
  margin: 2rem 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
  overflow: hidden;
  background: var(--card);
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-light);
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(16,185,129,0.1);
}

.faq-question {
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  font-family: var(--font);
}

.faq-question:hover {
  background: var(--primary-lighter);
}

.faq-question .arrow {
  transition: transform 0.3s ease;
  color: var(--primary);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  padding: 0 1.5rem 1.2rem;
  max-height: 600px;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.93rem;
}

/* --- Share Bar --- */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0;
  margin: 1.5rem 0;
}

.share-bar .share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.3rem;
}

.share-bar .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  color: var(--text-secondary);
}

.share-bar .share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.share-bar .share-btn.twitter:hover { background: #1DA1F2; color: #fff; border-color: #1DA1F2; }
.share-bar .share-btn.facebook:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-bar .share-btn.linkedin:hover { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.share-bar .share-btn.reddit:hover { background: #FF4500; color: #fff; border-color: #FF4500; }
.share-bar .share-btn.email:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.share-bar .share-btn.copy-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- Bookmark/Favorite Button --- */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  font-family: var(--font);
}

.bookmark-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.bookmark-btn.bookmarked {
  background: #FEF3C7;
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* --- Trust Badges --- */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
}

.trust-bar .trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.trust-bar .trust-item .trust-icon {
  font-size: 1.1rem;
}

/* --- Content Section --- */
.content-section {
  padding: 3.5rem 0;
}

.content-section h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--primary-light);
}

.content-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.85;
  font-size: 0.95rem;
}

/* --- Gov Links / Site Links --- */
.gov-links,
.site-links {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.gov-links h3,
.site-links h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.gov-links a,
.site-links a {
  display: inline-block;
  margin-right: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

/* --- Related Tools --- */
.related-tools {
  background: linear-gradient(135deg, var(--primary-lighter), var(--primary-light));
  border-radius: var(--radius);
  padding: 1.8rem;
  margin: 2rem 0;
  border: 1px solid rgba(16,185,129,0.2);
}

.related-tools h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.9rem;
}

.related-tools a {
  display: inline-block;
  margin-right: 1.2rem;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  color: var(--primary-dark) !important;
  font-weight: 500;
}

.related-tools a:hover {
  text-decoration: underline;
}

/* --- Page Header (sub pages) --- */
.page-header {
  background: linear-gradient(135deg, var(--primary-darker), var(--primary-dark));
  color: #fff;
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--primary-dark);
}

/* --- Disclaimer Bar --- */
.disclaimer-bar {
  background: #FEF3C7;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: #92400E;
  line-height: 1.65;
}

/* --- Section Title --- */
.section-title {
  text-align: center;
  margin: 3rem 0 2.2rem;
}

.section-title h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-title p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* --- Ad Placeholder --- */
.ad-placeholder {
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}

/* --- Footer v2 --- */
.site-footer {
  background: var(--primary-darker);
  color: #D1D5DB;
  padding: 3.5rem 0 1.5rem;
  margin-top: 5rem;
}

.footer-inner {
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.footer-links a {
  color: #D1D5DB;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: #6B7280;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: #6B7280;
  margin-top: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ============================================
   Responsive v2
   ============================================ */
@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.3rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    overflow-y: auto;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav .nav-link {
    padding: 0.9rem 1.2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-xs);
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 1.05rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
  }

  .calculator-box {
    padding: 1.5rem;
  }

  .result-value {
    font-size: 1.8rem;
  }

  .share-bar {
    justify-content: center;
  }

  .result-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .calc-title {
    font-size: 1.15rem;
    flex-wrap: wrap;
  }

  .result-value {
    font-size: 1.5rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .footer-links {
    gap: 0.8rem;
  }

  .trust-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

/* ============================================
   Print Styles v2 (Enhanced)
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .tab-nav,
  .faq-section,
  .gov-links,
  .site-links,
  .related-tools,
  ins.adsbygoogle,
  .ad-placeholder,
  .share-bar,
  .result-actions,
  .bookmark-btn,
  .trust-bar,
  .mobile-menu-btn {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  .calculator-box {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .result-area {
    display: block !important;
    background: #f9f9f9 !important;
    border-left: 4px solid #10B981 !important;
  }

  .result-area * {
    color: #000 !important;
  }

  .chart-container {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .content-section {
    padding: 1rem 0 !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: "";
  }

  h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .page-header,
  .hero {
    background: #10B981 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    margin: 1.5cm;
  }
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary-darker);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary-dark); }
.text-accent { color: var(--accent-dark); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-green {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-amber {
  background: #FEF3C7;
  color: #92400E;
}


/* ============================================
   Responsive Tables
   ============================================ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.table-wrap table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  margin: 0;
  background: var(--card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tr:nth-child(even) {
  background: var(--bg-alt);
}

.data-table tr:hover {
  background: var(--primary-lighter);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  background: var(--card);
}

.compare-table th,
.compare-table td {
  padding: 0.75rem;
  border: 1px solid var(--border);
  text-align: center;
}

.compare-table th {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  font-weight: 600;
}

.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  background: var(--bg-alt);
}

.compare-table .best {
  background: #ECFDF5;
  font-weight: 700;
  color: var(--primary-dark);
}

.compare-table .worst {
  background: #FEF2F2;
  color: var(--cta);
}

.split-result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--card);
}

.split-result-table th,
.split-result-table td {
  padding: 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.split-result-table th {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  font-weight: 600;
}

@media print {
  .table-wrap {
    overflow-x: visible;
  }
  .table-wrap table,
  .data-table,
  .compare-table,
  .split-result-table {
    width: 100%;
    min-width: auto;
  }
  .data-table th,
  .data-table td,
  .compare-table th,
  .compare-table td,
  .split-result-table th,
  .split-result-table td {
    white-space: normal;
  }
}


/* ============================================
   DARK MODE v1.0
   ============================================ */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F172A;
  --bg-alt: #1E293B;
  --card: #1E293B;
  --text: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: #334155;
  --border-light: #1E293B;
  --shadow: 0 4px 14px rgba(0,0,0,0.35);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.45);
  --primary-dark: #34D399;
  --primary-light: #064E3B;
  --primary-lighter: #064E3B;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .site-header {
  background: rgba(15,23,42,0.95);
  border-bottom-color: var(--border);
}

html[data-theme="dark"] .logo-text {
  color: var(--primary);
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active {
  background: rgba(16,185,129,0.15);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .calculator-box,
html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .faq-answer,
html[data-theme="dark"] .result-box,
html[data-theme="dark"] .rule-box,
html[data-theme="dark"] .market-check,
html[data-theme="dark"] .split-panel,
html[data-theme="dark"] .compare-column,
html[data-theme="dark"] .net-card,
html[data-theme="dark"] .checklist-item {
  background: var(--card);
  border-color: var(--border);
}

html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #064E3B 0%, #065F46 50%, #0F766E 100%);
}

html[data-theme="dark"] .hero-title,
html[data-theme="dark"] .hero-subtitle {
  color: #fff;
}

html[data-theme="dark"] .data-table th {
  background: #064E3B;
  color: #D1FAE5;
}

html[data-theme="dark"] .data-table tr:nth-child(even) {
  background: #1E293B;
}

html[data-theme="dark"] .data-table td {
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0F172A;
  color: #E2E8F0;
  border-color: #334155;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.25);
}

html[data-theme="dark"] .faq-question {
  background: #1E293B;
  color: #E2E8F0;
}

html[data-theme="dark"] .faq-question:hover {
  background: #064E3B;
}

html[data-theme="dark"] .main-footer {
  background: #0B1120;
  border-color: var(--border);
}

html[data-theme="dark"] .ad-placeholder {
  background: #1E293B;
  color: #94A3B8;
  border-color: #334155;
}

html[data-theme="dark"] .toast {
  background: #1E293B;
  color: #E2E8F0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

html[data-theme="dark"] .score-bar {
  background: #334155;
}

html[data-theme="dark"] .chart-container {
  background: #1E293B;
}

/* Theme Toggle Button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  color: var(--text-secondary);
}

.theme-toggle:hover {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  border-color: var(--primary);
}

html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(16,185,129,0.15);
  color: var(--primary);
}

/* --- Blog Hero Image --- */
.blog-hero-img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem auto 1.5rem;
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow);
}

@media print {
  .blog-hero-img { max-height: 200px; object-fit: contain; }
}

@media print {
  html[data-theme="dark"] body {
    background: #fff !important;
    color: #000 !important;
  }
  html[data-theme="dark"] .card,
  html[data-theme="dark"] .calculator-box {
    background: #fff !important;
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 500;
  border-radius: 0 0 6px 0;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: -2px;
}

/* --- Floating Action Widget (bottom-right) --- */
.floating-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.floating-widget .fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: #fff;
  color: var(--text);
}
.floating-widget .fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  background: var(--primary-lighter);
}
.floating-widget .fab-btn:active {
  transform: scale(0.95);
}
/* Hide back-to-top until scrolled */
.floating-widget #fabTop {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.floating-widget #fabTop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media print {
  .floating-widget { display: none !important; }
  .toast { display: none !important; }
}


