/* Site integration for the delivered nx-table.css (kept unchanged).
   - Gives .nx-table the same look as the blog's .comparison-table.
   - Lets the table scroll inside .nx-table-scroll instead of widening the
     whole post column on phones (flex children default to min-width:auto). */

.flex-block-102,
.text-rich-text { min-width: 0; max-width: 100%; }

.text-rich-text .nx-table-scroll { margin: 2rem 0; }

.text-rich-text .nx-table {
  font-size: .95rem;
  line-height: 1.5;
}
.text-rich-text .nx-table caption {
  font-weight: 600;
  padding-bottom: .75rem;
}
.text-rich-text .nx-table th,
.text-rich-text .nx-table td {
  padding: .85rem 1rem;
  border: 0;
  border-bottom: 1px solid #e3e6ec;
}
.text-rich-text .nx-table thead th { border-bottom: 2px solid #b6bdcb; }
.text-rich-text .nx-table th:first-child,
.text-rich-text .nx-table td:first-child { padding-left: 0; }
.text-rich-text .nx-table tbody th { font-weight: 600; }
.text-rich-text .nx-table tbody tr:nth-child(even) { background: #f6f7f9; }

/* header cells may wrap so 4-column tables fit the column on desktop;
   only phones fall back to the wrapper's sideways scroll */
.text-rich-text .nx-table thead th { white-space: normal; }
/* caption stays readable while the table scrolls sideways:
   pinned left and no wider than the scroll box (container query units) */
.text-rich-text .nx-table-scroll { container-type: inline-size; }
.text-rich-text .nx-table caption {
  position: sticky;
  left: 0;
  max-width: calc(100vw - 4.5rem); /* fallback */
  max-width: 100cqw;
}

/* article figures (delivered nx-article.css): full column width, like the hero */
.text-rich-text figure.nx-figure {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 2rem 0;
}
.text-rich-text figure.nx-figure > div,
.text-rich-text figure.nx-figure img {
  width: 100%;
  max-width: 100%;
}
.text-rich-text figure.nx-figure img { border-radius: 16px; }

@media (max-width: 640px) {
  .text-rich-text .nx-table { font-size: .9rem; }
  .text-rich-text .nx-table th,
  .text-rich-text .nx-table td { padding: .65rem .75rem; }
  .text-rich-text .nx-table th:first-child,
  .text-rich-text .nx-table td:first-child { padding-left: .5rem; }
}

/* "At a glance" summary box at the top of cost pages (same palette as .blog-toc) */
.text-rich-text .nx-summary {
  margin: 2rem 0 1rem;
  padding: 1.25rem 1.5rem;
  background: #f6f8fb;
  border: 1px solid #e3e8f0;
  border-left: 4px solid #23af99;
  border-radius: 12px;
  font-family: Poppins, "Trebuchet MS", sans-serif;
}
.text-rich-text .nx-summary__title {
  margin: 0 0 .75rem;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  font-weight: 600;
  color: #032f6e;
}
.text-rich-text .nx-summary__list { margin: 0; }
.text-rich-text .nx-summary__list > div {
  display: grid;
  grid-template-columns: minmax(9rem, 32%) 1fr;
  gap: 1rem;
  padding: .55rem 0;
  border-top: 1px solid #e3e8f0;
  font-size: clamp(.95rem, 1.05vw, 1.05rem);
  line-height: 1.5;
}
.text-rich-text .nx-summary__list dt { font-weight: 600; color: #032f6e; }
.text-rich-text .nx-summary__list dd { margin: 0; color: #212121; }

@media (max-width: 479px) {
  .text-rich-text .nx-summary { padding: 1rem 1.1rem; }
  .text-rich-text .nx-summary__title { font-size: 4.3vw; }
  .text-rich-text .nx-summary__list > div { grid-template-columns: 1fr; gap: .15rem; font-size: 3.56vw; }
}
