/* Public CMS pages */
:root {
  --cms-bg: #f7f8f5;
  --cms-surface: #ffffff;
  --cms-ink: #171717;
  --cms-muted: #666f5f;
  --cms-line: #e4e8dc;
  --cms-accent: #243f2f;
  --cms-accent-soft: #edf3e9;
  --cms-radius: 8px;
  --cms-shadow: 0 18px 50px rgba(27, 42, 30, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--cms-ink);
  font-family:'Segoe UI', sans-serif;
  line-height: 1.6;
}

/* Insights index: tint the page so the white cards read as elevated
   surfaces (article reading pages stay pure white for readability). */
body.insights-index {
  background: var(--cms-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container,
.categories-index,
.author-archive,
.category-archive,
.search-page,
.authors-index {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

/* Public navigation — same structure & spacing as landing_page.css `.lp-nav`,
   only the background is themed to match the CMS page bg. */
.lp-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 100px;
  border-bottom: none;
  background: #0F2A47;
  font-size: 16px;
  font-weight: 500;
  position: relative;
}

.lp-nav__logo {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lp-nav__logo:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

.lp-nav__logo img {
  height: 33px;
  width: auto;
  filter: brightness(0) invert(1);
}

.lp-nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.lp-nav__links a {
  margin-left: 24px;
  text-decoration: none;
  color: #ffffff;
}

.lp-nav__links a:first-child {
  margin-left: 0;
}

.lp-nav__links a:hover {
  color: #cbd5e1;
  text-decoration: underline;
}

.lp-nav__login-btn {
  display: inline-block;
  text-decoration: none;
  padding: 7px 20px;
  border-radius: 5px;
  border: 2px solid #ffffff;
  background-color: transparent;
  color: #ffffff;
  font-size: 16px;
  font-family: 'Segoe UI', sans-serif;
}

@media (max-width: 768px) {
  .lp-nav {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .lp-nav__logo img { height: 30px; }
  .lp-nav__links {
    position: static;
    transform: none;
    display: flex;
    gap: 16px;
    align-items: center;
    order: 3;
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--cms-line);
    padding-top: 8px;
  }
  .lp-nav__links a { margin-left: 0; font-size: 13px; }
  .lp-nav__login-btn {
    font-size: 13px;
    padding: 4px 10px;
    margin-left: auto;
  }
}

.btn,
.share-btn,
.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius);
  background: var(--cms-surface);
  color: var(--cms-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary,
.btn.btn-primary {
  border-color: var(--cms-accent);
  background: var(--cms-accent);
  color: #fff;
}

.btn-outline,
.btn-secondary,
.btn.btn-secondary {
  background: transparent;
}

.breadcrumb {
  padding: 28px 0 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--cms-muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--cms-accent);
  font-weight: 700;
}

.breadcrumb-separator {
  color: #a0a898;
}

.blog-index-header,
.blog-index-hero {
  padding: 36px 0 28px;
}

/* Heading + subtitle sit flush with the card's left edge (the 16px container
   gutter), so the title lines up with the left edge of the cards below. */

.blog-index-header h1,
.blog-index-hero h1,
.page-header h1,
.archive-header h1,
.post-header h1 {
  margin: 0;
  padding: 0;
  color: var(--cms-ink);
  font-size: clamp(28px, 7vw, 40px);
  line-height: 0.98;
  letter-spacing: 0;
}

/* Match the research page title (.cms-report__header h2) */
.post-header h1 {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  color: #0F2A47;
  font-family: 'Inter', sans-serif;
}

.subtitle,
.intro,
.page-header p,
.archive-header p,
.post-header .excerpt {
  max-width: 760px;
  color: var(--cms-muted);
  font-size: 18px;
}

.insights-cover {
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: var(--cms-radius);
  background: #dfe5d8;
  box-shadow: var(--cms-shadow);
}

.insights-cover-image,
.featured-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.blog-index-content {
  padding: 5px 0 50px;
}

.view-toggle {
  margin: 0 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.view-toggle-btn.is-active {
  border-color: var(--cms-accent);
  background: var(--cms-accent-soft);
  color: var(--cms-accent);
}

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

.posts-grid[data-view="list"] {
  grid-template-columns: 1fr;
  gap: 14px;
}

/* Light single-block list cards: white surface, navy accent left-border,
   left-aligned content, clear hover lift, and a "Read article →" CTA so each
   row reads as a clickable article that matches the light research pages. */
.posts-grid[data-view="list"] .post-card {
  background: var(--cms-surface);
  border: 1px solid var(--cms-line);
  border-left: 4px solid #0F2A47;
  box-shadow: 0 4px 16px rgba(15, 42, 71, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.posts-grid[data-view="list"] .post-card,
.posts-grid[data-view="list"] .post-card .post-card-link {
  color: var(--cms-ink);
}

.posts-grid[data-view="list"] .post-card h2 {
  color: #0F2A47;
}

.posts-grid[data-view="list"] .post-card .post-card-eyebrow {
  color: #0F2A47;
}

.posts-grid[data-view="list"] .post-card .post-card-cta {
  color: #0F2A47;
}

.posts-grid[data-view="list"] .post-card .excerpt,
.posts-grid[data-view="list"] .post-card time,
.posts-grid[data-view="list"] .post-card .post-card-meta,
.posts-grid[data-view="list"] .post-card .post-meta,
.posts-grid[data-view="list"] .post-card .post-meta .date,
.posts-grid[data-view="list"] .post-card .date {
  color: var(--cms-muted);
}

.posts-grid[data-view="list"] .post-card:hover {
  transform: translateY(-2px);
  border-left-color: #0F2A47;
  box-shadow: 0 10px 28px rgba(15, 42, 71, 0.10);
}

.posts-grid[data-view="list"] .post-card-link {
  display: block;
  padding: 22px 26px;
  text-decoration: none;
}

.posts-grid[data-view="list"] .post-card-content {
  padding: 0;
}

.posts-grid[data-view="list"] .post-card h2 {
  font-size: 22px;
  margin: 4px 0 8px;
  text-decoration: none;
}

.post-card-link .excerpt {
  text-decoration: none;
}

.posts-grid[data-view="list"] .excerpt {
  margin: 0 0 12px;
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-eyebrow {
  display: inline-block;
  color: var(--cms-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-card-cta {
  margin-left: auto;
  color: var(--cms-accent);
  font-weight: 700;
  text-decoration: underline;
}

.post-card,
.category-card,
.author-card,
.related-card {
  overflow: hidden;
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius);
  background: var(--cms-surface);
  box-shadow: 0 8px 30px rgba(27, 42, 30, 0.05);
}

.post-card-link {
  display: grid;
  height: 100%;
  color: inherit;
}

.posts-grid[data-view="list"] .post-card-link {
  grid-template-columns: minmax(220px, 34%) 1fr;
}

.post-image-wrapper,
.card-image-wrapper {
  background: #dfe5d8;
}

.post-image,
.card-image-wrapper img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-image-placeholder {
  min-height: 220px;
  display: grid;
  /* vertically centered, but horizontally start-aligned so the eyebrow and
     title share the same left edge regardless of title length. */
  place-items: center start;
  padding: 24px;
  background: linear-gradient(135deg, #e8eee2, #f8f7f0);
}

.post-image-placeholder-inner {
  max-width: 280px;
}

.placeholder-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--cms-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.placeholder-title {
  font-size: 20px;
  line-height: 1.15;
}

.post-card-content,
.card-content,
.category-card,
.author-card,
.related-card {
  padding: 22px;
}

.post-card h2,
.related-card h3,
.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.excerpt,
.post-card p,
.related-card p,
.category-card p {
  color: var(--cms-muted);
}

.post-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--cms-muted);
  font-size: 14px;
  font-weight: 600;
}

.post-header .post-meta {
  margin-top: 14px;
}

.blog-post-container {
  width: min(700px, calc(100% - 32px));
  margin-inline: auto;
}

.blog-post {
  padding: 22px 0 80px;
}

.post-header {
  margin-bottom: 34px;
  margin-top: 20px;
}

.post-categories {
  margin: 24px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-badge,
.tag,
.post-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cms-accent-soft);
  color: var(--cms-accent);
  font-size: 13px;
  font-weight: 800;
}

.post-body {
  font-size: 16px;
  line-height: 1.7;
  color: #1f2937;
  font-family: 'Inter', sans-serif; 
}

.post-body h2,
.post-body h3 {
  letter-spacing: 0;
  font-family: 'Inter', sans-serif;
}

.post-body h2 {
  font-size: 26px;
  font-weight: 800;
  color: #0F2A47;
  margin: 40px 0 12px;
}

.post-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 28px 0 8px;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body table {
  margin: 0 0 22px;
}

.post-body a {
  color: var(--cms-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body blockquote,
.testimonial {
  margin: 34px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--cms-accent);
  border-radius: 0 var(--cms-radius) var(--cms-radius) 0;
  background: var(--cms-accent-soft);
  color: var(--cms-accent);
}

.post-image,
.video-embed,
.chart-embed,
.table-embed,
.cta-block {
  margin: 34px 0;
}

.content-image {
  width: 100%;
  border-radius: var(--cms-radius);
  box-shadow: var(--cms-shadow);
}

.video-embed iframe,
.chart-embed iframe {
  width: 100%;
  border-radius: var(--cms-radius);
}

.table-embed {
  overflow-x: auto;
}

.table-embed table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cms-surface);
}

.table-embed th,
.table-embed td {
  padding: 12px 14px;
  border: 1px solid var(--cms-line);
  text-align: left;
}

.table-embed th {
  background: var(--cms-accent-soft);
}

.table-caption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}
.table-caption__text {
  display: block;
  color: #4b5563;
}
.table-caption__source {
  display: block;
  font-style: italic;
}

.pasted-table {
  margin: 34px 0;
}

.pasted-table__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #0F2A47;
}

.pasted-table__scroll {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.pasted-table__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.pasted-table__table thead th {
  background: #f3f4f6;
  color: #0F2A47;
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.pasted-table__table tbody td,
.pasted-table__table tbody th {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  font-weight: 400;
}

.pasted-table__table tbody tr:last-child td,
.pasted-table__table tbody tr:last-child th {
  border-bottom: none;
}

/* Spacer rows: a clean whitespace gap with no divider line or shading.
   The grey must be killed on the <tr> too, otherwise the zebra stripe
   shows through the transparent <td> as a faint band before bold rows. */
.pasted-table__table tbody tr.pasted-table__spacer,
.pasted-table__table tbody tr.pasted-table__spacer td {
  border-top: hidden !important;
  border-bottom: hidden !important;
  background: transparent !important;
  padding: 0 !important;
}
/* Drop the divider on the row directly above a spacer so no line floats
   against the gap. Must be `hidden`, not `none`: in a border-collapse table
   `none` defers to the neighbour's 1px border and the line still shows. */
.pasted-table__table tbody tr:has(+ tr.pasted-table__spacer) td,
.pasted-table__table tbody tr:has(+ tr.pasted-table__spacer) th {
  border-bottom: hidden;
}

/* Zebra striping driven by a class computed server-side that ignores
   spacer rows, so the alternating colour stays consistent across gaps. */
.pasted-table__table tbody tr.pasted-table__row--alt {
  background: #fafafa;
}

/* Bolded sub-header rows (e.g. **New build, **Group total) get the same grey
   fill as the table header so every section header looks consistent. The
   cell-level background paints over any zebra stripe on the same row. */
.pasted-table__table tbody tr.pasted-table__row--bold td,
.pasted-table__table tbody tr.pasted-table__row--bold th {
  background: #f3f4f6;
}

/* Totals row (the "bold last row" option): bold text with a line above it,
   on a white background so it reads as a financial total rather than a grey
   section header. Declared after the bold rule so its background wins if a
   row is both bold and a total. */
.pasted-table__table tbody tr.pasted-table__row--total td,
.pasted-table__table tbody tr.pasted-table__row--total th {
  font-weight: 700;
  background: #ffffff;
  border-top: 2px solid #cbd5e1;
}

.pasted-table__table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pasted-table__table tbody th[scope="row"] {
  font-weight: 700;
  color: #0F2A47;
}

.pasted-table__caption {
  margin-top: 10px;
  color: #6b7280;
  font-size: 13px;
}

.cta-block {
  margin: 34px 0;
  padding: 0;
  background: none;
}

.cta-block .btn {
  display: inline-block;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: #0F2A47;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.cta-block .btn:hover {
  opacity: 0.9;
}

.share-section,
.post-footer,
.related-posts {
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--cms-line);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-twitter,
.share-linkedin,
.share-facebook {
  color: #fff;
}

.share-twitter {
  background: #111827;
}

.share-linkedin {
  background: #0a66c2;
}

.share-facebook {
  background: #1877f2;
}

.related-grid,
.categories-grid,
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.page-header,
.archive-header {
  padding: 36px 0 28px;
}

.author-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
}

.author-photo,
.author-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
}

.author-photo-placeholder {
  display: grid;
  place-items: center;
  background: var(--cms-accent);
  color: #fff;
  font-size: 36px;
  font-weight: 800;
}

.author-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cms-accent);
  font-weight: 700;
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--cms-line);
  border-radius: var(--cms-radius);
  color: var(--cms-muted);
  text-align: center;
}

.pagination {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.reading-progress-bar {
  width: 0;
  height: 100%;
  background: var(--cms-accent);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--cms-accent);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.site-footer {
  border-top: 1px solid var(--cms-line);
  background: #F8F6F3;
}

.footer-container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 28px;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--cms-ink);
}

.footer-brand p {
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-column h4 {
  margin: 0 0 0px;
  font-size: 15px;
}

.footer-brand p,
.footer-column a,
.footer-bottom {
  color: var(--cms-muted);
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--cms-line);
  margin-top: 4px;
  padding-top: 14px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .nav-container,
  .footer-container,
  .footer-links,
  .posts-grid[data-view="list"] .post-card-link,
  .author-header {
    grid-template-columns: 1fr;
  }

  .nav-container {
    padding: 14px 0;
    align-items: flex-start;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* --- Insights page mobile --- */
  .blog-index-header,
  .blog-index-hero {
    padding: 24px 0 18px;
  }

  .blog-index-header h1,
  .blog-index-hero h1 {
    font-size: 32px;
    line-height: 1.1;
  }

  .subtitle,
  .intro {
    font-size: 15px;
  }

  .blog-index-content {
    padding: 0 0 40px;
  }

  .posts-grid[data-view="list"] .post-card-link {
    padding: 16px 18px;
  }

  .posts-grid[data-view="list"] .post-card h2 {
    font-size: 18px;
  }

  .posts-grid[data-view="list"] .excerpt {
    font-size: 14px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .post-card-cta {
    font-size: 14px;
  }

  /* --- Blog post content page mobile --- */
  .blog-post-container {
    width: calc(100% - 24px);
  }

  .breadcrumb {
    padding: 16px 0 6px;
    font-size: 13px;
  }

  .post-header {
    margin-top: 12px;
    margin-bottom: 24px;
  }

  .page-header h1,
  .archive-header h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .post-header h1 {
    font-size: 22px;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
  }

  .post-header .excerpt {
    font-size: 15px;
  }

  .post-meta,
  .card-meta {
    font-size: 13px;
  }

  .post-body {
    font-size: 16px;
    line-height: 1.65;
  }

  .post-body h2 {
    font-size: 22px;
    margin: 32px 0 10px;
  }

  .post-body h3 {
    font-size: 18px;
    margin: 24px 0 6px;
  }

  .post-body p,
  .post-body ul,
  .post-body ol,
  .post-body blockquote,
  .post-body table {
    margin: 0 0 16px;
  }

  .share-section,
  .post-footer,
  .related-posts {
    margin-top: 36px;
    padding-top: 20px;
  }

  .share-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .share-buttons {
    gap: 12px;
  }

  .share-btn {
    min-height: 38px;
    padding: 8px 12px;
  }

  /* --- Footer mobile --- */
  .footer-container {
    gap: 20px;
    padding: 24px 0;
  }

  .footer-links {
    gap: 16px;
  }

  .footer-column h4 {
    font-size: 14px;
  }

  .footer-column a {
    font-size: 14px;
  }
}

/* ── Report image caption / source ───────────────────────── */
.report-image {
  margin: 24px 0;
}
.report-image img,
.report-image__img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.report-image__caption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}
.report-image__text {
  display: block;
  color: #4b5563;
}
.report-image__source {
  display: block;
  font-style: italic;
}
