/* Insights index only — linked from templates/blog.html */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&display=swap');

body:has(.rpg-blog-hero) {
  --bg: #100C09;
  --bg2: #1E1813;
  --bg3: #16110D;
  --gold: #D9AE7E;
  --gold2: #E0B888;
  --gold-dim: rgba(217, 174, 126, 0.13);
  --gold-border: rgba(217, 174, 126, 0.28);
  --text: #F2EAE1;
  --ivory: #F2EAE1;
  --muted: #E7D7C9;
  --muted2: #9E8F84;
  --border: rgba(231, 215, 201, 0.10);
  --serif: "Playfair Display", Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
  --ix-radius: 20px;
  --ix-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Insights nav: keep labels on one line without touching homepage ── */
body:has(.rpg-blog-hero) .rpg-nav {
  gap: 12px;
  padding: 12px 40px;
  min-height: 0;
}
body:has(.rpg-blog-hero) .rpg-nav-logo {
  flex: 0 0 auto;
}
body:has(.rpg-blog-hero) .rpg-ix-nav-logo,
body:has(.rpg-blog-hero) .rpg-nav-logo img {
  height: 40px !important;
  width: auto !important;
  max-width: 160px;
}
body:has(.rpg-blog-hero) .rpg-counter {
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  line-height: 1.2;
}
body:has(.rpg-blog-hero) .rpg-nav-links {
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 14px;
  min-width: 0;
}
body:has(.rpg-blog-hero) .rpg-nav-links a {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 1px;
}
body:has(.rpg-blog-hero) .rpg-nav-cta {
  padding: 8px 14px !important;
  white-space: nowrap;
}
@media (max-width: 1280px) {
  body:has(.rpg-blog-hero) .rpg-counter {
    display: none;
  }
  body:has(.rpg-blog-hero) .rpg-nav-links {
    gap: 12px;
  }
}
@media (max-width: 1100px) {
  body:has(.rpg-blog-hero) .rpg-nav {
    padding: 12px 24px;
  }
  body:has(.rpg-blog-hero) .rpg-nav-links {
    gap: 10px;
  }
  body:has(.rpg-blog-hero) .rpg-nav-links a {
    font-size: 10px;
    letter-spacing: 0.6px;
  }
}

/* ── Compact hero so search + carousel enter a ~900px laptop viewport ── */
body:has(.rpg-blog-hero) .rpg-blog-hero {
  padding: 28px 56px 22px;
  min-height: 0;
}
body:has(.rpg-blog-hero) .rpg-blog-hero .rpg-section-eyebrow {
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 2px;
}
body:has(.rpg-blog-hero) .rpg-blog-hero h1 {
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.12;
  margin-bottom: 8px;
  max-width: 18ch;
}
body:has(.rpg-blog-hero) .rpg-blog-hero p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  max-width: 520px;
}

/* ── Chat widget: Insights only — lower + inset so it clears the toolbar ── */
body:has(.rpg-blog-hero) #chat-widget-container {
  bottom: 16px;
  right: 16px;
}
body:has(.rpg-blog-hero) #chat-label-badge {
  opacity: 0;
  transition: opacity 0.15s ease;
}
body:has(.rpg-blog-hero) #chat-widget-container:hover #chat-label-badge,
body:has(.rpg-blog-hero) #chat-widget-container:focus-within #chat-label-badge {
  opacity: 1;
}

/* ── Toolbar: search full-width, then quiet chip rail ── */
.rpg-blog-grid.rpg-ix {
  padding: 20px 56px 96px;
  max-width: 1240px;
}

.rpg-ix-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 0 12px;
  padding-right: 0;
  border-bottom: 1px solid var(--border);
}

.rpg-ix-search-wrap {
  width: 100%;
  min-width: 0;
}

.rpg-ix-search {
  width: 100%;
  min-height: 40px;
  background: transparent;
  color: var(--ivory);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  padding: 8px 2px;
  outline: none;
}
.rpg-ix-search::placeholder { color: var(--muted2); }
.rpg-ix-search:focus-visible {
  border-bottom-color: var(--gold);
  outline: none;
}

/* Single-row chip rail — no brick wall; right pad clears floating CTA */
.rpg-ix-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(90deg, #100C09 0%, #100C09 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #100C09 0%, #100C09 88%, transparent 100%);
  padding: 2px 220px 4px 0;
  box-sizing: content-box;
}
.rpg-ix-chips::-webkit-scrollbar { display: none; }

.rpg-blog-grid.rpg-ix .rpg-ix-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: var(--muted2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.rpg-blog-grid.rpg-ix .rpg-ix-chip:hover { color: var(--muted); }
.rpg-blog-grid.rpg-ix .rpg-ix-chip[aria-pressed="true"] {
  color: #D9AE7E;
  background: transparent;
  border-bottom-color: #D9AE7E;
}
.rpg-blog-grid.rpg-ix .rpg-ix-count {
  color: inherit;
  opacity: 0.55;
  font-size: 11px;
  margin-left: 5px;
  font-weight: 300;
}
.rpg-blog-grid.rpg-ix .rpg-ix-chip[aria-pressed="true"] .rpg-ix-count {
  color: #D9AE7E;
  opacity: 0.75;
}

/* Count + Cards/List on the left, clear of the floating widget */
.rpg-ix-meta-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.rpg-ix-views {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  min-height: 36px;
}
.rpg-ix-view {
  min-height: 36px;
  padding: 0 14px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
}
.rpg-ix-view:last-child { border-right: none; }
.rpg-ix-view[aria-pressed="true"] {
  background: var(--gold);
  color: #3a2c1e;
}

.rpg-ix-status {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  color: var(--muted2);
  letter-spacing: 0.04em;
  margin: 0;
}

/* ── Lead carousel ── */
.rpg-ix-carousel {
  position: relative;
  margin-bottom: 36px;
}
.rpg-ix-carousel[hidden] { display: none !important; }

.rpg-ix-carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.rpg-ix-carousel-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0;
}
.rpg-ix-carousel-nav {
  display: inline-flex;
  gap: 8px;
}
.rpg-ix-carousel-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.rpg-ix-carousel-btn:hover {
  border-color: var(--gold-border);
  color: var(--gold);
}
.rpg-ix-carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.rpg-ix-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
  padding-bottom: 4px;
}
.rpg-ix-carousel-track::-webkit-scrollbar { display: none; }

.rpg-ix-slide {
  flex: 0 0 min(88%, 820px);
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 120px),
    var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--ix-radius);
  box-shadow: var(--ix-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.18s ease;
}
.rpg-ix-slide:hover { border-color: var(--gold-border); }
.rpg-ix-slide[hidden] { display: none !important; }

.rpg-ix-slide .rpg-ix-media {
  aspect-ratio: 16 / 10;
  min-height: 0;
  border-bottom: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
}
.rpg-ix-slide .rpg-ix-media img {
  object-fit: cover;
  object-position: center center;
}
.rpg-ix-slide-copy {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.rpg-ix-slide .rpg-ix-title {
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 400;
  line-height: 1.18;
  margin-bottom: 10px;
}
.rpg-ix-slide .rpg-ix-excerpt {
  -webkit-line-clamp: 3;
  font-size: 14px;
}
.rpg-ix-slide .rpg-ix-meta {
  padding: 16px 0 0;
}

/* ── Magazine band + quieter grid ── */
.rpg-ix-section-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 8px 0 18px;
}
.rpg-ix-section-label[hidden] { display: none !important; }

.rpg-ix-magazine {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}
.rpg-ix-magazine[hidden] { display: none !important; }

.rpg-ix-mag-feature {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 140px),
    var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--ix-radius);
  box-shadow: var(--ix-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.18s ease;
}
.rpg-ix-mag-feature:hover { border-color: var(--gold-border); }
.rpg-ix-mag-feature .rpg-ix-media {
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--border);
}
.rpg-ix-mag-feature .rpg-ix-body { padding: 22px 22px 6px; }
.rpg-ix-mag-feature .rpg-ix-title {
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.16;
}
.rpg-ix-mag-feature .rpg-ix-excerpt { -webkit-line-clamp: 3; }
.rpg-ix-mag-feature .rpg-ix-meta { padding: 14px 22px 20px; }

.rpg-ix-mag-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.rpg-ix-mag-companion {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--ix-radius);
  box-shadow: var(--ix-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.18s ease;
}
.rpg-ix-mag-companion:hover { border-color: var(--gold-border); }
.rpg-ix-mag-companion .rpg-ix-media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 120px;
  border-bottom: none;
  border-right: 1px solid var(--border);
}
.rpg-ix-mag-companion .rpg-ix-body {
  padding: 16px 16px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rpg-ix-mag-companion .rpg-ix-title {
  font-size: 20px;
  line-height: 1.22;
  margin-bottom: 6px;
}
.rpg-ix-mag-companion .rpg-ix-excerpt {
  -webkit-line-clamp: 2;
  font-size: 13px;
}
.rpg-ix-mag-companion .rpg-ix-meta {
  padding: 8px 16px 14px;
}

.rpg-ix-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.rpg-ix-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--ix-radius);
  box-shadow: var(--ix-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.18s ease;
}
.rpg-ix-card:hover {
  border-color: var(--gold-border);
  background: var(--bg2);
}
.rpg-ix-card.is-featured { border-top: 0; }
.rpg-ix-card[hidden],
.rpg-ix-row[hidden],
.rpg-ix-empty[hidden],
.rpg-ix-placeholder[hidden] {
  display: none !important;
}

.rpg-ix-media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.rpg-ix-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.rpg-ix-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px 18px;
  background:
    linear-gradient(165deg, rgba(217, 174, 126, 0.14), transparent 46%),
    var(--bg3);
}
.rpg-ix-placeholder-kicker {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.rpg-ix-placeholder-mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 0.85;
  color: var(--gold);
}

.rpg-ix-body { padding: 18px 18px 4px; flex: 1; min-width: 0; }
.rpg-ix-cat {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 500;
}
.rpg-ix-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ivory);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  /* Natural wrap — no hard single-line truncate */
}
.rpg-ix-excerpt {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.rpg-ix-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 16px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  color: var(--muted2);
}

/* Filtering flattens magazine classes into a calm equal grid */
.rpg-ix.is-filtering .rpg-ix-cards {
  grid-template-columns: 1fr;
}

/* List view */
.rpg-ix-list { display: none; }
html[data-insights-view="list"] .rpg-ix-list { display: block; }
html[data-insights-view="list"] .rpg-ix-carousel,
html[data-insights-view="list"] .rpg-ix-magazine,
html[data-insights-view="list"] .rpg-ix-cards,
html[data-insights-view="list"] .rpg-ix-section-label {
  display: none !important;
}
.rpg-ix-list .rpg-article-row {
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 24px;
  border-radius: var(--ix-radius);
}
.rpg-ix-list .rpg-ix-media {
  width: 112px;
  aspect-ratio: 4 / 3;
  border-bottom: none;
  border-radius: 12px;
  overflow: hidden;
}
.rpg-ix-list .rpg-ix-placeholder-mark { font-size: 36px; }
.rpg-ix-list .rpg-article-title { overflow-wrap: anywhere; }
.rpg-ix-byline {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted2);
  font-family: var(--sans);
  font-weight: 300;
}

.rpg-ix-empty, .rpg-ix-soon { text-align: center; padding: 64px 16px; }
.rpg-ix-empty-title, .rpg-ix-soon h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 8px;
}
.rpg-ix-empty-copy, .rpg-ix-soon p {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
}
.rpg-ix-soon-mark {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  color: var(--muted2);
  margin-bottom: 12px;
}
.rpg-ix-clear {
  margin-top: 18px;
  min-height: 44px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
}
.rpg-ix-clear:hover { background: var(--gold-dim); }

.rpg-ix-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.rpg-ix-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--ix-radius);
  box-shadow: var(--ix-shadow);
  padding: 28px;
  min-width: 0;
}
.rpg-ix-panel--quiet { border-color: var(--border); }
.rpg-ix a:focus-visible,
.rpg-ix button:focus-visible,
.rpg-ix input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (min-width: 700px) {
  .rpg-ix-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpg-ix.is-filtering .rpg-ix-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .rpg-ix-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rpg-ix.is-filtering .rpg-ix-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rpg-ix-slide {
    flex-basis: 92%;
    grid-template-columns: 1fr;
  }
  .rpg-ix-slide .rpg-ix-media {
    aspect-ratio: 16 / 10;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .rpg-ix-slide-copy { padding: 22px 20px 18px; }
  .rpg-ix-magazine { grid-template-columns: 1fr; }
  .rpg-ix-mag-companion { grid-template-columns: 112px minmax(0, 1fr); }
  .rpg-ix-band { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .rpg-blog-grid.rpg-ix { padding: 20px 20px 64px; }
  body:has(.rpg-blog-hero) .rpg-blog-hero { padding: 24px 20px 18px; }
  .rpg-ix-chips { padding-right: 120px; }
  body:has(.rpg-blog-hero) #chat-widget-container {
    bottom: 14px;
    right: 14px;
  }
  .rpg-ix-meta-bar { gap: 10px; }
  .rpg-ix-views { display: flex; width: auto; }
  .rpg-ix-view { flex: 0 0 auto; }
  .rpg-ix-list .rpg-article-row { grid-template-columns: 1fr; gap: 14px; }
  .rpg-ix-list .rpg-ix-media { width: 100%; aspect-ratio: 16 / 9; }
  .rpg-ix-list .rpg-article-meta { text-align: left; }
  .rpg-ix-chips {
    mask-image: linear-gradient(90deg, #100C09 0%, #100C09 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #100C09 0%, #100C09 88%, transparent 100%);
  }
}
