/* ----------------------------------------------------- GENERAL STYLES ------------------------------------------------------- */

/* General Body and Background Setup */
body {
  background-color: #0f0f16 !important;
  color: #e5e7eb;
}
/* Font Defaults */
h1 {
  font-family: 'Instrument Serif', serif;
  color: #eaecf0;
}
h2, h3 {
  font-family: 'Instrument Serif', serif;
  color: #8fc0ee;
}
h4, h5, h6 {
  font-family: 'Lora', serif;
  color: #a7b1be;
}

a {
  color: #8fc0ee;
  text-decoration: underline;
}
a:hover {
  text-decoration: underline;
}

ul {
  list-style-type: disc;
}

.instrument-serif {
  font-family: 'Instrument Serif', serif;
}
.loubag {
  font-family: 'Lora', serif;
}

/* Navbar and Header */
.bg-dark {
  background-color: #1e1e2c !important;
}
.bg-hero {
  background-color: #0f0f16 !important;
}

.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-brand {
  color: #a7b1be !important;
}

.navbar-dark .nav-link:hover {
  color: #e42e5b !important;
}

/* Callout Boxes */
.bd-callout {
  padding: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  background-color: #1e2634;
  border: 1px solid #2f3e53;
  border-left-width: 0.25rem;
  border-radius: 0.25rem;
  color: #e5e7eb;
}
.bd-callout h4 {
  margin-bottom: 1.25rem;
}
.bd-callout p:last-child {
  margin-bottom: 0;
}
.bd-callout code {
  border-radius: 0.25rem;
}
.bd-callout + .bd-callout {
  margin-top: -0.25rem;
}
.bd-callout-info {
  border-left-color: #38bdf8;
}
.bd-callout-warning {
  border-left-color: #facc15;
}
.bd-callout-danger {
  border-left-color: #f87171;
}

/* Buttons */
.btn-primary, .btn-subscribe {
  background-color: #842c3a;
  border: none;
  color: #ffffff;
}
.btn-primary:hover, .btn-subscribe:hover {
  background-color: #64222d;
}

/* Footer */
footer {
  background-color: #0f0f16;
  color: #a7b1be;
}
footer h1, footer h2, footer h3, footer h4, footer h5, footer p, footer li, footer small {
  color: #a7b1be;
}
footer a {
  color: #8fc0ee;
  text-decoration: underline;
}
footer a:hover {
  text-decoration: underline;
}

/* Section Titles */
h2 {
  color: #8fc0ee;
}

/* Input Fields */
input, textarea {
  background-color: #121826;
  color: #e5e7eb;
  border: 1px solid #2f3e53;
  border-radius: 0.375rem;
  padding: 0.5rem;
}

/* Make header fill entire screen */
.hero-fullscreen {
  min-height: 100vh;
  padding-top: 0;
  padding-bottom: 0;
}

/* Optional: Reduce title size on small screens */
@media (max-width: 768px) {
  .hero-fullscreen h1 {
    font-size: 2rem;
  }
}

.hero-fullscreen h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #eaecf0;
}

@media (min-width: 768px) {
  .hero-fullscreen h1 {
    font-size: 4.5rem;
  }
}


/* ------------------------------------------------------- NAVBAR STYLES -------------------------------------------------------------------- */

.navbar {
  min-height: 80px; /* adjust to taste, default ~56px */
}

/* ====== Modern Glass Navbar ====== */
:root{
  --nav-bg: rgba(15,15,22,0.85);             /* matches your #0f0f16 with alpha */
  --nav-bg-solid: rgba(15,15,22,0.98);
  --nav-border: rgba(143,192,238,0.18);      /* blue accent hairline */
  --nav-accent: #e42e5b;                     /* your red accent */
  --nav-link: #cdd5df;
  --nav-link-dim: #a7b1be;
  --nav-underline: rgba(143,192,238,0.55);
}

.nav-glass {
  backdrop-filter: saturate(140%) blur(4px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  transition: transform .28s ease, background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.nav-glass.nav-solid {
  background: var(--nav-bg-solid);
  border-color: rgba(143,192,238,0.28);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.nav-glass.nav-hide { transform: translateY(-100%); }
.nav-glass.nav-show { transform: translateY(0); }

/* Links */
.navbar-dark .navbar-nav .nav-link {
  color: var(--nav-link);
  opacity: .92;
  font-weight: 400;
  letter-spacing: .2px;
  padding: .75rem 1rem;
  position: relative;
}
.navbar-dark .navbar-nav .nav-link:hover { color: #fff; }

.navbar-dark .navbar-brand {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.navbar-dark .navbar-nav .nav-link {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.nav-underline .nav-link::after {
  content: "";
  position: absolute;
  left: 1rem; right: 1rem; bottom: .35rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nav-underline), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s ease;
  border-radius: 2px;
}
.nav-underline .nav-link:hover::after { transform: scaleX(1); }

/* remove BS underline so only our custom line shows */
.nav-underline .nav-link,
.nav-underline .nav-link:hover,
.nav-underline .nav-link:focus,
.nav-underline .nav-link.active,
.nav-underline .dropdown.show > .nav-link {
  border-bottom: 0 !important;
}

/* 🔥 Disable Bootstrap’s underline completely */
.nav-underline .nav-link::after {
  content: none !important;   /* kill Bootstrap underline pseudo-element */
}

/* Ensure dropdown toggles don't get a fat border */
.nav-underline .nav-link {
  border-bottom: none !important;
}

/* Active link highlight */
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link[aria-current="page"] {
  color: #fff !important;
}
.nav-underline .nav-link.active::after { transform: scaleX(1); background: var(--nav-accent); }

/* one thin underline for ALL nav links (including dropdown toggles) */
.nav-underline .nav-link { position: relative; }

.nav-underline .nav-link::before{
  content: "";
  position: absolute;
  left: 1rem; right: 1rem; bottom: .35rem;
  height: 2px;
  background: var(--nav-accent);                     /* or your gradient */
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s ease;
  border-radius: 2px;
}

.nav-underline .nav-link:hover::before,
.nav-underline .nav-link.active::before{
  transform: scaleX(1);
}

/* optional: keep dropdown-menu items clean when active */
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active{
  color:#fff; background: transparent;
}


/* Offcanvas styling (top sheet) */
.offcanvas-top.offcanvas-glass {
  height: auto;
  max-height: 80vh;
  background: rgba(15,15,22,.9);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  color: #e5e7eb;
  border-bottom: 1px solid rgba(143,192,238,0.28);
}
.offcanvas-glass .offcanvas-header { border-bottom: 1px solid rgba(143,192,238,0.18); }
.offcanvas-glass .nav-compact .nav-link {
  color: var(--nav-link);
  padding: .6rem .25rem;
  border-radius: 8px;
}
.offcanvas-glass .nav-compact .nav-link:hover {
  color: #fff;
  background: rgba(143,192,238,0.10);
}

/* Optional: make hero header breathe under transparent nav */
header.bg-hero { padding-top: 56px; }

/* remove text underline from navbar links */
.navbar-dark .navbar-nav .nav-link {
  text-decoration: none !important;
}
.navbar-dark .navbar-nav .nav-link:hover {
  text-decoration: none !important;
}

/* Glassy dropdown menus */
.navbar .dropdown-menu {
  background: rgba(15, 15, 22, 0.85);        /* semi-transparent dark */
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(143,192,238,0.18);  /* subtle border */
  border-radius: 12px;
  padding: 0.6rem 0;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  opacity: 0; 
  transform: translateY(8px); 
  visibility: hidden; 
  transition: all 0.25s ease;
}

/* Dropdown item links */
.navbar .dropdown-item {
  color: #cdd5df;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-item:hover {
  background: rgba(143,192,238,0.12);  /* soft blue highlight */
  color: #fff;
}

/* Show dropdown on hover (desktop) */
@media (min-width: 992px) {
  .navbar .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

/* 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 */

/* ------------------------------------------------ HOME STYLES ---------------------------------------------------------- */
/* Fullscreen Clock Section */
.scroll-clock-block {
  background-color: #0f0f16;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.info-text {
  font-size: 2rem;
  font-weight: 600;
  color: #eaecf0;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .info-text {
    font-size: 2.5rem;
  }
}

/* Clock Visual */
.clock-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
}

.clock-svg {
  transform: rotate(-90deg); /* Rotate only circle */
}

.clock-svg text.clock-label {
  transform: rotate(90deg); /* Re-correct the 90 text */
  transform-origin: center;
}

.bg-ring {
  stroke-opacity: 0.2;
}

.progress-ring {
  transition: stroke-dashoffset 0.2s ease-out;
}


.scroll-lock-section {
  background-color: #0f0f16;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.clock-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
}
.clock-svg {
  transform: rotate(-90deg);
}
.clock-svg text.clock-label {
  transform: rotate(90deg);
  transform-origin: center;
}
.bg-ring {
  stroke-opacity: 0.2;
}
.progress-ring {
  transition: stroke-dashoffset 0.1s linear;
}

/* Life expectancy calendar */
  #life-expectancy-block .calendar-card {
    border-radius: 20px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 24px;
  }

  .calendar-grid {
    --cols: 12; /* 48 months -> 12 columns x 4 rows */
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: 10px;
  }

  .month-cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background: rgba(143,192,238,0.18);
    box-shadow: inset 0 0 0 1px rgba(143,192,238,0.35);
    transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  }
  .month-cell.filled {
    background: #e42e5b;
    box-shadow: inset 0 0 0 1px rgba(228,46,91,0.65);
    transform: scale(0.98);
  }

  .calendar-legend {
    font-size: 0.95rem;
    opacity: 0.9;
  }

  .counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(228,46,91,0.12);
    color: #e42e5b;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(228,46,91,0.3);
  }

  /* Make both “hero” blocks truly full-screen and centered */
  #scroll-clock-block,
  #life-expectancy-block {
    scroll-margin: 20vh; /* helps the center test feel natural */
  }

  @media (max-width: 992px) {
    .calendar-grid { --cols: 8; } /* stack nicer on smaller screens */
  }

  /* ensure full-viewport height behaves consistently inside containers */
  /* #life-expectancy-block .container { min-height: 100vh; display: flex; align-items: center; } */
  /* optional: slightly larger grid on big screens for drama */
  @media (min-width: 1200px) {
    #life-expectancy-block .calendar-card { padding: 28px; }
  }

  #life-expectancy-block .container {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }

  /* Slightly smaller calendar card than before */
  .calendar-card--compact {
    max-width: 520px;  /* adjust to taste: 480–560px range works well */
    width: 100%;
  }

  /* Tighten the grid a bit so it reads cleaner */
  .calendar-grid { gap: 8px; }
  .month-cell { border-radius: 8px; }

  @media (min-width: 1400px) {
    .calendar-card--compact { max-width: 560px; }
  }

  @media (max-width: 992px) {
    /* Keep it comfortably sized on tablets/phones */
    .calendar-card--compact { max-width: 440px; }
  }

  /* Shrink and align the calendar nicely */
.calendar-card--compact {
  max-width: 380px; /* smaller than before; tweak 340–420px if you like */
  width: 100%;
}

/* Make month labels smaller & give them more breathing room */
.month-header {
  font-size: 0.65rem;   /* was 0.75rem */
  letter-spacing: 0.5px; /* helps differentiate */
  color: #a7b1be;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  white-space: nowrap; /* prevent wrapping */
}

.calendar-matrix {
  --label-col: 60px; /* was 74px; smaller year label column */
  --cols: 12;
  display: grid;
  grid-template-columns: var(--label-col) repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: 34px;
  gap: 6px;
}

@media (max-width: 992px) {
  .month-header {
    font-size: 0.6rem; /* even smaller on small screens */
  }
}


/* Year labels on the left */
.year-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 6px;
  opacity: 0.95;
}

/* Month cells (unchanged visuals, just slightly smaller radius) */
.month-cell {
  width: 100%;
  border-radius: 8px;
  background: rgba(143,192,238,0.18);
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.35);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.month-cell.filled {
  background: #e42e5b;
  box-shadow: inset 0 0 0 1px rgba(228,46,91,0.65);
  transform: scale(0.98);
}

/* A tiny caption under the grid to telegraph “months” clearly */
.calendar-footnote {
  font-size: 0.8rem;
  color: #a7b1be;
  text-align: left;
  opacity: 0.9;
}

/* ensure full-viewport centering inside the container (life block) */
#life-expectancy-block .container {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* responsive touch */
@media (max-width: 992px) {
  .calendar-card--compact { max-width: 320px; }
  .calendar-matrix { grid-auto-rows: 30px; }
}


/* Center the clock + calendar sections as a whole
   (keeps all internal row/col spacing exactly the same) */
#scroll-clock-block > .container,
#life-expectancy-block > .container {
  /* tune the cap if you want a wider/narrower feel */
  max-width: clamp(900px, 88vw, 1200px);
  margin-left: auto;
  margin-right: auto;
}

/* Optional: on ultra-wide screens, keep them nicely centered */
@media (min-width: 1400px) {
  #scroll-clock-block > .container,
  #life-expectancy-block > .container {
    max-width: 1200px;
  }
}


/* ===== ALS Map Block ===== */
#als-map-block {
  background: #0f0f16;
  padding: 72px 0 40px;
}

#als-map-block h3 {
  color: #8fc0ee;
  font-family: 'Instrument Serif', serif;
  margin-bottom: 8px;
}
#als-map-block .map-kicker {
  color: #a7b1be;
  opacity: 0.9;
  margin-bottom: 18px;
}

.als-map-card {
  position: relative;
  width: 100%;
  max-width: 1080px;         /* was 720 */
  padding: 0;                /* no inner padding */
  border-radius: 0;          /* no rounded frame */
  background: transparent;   /* remove background */
  border: none;              /* remove border */
  box-shadow: none;          /* remove shadow */
  backdrop-filter: none;
}

.map-wrap {
  position: relative;
  width: 100%;
  max-width: 960px;          /* was 640 (~1.5x) */
  margin: 0 auto;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

#worldMap {
  width: 100%;
  height: 100%;
  pointer-events: none;            /* we’ll attach listeners to inner SVG nodes */
}

/* Tooltip */
#map-tooltip{
  position:absolute;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(15,15,22,0.92);
  color:#e5e7eb;
  font-size:0.9rem;
  line-height:1.2;
  box-shadow:0 6px 20px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(143,192,238,0.25);
  transform:translate(-50%, calc(-100% - 10px));
  pointer-events:none;
  opacity:0;
  transition:opacity .15s ease, transform .15s ease;
  z-index:5;
}


/* Legend */
.map-legend {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #a7b1be;
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
}
.chip { display:inline-block; width:14px; height:14px; border-radius:4px; }
.chip--highlight { background:#e42e5b; box-shadow: 0 0 0 1px rgba(228,46,91,0.5); }

/* Hover styling applied inside the SVG via a class we add */
svg .als-has-data, svg .als-has-data * { fill:#e42e5b!important; filter:drop-shadow(0 0 6px rgba(228,46,91,.35)); }
svg .als-hover,    svg .als-hover *    { fill:#ff5f86!important; }

/* Europe marker (used if no EU group in the SVG) */
.eu-marker {
  position: absolute;
  left: 51.2%;
  top: 33%;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: #e42e5b;
  box-shadow:
    0 0 0 1px rgba(228,46,91,0.5),
    0 0 18px rgba(228,46,91,0.45);
  cursor: pointer;
}

/* Small screens: keep everything tidy */
@media (max-width: 768px) {
  .als-map-card { padding: 16px; }
  .map-wrap { max-width: 520px; }
}

.svg-host { position: relative; width: 100%; height: 100%; }
.svg-host svg { width: 100%; height: 100%; display: block; background: transparent !important; }

/* Make the ALS map block fill the viewport and center content */
#als-map-block.full-viewport {
  min-height: 100vh;
  padding: 0;                 /* remove extra spacing */
  display: flex;
  align-items: center;        /* vertical center */
}
#als-map-block.full-viewport .container {
  min-height: 100vh;          /* ensure inner grid stretches */
  display: flex;
  flex-direction: column;
  justify-content: center;    /* center headings + map */
}

/* Tidy heading spacing in hero context */
#als-map-block.full-viewport h3 {
  margin-bottom: 6px;
}
#als-map-block.full-viewport .map-kicker {
  margin-bottom: 22px;
}

/* Bigger responsive map (fills but doesn’t overflow) */
.als-map-card {
  max-width: clamp(780px, 86vw, 1280px);  /* scales up on large screens */
}
.map-wrap {
  max-width: clamp(720px, 80vw, 1160px);
  aspect-ratio: 16 / 9;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  #als-map-block.full-viewport .container { padding-top: 24px; padding-bottom: 24px; }
  .map-wrap { max-width: 92vw; aspect-ratio: 4 / 3; }
}

/* ----------------------------------------- HOME SPRITES ----------------------------------------------------- */

/* Full-screen, dark hero */
.hero {
  min-height:100vh;
  position:relative;
  z-index:2;
  padding:8vh 2rem;
  background:#0d0f14;
  color:#f7f9ff;
  background-image:radial-gradient(1200px 600px at 50% 30%, rgba(255,255,255,.03), transparent);
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
}

.hero-text {
  max-width:920px;
  margin:auto;
  /* Invisible barricade padding */
  padding: 4rem 6rem;
}

#bg-sprites {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100vh;           /* only in the hero */
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-out;
}

#bg-sprites.fade-out {
  opacity: 0;
}

.bg-sprite {
  position: absolute;
  will-change: transform;
  opacity: 0.25; /* baseline, we’ll randomize later in JS */
  animation: drift var(--dur, 20s) linear infinite;
}

/* 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 */

/* ----------------------------------------------------------------- PAGE LAYOUTS ----------------------------------------------------------- */

/* --- Takeaway cards under the hero title --- */
.takeaway-card{
  padding: 1.25rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(255,255,255,0.08);
  line-height: 1.3;
}
/* Colors chosen to stand out on your #0f0f16 background without touching global colors */
.takeaway-card.tk-1{ background:#e42e5b; color:#fff; }
.takeaway-card.tk-2{ background:#38bdf8; color:#0b1220; }
.takeaway-card.tk-3{ background:#facc15; color:#0b0b0f; }

/* Small, subtle TOC that stays put while scrolling */
.toc-box{
  background: #0f0f16;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
}
.toc-title{
  font-size: 0.95rem;
  font-weight: 700;
  color: #8fc0ee;
  margin-bottom: 0.5rem;
}
.toc-link{
  display:block;
  padding: 0.25rem 0;
  text-decoration: none;
  color: #a7b1be;
}
.toc-link:hover{ color: #eaecf0; text-decoration: underline; }

/* Make sure the hero really takes the whole first screen (you already have this class) */
header.bg-hero.hero-fullscreen{
  min-height: 100vh; /* full screen */
  padding-top: 56px; /* breathing space below glass nav */
  display: flex; align-items: center;
}


/* ===== Section 2 layout panels (no new fonts/colors) ===== */

/* Standalone stacked callouts: each its own box with margins */
.expanded-callouts > .bd-callout {
  margin: 0 1rem 1rem 1rem;  /* side + bottom spacing */
}
.expanded-callouts > .bd-callout:first-child {
  margin-top: 0.5rem;        /* small top breathing room */
}

/* Content panel remains boxed with margin, beneath callouts */
.content-panel{
  margin: 1rem;              /* matches callout side margins */
  padding: 1.25rem;
  background-color: #0f0f16;
  border: 1px solid #2f3e53;
  border-radius: 12px;
}

/* TOC box (unchanged, here for context) */
.toc-panel{
  margin: 0 0 1.25rem 1rem;
  padding: 0.75rem 0.9rem;
  background-color: #0f0f16;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

/* Keep links inside TOC readable but not overbearing; inherit your palette */
.toc-panel a { text-decoration: none; }
.toc-panel a:hover { text-decoration: underline; }

/* Optional breathing on the accent callouts row placed inside content panel */
.accent-callouts .bd-callout { margin-bottom: 0; }

/* Expanded takeaway callouts stacked vertically */
.expanded-callouts .bd-callout {
  margin-bottom: 1.25rem;
}
.expanded-callouts .bd-callout:last-child {
  margin-bottom: 0;
}
/* Make TOC + all callout boxes match the footer background */
.toc-panel,
.bd-callout {
  background-color: #1e1e2c  !important;   /* same as footer */
  border-color: #2f3e53;                  /* keep your existing thin outline */
}

/* Keep the blue / yellow / red accent stripes */
.bd-callout-info    { border-left-color: #38bdf8; }
.bd-callout-warning { border-left-color: #facc15; }
.bd-callout-danger  { border-left-color: #f87171; }

/* (Optional) make the accent stripe a touch bolder */
.bd-callout { border-left-width: 0.35rem; }  /* was 0.25rem */

/* (Optional) subtle inner hairline so boxes still separate from the page */
.toc-panel, .bd-callout {
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.18);
}


/* Body text inside callouts already matches your scheme:
   .bd-callout { color: #e5e7eb; } — leave as-is */

   /* Figures blend with your palette */
.figure-img { box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.figure-caption { font-size: .9rem; color: #eaecf0 }

/* Keep callout headings white but use your existing fonts */
.expanded-callouts .bd-callout h1,
.expanded-callouts .bd-callout h2,
.expanded-callouts .bd-callout h3,
.expanded-callouts .bd-callout h4,
.expanded-callouts .bd-callout h5,
.expanded-callouts .bd-callout h6 { color: #eaecf0 !important; }


/* ===== Callout #2 document: use full width, better type scale ===== */

/* 1) Fill the whole callout (remove the “squished” column look) */
#aptamer-callout .doc-body{
  max-width: none !important;   /* override earlier 90ch */
  width: 100%;
}

/* 2) Clear, compact heading hierarchy (keeps your existing fonts) */
/* H2: section title */
#aptamer-callout h2{
  color: #eaecf0 !important;        /* keep headers white */
  font-size: 2rem;                   /* clear step above h3 */
  line-height: 1.2;
  margin-top: .25rem;
  margin-bottom: .6rem;
  padding-bottom: .35rem;
  /* border-bottom: 1px solid rgba(143,192,238,.25);*/
  border-bottom: none !important;
}

/* H3: subsection */
#aptamer-callout h3{
  color: #eaecf0 !important;
  font-size: 1.35rem;                /* distinct step above h4 */
  line-height: 1.3;
  margin-top: 1.1rem;
  margin-bottom: .4rem;
  font-weight: 700;                  /* crisper than body without changing fonts */
}

/* H4: mini-head (smaller + tighter) */
#aptamer-callout h4{
  color: #eaecf0 !important;
  font-size: 1.05rem;                /* clearly below body+H3 */
  line-height: 1.35;
  margin-top: .7rem;
  margin-bottom: .25rem;
  letter-spacing: .2px;              /* subtle separation from paragraph text */
  font-weight: 600;                  /* readable, not shouty */
}

/* Body copy & spacing */
#aptamer-callout p{ line-height: 1.65; margin-bottom: .9rem; }

/* Figures: let images use the full callout width cleanly */
#aptamer-callout .figure      { margin: 1rem 0 1.25rem; }
#aptamer-callout .figure-img  {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  background: #121826;
}
#aptamer-callout .figure-caption { text-align: center; opacity: .85; font-size: .9rem; }

/* TOC indent (unchanged) */
.toc-panel .toc-h3 { padding-left: .8rem; }
.toc-panel .toc-h4 { padding-left: 1.6rem; font-size: .9em; opacity: .9; }


/* Optional smooth scroll */
html { scroll-behavior: smooth; }


/* ===== Aptamer callout: centered reading column & tidy typography ===== */
#aptamer-callout .doc-body{
  width: 100%;
  /* Keep lines short like Background: tweak 880–1040px or 70–85ch */
  max-width: min(1400px, 175ch) !important;
  margin-inline: auto !important;                /* center within the box */
  padding-inline: clamp(16px, 2.4vw, 28px);      /* inner side gutters */
}

/* Clear hierarchy but not shouty */
#aptamer-callout h2{ color:#eaecf0!important; font-size:2rem;   line-height:1.2;  margin:.25rem 0 .6rem; border-bottom:1px solid rgba(143,192,238,.25); padding-bottom:.35rem; }
#aptamer-callout h3{ color:#eaecf0!important; font-size:1.25rem; line-height:1.35; margin:1rem 0 .35rem; font-weight:700; }
#aptamer-callout h4{ color:#eaecf0!important; font-size:1.05rem; line-height:1.35; margin:.6rem 0 .25rem; letter-spacing:.2px; font-weight:600; }
#aptamer-callout p { line-height:1.65; margin:0 0 .9rem; }

/* Hanging-indent bullets (real <ul>/<ol>, not • characters) */
#aptamer-callout .doc-body ul,
#aptamer-callout .doc-body ol{
  margin:.6rem 0 1rem;
  padding-left:1.75rem !important;
  list-style-position:outside !important;
}
#aptamer-callout .doc-body li{ margin:.25rem 0; line-height:1.65; text-indent:0; }
#aptamer-callout .doc-body li::marker{ color:#a7b1be; font-size:.9em; }

/* Figures scale nicely inside the reading column */
#aptamer-callout .figure{ margin:1rem 0 1.25rem; }
#aptamer-callout .figure-img{ display:block; width:100%; height:auto; border-radius:8px; box-shadow:0 2px 12px rgba(0,0,0,.25); background:#121826; }
#aptamer-callout .figure-caption{ text-align:center; opacity:.85; font-size:.9rem; }

/* Reusable document-style callout (keeps your fonts & colors) */
.doc-callout .doc-body{
  width:100%;
  max-width: min(1400px, 175ch) !important;
  margin-inline:auto !important;
  padding-inline: clamp(16px, 2.4vw, 28px);
}
.doc-callout h2{ color:#eaecf0!important; font-size:2rem;   line-height:1.2;  margin:.25rem 0 .6rem; border-bottom:1px solid rgba(143,192,238,.25); padding-bottom:.35rem; }
.doc-callout h3{ color:#eaecf0!important; font-size:1.25rem; line-height:1.35; margin:1rem 0 .35rem; font-weight:700; }
.doc-callout h4{ color:#eaecf0!important; font-size:1.05rem; line-height:1.35; margin:.6rem 0 .25rem; letter-spacing:.2px; font-weight:600; }
.doc-callout p { line-height:1.65; margin:0 0 .9rem; }

.doc-callout .figure{ margin:1rem 0 1.25rem; }
.doc-callout .figure-img{ display:block; width:100%; height:auto; border-radius:8px; box-shadow:0 2px 12px rgba(0,0,0,.25); background:#121826; }
.doc-callout .figure-caption{ text-align:center; opacity:.85; font-size:.9rem; }

.doc-callout ul, .doc-callout ol{
  margin:.6rem 0 1rem;
  padding-left:1.75rem !important;
  list-style: disc outside !important;
}
.doc-callout li{
  display:list-item !important;
  margin:.25rem 0;
  line-height:1.65;
  text-indent:0;
}
.doc-callout li::marker{ color:#a7b1be; font-size:.9em; }

/* Anchor offset so headings don't hide under the fixed nav */
:root { --nav-offset: 80px; }                  /* start with your sticky top value */
html, body { scroll-padding-top: var(--nav-offset); }  /* offsets anchor jumps */
.toc-panel.sticky-top { top: var(--nav-offset); }

:root { scroll-padding-top: var(--nav-offset, 84px); }   /* global anchor padding */
.bd-callout { scroll-margin-top: var(--nav-offset, 84px); } /* when linking to the box itself */

/* ============================================================================== Home Problem Quant — Stress Granule Comparison Block ================ */

/* ------------------- Stress Granule Block v2 ------------------- */
#stress-block {
  background: #0f0f16;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
#stress-block .container {
  max-width: 1200px;
}
/* Visual Card */

.sg-card-container {
  /* REMOVE visible styles */
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;

  /* KEEP spacing/structure */
  padding: 3rem 2rem; /* increased size for breathing room */
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  position: relative;
}


.sg-card-text h2,
.sg-card-text h3 {
  font-family: 'Instrument Serif', serif;
  color: #eaecf0;
}
.sg-card-text h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.4;
}
.sg-card-text h3 {
  font-size: 1.25rem;
  color: #8fc0ee;
}

.sg-card-text h2 {
  margin-top: 1.25rem;
}
.sg-card-text h3 {
  margin-bottom: 0.5rem;
}


/* Slider */
.sg-slider {
  --sg-slider-pos: 35%;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Was 16 / 9 — this makes it taller */
  max-width: 720px;     /* Was likely ~520px */
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0f16;
  box-shadow: 0 10px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(143,192,238,.18);
}

.sg-slider-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sg-slider-after {
  clip-path: inset(0 calc(100% - var(--sg-slider-pos)) 0 0);
}

.sg-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: ew-resize;
  z-index: 3;
}
.sg-range::-webkit-slider-thumb { appearance: none; width: 0; height: 0; }
.sg-range::-moz-range-thumb { width: 0; height: 0; border: 0; }

.sg-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--sg-slider-pos);
  width: 2px;
  background: rgba(143,192,238,.8);
  transform: translateX(-1px);
  z-index: 4;
}
.sg-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15,15,22,.95);
  box-shadow: 0 6px 20px rgba(0,0,0,.35), inset 0 0 0 1px rgba(143,192,238,.35);
}
.sg-grip::before,
.sg-grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid #8fc0ee;
  border-left: 2px solid #8fc0ee;
  transform: translateY(-50%) rotate(45deg);
}
.sg-grip::before { left: 9px; }
.sg-grip::after  { right: 9px; transform: translateY(-50%) rotate(-135deg); }

/* Flip text */
.sg-text-front,
.sg-text-back {
  backface-visibility: hidden;
  transition: transform 0.6s ease, opacity 0.6s ease;
  position: absolute;
  inset: 0;
  opacity: 0;
}
.sg-text-front {
  transform: rotateX(0);
  opacity: 1;
}
.sg-text-back {
  transform: rotateX(-180deg);
}
.flipped.sg-text-front {
  transform: rotateX(180deg);
  opacity: 0;
}
.flipped.sg-text-back {
  transform: rotateX(0deg);
  opacity: 1;
}

.sg-card-text {
  position: relative;
}

.sg-flip-wrapper {
  position: relative;
  min-height: 6rem; /* enough space to hold either h2 */
}

.sg-text {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
  backface-visibility: hidden;
  margin: 0;
}

.sg-front {
  transform: rotateX(0);
  opacity: 1;
}

.sg-back {
  transform: rotateX(-180deg);
}

.flipped.sg-front {
  transform: rotateX(180deg);
  opacity: 0;
}

.flipped.sg-back {
  transform: rotateX(0deg);
  opacity: 1;
}

/* Keep your container sizing; do NOT force aspect-ratio here */
.sg-slider {
  /* keep your existing width/height from your layout */
  position: relative;
  overflow: hidden;
  background: #000; /* or whatever your card bg is */
  --sg-slider-pos: 0%; /* start at 0 so BEFORE is fully visible */
}

/* Stack the two images */
.sg-slider-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;  /* <- preserves your illustration’s shape */
  display: block;
  user-select: none;
  pointer-events: none;
}

/* BEGIN: reversed clipping so BEFORE shows first */
.sg-slider-before {                           /* show from the divider to the RIGHT */
  clip-path: inset(0 0 0 var(--sg-slider-pos));
}
.sg-slider-after {                            /* reveal from the LEFT up to the divider */
  clip-path: inset(0 calc(100% - var(--sg-slider-pos)) 0 0);
}
/* END: reversed clipping */

/* Divider still follows the var */
.sg-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--sg-slider-pos);
  width: 0;
  transform: translateX(-50%);
  border-left: 2px solid rgba(255,255,255,0.9);
  pointer-events: none;
}

/* Optional: once fully to the right, hide BEFORE entirely */
.sg-slider.after-only .sg-slider-before { visibility: hidden; }
.sg-slider.after-only .sg-slider-after  { clip-path: inset(0 0 0 0); }


/* ===== Make ONLY the second slider big & centered ===== */
#giant-slider-section {
  min-height: 100vh;
  padding: 4vh 2vw;               /* breathing room so the title isn’t flush */
}

#giant-slider-section .sg-card-container {
  /* override the global 580px cap */
  max-width: clamp(1000px, 92vw, 1200px);
  width: 100%;
  padding: 0;                 /* let the media fill the box */
  margin: 0 auto;             /* center (extra safety) */
}

#giant-slider-section .sg-slider {
  /* override the global 720px cap */
  max-width: none;
  width: 100%;
  aspect-ratio: 16 / 9;       /* keeps a nice, wide box */
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25),
              inset 0 0 0 1px rgba(143,192,238,.18);
  background: #0b0f16;        /* matches your palette */
}

/* scale the handle/divider a touch for the bigger size (optional) */
#giant-slider-section .sg-divider {
  border-left: 3px solid rgba(255,255,255,0.9);
}
#giant-slider-section .sg-grip {
  width: 48px;
  height: 48px;
}

/* Center the clock block as a compact unit (desktop) */
@media (min-width: 992px) {
  #scroll-clock-block .row.align-items-center {
    justify-content: center !important; /* center the pair */
    column-gap: 56px;                  /* keep text↔clock spacing */
  }
  /* Let both cols size to content instead of 50%/50% */
  #scroll-clock-block .row .col-md-6 {
    flex: 0 0 auto !important;
    width: auto !important;
  }
  /* Cap text width so lines stay readable */
  #scroll-clock-block .row .col-md-6:first-child {
    max-width: 760px; /* tweak 680–820px to taste */
  }
}

:root { --title-gap: 16px; } /* tweak gap under heading */

#giant-slider-section{
  min-height: 100vh;            /* take the screen */
  padding: 6vh 2vw;             /* breathing room around */
}

.section-title{
  text-align: center;           /* center the text */
  margin: 0 0 var(--title-gap); /* gap below the title */
}

/* keep the slider big but not overflowing */
.sg-card-container{
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.sg-slider{
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 82vh;             /* “almost full-screen” */
  border-radius: 20px;
  overflow: hidden;
}

/* small screens: slightly tighter gap + taller box feel */
@media (max-width: 576px){
  :root { --title-gap: 10px; }
  .sg-slider { max-height: 78vh; }
}

/* footer base (already matches your theme) */
.site-footer { background:#0f0f16; color:#a7b1be; }
.site-footer a { color:#8fc0ee; text-decoration: underline; }
.footer-rule { border-color: rgba(143,192,238,0.18); }

/* viewport */
.logos-viewport{
  position:relative;
  overflow:hidden;
  width:100%;
  /* nice fade edges on dark bg */
  mask:linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask:linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* the moving belt that JS builds (.logos-track + clone) */
.logos-belt{
  display:flex;
  animation: logos-scroll var(--marquee-dur, 60) linear infinite;
}
.logos-viewport:hover .logos-belt{ animation-play-state: paused; }

@keyframes logos-scroll{
  from{ transform: translateX(0); }
  to  { transform: translateX(calc(-1 * var(--track-w, 0px))); }
}

/* one “set” of logos */
.logos-track{
  display:flex; gap:1rem; align-items:center;
}

/* keep internal gaps */
.logos-track{
  display:flex;
  gap:1rem;
  align-items:center;
}

/* ensure the SAME gap at the wrap (between original & clone) */
.logos-track::after{
  content:"";
  flex: 0 0 1rem;   /* equals the gap value */
}

/* chips (no fixed min-width, so no fake blanks) */
.sponsor-chip{
  flex:0 0 auto;
  height:86px;
  padding:.6rem .9rem;
  border-radius:12px;
  background:#e9a4b5;
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.18);
  display:flex; align-items:center; justify-content:center;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease;
  text-decoration:none;
}
.sponsor-chip:hover{
  transform: translateY(-2px);
  background:#ffffff;
  box-shadow:0 10px 24px rgba(0,0,0,.25), inset 0 0 0 1px rgba(143,192,238,.35);
}
.sponsor-chip img{
  max-height:60px; max-width:160px; width:auto; height:auto; object-fit:contain;
  filter:grayscale(100%) opacity(.9);
  transition:filter .25s ease;
}
.sponsor-chip:hover img{ filter:grayscale(0%) opacity(1); }


@media (max-width:576px){
  .sponsor-chip{ height:76px; }
  .sponsor-chip img{ max-height:54px; max-width:130px; }
}

/* ---------------- red outline callout (dark) ---------------- */
.contact-callout{
  background:#1e1e2c;                         /* dark panel */
  color:#e5e7eb;
  border-radius:12px;
  padding:1rem 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(228,46,91,0.55); /* red outline */
}
.contact-callout h4{ color:#eaecf0; font-family:'Lora', serif; }
.contact-link{ color:#8fc0ee; text-decoration: underline; }

/* ---------------- socials at bottom ---------------- */
.footer-bottom-row{ align-items:center; }
.footer-socials{
  display:flex; gap:.6rem; align-items:center; justify-content:flex-end;
}
.social-link{
  width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:10px;
  background:#1e1e2c;
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.18);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.social-link:hover{
  transform: translateY(-2px);
  background:#23263a;
  box-shadow: 0 6px 16px rgba(0,0,0,.25), inset 0 0 0 1px rgba(143,192,238,.35);
}
.socials{ width:20px; height:20px; display:block; }

/* mobile tweaks */
@media (max-width:576px){
  .sponsor-container{ height:76px; }
  .sponsor-container img{ max-height:54px; max-width:130px; }
}


/* ---------------- Contact callout (aesthetic upgrade) ---------------- */
.contact-callout{
  position: relative;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  color: #e5e7eb;

  /* Layered background to get a subtle gradient border */
  background:
    linear-gradient(#1e1e2c, #1e1e2c) padding-box,
    linear-gradient(135deg, rgba(228,46,91,.6), rgba(143,192,238,.45)) border-box;
  border: 1px solid transparent;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.28),
    inset 0 0 0 1px rgba(228,46,91,0.12);
}

/* Inside layout: text left, icons right */
.contact-with-socials{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.contact-with-socials .contact-text h4{
  color:#eaecf0;
  font-family:'Lora', serif;
  margin-bottom: .35rem;
}

/* Socials inside the contact box */
.contact-socials{
  display: flex;
  gap: .55rem;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.contact-socials .social-link{
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: #141a28;
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.22);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, filter .2s ease;
}

.contact-socials .social-link:hover{
  transform: translateY(-2px);
  background: #1a2030;
  box-shadow:
    0 8px 18px rgba(0,0,0,.32),
    inset 0 0 0 1px rgba(143,192,238,.38),
    0 0 0 4px rgba(228,46,91,.12); /* soft focus ring */
}

.contact-socials .socials{
  width: 20px; height: 20px; display: block;
  filter: drop-shadow(0 0 6px rgba(143,192,238,.25));
}

/* On small screens, stack text over icons */
@media (max-width: 576px){
  .contact-with-socials{
    flex-direction: column;
    align-items: stretch;
    gap: .85rem;
  }
  .contact-socials{ justify-content: flex-start; }
}

/* Hide the old bottom-right socials if the HTML still includes them */
.footer-bottom-row .footer-socials{ display: none !important; }

/* (Optional) tone down the red border inside the callout a bit */
.contact-callout{ box-shadow: 0 10px 28px rgba(0,0,0,.26), inset 0 0 0 1px rgba(228,46,91,.10); }

/* ===== Footer: Dark Blue Glass (matches header) ===== */
:root{
  /* optional footer overrides; falls back to nav if omitted */
  --footer-glass-bg: var(--nav-bg, rgba(15,15,22,0.55));
  --footer-glass-solid: var(--nav-bg-solid, rgba(15,15,22,0.98));
  --footer-hairline: var(--nav-border, rgba(143,192,238,0.18));
}

.footer-glass{
  background: var(--footer-glass-bg);
  border-top: 1px solid var(--footer-hairline);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 -8px 28px rgba(0,0,0,0.28) inset;
}

/* When the page background behind is very busy, you can “solidify” on scroll */
@media (min-width: 992px){
  .footer-glass.footer-solid{
    background: var(--footer-glass-solid);
    border-color: rgba(143,192,238,0.28);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
  }
}

/* Make inner elements look good on glass */
.footer-glass .footer-rule{ border-color: var(--footer-hairline); }
.footer-glass .sponsor-chip{
  background: rgba(30,38,52,0.75);
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.22);
}
.footer-glass .sponsor-chip:hover{
  background: rgba(35,41,59,0.85);
  box-shadow: 0 10px 24px rgba(0,0,0,.25),
              inset 0 0 0 1px rgba(143,192,238,.34);
}

/* Contact box: glassy, but slightly more opaque to “pop” */
.footer-glass .contact-callout{
  background:
    linear-gradient(rgba(30,38,52,0.92), rgba(30,38,52,0.92)) padding-box,
    linear-gradient(135deg, rgba(127,184,255,.42), rgba(228,46,91,.28)) border-box;
  border: 1px solid transparent;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.28),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

/* Social buttons inside the contact box */
.footer-glass .contact-socials .social-link{
  background: rgba(20,26,40,0.9);
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.22);
}
.footer-glass .contact-socials .social-link:hover{
  background: rgba(26,34,52,0.95);
  box-shadow: 0 8px 18px rgba(0,0,0,.32),
              inset 0 0 0 1px rgba(143,192,238,.38);
}

/* Footer sponsor chips: light-blue cards */
.footer-glass .sponsor-chip{
  background: #eaf4ff;                         /* light pastel blue */
  box-shadow: inset 0 0 0 1px rgba(140,190,255,.55);  /* blue hairline */
  border-radius: 12px;
  padding: .6rem .9rem;
  transition: transform .18s ease, box-shadow .22s ease, background .22s ease, filter .22s ease;
}

/* Keep the belt animation/pause as-is; just refine the hover */
.footer-glass .sponsor-chip:hover{
  background: #d9ecff;                         /* a touch deeper on hover */
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px rgba(0,0,0,.20),
    inset 0 0 0 1px rgba(110,170,255,.70);
}

/* Logo rendering on a light card: reduce grayscale a bit so it reads, full color on hover */
.footer-glass .sponsor-chip img{
  max-height:60px; max-width:160px; object-fit:contain;
  filter: grayscale(30%) opacity(.95);          /* softer than 100% so contrast stays good */
}
.footer-glass .sponsor-chip:hover img{
  filter: grayscale(0%) opacity(1);
}

/* Small-screen height stays tidy */
@media (max-width:576px){
  .footer-glass .sponsor-chip{ height:76px; }
  .footer-glass .sponsor-chip img{ max-height:54px; max-width:130px; }
}

/* Sleeker, narrower contact card */
.contact-card.glass{
  /* size */
  max-width: 560px;         /* cap width on desktop */
  margin-left: auto;        /* hug the right side of its column */
  padding: 14px 18px;       /* tighter padding */
  min-height: unset;        /* no forced tall height */

  /* look */
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(36,48,72,.82), rgba(36,48,72,.66));
  border: 1px solid rgba(143,192,238,.20);
  box-shadow: 0 10px 24px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.03);
}

/* compact header + icons */
.contact-card .card-top{ gap:.5rem; }
.contact-card h4{ font-size:1.35rem; margin:0; }

/* trim text spacing */
.contact-card .card-body{ margin-top:.5rem; }
.contact-card .card-body p{ margin-bottom:.4rem; }
.contact-card .card-body p:last-child{ margin-bottom:0; }

/* smaller icon pills so they don’t make the card feel bulky */
.contact-actions .social-link{
  width:36px; height:36px; border-radius:10px;
  background: rgba(20,26,40,.92);
}
.contact-actions .socials{ width:18px; height:18px; }

/* slightly narrower on huge screens, full width on phones */
@media (min-width: 1200px){ .contact-card.glass{ max-width: 520px; } }
@media (max-width: 576px){ .contact-card.glass{ max-width: 100%; margin-left: 0; } }

/* put the icons back in the top-right corner */
.contact-card.glass{ position: relative; padding-top: 18px; }  /* ensure a little headroom */

.contact-card .contact-actions{
  position: absolute;
  top: 12px;                /* tweak as you like (8–16px) */
  right: 14px;
  display: flex;
  gap: .5rem;
}

/* smaller, tighter pills look sleeker up there */
.contact-actions .social-link{ width: 34px; height: 34px; border-radius: 10px; }
.contact-actions .socials{ width: 18px; height: 18px; }

/* mobile: drop back under the heading so nothing overlaps */
@media (max-width: 576px){
  .contact-card .contact-actions{
    position: static;
    margin-top: .5rem;
    justify-content: flex-start;
  }
}
/* inline icon pills next to each label */
.icon-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;           /* space before the label text */
  border-radius: 8px;
  color: #bcd3f5;              /* for the SVG pin */
  background:#ffffff;
  box-shadow: inset 0 0 0 1px rgba(143,192,238,.25);
  vertical-align: -4px;        /* aligns pill with first text line nicely */
}
.icon-pill img{
  width: 18px; height: 18px; display: block;
}

/* tighten the paragraph spacing a touch */
.contact-card .card-body p{ margin-bottom: .5rem; }
.contact-card .card-body p:last-child{ margin-bottom: 0; }

/* Use your “card” look on native <li> */
.refs-list { counter-reset: ref; list-style: none; padding: 0; margin: 0; }
.refs-list > li {
  position: relative;
  padding: 10px 12px 10px 42px;
  border-radius: 10px;
  background: rgba(20,26,40,0.55);
  box-shadow: inset 0 0 0 1px rgba(143,192,238,0.18);
  transition: box-shadow .2s ease, background .2s ease, transform .12s ease;
}
.refs-list > li:hover {
  background: rgba(26,34,52,0.68);
  box-shadow: 0 6px 16px rgba(0,0,0,.25), inset 0 0 0 1px rgba(143,192,238,.34);
  transform: translateY(-1px);
}

/* big on-brand index bubble */
.refs-list > li::before{
  counter-increment: ref;
  content: counter(ref);
  position: absolute;
  left: 10px; top: 10px;
  width: 24px; height: 24px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
  color: #fff;
  background: #e42e5b;
  box-shadow: inset 0 0 0 1px rgba(228,46,91,.35);
}

/* links + meta */
.refs-list a{
  color: #8fc0ee;
  text-decoration: none;
  border-bottom: 1px dotted rgba(143,192,238,.75);
}
.refs-list a:hover{ border-bottom-style: solid; color: #fff; }
.refs-list .ref-meta{
  display:block; font-size:.85rem; color:#a7b1be; margin-top:4px; opacity:.95;
}

/* compact copy button (auto-injected by JS) */
.refs-list .ref-copy{
  position:absolute; right:10px; top:10px;
  font-size:.85rem;
  background: rgba(15,15,22,.85);
  border: 1px solid rgba(143,192,238,.28);
  border-radius: 8px;
  padding: 2px 8px;
  color: #cdd5df;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, box-shadow .2s ease, transform .1s ease;
}
.refs-list .ref-copy:hover{
  background: rgba(26,34,52,.95);
  box-shadow: 0 6px 12px rgba(0,0,0,.28), inset 0 0 0 1px rgba(143,192,238,.38);
  color: #fff;
}

.center-layout .text-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* horizontal center */
  justify-content: center; /* vertical center if parent has height */
  text-align: center; /* center the text */
}

/* Sleeker centered references */
.refs-inline{
  margin: 56px auto 0;
  max-width: clamp(680px, 70vw, 900px);  /* narrower than before */
  padding: 20px 28px;                    /* more inner spacing */
}


/* ===== Clean line spacing & rhythm (paste at END of style.css) ===== */
:root{
  --lh-body: 1.7;           /* base body line-height */
  --lh-head-1: 1.15;        /* h1 */
  --lh-head-2: 1.25;        /* h2 */
  --lh-head-3: 1.30;        /* h3 */
  --lh-head-4: 1.35;        /* h4–h6 */
}

/* Global body copy */
body { line-height: var(--lh-body); letter-spacing: .01em; }

/* Paragraphs (keeps things airy between blocks) */
p { line-height: var(--lh-body); margin: 0 0 1rem; }

/* Lists */
ul, ol { line-height: var(--lh-body); margin: 0 0 1rem 1.25rem; }
li { margin: .25rem 0; }
li > ul, li > ol { margin-top: .25rem; }

/* Headings — clearer rhythm without changing your sizes/colors */
h1 { line-height: var(--lh-head-1); margin-bottom: .6rem; }
h2 { line-height: var(--lh-head-2); margin-bottom: .5rem; }
h3 { line-height: var(--lh-head-3); margin-bottom: .45rem; }
h4, h5, h6 { line-height: var(--lh-head-4); margin-top: .8rem; margin-bottom: .4rem; }

/* Keep the big hero title snug so it doesn’t look floppy */
.hero-fullscreen h1 { line-height: 1.05; }

/* Callouts: ensure the copy breathes inside the boxes */
.bd-callout p { line-height: var(--lh-body); }

/* Tables & small text (optional, if you have them) */
small, .text-muted { line-height: 1.6; }

mjx-container[jax="CHTML"] {
  font-size: 1.05em;
  line-height: 1.6;
  margin: 0.6rem 0;
}

