:root {
  --bg: #f7f3ee;
  --surface: #ffffff;
  --surface-soft: #fffaf5;
  --text: #1f2937;
  --muted: #64748b;
  --border: #eadfd5;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #7c3aed;
  --shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

body {
  min-height: 100%;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

a {
  color: inherit;
}

.container,
.section-inner,
.calculator-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

header {
  background: #fffaf5;
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  text-align: center;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary-dark);
  text-align: center;
}

header nav {
  display: none;
}

.section {
  padding: 54px 0;
  text-align: center;
}

.section h1,
.section h2,
.section h3,
.calculator-header h1,
.calculator-header h2 {
  text-align: center;
  line-height: 1.15;
  color: var(--text);
}

.section p,
.calculator-header .intro {
  text-align: center;
  color: var(--muted);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero {
  padding: 72px 18px;
  text-align: center;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 55%, #c7d2fe 100%);
}

.hero-badge,
.card-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #ffffff;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.hero h1 {
  max-width: 780px;
  margin: 0 auto 22px;
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  font-weight: 950;
  line-height: 1.05;
  color: #111827;
  text-align: center;
}

.hero p,
.hero-subtitle {
  max-width: 760px;
  margin: 0 auto 30px;
  font-size: clamp(1.08rem, 4vw, 1.45rem);
  line-height: 1.8;
  color: #475569;
  text-align: center;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px auto;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: rgba(255, 255, 255, 0.65);
  color: #312e81;
  font-weight: 800;
  text-align: center;
}

.hero-actions,
.hero-cta,
.form-actions,
.button-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 28px auto;
  width: 100%;
}

.btn,
.hero-btn,
.cta-btn,
.calculate-btn,
.tool-cta,
.card-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(194, 65, 12, 0.18);
}

.hero-btn-ghost {
  background: #ffffff;
  color: var(--primary-dark);
  border: 1px solid #c7d2fe;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card,
.tool-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-icon,
.related-tool-icon {
  display: block;
  margin: 0 auto 12px;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

.card-title,
.tool-card h3 {
  margin: 8px auto 12px;
  color: #111827;
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 950;
  line-height: 1.15;
  text-align: center;
}

.card-desc,
.tool-card p {
  max-width: 620px;
  margin: 0 auto 18px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
}

.card-tags,
.tool-chips,
.related-tool-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tag,
.chip,
.related-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fffaf5;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.calculator-container {
  padding-top: 42px;
  padding-bottom: 42px;
}

.calculator-header {
  margin-bottom: 32px;
  text-align: center;
}

.calculator-header h1 {
  margin: 0 auto 14px;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 950;
}

.calculator-header .intro {
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  line-height: 1.8;
}

.calculator-form {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 34px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  width: 100%;
}

.form-group {
  width: 100%;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.form-group input,
.form-group select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #d8cfc6;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 1rem;
}

.hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-actions,
.button-actions {
  flex-direction: column;
  align-items: center;
}

.form-actions .btn,
.form-actions button,
.button-actions .btn,
.button-actions button {
  width: min(100%, 440px);
  margin: 0 auto;
}

.calculator-results {
  width: 100%;
  max-width: 860px;
  margin: 34px auto;
  text-align: center;
}

.results-header {
  margin: 0 auto 22px;
  text-align: center;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 950;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.result-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-label,
.result-value,
.result-subtitle {
  text-align: center;
}

.result-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-value {
  margin: 8px 0;
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 950;
}

.result-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.message-box,
.warning-message,
.explanation-box {
  width: min(100%, 760px);
  margin: 22px auto;
  padding: 22px;
  border-radius: 18px;
  text-align: center;
  line-height: 1.8;
}

.message-box:empty,
.warning-message:empty,
.explanation-box:empty {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.message-box.info {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #075985;
}

.message-box.success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.message-box.warning,
.warning-message {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.calculator-disclaimer {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0 0 0;
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.calculator-disclaimer p {
  margin: 0;
}

.calculator-disclaimer strong {
  color: #374151;
}

.explanation-box {
  background: #ffffff;
  border: 1px solid var(--border);
}

.faq-section {
  width: 100%;
  max-width: 900px;
  margin: 60px auto;
  padding: 0 18px;
  text-align: center;
}

.faq-section h2 {
  margin: 0 auto 30px;
  text-align: center;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 950;
  color: #111827;
}

.faq-item {
  width: 100%;
  margin: 0 auto 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fffaf5;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.04);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 22px;
  cursor: pointer;
  background: #fffaf5;
}

.faq-question .faq-question-text {
  flex: 1;
  padding: 0;
  text-align: center;
  color: #111827;
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  font-weight: 900;
  line-height: 1.45;
}

.faq-question .faq-icon {
  flex: 0 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 900;
}

.faq-question .faq-icon::before {
  content: "+";
}

.faq-item.active .faq-question .faq-icon::before {
  content: "−";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: #ffffff;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 900px;
  border-top: 1px solid var(--border);
}

.faq-answer p,
.faq-answer {
  margin: 0 auto;
  padding: 0;
  text-align: center;
  color: #475569;
  font-size: clamp(1rem, 4vw, 1.18rem);
  line-height: 1.9;
}

.faq-item.active .faq-answer p,
.faq-item.active .faq-answer {
  padding: 24px;
}

.faq-answer strong {
  color: var(--primary-dark);
  font-weight: 900;
}

.related-tools {
  width: 100%;
  max-width: 900px;
  margin: 60px auto 0;
  padding: 34px 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.related-tools h2,
.related-tools h3 {
  margin: 0 auto 26px;
  text-align: center;
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  font-weight: 950;
  color: var(--text);
}

.related-tools-grid,
.related-tools-grid-modern {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.related-tool-card,
.related-tool-card-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  color: inherit;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.04);
}

.related-tool-card *,
.related-tool-card-modern * {
  text-align: center;
  text-decoration: none !important;
}

.related-tool-card h3,
.related-tool-card h4,
.related-tool-card-modern h3,
.related-tool-card-modern h4 {
  margin: 0 auto 10px;
  color: var(--text);
  font-size: clamp(1.2rem, 5vw, 1.65rem);
  font-weight: 950;
  line-height: 1.2;
}

.related-tool-card p,
.related-tool-card-modern p {
  max-width: 560px;
  margin: 0 auto 14px;
  color: var(--muted);
  line-height: 1.7;
}

footer,
.calculator-footer {
  width: 100%;
  margin: 54px 0 0;
  padding: 26px 16px;
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #e5e7eb;
  text-align: center;
}

footer p,
.calculator-footer p {
  max-width: 760px;
  margin: 0 auto 8px;
  color: #e5e7eb;
  text-align: center;
  line-height: 1.5;
}

footer p:last-child,
.calculator-footer p:last-child {
  margin-bottom: 0;
  color: #cbd5e1;
}

@media (max-width: 768px) {
  .container,
  .section-inner,
  .calculator-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section {
    padding: 42px 0;
  }

  .hero {
    padding: 54px 18px;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .calculator-form {
    padding: 20px 16px;
  }

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

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

  .faq-section {
    margin-top: 46px;
    margin-bottom: 46px;
  }

  .faq-question {
    padding: 20px 18px;
  }

  .faq-item.active .faq-answer p,
  .faq-item.active .faq-answer {
    padding: 22px 18px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .btn,
  .hero-btn,
  .cta-btn,
  .calculate-btn,
  .tool-cta,
  .card-link,
  button {
    width: 100%;
  }

  .faq-question .faq-question-text {
    font-size: 1.05rem;
  }
}

/* Clean top navigation link on calculator pages */
.top-back-link {
  width: 100%;
  max-width: 900px;
  margin: 22px auto 0;
  padding: 0 20px;
  text-align: left;
}

.top-back-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4338ca;
  background: #fffaf5;
  border: 1px solid #eadfd5;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.top-back-link a:hover {
  background: #eef2ff;
}

/* Prevent mobile browser from showing artificial blank area after footer */
html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: auto;
  overflow-x: hidden;
}

/* Compact Related Tools Section */
.related-tools-compact {
  width: 100%;
  max-width: 760px;
  margin: 60px auto 40px;
  padding: 0 18px;
  text-align: center;
}

.related-tools-compact h3 {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.related-tools-compact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-tool-compact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-tool-compact-item:hover {
  border-color: var(--primary);
  background: #f8fafc;
  transform: translateY(-2px);
}

.related-tool-compact-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.related-tool-compact-info {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.related-tool-compact-title {
  display: block;
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.related-tool-compact-desc {
  display: block;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .related-tools-compact {
    margin: 40px auto 30px;
    padding: 0 16px;
  }

  .related-tool-compact-item {
    padding: 12px 16px;
    gap: 12px;
  }

  .related-tool-compact-title {
    font-size: 0.95rem;
  }

  .related-tool-compact-desc {
    font-size: 0.8rem;
  }
}

footer,
.calculator-footer {
  margin-bottom: 0 !important;
}


/* FINAL PREMIUM COLOR OVERRIDE - removes harsh orange */
:root {
  --primary: #4f46e5;
  --accent: #7c3aed;
  --text: #111827;
  --text-muted: #475569;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
}

.hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 55%, #ffffff 100%) !important;
}

.btn,
.hero-btn,
.cta-btn,
.calculate-btn,
button,
.tool-cta,
.card-link {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
}

.hero-btn-ghost,
.top-back-link a {
  background: #ffffff !important;
  color: #4f46e5 !important;
  border-color: #c7d2fe !important;
}

section[style*="linear-gradient"] {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%) !important;
  color: #111827 !important;
}

/* FINAL LINK + CENTERING CLEANUP */
a,
a:visited,
a:hover,
a:active {
  text-decoration: none !important;
}

/* Make the secondary hero link look like a real premium button */
.hero-btn-ghost {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: min(100%, 520px) !important;
  min-height: 56px !important;
  padding: 14px 24px !important;
  margin: 12px auto 0 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  color: #4f46e5 !important;
  border: 1.5px solid #c7d2fe !important;
  font-weight: 900 !important;
  font-size: 1rem !important;
  box-shadow: 0 12px 28px rgba(79,70,229,.12) !important;
}

/* Center homepage tool cards and remove raw link appearance */
.tool-card,
.tool-card *,
.card,
.card * {
  text-decoration: none !important;
}

.tool-card,
.card {
  text-align: center !important;
}

.card-header,
.card-icon,
.card-title,
.card-desc,
.card-tags,
.tool-chips {
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* FAQ should look intentional and balanced */
.faq-section {
  text-align: center !important;
}

.faq-question,
.faq-question-text {
  text-align: center !important;
  justify-content: center !important;
}

.faq-answer,
.faq-answer p {
  text-align: center !important;
  max-width: 620px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  line-height: 1.75 !important;
}

/* Related tool cards: centered icons, text, chips */
.related-tools,
.related-tool-card,
.related-tool-card-modern,
.related-tool-card *,
.related-tool-card-modern * {
  text-align: center !important;
  text-decoration: none !important;
}

.related-tool-icon,
.related-tool-chips {
  justify-content: center !important;
  align-items: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* FINAL MOBILE CTA + FAQ CENTERING FIX */
.cta-banner {
  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
  padding: 52px 20px !important;
  text-align: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.cta-banner h2 {
  max-width: 720px !important;
  margin: 0 auto 18px !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 1.12 !important;
  font-size: clamp(2rem, 8vw, 3rem) !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.cta-banner p {
  max-width: 680px !important;
  margin: 0 auto 28px !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 1.6 !important;
}

.cta-banner .btn,
.cta-banner .hero-btn,
.cta-banner .cta-btn {
  width: min(100%, 560px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Stronger FAQ answer centering */
.faq-section {
  width: 100% !important;
  max-width: 900px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

.faq-item {
  width: 100% !important;
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.faq-answer,
.faq-answer p {
  width: 100% !important;
  max-width: 620px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  line-height: 1.75 !important;
  box-sizing: border-box !important;
}

/* FINAL HOMEPAGE TOOL CARD ALIGNMENT FIX */
.tools-grid,
.related-tools-grid,
.related-tools-grid-modern {
  width: 100% !important;
  max-width: 980px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  justify-items: center !important;
}

.tool-card,
.card,
.related-tool-card,
.related-tool-card-modern {
  width: 100% !important;
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 34px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.tool-card > *,
.card > *,
.related-tool-card > *,
.related-tool-card-modern > * {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.card-header {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  text-align: center !important;
}

.card-icon,
.related-tool-icon {
  display: block !important;
  width: 100% !important;
  margin: 0 auto 14px !important;
  text-align: center !important;
  line-height: 1 !important;
  font-size: 2.15rem !important;
}

.card-category {
  display: flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 auto 18px !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  float: none !important;
  clear: both !important;
}

.card-title,
.tool-card h3,
.related-tool-card h3,
.related-tool-card h4,
.related-tool-card-modern h3,
.related-tool-card-modern h4 {
  display: block !important;
  width: 100% !important;
  max-width: 640px !important;
  margin: 0 auto 16px !important;
  text-align: center !important;
  line-height: 1.18 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

.card-desc,
.tool-card p,
.related-tool-card p,
.related-tool-card-modern p {
  display: block !important;
  width: 100% !important;
  max-width: 620px !important;
  margin: 0 auto 20px !important;
  text-align: center !important;
  line-height: 1.6 !important;
}

.card-tags,
.tool-chips,
.related-tool-chips {
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 auto 20px !important;
}

@media (max-width: 520px) {
  .tool-card,
  .card,
  .related-tool-card,
  .related-tool-card-modern {
    padding: 30px 18px !important;
  }

  .card-title,
  .tool-card h3,
  .related-tool-card h3,
  .related-tool-card h4,
  .related-tool-card-modern h3,
  .related-tool-card-modern h4 {
    font-size: clamp(1.45rem, 6.4vw, 1.95rem) !important;
  }
}

/* FINAL HEADER + WHY SECTION POLISH */
header {
  background: rgba(255,255,255,0.96) !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04) !important;
  padding: 16px 0 !important;
  text-align: center !important;
}

header .container {
  width: 100% !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

header h1,
header h1 a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 auto !important;
  color: #4f46e5 !important;
  font-size: clamp(1.35rem, 5.5vw, 2rem) !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.03em !important;
  text-align: center !important;
  text-decoration: none !important;
}

header nav {
  display: none !important;
}

/* Keep the Why section title clean on mobile */
#why h2,
section#why h2 {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  white-space: nowrap !important;
  font-size: clamp(1.25rem, 5.2vw, 2.4rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.035em !important;
}

/* Keep the small “Why It Matters” label balanced */
#why .section-kicker,
#why .eyebrow,
#why p:first-child {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* FINAL FOOTER / MOBILE BLANK-SPACE FIX */
html,
body {
  min-height: 0 !important;
  height: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: none !important;
}

body {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

main,
.page,
.site,
.site-wrapper,
.app,
#app,
#root {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  min-height: 0 !important;
}

footer,
.calculator-footer {
  margin-bottom: 0 !important;
  padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
}

/* Nothing after the footer should create visual blank scroll space */
footer + *,
.calculator-footer + * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Prevent Chrome mobile from restoring a strange reload scroll position */
html {
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}


/* FINAL PROFESSIONAL HEADER + HERO CLEANUP */
header {
  padding: 18px 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

header h1,
header h1 a {
  color: #4338ca !important;
  font-size: clamp(1.45rem, 5vw, 2rem) !important;
  font-weight: 950 !important;
  letter-spacing: -0.04em !important;
  text-decoration: none !important;
}

.hero {
  padding: 56px 20px 62px !important;
  background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%) !important;
}

.hero-badge {
  width: fit-content !important;
  max-width: 92% !important;
  padding: 9px 16px !important;
  margin: 0 auto 26px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #4338ca !important;
  border: 1px solid #c7d2fe !important;
  font-size: .78rem !important;
  letter-spacing: .08em !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  text-align: center !important;
}

.hero h1 {
  max-width: 760px !important;
  margin: 0 auto 24px !important;
  font-size: clamp(2.35rem, 9vw, 4rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.055em !important;
  color: #0f172a !important;
  text-align: center !important;
}

.hero p,
.hero-subtitle {
  max-width: 680px !important;
  margin: 0 auto 30px !important;
  font-size: clamp(1.05rem, 4.3vw, 1.35rem) !important;
  line-height: 1.65 !important;
  color: #475569 !important;
  text-align: center !important;
}

@media (max-width: 520px) {
  .hero {
    padding-top: 48px !important;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 10vw, 3rem) !important;
  }

  .hero-badge {
    font-size: .72rem !important;
  }
}

/* FINAL BADGE + BACK LINK POLISH */
.hero-badge {
  font-size: clamp(0.92rem, 3.6vw, 1.08rem) !important;
  padding: 14px 22px !important;
  line-height: 1.35 !important;
  max-width: 92% !important;
  letter-spacing: 0.07em !important;
}

/* Make calculator page back link subtle, not a big hero button */
.top-back-link {
  width: 100% !important;
  max-width: 900px !important;
  margin: 22px auto 8px !important;
  padding: 0 22px !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.top-back-link a {
  display: inline-flex !important;
  width: auto !important;
  min-height: auto !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #4f46e5 !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.top-back-link a:hover {
  text-decoration: underline !important;
}

@media (max-width: 520px) {
  .top-back-link {
    margin: 18px auto 4px !important;
    text-align: left !important;
  }

  .hero-badge {
    font-size: 0.95rem !important;
  }
}

/* FINAL BACK TOOLS PLACEMENT POLISH */
.top-back-link {
  width: 100% !important;
  max-width: 900px !important;
  margin: 18px auto 26px !important;
  padding: 0 20px !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.top-back-link a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-height: 42px !important;
  padding: 9px 16px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  border: 1px solid #c7d2fe !important;
  color: #4f46e5 !important;
  font-size: 0.95rem !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(79,70,229,.08) !important;
}

.calculator-header {
  margin-top: 10px !important;
}

@media (max-width: 520px) {
  .top-back-link {
    margin: 16px auto 24px !important;
  }

  .top-back-link a {
    font-size: 0.92rem !important;
    padding: 9px 15px !important;
  }
}

