/* ===========================================
   RentersInsuranceCalc.com - Global Stylesheet
   主色 #7E22CE 梅紫 | 辅助色 #334155 | 背景 #F8FAFC
   全站统一容器 1200px | calculator-box 全局统一格式
   =========================================== */

/* ---- CSS Variables ---- */
:root {
  --primary: #7E22CE;  /* 梅紫 - 主品牌色 */
  --primary-light: #F3E8FF;
  --primary-dark: #581C87;
  --accent: #F59E0B;  /* 暖金 - 强调/高亮 */
  --text: #1E293B;
  --text-muted: #64748B;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --success: #059669;
  --warning: #F59E0B;
  --star: #FBBF24;
  --cta: #7E22CE;  /* CTA按钮颜色 */
  --cta-dark: #581C87;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --max-width: 1200px;
  --nav-height: 64px;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5em; }
p { line-height: 1.75; margin: 16px 0; }
h1, h2, h3, h4 { margin-top: 40px; margin-bottom: 20px; font-weight: 700; color: #0F172A; line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* ---------- 全站统一容器 固定宽度 禁止改动 ---------- */
.container {
  max-width: var(--max-width);
  width: 92%;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------- 三行导航 ---------- */

/* Row 1: Logo Bar */
.nav-logo-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.nav-logo-bar .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.nav-logo i { font-size: 1.35rem; }
.nav-logo:hover { color: var(--primary-dark); }

/* Row 2: Calculator Nav (dark blue bg) */
.nav-calc-bar {
  background: #7E22CE;
  border-bottom: 1px solid #581C87;
  padding: 4px 0;
}
.nav-calc-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-calc-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.nav-calc-links a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-calc-links a:hover,
.nav-calc-links a.active {
  background: rgba(255,255,255,0.18);
  color: #FFFFFF;
}

/* Row 3: Secondary Nav (light gray bg) */
.nav-sub-bar {
  background: #F1F5F9;
  border-bottom: 1px solid var(--border);
  padding: 2px 0;
}
.nav-sub-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-sub-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.nav-sub-links a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-sub-links a:hover,
.nav-sub-links a.active {
  background: #E2E8F0;
  color: var(--primary);
}

/* Sticky: 三行一起吸顶 */
header.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

/* Mobile responsive for three-row nav */
@media (max-width: 768px) {
  .nav-calc-links a {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
  .nav-sub-links a {
    padding: 5px 8px;
    font-size: 0.73rem;
  }
  .nav-logo { font-size: 1rem; }
  .nav-logo i { font-size: 1.15rem; }
}

/* ---------- Hero 头部区域 ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #A855F7 100%);
  color: #FFFFFF;
  padding: 56px 0 48px;
  text-align: center;
}
.hero-logo { font-size: 2.8rem; margin-bottom: 12px; opacity: 0.95; }
.hero h1 { color: #FFFFFF; font-size: 2.4rem; margin: 0 0 16px; line-height: 1.2; }
.hero p { font-size: 1.15rem; opacity: 0.92; max-width: 680px; margin: 0 auto; line-height: 1.6; }

/* ---------- Rating Display ---------- */
.rating-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.rating-stars { color: var(--star); font-size: 1rem; }
.rating-value { font-weight: 700; }
.rating-count { opacity: 0.85; font-size: 0.85rem; }

/* ---------- Trust Bar ---------- */
.trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text);
}
.trust-item { display: inline-flex; align-items: center; gap: 6px; }
.trust-icon { color: var(--success); font-weight: 700; }
.trust-divider { width: 1px; height: 20px; background: var(--border); }

/* ---------- Calculator Box (AdSense exclusion zone) ---------- */
.calculator-box {
  width: 100%;
  padding: 32px;
  margin: 36px 0;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.calculator-box h2 { margin-top: 0; color: var(--primary); font-size: 1.35rem; }
.calculator-box label {
  display: block;
  font-weight: 600;
  margin: 14px 0 6px;
  color: #334155;
  font-size: 0.95rem;
}
.calculator-box input,
.calculator-box select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.calculator-box input:focus,
.calculator-box select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 34, 206, 0.15);
}

/* Checkbox/radio override inside calculator-box */
.calculator-box input[type="checkbox"],
.calculator-box input[type="radio"] {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Calculator Card + Sidebar Layout */
.calculator-box:has(> .calculator-card) {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}
.calculator-box:has(> .calculator-card) > .calculator-card {
  flex: 1;
  min-width: 300px;
}
.calculator-box:has(> .calculator-card) > .calculator-sidebar {
  width: 280px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .calculator-box:has(> .calculator-card) {
    flex-direction: column;
  }
  .calculator-box:has(> .calculator-card) > .calculator-sidebar {
    width: 100%;
  }
}

/* Calculator Card Components */
.calculator-card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.calculator-sidebar h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 16px;
}
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  margin: 0;
  font-weight: 600;
}
.form-group small {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.related-calc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.related-calc-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.related-calc-link i {
  color: var(--primary);
  width: 20px;
  text-align: center;
}

/* Checkbox Grid — must outrank .calculator-box label { display: block } at line ~245 */
.calc-checkbox-grid {
  display: grid !important;
  gap: 10px;
}
/* Use higher specificity: .calculator-box .calc-checkbox-grid label > generic .calculator-box label */
.calculator-box .calc-checkbox-grid label,
.calc-checkbox-grid label {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0.5rem 0.75rem !important;
  font-weight: 400 !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  cursor: pointer;
  text-align: left !important;
  float: none !important;
  clear: none !important;
  position: static !important;
}
.calculator-box .calc-checkbox-grid label input[type="checkbox"],
.calc-checkbox-grid label input[type="checkbox"] {
  width: auto !important;
  min-width: 18px;
  height: 18px;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  order: -1;
  align-self: center;
  float: none !important;
}
.calc-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.calc-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(126, 34, 206, 0.35); }
.calc-btn:active { transform: translateY(0); }

.btn-secondary {
  display: inline-block;
  padding: 8px 18px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--primary); color: #FFFFFF; }

.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* ---------- Result Box ---------- */
.result-box {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--primary-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  display: none;
}
.result-box.show { display: block; }
.result-box h3 { margin: 0 0 10px; color: var(--primary); font-size: 1.1rem; }
.result-value { font-size: 1.6rem; font-weight: 800; color: var(--primary-dark); }
.result-note { font-size: 0.88rem; color: var(--text-muted); margin-top: 8px; }

/* ---------- Tab Navigation ---------- */
.tab-nav { display: flex; gap: 0; margin-bottom: 0; border-bottom: 2px solid var(--border); }
.tab-nav button {
  flex: 1;
  padding: 12px 18px;
  border: none;
  background: #F1F5F9;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.tab-nav button.active { background: var(--card); color: var(--primary); border-bottom-color: var(--primary); }
.tab-nav button:first-child { border-radius: var(--radius-lg) 0 0 0; }
.tab-nav button:last-child { border-radius: 0 var(--radius-lg) 0 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Card Grid ---------- */
.card-grid { display: grid; gap: 24px; margin: 32px 0; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 32px 0;
}
.tool-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tool-card .card-icon, .tool-card-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: inline-block;
}
.tool-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--text); }
.tool-card h3 a { color: var(--text); }
.tool-card h3 a:hover { color: var(--primary); }
.tool-card p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq-item {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q i { transition: transform 0.3s; color: var(--primary); }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-item.open .faq-a { display: block; }

/* ---------- FAQ Search ---------- */
.faq-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 20px;
}
.faq-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(126, 34, 206, 0.15); }

/* ---------- Official Links ---------- */
.official-links { margin: 40px 0; }
.official-links h3 { font-size: 1.1rem; color: var(--primary); }
.official-links ul { list-style: none; padding-left: 0; }
.official-links li { padding: 6px 0; border-bottom: 1px solid #F1F5F9; }
.official-links a { font-size: 0.92rem; }

/* ---------- Site Links ---------- */
.site-links {
  max-width: var(--max-width);
  width: 92%;
  margin: 32px auto;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.site-links h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.05rem;
}
.site-links ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}
.site-links li {
  padding: 5px 0;
  line-height: 1.5;
}
.site-links a {
  display: inline-block;
  margin: 4px 10px 4px 0;
  font-size: 0.9rem;
  color: var(--primary);
}
.site-links a:hover {
  text-decoration: underline;
}
.site-links h3 { margin-top: 0; color: var(--primary); font-size: 1.05rem; }
.site-links a { display: inline-block; margin: 4px 10px 4px 0; font-size: 0.9rem; }

/* ---------- Social Share Buttons ---------- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.share-bar label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #FFFFFF;
  transition: transform 0.15s, opacity 0.2s;
}
.share-btn:hover { transform: scale(1.1); opacity: 0.9; }
.share-btn.reddit { background: #FF4500; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #1877F2; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.copy { background: #64748B; }
.share-btn.email { background: #EA4335; }

/* ---------- Bookmark (Save) Button ---------- */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.bookmark-btn:hover { border-color: var(--primary); color: var(--primary); }
.bookmark-btn.saved { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* ---------- Print/PDF Button ---------- */

/* ---------- Tips Box (State Guide Footer) ---------- */
.tips-box {
  max-width: 1200px;
  width: 92%;
  margin: 32px auto;
  padding: 20px 24px;
  background: #F8FAFC;
  border-radius: 12px;
  border-left: 4px solid #059669;
}
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.print-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Email Result ---------- */
.email-result {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.email-result input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.email-result input:focus { outline: none; border-color: var(--primary); }
.email-result button {
  padding: 8px 16px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Recent Estimates Feed ---------- */
.recent-estimates {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  margin: 24px 0;
}
.recent-estimates h3 { margin-top: 0; font-size: 1.05rem; color: var(--primary); }
.recent-list { list-style: none; padding-left: 0; }
.recent-list li {
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.recent-list li:last-child { border-bottom: none; }
.recent-state { font-weight: 600; color: var(--text); }
.recent-premium { font-weight: 700; color: var(--primary); }

/* ---------- Related Calculators ---------- */
.related-calculators {
  margin: 40px 0;
  padding: 24px;
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  border: 1px solid #E9D5FF;
}
.related-calculators h3 { margin-top: 0; color: var(--primary); font-size: 1.1rem; }
.related-calculators ul { list-style: none; padding-left: 0; }
.related-calculators li { padding: 6px 0; }
.related-calculators a { font-weight: 500; }

/* ---------- Sticky Mobile Calc Button ---------- */
.sticky-calc-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #FFFFFF;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(4,120,87,0.4);
  transition: transform 0.2s;
}
.sticky-calc-btn:hover { transform: scale(1.05); }

/* ---------- State Grid (for state guides index) ---------- */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 32px 0;
}
.state-card {
  display: block;
  padding: 14px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}
.state-card:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 32px;
  margin-top: 64px;
  font-size: 0.92rem;
}
.site-footer h4 { color: #FFFFFF; margin: 0 0 16px; font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.site-footer a:hover { color: #6EE7B7; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 32px; padding-top: 20px; text-align: center; font-size: 0.85rem; opacity: 0.7; }

/* ---------- Ad Slots ---------- */
.ad-placeholder {
  text-align: center;
  margin: 24px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius);
  color: #94A3B8;
  font-size: 0.88rem;
}
.ad-banner-top { margin: 24px 0 0; }

/* Blank ad auto-hide */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 40px 0 36px; }
  .calculator-box { padding: 20px; }
  .card-grid.cols-3,
  .card-grid.cols-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .trust-bar { gap: 12px; padding: 12px 16px; font-size: 0.85rem; }
  .trust-divider { display: none; }
  .trust-bar { flex-direction: column; gap: 8px; }
  .sticky-calc-btn { display: block; }
  .tab-nav { flex-direction: column; }
  .tab-nav button { border-radius: 0 !important; border-bottom: 1px solid var(--border); }
  .share-bar { gap: 6px; }
}

/* ---------- Key Takeaways Box ---------- */
.key-takeaways {
  background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
  border: 1px solid #E9D5FF;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 32px 0;
}
.key-takeaways h3 {
  margin-top: 0;
  color: var(--primary-dark);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.key-takeaways h3::before {
  content: "📌";
  font-size: 1.2rem;
}
.key-takeaways ul {
  margin: 12px 0 0 0;
  padding-left: 20px;
  list-style-type: none;
}
.key-takeaways li {
  padding: 6px 0;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  padding-left: 24px;
}
.key-takeaways li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ---------- Author Box ---------- */
.author-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 32px 0;
  font-size: 0.92rem;
}
.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}
.author-info {
  flex: 1;
}
.author-info strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 4px;
}
.author-info br + span {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.author-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 4px;
}

/* ---------- Pro Tip Box ---------- */
.pro-tip {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
  line-height: 1.65;
}
.pro-tip strong {
  color: #B45309;
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}
.pro-tip strong::before {
  content: "💡 ";
}

/* ---------- Top 3 Cheapest Companies ---------- */
.top-companies {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
}
.top-companies h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 16px;
}
.company-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: all 0.2s;
}
.company-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.company-rank {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.company-info {
  flex: 1;
}
.company-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}
.company-price {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.1rem;
}
.company-rating {
  color: var(--primary);
  font-size: 0.92rem;
}
.company-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.company-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ---------- Star Rating ---------- */
.star-rating {
  display: inline-flex;
  gap: 2px;
  color: #FBBF24;
  font-size: 1rem;
}
.star-rating .star-empty {
  color: #E5E7EB;
}

/* ---------- Sticky CTA Button ---------- */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--cta), var(--cta-dark));
  color: #FFFFFF;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(126, 34, 206, 0.4);
  transition: all 0.2s;
  display: none;
}
.sticky-cta:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
}
@media (max-width: 640px) {
  .sticky-cta {
    display: block;
  }
}

/* ---------- Insurance Glossary Sidebar ---------- */
.glossary-sidebar {
  position: sticky;
  top: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 24px 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.glossary-sidebar h4 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.glossary-sidebar dl {
  margin: 0;
}
.glossary-sidebar dt {
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
  margin-top: 12px;
  cursor: pointer;
}
.glossary-sidebar dd {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: none;
}
.glossary-sidebar dt.active + dd {
  display: block;
}

/* ---------- User Rating Widget ---------- */
.rating-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--primary-light);
  border: 1px solid #E9D5FF;
  border-radius: var(--radius);
  margin: 20px 0;
}
.rating-widget p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.rating-stars {
  display: inline-flex;
  gap: 4px;
}
.rating-star {
  font-size: 1.5rem;
  color: #E5E7EB;
  cursor: pointer;
  transition: all 0.2s;
}
.rating-star:hover,
.rating-star.active {
  color: #FBBF24;
}
.rating-result {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ---------- CTA Button (Orange) ---------- */
.btn-cta {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--cta), var(--cta-dark));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* ---------- Floating Action Button ---------- */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 8px;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.30);
  cursor: pointer;
  font-size: 1.40rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.20s;
}

.fab-main:hover { transform: scale(1.10); }
.fab-main.open { transform: rotate(45deg); }

.fab-menu {
  display: none;
  flex-direction: column-reverse;
  gap: 8px;
  align-items: flex-end;
}

.fab-menu.open { display: flex; }

.fab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
  font-size: 0.90rem;
  color: var(--text);
  transition: all 0.20s;
  white-space: nowrap;
}

.fab-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.fab-item i { font-size: 1.10rem; }

/* Print Toast */
.print-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #1E293B;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.90rem;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.30);
  display: none;
}

.print-toast.show {
  display: block;
  animation: toastIn 0.30s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media print {
  .print-toast { display: none !important; }
  .fab-container { display: none !important; }
}


/* ---------- Print Styles ---------- */
@media print {
  .site-nav, .nav-logo-bar, .nav-calc-bar, .nav-sub-bar, .trust-bar, .share-bar, .bookmark-btn, .print-btn, .email-result, .ad-placeholder, .site-footer, .sticky-calc-btn { display: none !important; }
  .calculator-box { box-shadow: none; border: 1px solid #CCC; }
  body { background: #FFFFFF; color: #000000; }
  .hero { background: #FFFFFF; color: #000000; padding: 20px 0; }
  .hero h1 { color: #000000; }
}

    
/* ========== 打印优化样式 ========== */
@media print {
    /* 隐藏非必要元素 */
    header, .site-header, .navbar, .main-nav,
    .trust-bar, .sticky-cta, .rating-widget,
    .share-buttons, .bookmark-btn, .related-calculators,
    .glossary-sidebar, .newsletter-box, 
    footer, .site-footer, .footer-cols,
    .back-to-top, .calc-btn, button:not(.print-show) {
        display: none !important;
    }
    
    /* 优化打印布局 */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
        margin: 0;
        padding: 0;
    }
    
    .container {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 20px;
    }
    
    /* 显示链接URL */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
        font-weight: normal;
    }
    
    /* 不显示内部链接的URL */
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
    
    /* 避免表格跨页断裂 */
    table, tr, td, th,
    .city-table, .company-card,
    .key-takeaways, .pro-tip {
        page-break-inside: avoid;
    }
    
    /* 标题分页控制 */
    h1, h2, h3, h4 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    /* 优化关键要点显示 */
    .key-takeaways {
        border: 2px solid #000;
        background: #f9f9f9 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    /* 优化表格显示 */
    table {
        width: 100% !important;
        border-collapse: collapse;
    }
    
    table th, table td {
        border: 1px solid #000;
        padding: 8px;
    }
    
    table th {
        background: #f0f0f0 !important;
        print-color-adjust: exact;
    }
    
    /* 图表打印优化 */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}


/* ========== CTA按钮改进 ========== */
/* 主要CTA按钮 */
.btn-primary, .cta-btn, button[class*="cta"], button[class*="primary"] {
    background: linear-gradient(135deg, var(--cta, #7E22CE) 0%, var(--cta-dark, #581C87) 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover, .cta-btn:hover, button[class*="cta"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, var(--cta-dark, #581C87) 0%, #c2410c 100%);
}

.btn-primary:active, .cta-btn:active, button[class*="cta"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

/* 次要按钮 */
.btn-secondary {
    background: var(--card);
    color: var(--primary);
    padding: 14px 32px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

/* 大号CTA按钮 */
.btn-hero, .hero-cta {
    background: linear-gradient(135deg, var(--cta, #7E22CE) 0%, var(--cta-dark, #581C87) 100%);
    color: white;
    padding: 18px 42px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-hero:hover, .hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(249, 115, 22, 0.5);
    background: linear-gradient(135deg, var(--cta-dark, #581C87) 0%, #c2410c 100%);
}

    
/* ========= 面包屑导航 ========= */
.breadcrumb {
    max-width: 1200px;
    width: 92%;
    margin: 0 auto 20px;
    padding: 16px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li:last-child {
    color: var(--text);
    font-weight: 500;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ========= 增强Author Box样式 ========= */
.author-box {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 40px 0;
  border-left: 4px solid var(--primary);
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.author-info {
  flex: 1;
}

.author-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 4px;
}

.author-credentials {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.author-credentials i {
  font-size: 0.9rem;
}

.author-credentials span {
  color: var(--border);
}

.author-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.author-expertise {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.expertise-badge {
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* 响应式 */
@media (max-width: 640px) {
  .author-box {
    flex-direction: column;
    text-align: center;
  }
  
  .author-avatar {
    margin: 0 auto;
  }
  
  .author-credentials {
    justify-content: center;
  }
  
  .author-expertise {
    justify-content: center;
  }
}


.tool-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.table-responsive table {
    min-width: 600px;
}

/* Button Touch Targets */
@media (max-width: 768px) {
    .btn, button, .share-btn, .bookmark-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }
    
    /* Mobile Font Sizes */
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    p, li, td, th {
        font-size: 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .btn, button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ---------- Checkbox Group (state mini-calculators) ---------- */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    color: var(--text);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}


/* ===== Own-site network links (Phase A outbound plan) ===== */
.own-tools {
  max-width: 1200px;
  width: 92%;
  margin: 32px auto;
  padding: 24px 28px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.own-tools h3 { margin: 0 0 16px; font-size: 1.05rem; color: var(--text, #0f172a); }
.own-tools ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.own-tools li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
}
.own-tools li:last-child { border-bottom: none; }
.own-tools li:hover { background: #f8fafc; border-radius: 6px; }
.own-tools li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #047857);
  flex-shrink: 0;
  margin-right: 12px;
}
.own-tools li a {
  color: var(--text, #0f172a);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  flex: 1;
  min-width: 0;
}
.own-tools li a:hover { color: var(--primary, #047857); text-decoration: underline; }
.own-tools .domain {
  font-size: 0.78rem;
  color: var(--primary, #047857);
  margin-left: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Own-tools dark mode */
body.dark-mode .own-tools { background: #1e293b; border-color: #334155; }
body.dark-mode .own-tools h3 { color: #f1f5f9; }
body.dark-mode .own-tools li { border-bottom-color: #334155; color: #e2e8f0; }
body.dark-mode .own-tools li:hover { background: #334155; }
body.dark-mode .own-tools li a { color: #e2e8f0; }
body.dark-mode .own-tools li a:hover { color: #C4B5FD; }
