/* ===== DEB Theme subpage — shared styles ===== */
/* Reusable across all 5 theme subpages. Page sets --theme-color via inline
   style on .theme-hero and .theme-footer-nav. */

/* Theme-coloured hero with side illustration */
.theme-hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--theme-color) 22%, white) 0%,
    color-mix(in srgb, var(--theme-color) 8%, white) 60%,
    var(--bg) 100%);
  padding-block: var(--gap-7) var(--gap-6);
  position: relative; overflow: hidden;
}
/* New layout — title spans full width above; lead-text + theme illustration sit
   side-by-side below, with the illustration vertically centered to the text. */
.theme-hero .inner {
  max-width: var(--max-content); margin-inline:auto; padding-inline: var(--gap-5);
}
.theme-hero .theme-head { margin-bottom: var(--gap-4); }
/* Subpage titles inherit the site-wide .hero .display cap (≤ 32ch / ≤ 2.75rem) so
   they never appear more prominent than the H1 overview page. */
.theme-hero .theme-body {
  display: grid;
  grid-template-columns: 1fr 420px;     /* closer in scale to the same illustration on the overview page */
  gap: var(--gap-7);
  align-items: center;
}
@media (max-width: 760px) {
  .theme-hero .theme-body { grid-template-columns: 1fr; }
  .theme-hero .theme-illu { max-width: 320px; margin: 0 auto; }
}
.theme-hero .breadcrumb {
  font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--gap-3);
}
.theme-hero .breadcrumb a {
  color: color-mix(in srgb, var(--theme-color) 70%, black 30%);
  text-decoration: none; font-weight: 500;
}
.theme-hero .breadcrumb a:hover { text-decoration: underline; }
/* Match the site-wide .hero .display cap so subpage H1 is never more prominent
   than the overview H1 page. .theme-hero is a separate class, hence the override. */
.theme-hero h1.display {
  color: var(--ink);
  margin: 0 0 var(--gap-3);
  font-size: clamp(1.75rem, 2.2vw + 0.8rem, 2.75rem);
  line-height: 1.1;
  max-width: 32ch;
}
.theme-hero h1 em {
  font-style: normal;
  color: color-mix(in srgb, var(--theme-color) 70%, black 30%);
}
.theme-hero .lead { font-size: var(--fs-md); color: var(--ink-soft); max-width: 56ch; }
.theme-hero .theme-tag {
  display:inline-block; padding:.35rem .8rem; border-radius:999px;
  background: color-mix(in srgb, var(--theme-color) 80%, black 20%);
  color:#fff;
  font-size: var(--fs-xs); font-weight:600; letter-spacing:.5px; text-transform: uppercase;
  margin-bottom: var(--gap-3);
}
.theme-hero .theme-illu {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border: 8px solid var(--theme-color); border-radius: var(--radius-xl);
  background: #f3ecdc; box-shadow: var(--shadow-2);
}
/* (Mobile override moved into the new layout block above) */

/* Article body */
.theme-article { max-width: 740px; margin-inline: auto; padding-inline: var(--gap-5); }
/* H2 = section head, H3 = sub-section under H2. Sized so the cascade reads
   H1 (~44px) → H2 (~30px) → H3 (~18px) — a clear step at every level. */
.theme-article h2 {
  color: color-mix(in srgb, var(--theme-color) 75%, black 25%);
  margin-top: var(--gap-6); margin-bottom: var(--gap-3);
  font-size: var(--fs-xl);     /* was --fs-2xl (40px); now ~30px */
  line-height: 1.2;
}
.theme-article h3 {
  margin-top: var(--gap-5); margin-bottom: var(--gap-2);
  font-size: var(--fs-md);     /* was --fs-lg (22px); now ~18px — clear step under H2 */
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.theme-article p { font-size: var(--fs-md); line-height: 1.65; color: var(--ink); margin-bottom: var(--gap-3); }
.theme-article p strong { color: var(--ink); }
.theme-article ul { font-size: var(--fs-md); line-height: 1.65; color: var(--ink); margin-bottom: var(--gap-3); }
.theme-article blockquote {
  border-left: 4px solid var(--theme-color);
  padding: var(--gap-3) var(--gap-4);
  margin: var(--gap-4) 0;
  background: color-mix(in srgb, var(--theme-color) 6%, white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--fs-md); color: var(--ink-soft); font-style: italic;
}

/* Highlighted research / case insert */
.research-card {
  background: var(--surface-tint); border-radius: var(--radius-lg);
  padding: var(--gap-5); margin-block: var(--gap-6);
  border-top: 6px solid var(--theme-color);
}
.research-card .eyebrow {
  color: color-mix(in srgb, var(--theme-color) 75%, black 25%);
  font-weight:600;
}
.research-card h3 { margin-top: var(--gap-2); }
.research-card .meta { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--gap-3); }
.research-card .meta strong { color: var(--ink); }

/* Future "impact cases" placeholder */
.cases-placeholder {
  background: repeating-linear-gradient(45deg, var(--surface-tint), var(--surface-tint) 12px, var(--bg-tint) 12px, var(--bg-tint) 24px);
  border-radius: var(--radius-lg);
  padding: var(--gap-6) var(--gap-5);
  text-align: center;
  margin-block: var(--gap-6);
  border: 2px dashed color-mix(in srgb, var(--theme-color) 40%, white);
}
.cases-placeholder h3 {
  color: color-mix(in srgb, var(--theme-color) 75%, black 25%);
  margin-top:0;
}
.cases-placeholder p { color: var(--ink-soft); margin: 0; }

/* Cross-nav footer */
.theme-footer-nav {
  background: var(--surface-tint);
  padding: var(--gap-6) var(--gap-5);
  margin-top: var(--gap-7);
}
.theme-footer-nav .inner {
  max-width: var(--max-content); margin-inline:auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--gap-4);
}
.theme-footer-nav .nav-card {
  background:#fff; padding: var(--gap-4); border-radius: var(--radius-md);
  text-decoration:none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
  border: 1px solid color-mix(in srgb, var(--theme-color) 20%, transparent);
}
.theme-footer-nav .nav-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.theme-footer-nav .nav-card .eyebrow {
  color: color-mix(in srgb, var(--theme-color) 75%, black 25%);
  font-size: var(--fs-xs); font-weight:600;
}
.theme-footer-nav .nav-card strong { display:block; margin-top:.25rem; font-size: var(--fs-md); }
@media (max-width:760px){ .theme-footer-nav .inner { grid-template-columns: 1fr; } }

/* Transcript-source disclaimer placed under .lead */
.transcript-note {
  margin: var(--gap-3) 0 0 0;
  padding: var(--gap-3) var(--gap-4);
  background: color-mix(in srgb, var(--theme-color) 8%, white);
  border-left: 4px solid var(--theme-color);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: 1.45;
}
.transcript-note strong { color: color-mix(in srgb, var(--theme-color) 70%, black 30%); }

/* === Two-column layout (article + sidebar) === */
.theme-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--gap-6);
  padding-block: var(--gap-6) var(--gap-5);
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gap-4);
}
.theme-content-grid > .theme-article { padding: 0; min-width: 0; }

/* Sidebar shell — theme-tinted background; full natural height, no scrollbar */
.theme-sidebar {
  align-self: start;
  background: color-mix(in srgb, var(--theme-color) 10%, white);
  border: 1px solid color-mix(in srgb, var(--theme-color) 25%, white);
  border-radius: var(--radius-xl, 28px);
  padding: var(--gap-4) var(--gap-4);
}

.sidebar-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 0 0 var(--gap-1) 0;
  color: color-mix(in srgb, var(--theme-color) 70%, black 30%);
  letter-spacing: -0.01em;
}
.sidebar-meta {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin: 0 0 var(--gap-3) 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-list {
  list-style: none;
  margin: 0 0 var(--gap-4) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-item {
  display: flex;
  gap: var(--gap-2);
  padding: var(--gap-2) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-color) 18%, white);
}
.sidebar-item:last-child { border-bottom: 0; }

.sidebar-num {
  flex: 0 0 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: color-mix(in srgb, var(--theme-color) 70%, black 30%);
  line-height: 1.4;
  text-align: right;
}
.sidebar-link {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.sidebar-link:hover .sidebar-headline { color: color-mix(in srgb, var(--theme-color) 70%, black 30%); text-decoration: underline; }
.sidebar-headline {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-meta-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 6px;
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}
.sidebar-date { font-variant-numeric: tabular-nums; font-weight: 500; }
.sidebar-sep { opacity: 0.5; }
.sidebar-uni { font-weight: 500; }

.sidebar-more {
  display: block;
  margin-top: var(--gap-2);
  padding: var(--gap-2) var(--gap-3);
  background: color-mix(in srgb, var(--theme-color) 80%, black 20%);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-pill, 999px);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-align: center;
  transition: transform 0.15s ease;
}
.sidebar-more:hover { transform: translateY(-1px); }

/* When the sidebar header colour is light pink (welfare), darken pill text legibility automatically via color-mix above. */

/* Responsive: stack the sidebar below the article on narrow viewports */
@media (max-width: 960px) {
  .theme-content-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-4);
  }
}
