body {
  font-family: 'Noto Sans', sans-serif;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.portbench {
  font-variant: small-caps;
  font-weight: bold;
}

/* ── Hero / publication ── */
.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}
.teaser {
  font-family: 'Google Sans', sans-serif;
}
.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.publication-title,
.publication-authors {
  font-family: 'Google Sans', sans-serif;
}
.publication-venue {
  color: #555;
  width: fit-content;
  font-weight: bold;
}
.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}
.publication-authors a:hover {
  text-decoration: underline;
}
.author-block {
  display: inline-block;
}

/* ── Section banner label ── */
.section-banner {
  background: #f5f5f5;
}

/* ── Leaderboard ── */
.leaderboard-container {
  display: flex;
  flex-direction: column;
}
.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 80vh;
  width: 100%;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin-top: 5px;
  border: 1px solid #ddd;
  font-size: 14px;
}
th, td {
  text-align: center;
  padding: 7px 10px;
  white-space: nowrap;
}
th {
  background-color: #f2f2f2;
}
.main-header {
  background-color: #e6e6e6 !important;
  font-weight: bold;
  text-align: center;
}
.clickable { cursor: pointer; }
.clickable:hover { background-color: #d9d9d9; }
.asc::after  { content: ' ↑'; }
.desc::after { content: ' ↓'; }

/* sticky header */
.table-wrapper table thead th {
  position: sticky;
  z-index: 10;
  background-color: #f2f2f2;
  box-shadow: inset 0 -2px 0 #ddd;
}
.table-wrapper table thead tr:first-child th { top: 0; }
.table-wrapper table thead tr:nth-child(2) th { top: 37px; }

/* row colours */
.row-conservative { background: rgba(35,209,96,0.07); }
.row-balanced     { background: rgba(50,115,220,0.07); }
.row-aggressive   { background: rgba(255,56,96,0.07); }
.row-baseline     { background: #f9f9f9; font-style: italic; color: #888; }
.row-best td      { font-weight: 700; background: #fffbeb !important; }

.pass-cell { color: #23d160; font-weight: 700; }
.fail-cell { color: #ff3860; font-weight: 700; }

/* model type labels */
.model-labels-container {
  text-align: center;
  margin: 8px 0;
}
.model-label {
  display: inline-block;
  padding: 4px 10px;
  margin: 4px;
  border-radius: 3px;
}

/* ── Figures ── */
.fig-caption {
  font-size: 0.82rem;
  color: #666;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}
.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
}

/* ── Stage boxes ── */
.stage-box {
  background: #f5f5f5;
  border-left: 4px solid #3273dc;
  padding: 0.65rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: 0 4px 4px 0;
}
.stage-label { font-weight: 700; color: #3273dc; }

/* ── Highlight box ── */
.highlight-box {
  background: #fffbeb;
  border: 1px solid #f0c040;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* ── CEPS formula ── */
.ceps-formula {
  background: #1a1a2e;
  color: #e0e0e0;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.93rem;
  overflow-x: auto;
}

/* ── Profile cards ── */
.profile-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.35rem 1rem;
  text-align: center;
  border-top: 4px solid;
  height: 100%;
  transition: box-shadow 0.2s;
}
.profile-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.profile-card.conservative { border-color: #23d160; background: linear-gradient(180deg, #f0fdf4 0%, #f8f9fa 40%); }
.profile-card.balanced     { border-color: #3273dc; background: linear-gradient(180deg, #eff6ff 0%, #f8f9fa 40%); }
.profile-card.aggressive   { border-color: #ff3860; background: linear-gradient(180deg, #fff1f2 0%, #f8f9fa 40%); }
.profile-card .profile-icon { font-size: 1.6rem; margin-bottom: 0.3rem; }
.profile-card .profile-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.6rem; }
.profile-card .profile-constraints { text-align: left; display: inline-block; }
.profile-card .profile-constraints .pc-item {
  font-size: 0.82rem;
  padding: 3px 0;
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
}
.profile-card .profile-constraints .pc-label { color: #666; }
.profile-card .profile-constraints .pc-value { font-weight: 700; }

/* ── Crisis badge ── */
.crisis-badge {
  display: inline-block;
  color: white;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
  margin-right: 4px;
}
.crisis-badge.cb-china   { background: #e07b39; }
.crisis-badge.cb-covid   { background: #b91c1c; }
.crisis-badge.cb-crypto  { background: #9333ea; }

/* ── Stress regime cards ── */
.stress-card {
  background: #fafafa;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  text-align: center;
  border-left: 4px solid;
  height: 100%;
}
.stress-card.china  { border-color: #e07b39; }
.stress-card.covid  { border-color: #b91c1c; }
.stress-card.crypto { border-color: #9333ea; }
.stress-card .stress-name { font-weight: 700; font-size: 0.92rem; }
.stress-card .stress-date { font-size: 0.78rem; color: #888; margin-top: 0.2rem; }
.stress-card .stress-type { font-size: 0.78rem; color: #666; font-style: italic; margin-top: 0.2rem; }

/* ── Key numbers ── */
.result-number { font-size: 2rem; font-weight: 700; color: #3273dc; }
.result-label  { font-size: 0.85rem; color: #666; }

/* ── Simple custom carousel ── */
.simple-carousel {
  position: relative;
  width: 100%;
}
.simple-carousel .slides {
  overflow: hidden;
  border-radius: 6px;
}
.simple-carousel .slide {
  display: none;
}
.simple-carousel .slide.active {
  display: block;
}
.simple-carousel .slide img {
  width: 70%;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}
.simple-carousel .slide .fig-caption {
  margin-top: 0.5rem;
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}
.carousel-btn {
  background: #3273dc;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.carousel-btn:hover { background: #1a56c4; }
.carousel-counter {
  font-size: 0.85rem;
  color: #666;
  min-width: 60px;
}

/* ══════════════════════════════════════════
   Showcase / tcolorbox-style components
   ══════════════════════════════════════════ */

/* Outer frame (deepslate) */
.showcase-frame {
  border: 1.5px solid #2d3748;
  border-radius: 5px;
  background: #fff;
  margin-bottom: 2rem;
  font-size: 0.82rem;
  overflow: hidden;
}
.showcase-frame-header {
  background: #2d3748;
  color: #e2e8f0;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.showcase-frame-header .meta {
  font-weight: 400;
  font-size: 0.75rem;
  color: #a0aec0;
}
.showcase-frame-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Inner boxes */
.showcase-inner {
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid;
}
.showcase-inner-header {
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.showcase-inner-body {
  background: #f9f9fa;
  padding: 6px 10px;
}

/* Colour variants */
.si-blue   { border-color: #4a90d9; }
.si-blue   .showcase-inner-header { background: #dbeafe; color: #1e40af; }
.si-peri   { border-color: #8b7fd4; }
.si-peri   .showcase-inner-header { background: #ede9fe; color: #5b21b6; }
.si-cream  { border-color: #b7935a; }
.si-cream  .showcase-inner-header { background: #fef3c7; color: #92400e; }
.si-lav    { border-color: #6b8dd6; }
.si-lav    .showcase-inner-header { background: #e0e7ff; color: #3730a3; }
.si-coral  { border-color: #e07070; }
.si-coral  .showcase-inner-header { background: #fee2e2; color: #991b1b; }
.si-teal   { border-color: #0f766e; }
.si-teal   .showcase-inner-header { background: #ccfbf1; color: #0f4c45; }
.si-orange { border-color: #c2710c; }
.si-orange .showcase-inner-header { background: #ffedd5; color: #7c2d12; }
.si-red    { border-color: #b91c1c; }
.si-red    .showcase-inner-header { background: #fee2e2; color: #7f1d1d; }

/* Score badge */
.score-badge {
  background: #1e40af;
  color: #fff;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 8px;
  white-space: nowrap;
}
.score-badge.high  { background: #15803d; }
.score-badge.med   { background: #b45309; }
.score-badge.low   { background: #b91c1c; }

/* Two-col layout inside inner boxes */
.showcase-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.78rem;
}
.showcase-two-col .col-label {
  font-weight: 700;
  font-size: 0.74rem;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 4px;
  padding-bottom: 2px;
}
.showcase-scoring {
  margin-top: 6px;
  font-style: italic;
  color: #6b7280;
  font-size: 0.75rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 4px;
}

/* Macro grid */
.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px 12px;
}
.macro-grid span { font-size: 0.78rem; }

/* Correlation table */
.corr-table { font-size: 0.78rem; border-collapse: collapse; }
.corr-table th, .corr-table td {
  padding: 2px 10px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}
.corr-table th { background: #f3f4f6; font-weight: 700; }

/* Summary bar */
.showcase-summary {
  background: #f0f4ff;
  border-left: 3px solid #3b82f6;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: #374151;
  border-radius: 0 3px 3px 0;
}

/* QA box colour tiers */
.si-qa-blue   { border-color: #3b82f6; }
.si-qa-blue   .showcase-inner-header { background: #dbeafe; color: #1e3a8a; }
.si-qa-teal   { border-color: #0d9488; }
.si-qa-teal   .showcase-inner-header { background: #ccfbf1; color: #134e4a; }
.si-qa-orange { border-color: #ea580c; }
.si-qa-orange .showcase-inner-header { background: #ffedd5; color: #7c2d12; }
.si-qa-red    { border-color: #dc2626; }
.si-qa-red    .showcase-inner-header { background: #fee2e2; color: #7f1d1d; }

/* Note text */
.showcase-note {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 4px;
}

@media screen and (max-width: 768px) {
  .showcase-two-col { grid-template-columns: 1fr; }
  .macro-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Dataset Explorer ── */
.explorer-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.explorer-select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #fff;
  cursor: pointer;
}
.qa-template-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-tmpl-btn {
  padding: 5px 12px;
  border: 1px solid #3273dc;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  color: #3273dc;
  font-size: 0.82rem;
  transition: background 0.15s, color 0.15s;
}
.qa-tmpl-btn.is-active, .qa-tmpl-btn:hover {
  background: #3273dc;
  color: #fff;
}
.explorer-loading {
  text-align: center;
  padding: 2rem;
  color: #888;
  font-style: italic;
}

/* ── Key Insights cards ── */
.insight-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  border-left: 4px solid #3273dc;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.insight-card.i1 { border-left-color: #3273dc; }
.insight-card.i2 { border-left-color: #ff3860; }
.insight-card.i3 { border-left-color: #f0a030; }
.insight-card.i4 { border-left-color: #23d160; }
.insight-card .insight-icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
.insight-card .insight-headline {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}
.insight-card .insight-body {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.55;
  flex: 1;
}
.insight-card .insight-stat {
  display: inline-block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 1px 8px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 4px;
}
