/**
 * WordPress wrappers for HTML imported from the static site (Tailwind sections).
 */

/* Let full-width section backgrounds span the viewport */
.po-static-import {
  width: 100%;
  max-width: none;
}

.po-static-import .po-content,
.po-static-import .po-content-wide {
  max-width: var(--po-content-max, 720px);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.po-static-import .po-content-wide {
  max-width: var(--po-shell-max, 1280px);
}

/* Undo Picostrap/Bootstrap prose constraints on imported pages */
.po-static-import.entry-content,
.po-has-static-import .po-static-import.entry-content {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Bootstrap utility classes collide with Tailwind tokens — restore brand palette */
.po-has-static-import .po-static-import .text-primary {
  color: #1a202c !important;
}

.po-has-static-import .po-static-import .bg-primary {
  background-color: #1a202c !important;
}

.po-has-static-import .po-static-import .border-primary {
  border-color: #1a202c !important;
}

.po-has-static-import .po-static-import .text-secondary {
  color: #3182ce !important;
}

.po-has-static-import .po-static-import .text-tertiary {
  color: #319795 !important;
}

.po-has-static-import .po-static-import .text-on-primary {
  color: #ffffff !important;
}

.po-has-static-import .po-static-import .text-on-primary-container {
  color: #a0aec0 !important;
}

.po-has-static-import .po-static-import .text-secondary-container {
  color: #90cdf4 !important;
}

.po-has-static-import .po-static-import .text-on-surface-variant {
  color: #4a5568 !important;
}

/* Imported tables and callouts */
.po-static-import .po-data-table {
  width: 100%;
  border-collapse: collapse;
}

.po-static-import .po-data-table th,
.po-static-import .po-data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.po-static-import .po-data-table thead th {
  font-family: "Public Sans", sans-serif;
  font-size: 14px !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4a5568 !important;
  background: #f7fafc;
}

.po-has-static-import .po-static-import .po-data-table td {
  font-family: "EB Garamond", serif !important;
  font-size: 20px !important;
  line-height: 1.65 !important;
  color: #1a202c !important;
}

.po-has-static-import .po-static-import .po-data-table td.font-data-numeral {
  font-family: "Public Sans", sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

/* Publication body: match static site top spacing under header */
.single-po_publication .po-static-import {
  padding-top: 0;
}

/**
 * Research hero inside imported publications — Bootstrap/Picostrap reboot fights
 * <header>, h1, and Tailwind token utilities unless overridden here.
 */
.po-has-static-import .po-static-import header.po-research-hero {
  display: block !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
  z-index: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background: #f7fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding-top: 1.75rem !important;
  padding-bottom: 2.25rem !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

@media (min-width: 768px) {
  .po-has-static-import .po-static-import header.po-research-hero {
    padding-top: 2.5rem !important;
    padding-bottom: 3rem !important;
    padding-left: 80px !important;
    padding-right: 80px !important;
  }
}

.po-has-static-import .po-static-import .po-research-hero__grid {
  display: grid !important;
  gap: 1.75rem !important;
  align-items: center !important;
  max-width: 960px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
}

.po-has-static-import .po-static-import .po-research-hero--no-media .po-research-hero__grid,
.po-has-static-import .po-static-import .po-research-hero--no-media > .po-research-hero__content {
  max-width: 720px !important;
  grid-template-columns: 1fr !important;
}

.po-has-static-import .po-static-import .po-research-hero__content {
  min-width: 0 !important;
}

.po-has-static-import .po-static-import .po-research-hero__eyebrow {
  display: block !important;
  margin-top: 1rem !important;
  margin-bottom: 0.75rem !important;
  font-family: "Public Sans", sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

.po-has-static-import .po-static-import .po-research-hero h1,
.po-has-static-import .po-static-import .po-research-hero h1.font-display-lg {
  font-family: "Public Sans", sans-serif !important;
  font-size: 48px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  font-weight: 700 !important;
  color: #1a202c !important;
  margin: 0 0 1rem !important;
}

.po-has-static-import .po-static-import .po-research-hero .font-body-lg,
.po-has-static-import .po-static-import .po-research-hero p.font-body-lg {
  font-family: "EB Garamond", serif !important;
  font-size: 22px !important;
  line-height: 1.5 !important;
  color: #4a5568 !important;
  margin: 0 0 1.25rem !important;
}

@media (max-width: 767px) {
  .po-has-static-import .po-static-import .po-research-hero h1,
  .po-has-static-import .po-static-import .po-research-hero h1.font-display-lg {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }
}

@media (min-width: 768px) {
  .po-has-static-import .po-static-import .po-research-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) !important;
    gap: 2.5rem 3rem !important;
  }

  .po-has-static-import .po-static-import .po-research-hero--no-media .po-research-hero__grid {
    grid-template-columns: 1fr !important;
  }
}

.po-has-static-import .po-static-import .po-research-hero__figure {
  margin: 0 !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  padding: 0.625rem !important;
  border-radius: 2px !important;
}

/* Core flex — ensure Tailwind layout utilities win in imported body */
.po-has-static-import .po-static-import .flex {
  display: flex !important;
}

.po-has-static-import .po-static-import .inline-flex {
  display: inline-flex !important;
}

.po-has-static-import .po-static-import .flex-col {
  flex-direction: column !important;
}

@media (min-width: 640px) {
  .po-has-static-import .po-static-import .flex.flex-col[class*="sm:flex-row"],
  .po-has-static-import .po-static-import article.publication-card[class*="sm:flex-row"] {
    flex-direction: row !important;
  }
}

@media (min-width: 768px) {
  .po-has-static-import .po-static-import .flex.flex-col[class*="md:flex-row"] {
    flex-direction: row !important;
  }
}

.po-has-static-import .po-static-import .flex-wrap {
  flex-wrap: wrap !important;
}

.po-has-static-import .po-static-import .items-center {
  align-items: center !important;
}

.po-has-static-import .po-static-import .justify-between {
  justify-content: space-between !important;
}

.po-has-static-import .po-static-import .gap-2 {
  gap: 0.5rem !important;
}

.po-has-static-import .po-static-import .gap-3 {
  gap: 0.75rem !important;
}

.po-has-static-import .po-static-import .gap-4 {
  gap: 1rem !important;
}

.po-has-static-import .po-static-import .gap-6 {
  gap: 1.5rem !important;
}

.po-has-static-import .po-static-import .gap-8 {
  gap: 2rem !important;
}

/**
 * Bootstrap 5 .grid is a 12-column CSS grid; Tailwind .grid uses grid-cols-*.
 * Without this override, three cards land in three 1/12 columns (broken layout).
 */
.po-static-import .grid,
.po-has-static-import .po-static-import .grid {
  display: grid !important;
  grid-template-rows: none !important;
  --bs-columns: 1 !important;
  --bs-rows: unset !important;
  --bs-gap: unset !important;
}

.po-static-import .grid[class*="grid-cols"] > *,
.po-has-static-import .po-static-import .grid[class*="grid-cols"] > * {
  min-width: 0;
  width: auto !important;
  max-width: none !important;
}

/* wpautop sometimes wraps grid children in <p> — keep them in the grid */
.po-static-import .grid[class*="grid-cols"] > p,
.po-has-static-import .po-static-import .grid[class*="grid-cols"] > p {
  display: contents;
  margin: 0;
}

.po-static-import .grid-cols-1:not([class*="sm:grid-cols"]):not([class*="md:grid-cols"]):not([class*="lg:grid-cols"]),
.po-has-static-import .po-static-import .grid-cols-1:not([class*="sm:grid-cols"]):not([class*="md:grid-cols"]):not([class*="lg:grid-cols"]) {
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

.po-static-import .grid-cols-2,
.po-has-static-import .po-static-import .grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.po-static-import .grid-cols-4,
.po-has-static-import .po-static-import .grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.po-static-import .grid-cols-8,
.po-has-static-import .po-static-import .grid-cols-8 {
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
}

@media (min-width: 640px) {
  .po-static-import .grid[class*="sm:grid-cols-2"],
  .po-has-static-import .po-static-import .grid[class*="sm:grid-cols-2"],
  .po-static-import .sm\:grid-cols-2,
  .po-has-static-import .po-static-import .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .po-static-import .sm\:flex-row,
  .po-has-static-import .po-static-import .sm\:flex-row,
  .po-has-static-import .po-static-import [class*="sm:flex-row"] {
    flex-direction: row !important;
  }

  .po-static-import .sm\:justify-between,
  .po-has-static-import .po-static-import .sm\:justify-between {
    justify-content: space-between !important;
  }

  .po-static-import .sm\:items-end,
  .po-has-static-import .po-static-import .sm\:items-end {
    align-items: flex-end !important;
  }

  .po-static-import .sm\:items-center,
  .po-has-static-import .po-static-import .sm\:items-center {
    align-items: center !important;
  }

  .po-static-import .sm\:text-left,
  .po-has-static-import .po-static-import .sm\:text-left {
    text-align: left !important;
  }

  .po-static-import .sm\:w-44,
  .po-has-static-import .po-static-import .sm\:w-44 {
    width: 11rem !important;
  }
}

@media (min-width: 768px) {
  .po-static-import .grid[class*="md:grid-cols-2"],
  .po-has-static-import .po-static-import .grid[class*="md:grid-cols-2"],
  .po-static-import .md\:grid-cols-2,
  .po-has-static-import .po-static-import .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .po-static-import .grid[class*="md:grid-cols-3"],
  .po-has-static-import .po-static-import .grid.grid-cols-1[class*="md:grid-cols-3"],
  .po-static-import .md\:grid-cols-3,
  .po-has-static-import .po-static-import .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .po-static-import .grid[class*="md:grid-cols-4"],
  .po-has-static-import .po-static-import .grid[class*="md:grid-cols-4"],
  .po-static-import .md\:grid-cols-4,
  .po-has-static-import .po-static-import .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .po-static-import .md\:flex-row,
  .po-has-static-import .po-static-import .md\:flex-row,
  .po-has-static-import .po-static-import [class*="md:flex-row"] {
    flex-direction: row !important;
  }

  .po-static-import .md\:w-2\/5,
  .po-has-static-import .po-static-import .md\:w-2\/5,
  .po-has-static-import .po-static-import [class*="md:w-2/5"] {
    width: 40% !important;
  }

  .po-static-import .md\:w-3\/5,
  .po-has-static-import .po-static-import .md\:w-3\/5,
  .po-has-static-import .po-static-import [class*="md:w-3/5"] {
    width: 60% !important;
  }

  .po-static-import .md\:items-center,
  .po-has-static-import .po-static-import .md\:items-center,
  .po-has-static-import .po-static-import [class*="md:items-center"] {
    align-items: center !important;
  }

  .po-static-import .md\:items-end,
  .po-has-static-import .po-static-import .md\:items-end {
    align-items: flex-end !important;
  }

  .po-static-import .md\:justify-between,
  .po-has-static-import .po-static-import .md\:justify-between {
    justify-content: space-between !important;
  }

  .po-static-import .md\:text-left,
  .po-has-static-import .po-static-import .md\:text-left,
  .po-has-static-import .po-static-import [class*="md:text-left"] {
    text-align: left !important;
  }

  .po-static-import .md\:w-52,
  .po-has-static-import .po-static-import .md\:w-52 {
    width: 13rem !important;
  }

  .po-static-import .md\:gap-16,
  .po-has-static-import .po-static-import .md\:gap-16 {
    gap: 4rem !important;
  }
}

@media (min-width: 1024px) {
  .po-static-import .lg\:grid-cols-3,
  .po-has-static-import .po-static-import .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Homepage audience cards — "Start here" */
.po-static-import .grid[class*="grid-cols"] > a,
.po-static-import .grid[class*="grid-cols"] > p > a,
.po-has-static-import .po-static-import .grid.md\:grid-cols-3 > a,
.po-has-static-import .po-static-import .grid.md\:grid-cols-3 > p > a {
  display: block !important;
  width: 100% !important;
  text-decoration: none;
  color: inherit;
}

/* Fixed WP navbar — #theme-main already has padding-top via po-layout; avoid doubling */
.single-po_publication .po-static-import {
  padding-top: 0;
}

/* Surface / background tokens vs Bootstrap .bg-light, .bg-white */
.po-has-static-import .po-static-import .bg-surface {
  background-color: #edf2f7 !important;
}

.po-has-static-import .po-static-import .bg-surface-container-lowest {
  background-color: #ffffff !important;
}

.po-has-static-import .po-static-import .bg-surface-container-low {
  background-color: #f7fafc !important;
}

.po-has-static-import .po-static-import .bg-surface-container-high {
  background-color: #edf2f7 !important;
}

.po-has-static-import .po-static-import .bg-primary-container {
  background-color: #1a202c !important;
}

.po-has-static-import .po-static-import .bg-status-report {
  background-color: #1a202c !important;
}

.po-has-static-import .po-static-import .bg-status-brief {
  background-color: #319795 !important;
}

.po-has-static-import .po-static-import .border-outline-variant {
  border-color: #e2e8f0 !important;
}

.po-has-static-import .po-static-import .text-outline {
  color: #a0aec0 !important;
}

.po-has-static-import .po-static-import .text-data-highlight {
  color: #319795 !important;
}

/* Featured insight band — dark section typography */
.po-has-static-import .po-static-import section.bg-primary blockquote {
  color: #ffffff !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.po-has-static-import .po-static-import section.bg-primary .po-feature-stat {
  color: #ffffff !important;
}

/* Publication cards — horizontal layout with thumbnail */
.po-has-static-import .po-static-import article.publication-card {
  display: flex !important;
}

@media (min-width: 640px) {
  .po-has-static-import .po-static-import article.publication-card {
    flex-direction: row !important;
  }

  .po-has-static-import .po-static-import article.publication-card > a.shrink-0,
  .po-has-static-import .po-static-import article.publication-card > a[class*="sm:w-44"] {
    width: 11rem !important;
    flex-shrink: 0 !important;
  }

  .po-has-static-import .po-static-import article.publication-card .po-thumb {
    width: 100% !important;
    height: 100% !important;
    min-height: 8.75rem !important;
    object-fit: cover !important;
  }
}

@media (min-width: 768px) {
  .po-has-static-import .po-static-import article.publication-card > a[class*="md:w-52"] {
    width: 13rem !important;
  }
}

/* Bootstrap .border sets color; keep Tailwind border width */
.po-has-static-import .po-static-import .border {
  border-style: solid;
  border-width: 1px;
}

.po-has-static-import .po-static-import .border-y {
  border-top-width: 1px;
  border-bottom-width: 1px;
  border-style: solid;
}

.po-has-static-import .po-static-import .border-b {
  border-bottom-width: 1px;
  border-style: solid;
}

/* Flex layout — Bootstrap uses .d-flex; Tailwind .flex must stay flex */
.po-has-static-import .po-static-import .flex {
  display: flex !important;
}

.po-has-static-import .po-static-import .inline-flex {
  display: inline-flex !important;
}

.po-has-static-import .po-static-import .flex-wrap {
  flex-wrap: wrap !important;
}

.po-has-static-import .po-static-import .flex-col {
  flex-direction: column !important;
}

.po-has-static-import .po-static-import .items-center {
  align-items: center !important;
}

.po-has-static-import .po-static-import .items-end {
  align-items: flex-end !important;
}

.po-has-static-import .po-static-import .justify-between {
  justify-content: space-between !important;
}

.po-has-static-import .po-static-import .justify-center {
  justify-content: center !important;
}

.po-has-static-import .po-static-import .gap-2 {
  gap: 0.5rem !important;
}

.po-has-static-import .po-static-import .gap-6 {
  gap: 1.5rem !important;
}

.po-has-static-import .po-static-import .gap-4 {
  gap: 1rem !important;
}

.po-has-static-import .po-static-import .gap-10 {
  gap: 2.5rem !important;
}

.po-has-static-import .po-static-import .items-start {
  align-items: flex-start !important;
}

.po-has-static-import .po-static-import .shrink-0 {
  flex-shrink: 0 !important;
}

.po-has-static-import .po-static-import .flex-1,
.po-has-static-import .po-static-import .flex-grow {
  flex: 1 1 0% !important;
}

.po-has-static-import .po-static-import .text-center {
  text-align: center !important;
}

.po-has-static-import .po-static-import .space-y-6 > * + * {
  margin-top: 1.5rem !important;
}

.po-has-static-import .po-static-import .bg-surface-muted {
  background-color: #e2e8f0 !important;
}

/* Hero thumbnails */
.po-has-static-import .po-static-import .po-thumb,
.po-has-static-import .po-static-import img.po-research-hero__img {
  object-fit: cover;
}

.po-has-static-import .po-static-import .relative {
  position: relative !important;
}

.po-has-static-import .po-static-import .absolute {
  position: absolute !important;
}

.po-has-static-import .po-static-import .overflow-hidden {
  overflow: hidden !important;
}

.po-has-static-import .po-static-import .overflow-x-auto {
  overflow-x: auto !important;
}

.po-has-static-import .po-static-import .w-full {
  width: 100% !important;
}

.po-has-static-import .po-static-import .h-full {
  height: 100% !important;
}

.po-has-static-import .po-static-import .h-40 {
  height: 10rem !important;
}

.po-has-static-import .po-static-import .hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .po-has-static-import .po-static-import .md\:flex {
    display: flex !important;
  }

  .po-has-static-import .po-static-import .md\:hidden {
    display: none !important;
  }
}

/* Research hub filter script */
.po-has-static-import .po-static-import .publication-card[hidden] {
  display: none !important;
}

.po-has-static-import .po-static-import .tab-active {
  color: #1a202c !important;
  border-bottom: 2px solid #319795 !important;
  font-weight: 700 !important;
}

/* Site chrome — Bootstrap utility collisions with Tailwind tokens */
.po-site-chrome header .text-primary,
.po-site-chrome footer .text-primary {
  color: #1a202c !important;
}

.po-site-chrome header .bg-primary,
.po-site-chrome header .po-header-cta.bg-primary {
  background-color: #1a202c !important;
}

.po-site-chrome header .text-on-primary,
.po-site-chrome header .po-header-cta.text-on-primary {
  color: #ffffff !important;
}

.po-site-chrome header .text-secondary,
.po-site-chrome footer .text-secondary {
  color: #3182ce !important;
}

.po-site-chrome header .text-on-surface-variant,
.po-site-chrome footer .text-on-surface-variant {
  color: #4a5568 !important;
}

.po-site-chrome header .border-secondary {
  border-color: #3182ce !important;
}

.po-site-chrome header .bg-surface-container-lowest {
  background-color: #ffffff !important;
}

.po-site-chrome footer .bg-surface-container-highest {
  background-color: #f7fafc !important;
}

.po-site-chrome header .border-outline-variant,
.po-site-chrome footer .border-outline-variant {
  border-color: #e2e8f0 !important;
}

.po-site-chrome header .hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .po-site-chrome header .md\:flex {
    display: flex !important;
  }

  .po-site-chrome header .md\:hidden {
    display: none !important;
  }
}

.po-site-chrome .skip-link.visually-hidden-focusable:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #1a202c;
  color: #fff;
  clip: auto;
  width: auto;
  height: auto;
}
