/* ==========================================================================
   Nodexia — blog (listing + articles). Loads after styles.css.
   ========================================================================== */

.page-blog main { padding-top: 150px; }
.container-narrow { max-width: calc(780px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.nav__links a[aria-current="page"] { color: #fff; }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- listing ---------- */
.blog-hero { padding-bottom: 56px; }
.blog-hero__title { margin-top: 24px; font-size: clamp(40px, 5.4vw, 76px); font-weight: 500; letter-spacing: -.05em; line-height: 1.05; text-wrap: balance; }
.blog-hero__lead { margin-top: 20px; max-width: 560px; font-size: 20px; line-height: 1.5; color: rgba(255, 255, 255, .72); }
.blog-list { padding-inline: var(--gutter); max-width: var(--maxw); margin-inline: auto; }
.post__lead { padding: 12px 36px 0; color: var(--muted-2); font-size: 15px; line-height: 1.55; max-width: 360px; }

/* ---------- article ---------- */
.article__head { padding-bottom: 48px; }
.article__back { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .7); font-size: 14px; transition: color .3s; }
.article__back:hover { color: #fff; }
.article__back svg { width: 16px; }
.article__title { margin-top: 28px; font-size: clamp(36px, 5vw, 64px); font-weight: 500; letter-spacing: -.045em; line-height: 1.08; text-wrap: balance; }
.article__lead { margin-top: 20px; max-width: 640px; font-size: 20px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
.article__meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-family: var(--mono); font-size: 13px; }

.article__cover {
  height: clamp(220px, 30vw, 400px);
  margin: 0 var(--gutter); max-width: calc(var(--maxw) - 2 * var(--gutter));
  border-radius: var(--radius) var(--radius) var(--radius-sm) var(--radius-sm);
}
@media (min-width: 1440px) { .article__cover { margin-inline: auto; } }
.article__cover i { transform: scale(1.5); }
.article__cover.post__art--c i { transform: rotate(-10deg) scale(1.5); }

.article__body { margin-top: var(--gap); padding: 80px 0 72px; border-radius: var(--radius-sm) var(--radius-sm) var(--radius) var(--radius); }
.article__inner { max-width: calc(680px + 48px); margin-inline: auto; padding-inline: 24px; }

.prose { font-size: 18px; line-height: 1.7; color: var(--ink-warm); }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 56px; font-size: clamp(26px, 2.6vw, 32px); font-weight: 500; letter-spacing: -.03em; line-height: 1.2; text-wrap: balance; }
.prose h2 + * { margin-top: 14px; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--cu-brand); font-weight: 600; }
.prose strong { font-weight: 600; }
.prose .formula {
  padding: 18px 22px; border-radius: 12px; background: var(--sand);
  font-family: var(--mono); font-size: 15px; line-height: 1.6;
}
.prose .callout { padding: 22px 24px; border-radius: 14px; background: #fbf4ef; box-shadow: inset 0 0 0 1px #f0dccd; }
.prose .callout__label { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 12px; color: #7a4f33; }
.prose h3 { margin-top: 36px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.prose h3 + * { margin-top: 10px; }
.prose a:not(.btn) { color: #8a5634; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
.prose a:not(.btn):hover { color: var(--ink-warm); }
.prose em { color: var(--muted-2); }
.prose .callout ul { margin-top: 4px; }
.prose .callout li + li { margin-top: 6px; }
.prose .callout--summary { background: var(--sand); box-shadow: none; }
.prose .sources { font-size: 15px; line-height: 1.55; color: var(--muted-2); }
.prose .sources a:not(.btn) { color: inherit; }
.table-wrap { overflow-x: auto; }
.prose caption { caption-side: top; text-align: left; padding-bottom: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.prose th[scope="row"] { color: var(--ink-warm); font-size: 16px; }
.prose table.table--text td:last-child, .prose table.table--text th:last-child { text-align: left; white-space: normal; }

/* ROI calculator */
.roi { margin-top: 24px; padding: 28px; border-radius: 18px; background: var(--sand); }
.roi__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.roi__field { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; font-size: 14px; line-height: 1.35; color: var(--muted-2); }
.roi__field input {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(60, 40, 20, .25);
  background: #fff; color: var(--ink-warm); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums;
}
.roi__field input:focus-visible { outline: 2px solid var(--cu-brand); outline-offset: 1px; }
.roi__results { margin-top: 24px; padding: 20px 22px; border-radius: 14px; background: var(--espresso); color: #fff; }
.roi__results dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 20px; margin: 0; }
.roi__results dt { font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .72); }
.roi__results dd { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--champagne); font-variant-numeric: tabular-nums; }
.roi__note { margin-top: 14px; font-size: 13px; color: var(--muted-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 12px 8px; border-bottom: 1px solid var(--line-light); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; color: var(--muted-2); font-size: 14px; }
.prose td:last-child, .prose th:last-child { text-align: right; white-space: nowrap; }
.prose tr.is-total td { font-weight: 600; border-bottom: 0; }

.article__cta {
  margin-top: 64px; padding: 32px 36px; border-radius: var(--radius);
  background: var(--espresso); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.article__cta h2 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.article__cta p { margin-top: 6px; color: rgba(255, 255, 255, .75); font-size: 15px; }
.article__cta .btn { flex: none; }

.related { margin: 120px auto 0; padding-inline: var(--gutter); max-width: var(--maxw); }
.related__title { margin-bottom: 32px; font-size: clamp(32px, 3.4vw, 44px); font-weight: 500; letter-spacing: -.04em; }
.posts--two { grid-template-columns: repeat(2, 1fr); }
.posts--two .post:last-child { grid-column: auto; }

/* ---------- compact footer ---------- */
.footer-mini {
  margin: 140px auto 0; max-width: var(--maxw); padding: 32px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--line-dark); color: rgba(255, 255, 255, .6); font-size: 14px;
}
.footer-mini__brand { display: flex; align-items: center; gap: 16px; }
.footer-mini__brand img { height: 26px; width: auto; }
.footer-mini nav { display: flex; gap: 24px; }
.footer-mini nav a:hover { color: #fff; }

@media (max-width: 809px) {
  .page-blog main { padding-top: 110px; }
  .blog-hero__lead, .article__lead { font-size: 18px; }
  .article__body { padding: 48px 0 40px; }
  .prose { font-size: 17px; }
  .roi { padding: 20px 16px; }
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 10px 6px; }
  /* text tables stack: one card per row, each cell labelled with its column */
  .prose table.table--text thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table.table--text, .prose table.table--text tbody, .prose table.table--text tr,
  .prose table.table--text td, .prose table.table--text th[scope="row"] { display: block; width: 100%; }
  .prose table.table--text tr { padding: 12px 0; border-bottom: 1px solid var(--line-light); }
  .prose table.table--text td, .prose table.table--text th[scope="row"] { padding: 2px 0; border: 0; font-size: 15px; }
  .prose table.table--text th[scope="row"] { margin-bottom: 4px; }
  .prose table.table--text caption { display: block; width: 100%; }
  .prose table.table--text td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-warm); }
  .roi__fields { grid-template-columns: 1fr; }
  .article__cta { flex-direction: column; align-items: flex-start; padding: 28px 20px; }
  .posts--two { grid-template-columns: 1fr; }
  .post__lead { padding-inline: 24px; }
  .related { margin-top: 80px; }
  .footer-mini { margin-top: 96px; flex-direction: column; align-items: flex-start; }
}
