/* Calculators directory visual refresh */
body {
  background: #f6f8f7;
  color: #17201d;
}

.header {
  border: 1px solid #e2e8e5;
  box-shadow: 0 8px 24px rgba(23, 32, 29, 0.07);
}

.calculators-hero {
  max-width: 1200px;
  margin: 20px auto 72px;
  padding: 72px 64px;
  border-radius: 24px;
  background: #075e47;
  text-align: left;
}

.calculators-eyebrow,
.calculators-heading-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.calculators-hero h1 {
  max-width: 780px;
  margin: 0 0 20px;
  color: white;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.08;
}

.calculators-hero .calculators-hero-lead {
  max-width: 720px;
  margin: 0;
  color: #d8eee6;
  font-size: 19px;
  line-height: 1.65;
}

.calculators-hero .author-byline {
  margin: 28px 0 0;
  color: #bfe1d5;
  font-size: 13px;
}

.calculators-hero .author-byline a {
  color: white;
  text-underline-offset: 3px;
}

/* Shared flat hero. Used by /guias/ and /blog/, which is why it lives in the
   directory-page system rather than in either page's own stylesheet. */
.page-hero--flat {
  max-width: 1200px;
  margin: 20px auto 72px;
  padding: 72px 64px;
  border-radius: 24px;
  background: #075e47;
  text-align: left;
}

/* shared.css makes .page-hero h1 a centred flex container, so text-align has
   no effect on it. Only visible when the title is short enough not to fill
   the line — /guias/ wraps and hid this, /blog/ does not. */
.page-hero--flat h1 {
  display: block;
  max-width: 780px;
  margin: 0 0 20px;
  color: white;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.08;
}

.page-hero--flat h1 .emoji-icon {
  display: none !important;
}

.page-hero--flat p {
  max-width: 720px;
  margin: 0;
  color: #d8eee6;
  font-size: 19px;
  line-height: 1.65;
}

.page-hero--flat .author-byline {
  margin: 0 0 20px;
  color: #bfe1d5;
  font-size: 13px;
}

.page-hero--flat .author-byline a {
  color: white;
  text-underline-offset: 3px;
}

.calculators-section {
  padding-top: 0;
  padding-bottom: 20px;
}

.calculators-heading {
  max-width: 700px;
  margin: 0 auto 38px;
  text-align: center;
}

.calculators-heading-eyebrow {
  margin-bottom: 10px;
  color: #087a55;
}

.calculators-heading h2 {
  margin-bottom: 12px;
  color: #17201d;
  font-size: clamp(2rem, 4vw, 2.5rem);
}

.calculators-heading p {
  color: #5f6f68;
  font-size: 17px;
  line-height: 1.6;
}

.calculators-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.calculator-card-link {
  border-radius: 16px;
}

.calculator-card-link:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.35);
  outline-offset: 3px;
}

.calculator-card {
  min-height: 248px;
  padding: 28px;
  border: 1px solid #dce5e1;
  border-radius: 16px;
  background: white;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.calculator-card:hover {
  border-color: #7fc3aa;
  box-shadow: 0 10px 26px rgba(7, 94, 71, 0.08);
  transform: translateY(-2px);
}

.calculator-header {
  gap: 16px;
  margin-bottom: 18px;
}

.calculator-icon {
  width: 56px !important;
  height: 56px !important;
  padding: 7px;
  border-radius: 13px;
  background: #eaf6f0;
}

.calculator-title {
  color: #17201d;
  font-size: 21px;
  line-height: 1.3;
}

.calculator-description {
  margin-bottom: 22px;
  color: #5f6f68;
  line-height: 1.65;
}

.calculator-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0;
  background: transparent;
  color: #087a55;
  font-size: 15px;
  font-weight: 700;
}

.calculator-card-link:hover .calculator-cta {
  color: #075e47;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.editorial-section,
.faq-lite,
.related-content {
  margin-top: 72px;
  margin-bottom: 72px;
}

.editorial-card,
.faq-lite-box {
  border: 1px solid #e2e8e5;
  border-radius: 16px;
  box-shadow: none;
}

.editorial-card {
  padding: 36px;
}

.editorial-card h2,
.faq-lite-box h2 {
  color: #075e47;
}

.editorial-card h2 img,
.faq-lite-box h2 img {
  display: none !important;
}

.editorial-item {
  border: 1px solid #e2e8e5;
  background: #f8faf9;
}

.editorial-note {
  border-left-color: #087a55;
  background: #eaf6f0;
  color: #075e47;
}

.faq-lite-box {
  padding: 36px;
}

.faq-lite-box details {
  border-color: #e2e8e5;
  padding: 16px 0;
}

.faq-lite-box summary {
  min-height: 44px;
  color: #17201d;
  font-family: var(--font-headings);
  line-height: 1.45;
}

.related-content {
  padding: 48px 32px;
  border: 1px solid #d6e8e1;
  border-radius: 18px;
  background: #eaf6f0;
}

.related-content h2 {
  color: #17201d;
}

.related-content p {
  max-width: 700px;
  margin-right: auto;
  margin-left: auto;
  color: #5f6f68;
}

.related-link {
  border: 1px solid #c4ddd4;
  border-radius: 10px;
  box-shadow: none;
  color: #075e47;
}

.related-link:hover {
  border-color: #7fc3aa;
  background: #f7fffb;
}

.footer {
  max-width: 1200px;
  margin: 72px auto 0;
  padding: 48px 32px;
  border-radius: 18px;
  background: #075e47;
  color: #f7fffb;
}

.footer p {
  color: #f7fffb;
}

.footer p img {
  display: none !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
}

.footer-links a {
  margin: 0;
  color: #d7f3e7;
  opacity: 1;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .page-hero--flat {
    margin-top: 12px;
    margin-bottom: 56px;
    padding: 56px 40px;
    border-radius: 20px;
  }

  .calculators-hero {
    margin-top: 12px;
    margin-bottom: 56px;
    padding: 56px 40px;
    border-radius: 20px;
  }

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

  .calculator-card {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .page-hero--flat {
    margin-bottom: 48px;
    padding: 40px 20px;
    border-radius: 16px;
  }

  .page-hero--flat h1 {
    font-size: 34px;
  }

  .page-hero--flat p {
    font-size: 16px;
  }

  body {
    padding: 8px;
  }

  .header {
    top: 8px;
  }

  .calculators-hero {
    margin-bottom: 48px;
    padding: 40px 20px;
    border-radius: 16px;
  }

  .calculators-hero h1 {
    font-size: 34px;
  }

  .calculators-hero .calculators-hero-lead {
    font-size: 16px;
  }

  .calculators-section,
  .editorial-section,
  .faq-lite,
  .related-content {
    padding-right: 4px;
    padding-left: 4px;
  }

  .calculators-heading {
    margin-bottom: 28px;
  }

  .calculators-heading h2 {
    font-size: 30px;
  }

  .calculators-heading p {
    font-size: 16px;
  }

  .calculator-card {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .calculator-icon {
    width: 50px !important;
    height: 50px !important;
  }

  .calculator-title {
    font-size: 19px;
  }

  .editorial-section,
  .faq-lite,
  .related-content {
    margin-top: 48px;
    margin-bottom: 48px;
  }

  .editorial-card,
  .faq-lite-box,
  .related-content {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .editorial-card h2,
  .faq-lite-box h2,
  .related-content h2 {
    font-size: 26px;
    line-height: 1.25;
  }

  .related-links {
    display: grid;
    gap: 12px;
  }

  .related-link {
    min-height: 48px;
    padding: 12px 16px;
  }

  .footer {
    margin-top: 48px;
    padding: 32px 18px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .calculator-card {
    transition: none;
  }
}
