/* ===== Blog Home ===== */
.blog-home {
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
}

.blog-home-hero {
  margin-bottom: 2rem;
}

.blog-home-hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) 18rem;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}

.blog-home-hero-inner {
  max-width: 760px;
  padding: 1.5rem 0;
}

.blog-kicker {
  margin: 0 0 0.55rem;
  color: var(--bs-success);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-kicker-light {
  color: var(--fte-public-hero-kicker);
}

.blog-home-title {
  margin-bottom: 0.85rem;
  color: var(--bs-emphasis-color);
  font-size: 2.25rem;
  font-weight: 720;
  line-height: 1.08;
}

.blog-home-hero .blog-home-title {
  color: var(--fte-public-hero-title);
  font-size: 2.5rem;
}

.blog-home-copy {
  max-width: 43rem;
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: 1.05rem;
}

.blog-home-hero .blog-home-copy {
  color: var(--fte-public-hero-copy);
  font-size: 1.1rem;
}

.blog-home-signal {
  border-top: 3px solid var(--fte-accent);
}

.blog-home-signal-header {
  margin: 0;
}

.blog-home-signal-row {
  padding: 0.9rem 1rem;
}

.blog-home-signal-row + .blog-home-signal-row {
  border-top: 1px solid var(--bs-border-color);
}

.blog-home-signal-row span {
  display: block;
  color: var(--fte-accent-emphasis);
  font-size: 0.75rem;
  font-weight: 750;
  margin-bottom: 0.2rem;
}

.blog-home-signal-row strong {
  display: block;
  color: var(--bs-emphasis-color);
  font-size: 0.92rem;
  line-height: 1.35;
}

[data-bs-theme="dark"] .blog-home-hero .blog-home-title {
  color: var(--fte-public-hero-title);
}

[data-bs-theme="dark"] .blog-home-hero .blog-home-copy {
  color: var(--fte-public-hero-copy);
}

[data-bs-theme="dark"] .blog-home-signal {
  border-color: var(--fte-border-color);
  border-top-color: var(--fte-accent);
}

[data-bs-theme="dark"] .blog-home-signal-header,
[data-bs-theme="dark"] .blog-home-signal-row + .blog-home-signal-row {
  border-color: var(--fte-border-color);
}

.blog-featured {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--fte-surface-bg);
  border: 1px solid var(--bs-border-color);
  border-left: 3px solid var(--fte-accent);
  border-radius: 0.375rem;
}

.blog-featured-label,
.blog-post-date {
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
  font-weight: 650;
}

.blog-featured-link {
  color: var(--bs-body-color);
  text-decoration: none;
}

.blog-featured-link:hover,
.blog-post-row:hover,
.blog-post-row:focus-visible,
.blog-featured-meta a:hover,
.blog-help-link a:hover,
.blog-article-footer-actions a:hover {
  text-decoration: none;
}

.blog-featured-link:hover h2,
.blog-post-row:hover h3,
.blog-post-row:focus-visible h3,
.blog-featured-meta a:hover,
.blog-help-link a:hover,
.blog-article-footer-actions a:hover {
  color: var(--bs-success);
}

.blog-featured h2 {
  margin-bottom: 0.6rem;
  color: var(--bs-emphasis-color);
  font-size: 1.45rem;
  font-weight: 760;
  line-height: 1.18;
}

.blog-featured p {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--bs-secondary-color);
}

.blog-featured-meta {
  display: grid;
  gap: 0.65rem;
  justify-items: end;
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
  white-space: nowrap;
}

.blog-featured-meta a,
.blog-help-link a,
.blog-article-footer-actions a {
  color: var(--bs-success);
  font-weight: 700;
  text-decoration: none;
}

.blog-post-list-section {
  padding-top: 2.25rem;
}

.blog-section-heading {
  margin-bottom: 0.35rem;
}

.blog-section-heading h2 {
  margin: 0;
  color: var(--bs-emphasis-color);
  font-size: 1.35rem;
  font-weight: 760;
}

.blog-post-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.45rem 0;
  color: inherit;
  border-bottom: 1px solid var(--bs-border-color);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.blog-post-row:hover,
.blog-post-row:focus-visible {
  background: var(--fte-surface-hover-bg);
  text-decoration: none;
}

.blog-post-body h3 {
  margin: 0 0 0.45rem;
  color: var(--bs-emphasis-color);
  font-size: 1.08rem;
  font-weight: 740;
  line-height: 1.25;
}

.blog-post-body p {
  max-width: 42rem;
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: 0.95rem;
  line-height: 1.65;
}

.blog-help-link {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 1.35rem;
  color: var(--bs-secondary-color);
  font-size: 0.95rem;
}

.blog-empty {
  padding: 3rem 1rem;
  border-top: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
}

/* ===== Blog Article ===== */
.blog-article-header {
  max-width: 980px;
  padding: 1.25rem 0 1.35rem;
  margin: 0.5rem auto 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.blog-parent-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
  font-weight: 650;
  text-decoration: none;
}

.blog-parent-link:hover {
  color: var(--bs-success);
  text-decoration: underline;
}

.blog-article-title {
  max-width: 58rem;
  margin: 0;
  color: var(--bs-emphasis-color);
  font-size: 2rem;
  font-weight: 720;
  line-height: 1.12;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}

.blog-sidebar-nav {
  position: sticky;
  top: 1rem;
  padding-top: 0.25rem;
}

.blog-sidebar-nav.public-panel {
  padding: 1rem;
}

.blog-sidebar-heading {
  margin-bottom: 0.75rem;
  color: var(--bs-emphasis-color);
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
}

.blog-sidebar-link {
  display: block;
  padding: 0.42rem 0 0.42rem 0.75rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 2px solid var(--bs-border-color);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.blog-sidebar-link:hover,
.blog-sidebar-link.active {
  color: var(--bs-success);
  border-left-color: var(--bs-success);
}

.blog-sidebar-all {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-weight: 700;
}

.blog-article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--bs-border-color);
}

.blog-article-footer h2 {
  margin-bottom: 0.35rem;
  color: var(--bs-emphasis-color);
  font-size: 1.2rem;
  font-weight: 750;
}

.blog-article-footer p {
  margin: 0;
  color: var(--bs-secondary-color);
}

.blog-article-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  white-space: nowrap;
}

/* ===== Blog Calculation Tables ===== */
.table-responsive:has(.table-spaced) {
  display: inline-block;
  overflow: hidden;
  width: auto;
  border: 1px solid var(--fte-grid-border, var(--bs-border-color));
  border-radius: 0.375rem;
}

.table.table-spaced {
  margin-bottom: 0;
}

.table.table-spaced > :not(caption) > * > * {
  padding: 0.6rem 1rem;
}

.table.table-spaced > thead > tr > th {
  background: var(--fte-table-header-bg, var(--bs-tertiary-bg));
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 2px solid var(--fte-table-header-border, var(--bs-border-color));
}

.table.table-spaced > tbody > tr > td {
  border-bottom: 1px solid var(--fte-grid-border, var(--bs-border-color));
}

.table.table-spaced > tbody > tr:not(.table-light):hover > * {
  --bs-table-bg-state: var(--fte-table-hover-bg, var(--fte-surface-hover-bg));
}

.table.table-spaced > tbody > tr:last-child > td {
  border-bottom: none;
}

.table.table-spaced > tbody > tr.table-light > td {
  border-top: 2px solid var(--fte-table-header-border, var(--bs-border-color));
  border-bottom: none;
}

/* ===== Blog Formula Callout ===== */
.formula-callout {
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  text-align: center;
  background-color: rgba(var(--bs-success-rgb), 0.05);
  border-left: 3px solid var(--bs-success);
  border-radius: 0.375rem;
}

[data-bs-theme="dark"] .formula-callout {
  background: rgba(var(--bs-success-rgb), 0.08);
}

/* ===== Mobile ===== */
@media (max-width: 767.98px) {
  .blog-home-hero {
    padding-top: 2.75rem;
    padding-bottom: 2.5rem;
  }

  .blog-home-hero-grid {
    grid-template-columns: 1fr;
  }

  .blog-home-title {
    font-size: 1.85rem;
  }

  .blog-article-title {
    font-size: 1.55rem;
  }

  .blog-featured,
  .blog-post-row,
  .blog-article-footer {
    grid-template-columns: 1fr;
  }

  .blog-featured,
  .blog-article-footer {
    display: grid;
  }

  .blog-featured-meta {
    justify-items: start;
    white-space: normal;
  }

  .blog-post-row {
    gap: 0.45rem;
    padding: 1.25rem 0;
  }

  .blog-sidebar-link {
    padding: 0.5rem 0 0.5rem 0.75rem;
  }
}
