/* ==========================================================================
   CatBonds.info — "Geological Luxe" Design System
   Aesthetic: Deep oceanic palette meets high-finance editorial.
   Bloomberg Terminal × National Geographic.
   ========================================================================== */

/* Google Fonts loaded in <head>: DM Serif Display + Outfit */

/* === RESET === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === DESIGN TOKENS === */
:root {
  /* Core palette — deep ocean + warm amber */
  --ink: #0b1120;
  --ink-soft: #141d30;
  --surface: #f7f5f0;
  --surface-raised: #ffffff;
  --surface-dim: #edeae3;
  --surface-muted: #e2dfd8;

  /* Brand accents */
  --teal: #0ea5a0;
  --teal-bright: #14d9d3;
  --teal-dim: #0a7c78;
  --amber: #e5a238;
  --amber-bright: #f5c044;
  --amber-dim: #c48a28;
  --coral: #e85d5d;

  /* Text */
  --text: #1a1f2e;
  --text-secondary: #5c6478;
  --text-muted: #8b93a5;
  --text-inverse: #f0eee8;
  --text-inverse-muted: rgba(240, 238, 232, 0.65);

  /* Borders & shadows */
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --shadow-sm: 0 1px 3px rgba(11, 17, 32, 0.06);
  --shadow-md: 0 4px 16px rgba(11, 17, 32, 0.08);
  --shadow-lg: 0 8px 32px rgba(11, 17, 32, 0.10);
  --shadow-xl: 0 16px 48px rgba(11, 17, 32, 0.14);
  --shadow-glow-teal: 0 0 30px rgba(14, 165, 160, 0.15);
  --shadow-glow-amber: 0 0 30px rgba(229, 162, 56, 0.12);

  /* Layout */
  --max-w: 1200px;
  --max-w-wide: 1400px;
  --max-w-narrow: 800px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-gap: clamp(2rem, 6vw, 5rem);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --speed-fast: 0.15s;
  --speed: 0.3s;
  --speed-slow: 0.6s;

  /* Type scale — fluid */
  --fs-xs: clamp(0.72rem, 0.68rem + 0.2vw, 0.8rem);
  --fs-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --fs-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --fs-md: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.4rem + 4vw, 3.8rem);
  --fs-hero: clamp(2.5rem, 1.5rem + 5vw, 5rem);
}

/* === DARK MODE === */
[data-theme="dark"] {
  --surface: #0b1120;
  --surface-raised: #141d30;
  --surface-dim: #0e1628;
  --surface-muted: #1a2540;
  --text: #e8e5de;
  --text-secondary: #9da5b8;
  --text-muted: #6b7590;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow-teal: 0 0 40px rgba(14, 165, 160, 0.2);
  --shadow-glow-amber: 0 0 40px rgba(229, 162, 56, 0.15);
}

/* === BASE === */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text);
  background: var(--surface);
  overflow-x: hidden;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

/* === TOPOGRAPHIC BACKGROUND TEXTURE === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg width='600' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M300 50c138 0 250 112 250 250S438 550 300 550 50 438 50 300 162 50 300 50z' fill='none' stroke='%230ea5a0' stroke-width='1'/%3E%3Cpath d='M300 100c110 0 200 90 200 200s-90 200-200 200-200-90-200-200 90-200 200-200z' fill='none' stroke='%230ea5a0' stroke-width='1'/%3E%3Cpath d='M300 150c83 0 150 67 150 150s-67 150-150 150-150-67-150-150 67-150 150-150z' fill='none' stroke='%230ea5a0' stroke-width='1'/%3E%3Cpath d='M300 200c55 0 100 45 100 100s-45 100-100 100-100-45-100-100 45-100 100-100z' fill='none' stroke='%230ea5a0' stroke-width='1'/%3E%3Cpath d='M300 250c28 0 50 22 50 50s-22 50-50 50-50-22-50-50 22-50 50-50z' fill='none' stroke='%230ea5a0' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 600px 600px;
}

[data-theme="dark"] body::before {
  opacity: 0.04;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--fs-3xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-2xl);
  letter-spacing: -0.01em;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--teal);
  border-radius: 2px;
  transition: width var(--speed-slow) var(--ease-out);
}

h2:hover::after {
  width: 72px;
}

h3 {
  font-size: var(--fs-xl);
  margin-top: 2rem;
  padding-left: 0;
}

/* Remove the gradient bar on h3 — use simple spacing instead */
h3::before {
  display: none;
}

h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: var(--fs-lg);
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--speed-fast) var(--ease);
}

a:hover {
  color: var(--teal-bright);
}

strong {
  color: var(--text);
  font-weight: 600;
}

small {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 1rem 1.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--teal);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  z-index: 10001;
  transition: width 0.08s linear;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
header {
  background: var(--ink);
  color: var(--text-inverse);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: visible;
}

.header-container {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  overflow: visible;
}

/* Logo */
.logo {
  flex-shrink: 0;
}

.logo-link {
  text-decoration: none;
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo-link:hover {
  color: var(--text-inverse);
}

.logo h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0;
  color: var(--text-inverse);
  letter-spacing: -0.02em;
  line-height: 1;
  background: none;
  -webkit-text-fill-color: unset;
  animation: none;
  background-size: unset;
}

.logo p {
  font-size: var(--fs-xs);
  margin: 0;
  color: var(--teal);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

/* === NAV === */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  overflow: visible;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-separator {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 0.5rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text-inverse-muted);
  text-decoration: none;
  font-weight: 400;
  font-size: var(--fs-sm);
  border-radius: var(--r-sm);
  transition: color var(--speed-fast) var(--ease), background var(--speed-fast) var(--ease);
  background: transparent;
  border: none;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--text-inverse);
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.active {
  color: var(--teal-bright);
}

/* Highlighted nav items (Perspectives, Industry News, etc.) */
.nav-link-highlight {
  color: var(--text-inverse-muted);
}

.nav-link-highlight.active {
  color: var(--teal-bright);
}

/* Dropdown */
.nav-item-dropdown {
  position: relative;
}

.nav-link-dropdown {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-inverse-muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-sm);
  transition: color var(--speed-fast) var(--ease), background var(--speed-fast) var(--ease);
  letter-spacing: 0.01em;
}

.nav-link-dropdown:hover {
  color: var(--text-inverse);
  background: rgba(255, 255, 255, 0.07);
}

.nav-link-dropdown.active {
  color: var(--teal-bright);
}

.nav-link-dropdown:focus {
  outline: 2px solid rgba(14, 165, 160, 0.5);
  outline-offset: 2px;
}

.dropdown-arrow {
  transition: transform var(--speed) var(--ease);
  margin-left: 0.15rem;
  flex-shrink: 0;
  opacity: 0.5;
}

.nav-item-dropdown.dropdown-open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 220px;
  background: var(--surface-raised);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--speed) var(--ease-out);
  z-index: 1001;
  border: 1px solid var(--border);
}

.nav-item-dropdown.dropdown-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  transition: background var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
}

.dropdown-link:hover {
  background: var(--surface-dim);
  color: var(--teal);
}

.dropdown-link.active {
  color: var(--teal);
  font-weight: 500;
}

/* Desktop dropdown overrides */
@media (min-width: 769px) {
  .nav-item-dropdown .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 0.5rem) !important;
    left: 0 !important;
    min-width: 220px !important;
    background: var(--surface-raised) !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--shadow-xl) !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
  }

  .nav-item-dropdown.dropdown-open .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  .nav-item-dropdown .dropdown-link {
    padding: 0.6rem 0.85rem !important;
    color: var(--text) !important;
    padding-left: 0.85rem !important;
  }

  .nav-item-dropdown .dropdown-link:hover {
    background: var(--surface-dim) !important;
    color: var(--teal) !important;
    padding-left: 0.85rem !important;
  }
}

/* Mobile menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  transition: background var(--speed-fast) var(--ease);
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-inverse);
  border-radius: 1px;
  transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .header-container {
    height: 60px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink-soft);
    padding: 0.75rem;
    box-shadow: var(--shadow-xl);
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    transition: max-height var(--speed) var(--ease-out),
                opacity var(--speed) var(--ease),
                transform var(--speed) var(--ease);
    transform: translateY(-8px);
  }

  .nav-list.mobile-open ~ .main-nav,
  .nav-list.mobile-open {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0.15rem;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link,
  .nav-link-dropdown {
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.85rem;
    font-size: var(--fs-sm);
    color: var(--text-inverse-muted);
  }

  .nav-separator {
    display: none;
  }

  .nav-link-highlight {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 500;
    border-radius: var(--r-sm);
  }

  .nav-item-dropdown {
    width: 100%;
  }

  .nav-link-dropdown {
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static !important;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 0;
    margin-left: 0.75rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--speed) var(--ease-out);
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--r-sm);
    padding: 0;
  }

  .nav-item-dropdown.dropdown-open .dropdown-menu {
    max-height: 500px;
    margin-top: 0.15rem;
    padding: 0.25rem;
  }

  .dropdown-link {
    padding-left: 1rem;
    font-size: var(--fs-sm);
    color: var(--text-inverse-muted) !important;
  }

  .dropdown-link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--teal-bright) !important;
  }

  .dropdown-link.active {
    border-left: 2px solid var(--teal);
    padding-left: calc(1rem - 2px);
    color: var(--teal-bright) !important;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.2rem;
  }

  .logo p {
    font-size: 0.65rem;
  }
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--gutter) var(--section-gap);
  background: transparent;
  min-height: calc(100vh - 200px);
  position: relative;
  z-index: 1;
}

main#main-content {
  background: transparent;
}

/* === SECTIONS === */
section {
  margin-bottom: var(--section-gap);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface-raised);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: revealUp var(--speed-slow) var(--ease-out) forwards;
  transition: box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}

/* Diagonal accent stripe on sections */
section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--teal), var(--amber));
  border-radius: 2px 0 0 2px;
}

section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.2s; }
section:nth-child(5) { animation-delay: 0.25s; }
section:nth-child(6) { animation-delay: 0.3s; }
section:nth-child(7) { animation-delay: 0.35s; }
section:nth-child(8) { animation-delay: 0.4s; }

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === LISTS === */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.6rem;
}

/* === HIGHLIGHT BOXES === */
.highlight-box {
  background: var(--surface-dim);
  border-left: 3px solid var(--teal);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.highlight-box::after {
  display: none;
}

.highlight-box:hover {
  transform: translateX(2px);
  border-left-color: var(--amber);
  box-shadow: var(--shadow-sm);
}

.highlight-box h3,
.highlight-box h4 {
  margin-top: 0;
  color: var(--text);
  font-family: 'DM Serif Display', Georgia, serif;
}

.highlight-box h3::before,
.highlight-box h4::before {
  display: none;
}

.highlight-box h4 {
  font-size: var(--fs-md);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* === HERO SECTION === */
.hero-section {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  margin-bottom: var(--section-gap);
  background: var(--ink);
  color: var(--text-inverse);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
  border: none;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 160, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 162, 56, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section h1,
.hero-section h2 {
  font-size: var(--fs-hero);
  margin-bottom: 1.5rem;
  color: var(--text-inverse);
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.hero-section h1::after,
.hero-section h2::after {
  display: none;
}

.lead {
  font-size: var(--fs-lg);
  color: var(--text-inverse-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* === OVERVIEW SECTION === */
.overview-section {
  margin-bottom: var(--section-gap);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.overview-card {
  background: var(--surface-raised);
  padding: 1.75rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  transition: all var(--speed) var(--ease);
  position: relative;
  overflow: hidden;
}

.overview-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) var(--ease-out);
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.overview-card:hover::after {
  transform: scaleX(1);
}

.overview-card h3 {
  margin-top: 0;
  color: var(--text);
  font-size: var(--fs-lg);
}

.overview-card h3::before {
  display: none;
}

.overview-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  color: var(--teal);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color var(--speed-fast) var(--ease), gap var(--speed-fast) var(--ease);
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-link:hover {
  color: var(--teal-bright);
  gap: 0.6rem;
}

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--ink);
  color: var(--text-inverse);
  padding: 2rem;
  border-radius: var(--r-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(14, 165, 160, 0.2);
  transition: all var(--speed) var(--ease);
  cursor: default;
}

.stat-card::before {
  display: none;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(14, 165, 160, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-teal);
  border-color: var(--teal);
}

.stat-card h3 {
  color: var(--teal-bright);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: var(--fs-3xl);
  margin-bottom: 0.35rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.stat-card h3::before,
.stat-card h3::after {
  display: none;
}

.stat-card p {
  color: var(--text-inverse-muted);
  margin-bottom: 0;
  font-weight: 400;
  font-size: var(--fs-sm);
  position: relative;
  z-index: 1;
}

/* === TABLE === */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--surface-raised);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

table::before {
  display: none;
}

thead {
  background: var(--ink);
  color: var(--text-inverse);
}

@keyframes table-header-gradient {
  /* Remove animated gradient — static dark header */
}

th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-inverse-muted);
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
  font-size: var(--fs-sm);
}

td small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

tbody tr {
  transition: background var(--speed-fast) var(--ease);
}

tbody tr:hover {
  background: var(--surface-dim);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* === RISK BADGES === */
.risk-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  margin: 0.2rem;
  letter-spacing: 0.02em;
}

.risk-badge::before {
  display: none;
}

.risk-high {
  background: rgba(232, 93, 93, 0.12);
  color: var(--coral);
  border: 1px solid rgba(232, 93, 93, 0.25);
}

.risk-medium {
  background: rgba(229, 162, 56, 0.12);
  color: var(--amber);
  border: 1px solid rgba(229, 162, 56, 0.25);
}

.risk-low {
  background: rgba(14, 165, 160, 0.12);
  color: var(--teal);
  border: 1px solid rgba(14, 165, 160, 0.25);
}

/* === SECTION NAVIGATION === */
.section-navigation {
  margin-top: var(--section-gap);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: right;
}

.nav-next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: var(--text-inverse);
  text-decoration: none;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: all var(--speed) var(--ease);
  border: 1px solid rgba(14, 165, 160, 0.2);
  letter-spacing: 0.01em;
}

.nav-next::before {
  display: none;
}

.nav-next:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-glow-teal);
  border-color: var(--teal);
  color: var(--text-inverse);
  text-decoration: none;
}

[data-theme="dark"] .nav-next {
  background: var(--surface-raised);
}

@media (max-width: 768px) {
  .section-navigation {
    text-align: center;
  }

  .nav-next {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: var(--ink);
  color: var(--text-inverse);
  padding: var(--section-gap) var(--gutter) 2rem;
  margin-top: var(--section-gap);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] footer {
  background: var(--ink-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.3;
}

footer p {
  color: var(--text-inverse-muted);
  margin-bottom: 0.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto 2.5rem;
  text-align: left;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section h3 {
  color: var(--text-inverse);
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-section h3::before {
  display: none;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-inverse-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: color var(--speed-fast) var(--ease);
}

.footer-links a:hover {
  color: var(--teal-bright);
  text-decoration: none;
  transform: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  margin-bottom: 0.35rem;
  font-size: var(--fs-xs);
}

.footer-disclaimer {
  font-size: var(--fs-xs);
  color: rgba(240, 238, 232, 0.4);
  line-height: 1.6;
  max-width: 650px;
  margin: 0.5rem auto 0;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--ink);
  color: var(--teal-bright);
  border: 1px solid rgba(14, 165, 160, 0.3);
  padding: 0.5rem 0.85rem;
  border-radius: 100px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-xs);
  font-family: 'Outfit', sans-serif;
  box-shadow: var(--shadow-lg);
  transition: all var(--speed) var(--ease);
  z-index: 999;
  display: none;
}

.back-to-top::before {
  display: none;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-teal);
  border-color: var(--teal);
}

.back-to-top.visible {
  display: block;
  animation: fadeIn var(--speed) var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    padding: 0.4rem 0.7rem;
  }
}

/* ==========================================================================
   LEGAL / INFO PAGES
   ========================================================================== */
.legal-page {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 2.5rem);
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
}

.content-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 2.5rem);
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
}

.legal-page h1 {
  font-size: var(--fs-3xl);
  margin-bottom: 1rem;
  color: var(--text);
  border-bottom: 2px solid var(--teal);
  padding-bottom: 0.75rem;
  background: none;
  -webkit-text-fill-color: unset;
  animation: none;
  background-size: unset;
}

.legal-page .last-updated {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2rem;
  font-size: var(--fs-sm);
}

.legal-page h2 {
  font-size: var(--fs-xl);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.legal-page h3 {
  font-size: var(--fs-lg);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.legal-page p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.legal-page ul,
.legal-page ol {
  margin: 1rem 0;
  padding-left: 2rem;
  line-height: 1.8;
}

.legal-page li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.legal-page a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover {
  color: var(--teal-bright);
}

.legal-page strong {
  color: var(--text);
  font-weight: 600;
}

.contact-info {
  background: var(--surface-dim);
  padding: 1.5rem;
  border-radius: var(--r-md);
  margin: 1.5rem 0;
  border-left: 3px solid var(--teal);
}

.contact-info h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

@media (max-width: 768px) {
  .legal-page {
    padding: 1rem 1rem;
  }

  .legal-page h1 {
    font-size: var(--fs-2xl);
  }

  .legal-page h2 {
    font-size: var(--fs-lg);
  }
}

/* ==========================================================================
   HTMX LOADING
   ========================================================================== */
.htmx-indicator {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  background: var(--surface-raised);
  backdrop-filter: blur(12px);
  padding: 1.5rem 2rem;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.htmx-request .htmx-indicator,
.htmx-swapping .htmx-indicator {
  display: block;
  animation: fadeIn var(--speed) var(--ease-out);
}

.loading-spinner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--teal);
  font-size: var(--fs-sm);
}

.loading-spinner::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* HTMX swap stability */
#main-content {
  min-height: 200px;
  position: relative;
}

#main-content,
#main-content.htmx-swapping,
#main-content.htmx-swapped,
#main-content.htmx-added,
.htmx-swapping #main-content,
.htmx-swapped #main-content {
  opacity: 1 !important;
  transform: none !important;
  display: block !important;
  visibility: visible !important;
  transition: none !important;
}

/* ==========================================================================
   TOOLTIP / MODAL
   ========================================================================== */
.tooltip-trigger {
  cursor: pointer;
  color: var(--teal);
  border-bottom: 1px dashed var(--teal);
  transition: color var(--speed-fast) var(--ease), border-color var(--speed-fast) var(--ease);
  font-weight: 500;
  user-select: none;
}

.tooltip-trigger:hover {
  color: var(--teal-bright);
  border-bottom-color: var(--teal-bright);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--speed) var(--ease), visibility var(--speed) var(--ease);
  padding: 1rem;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 17, 32, 0.7);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--surface-raised);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--speed) var(--ease-out);
  z-index: 2001;
  border: 1px solid var(--border);
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--surface-dim);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
  z-index: 2002;
}

.modal-close:hover {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

.modal-body {
  padding: 2rem 1.75rem;
}

.modal-body h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text);
  font-size: var(--fs-xl);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--teal);
}

.modal-body h3::before {
  display: none;
}

.modal-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .modal-content {
    max-width: 100%;
  }

  .modal-body {
    padding: 1.5rem 1.25rem;
  }

  .modal-body h3 {
    font-size: var(--fs-lg);
  }
}

/* ==========================================================================
   BLOG
   ========================================================================== */
section.blog-listing {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border: none;
  opacity: 1;
  animation: none;
}

section.blog-listing::before {
  display: none;
}

section.blog-listing:hover {
  box-shadow: none;
  transform: none;
}

.blog-header {
  text-align: center;
  margin-top: calc(-1 * clamp(1.5rem, 4vw, 2.5rem));
  margin-left: calc(-1 * clamp(1.5rem, 4vw, 2.5rem));
  margin-right: calc(-1 * clamp(1.5rem, 4vw, 2.5rem));
  margin-bottom: 2rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--ink);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-bottom: 1px solid rgba(14, 165, 160, 0.2);
}

.blog-header h1 {
  font-size: var(--fs-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
  margin-bottom: 0.75rem;
  background: none;
  -webkit-text-fill-color: unset;
  animation: none;
  background-size: unset;
  position: relative;
  display: inline-block;
}

.blog-header h1::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--teal-bright);
  border-radius: 2px;
}

.blog-subtitle {
  font-size: var(--fs-md);
  color: var(--text-inverse-muted);
  margin-bottom: 1rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 400;
}

.blog-filter-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  margin: 0.5rem 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.blog-filter-badge .filter-label {
  color: var(--text-inverse-muted);
  margin-right: 0.35rem;
  font-weight: 400;
}

.blog-filter-badge strong {
  color: var(--text-inverse);
  font-weight: 600;
}

/* Blog grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}

@media (min-width: 1200px) {
  .blog-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog card */
.blog-card {
  background: #ffffff;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--speed) var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  position: relative;
  opacity: 0;
  animation: revealUp var(--speed-slow) var(--ease-out) forwards;
}

[data-theme="dark"] .blog-card {
  background: var(--surface-raised);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-card:nth-child(6) { animation-delay: 0.3s; }

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) var(--ease-out);
}

.blog-card:hover::before {
  transform: scaleX(1);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 160, 0.2);
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
}

[data-theme="dark"] .blog-card-image-wrapper {
  background: linear-gradient(135deg, #1a2540 0%, #0e1628 100%);
}

@media (min-width: 768px) {
  .blog-card-image-wrapper {
    height: 240px;
  }
}

.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--speed-slow) var(--ease);
}

.blog-card:hover .blog-card-image {
  transform: scale(1.05);
}

.blog-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.blog-card-category-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--surface-raised);
  color: var(--teal);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  transition: all var(--speed-fast) var(--ease);
}

[data-theme="dark"] .blog-card-category-badge {
  background: var(--ink-soft);
  color: var(--teal-bright);
}

.blog-card:hover .blog-card-category-badge {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.blog-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  box-shadow: none !important;
  background: #ffffff;
}

[data-theme="dark"] .blog-card-content {
  background: var(--surface-raised);
}

.blog-card-header {
  margin-bottom: 0.75rem;
  box-shadow: none !important;
  background: #ffffff;
}

[data-theme="dark"] .blog-card-header {
  background: var(--surface-raised);
}

.blog-card-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  margin-top: 0 !important;
  padding: 0;
  color: #1a1f2e !important;
  transition: color var(--speed-fast) var(--ease);
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  -webkit-text-fill-color: #1a1f2e !important;
  animation: none !important;
  box-shadow: none !important;
}

.blog-card-header *,
.blog-card-content * {
  box-shadow: none !important;
}

[data-theme="dark"] .blog-card-title {
  background: transparent !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.blog-card-title::after {
  display: none !important;
}

.blog-card:hover .blog-card-title {
  color: var(--teal);
  background: transparent !important;
  border: none !important;
}

[data-theme="dark"] .blog-card:hover .blog-card-title {
  color: var(--teal-bright);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.blog-card-meta time {
  font-weight: 500;
  color: var(--text-secondary);
}

.blog-card-date {
  font-weight: 500;
}

.blog-card-author {
  position: relative;
  padding-left: 0.75rem;
}

.blog-card-author::before {
  content: '\00B7';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.blog-card-reading-time {
  position: relative;
  padding-left: 0.75rem;
  font-style: italic;
  color: var(--text-muted);
}

.blog-card-reading-time::before {
  content: '\00B7';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-sm);
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.blog-card-tag {
  background: var(--surface-dim);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--speed-fast) var(--ease);
}

.blog-card:hover .blog-card-tag {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.blog-card-tag-more {
  background: var(--surface-dim);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 500;
  border: 1px solid var(--border);
}

.blog-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.blog-card-read-more {
  color: var(--teal);
  font-weight: 600;
  font-size: var(--fs-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all var(--speed-fast) var(--ease);
}

.blog-card:hover .blog-card-read-more {
  color: var(--teal-bright);
  gap: 0.6rem;
}

.blog-card-read-more .arrow {
  transition: transform var(--speed-fast) var(--ease);
  font-size: 1rem;
  line-height: 1;
}

.blog-card:hover .blog-card-read-more .arrow {
  transform: translateX(4px);
}

/* Blog post detail */
.blog-post {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 2rem 0;
  background: transparent;
}

.post-header {
  position: static;
  z-index: auto;
  color: var(--text);
  margin-bottom: 2rem;
  padding: 1.75rem;
  border-bottom: none;
  background: var(--surface-raised);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

[data-theme="dark"] .post-header {
  background: var(--surface-raised);
}

.blog-post .post-title,
.post-header .post-title,
h1.post-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: var(--fs-3xl);
  margin-bottom: 1rem;
  padding: 0;
  color: var(--text) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--text) !important;
  background-clip: unset !important;
  background-size: unset !important;
  animation: none !important;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: 0.75rem;
}

.post-author {
  font-weight: 500;
}

.post-category {
  background: var(--teal);
  color: white;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.post-reading-time {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-style: italic;
}

.post-reading-time::before {
  content: "• ";
  margin-right: 0.25rem;
  color: var(--text-muted);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.post-tags .tag {
  background: var(--surface-dim);
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  text-decoration: none;
  transition: all var(--speed-fast) var(--ease);
  border: 1px solid var(--border);
}

.post-tags .tag:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.post-content {
  line-height: 1.8;
  color: var(--text);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--text) !important;
  background-clip: unset !important;
  animation: none !important;
}

.post-content h2::after {
  display: none;
}

.post-content h3::before {
  display: none;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: var(--teal-bright);
}

/* Post footer & share button */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--surface-dim);
  display: flex;
  justify-content: center;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
}

.share-button:hover {
  background: var(--teal-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-button:active {
  transform: translateY(0);
}

.share-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.share-button svg {
  width: 18px;
  height: 18px;
}

/* No posts */
.no-posts {
  text-align: center;
  padding: 4rem 1rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-posts-content {
  max-width: 400px;
  margin: 0 auto;
}

.no-posts-icon {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  opacity: 0.3;
  width: 64px;
  height: 64px;
  margin-left: auto;
  margin-right: auto;
}

.no-posts h2 {
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: var(--fs-xl);
}

.no-posts p {
  color: var(--text-secondary);
  font-size: var(--fs-base);
}

/* Responsive blog */
@media (max-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-card-image-wrapper {
    height: 180px;
  }

  .blog-card-content {
    padding: 1.25rem;
  }

  .blog-card-title {
    font-size: var(--fs-md);
  }

  .blog-header {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .blog-card-image-wrapper {
    height: 160px;
  }

  .blog-card-excerpt {
    -webkit-line-clamp: 2;
    font-size: var(--fs-xs);
  }
}

/* ==========================================================================
   NEWS
   ========================================================================== */
section.news-listing {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border: none;
  opacity: 1;
  animation: none;
}

section.news-listing::before {
  display: none;
}

section.news-listing:hover {
  box-shadow: none;
  transform: none;
}

.news-header {
  text-align: center;
  margin-top: calc(-1 * clamp(1.5rem, 4vw, 2.5rem));
  margin-left: calc(-1 * clamp(1.5rem, 4vw, 2.5rem));
  margin-right: calc(-1 * clamp(1.5rem, 4vw, 2.5rem));
  margin-bottom: 2rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--ink);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-bottom: 1px solid rgba(14, 165, 160, 0.2);
}

.news-header h1 {
  font-size: var(--fs-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-inverse);
  position: relative;
  display: inline-block;
  background: none;
  -webkit-text-fill-color: unset;
  animation: none;
  background-size: unset;
}

.news-header h1::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--teal-bright);
  border-radius: 2px;
}

.news-subtitle {
  font-size: var(--fs-md);
  color: var(--text-inverse-muted);
  margin-bottom: 1rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 400;
}

.news-filter-badge {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--text-inverse-muted);
  margin-top: 0.75rem;
  padding: 0.35rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.1);
}

.news-filter-badge strong {
  color: var(--text-inverse);
}

/* News filter section (categories and tags) */
.news-filters {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--surface-raised);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.news-filter-section {
  margin-bottom: 1.5rem;
}

.news-filter-section:last-child {
  margin-bottom: 0;
}

.filter-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal-bright);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: var(--teal);
  border-color: var(--teal-bright);
  color: white;
  font-weight: 600;
}

.filter-chip.active:hover {
  background: var(--teal-bright);
  transform: translateY(0);
}

.news-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.news-card {
  background: var(--surface-raised);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--speed) var(--ease);
  border: 1px solid var(--border);
  position: relative;
  padding: 1.5rem;
  opacity: 0;
  animation: revealUp var(--speed-slow) var(--ease-out) forwards;
}

[data-theme="dark"] .news-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.news-card:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2) { animation-delay: 0.1s; }
.news-card:nth-child(3) { animation-delay: 0.15s; }
.news-card:nth-child(4) { animation-delay: 0.2s; }
.news-card:nth-child(5) { animation-delay: 0.25s; }
.news-card:nth-child(6) { animation-delay: 0.3s; }

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--teal), var(--amber));
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
}

.news-card:hover::before {
  opacity: 1;
}

.news-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(14, 165, 160, 0.15);
}

.news-card-header {
  margin-bottom: 0.75rem;
  background: transparent !important;
  box-shadow: none !important;
}

.news-card-header * {
  box-shadow: none !important;
}

.news-card-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  margin-top: 0 !important;
  color: var(--text);
  background: transparent !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--text) !important;
  background-clip: unset !important;
  animation: none !important;
  position: static !important;
  display: block !important;
  padding-bottom: 0 !important;
  box-shadow: none !important;
}

[data-theme="dark"] .news-card-title {
  background: transparent !important;
}

.news-card-title::after,
.news-card-title::before {
  display: none !important;
}

.news-card-title a {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--speed-fast) var(--ease);
}

.news-card-title a:hover {
  color: var(--teal);
}

.external-link-icon {
  font-size: var(--fs-sm);
  opacity: 0.4;
  transition: opacity var(--speed-fast) var(--ease), transform var(--speed-fast) var(--ease);
}

.news-card-title a:hover .external-link-icon {
  opacity: 0.8;
  transform: translate(1px, -1px);
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.news-card-meta time {
  font-weight: 500;
  color: var(--text-secondary);
}

.news-source {
  position: relative;
  padding-left: 0.75rem;
}

.news-source::before {
  content: '\00B7';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.news-category {
  background: var(--surface-dim);
  color: var(--text-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  transition: all var(--speed-fast) var(--ease);
}

.news-card:hover .news-category {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.news-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  font-size: var(--fs-sm);
}

.news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.news-card-tags .tag {
  background: var(--surface-dim);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 500;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--speed-fast) var(--ease);
}

.news-card-tags .tag:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
  text-decoration: none;
}

.no-news {
  text-align: center;
  padding: 4rem 1rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-news p {
  color: var(--text-secondary);
  font-size: var(--fs-base);
}

.news-link {
  color: var(--teal);
  text-decoration: none;
}

.news-link:hover {
  color: var(--teal-bright);
}

@media (max-width: 768px) {
  .news-card {
    padding: 1.25rem;
  }

  .news-card-title {
    font-size: var(--fs-md);
  }
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.pagination-info {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--speed-fast) var(--ease);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-btn:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pagination-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-number {
  min-width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--speed-fast) var(--ease);
  cursor: pointer;
}

.pagination-number:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pagination-number:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.pagination-number.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
  font-weight: 600;
  cursor: default;
}

.pagination-ellipsis {
  color: var(--text-secondary);
  padding: 0 0.25rem;
  font-weight: 500;
}

[data-theme="dark"] .pagination-btn,
[data-theme="dark"] .pagination-number {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Load More Button (Alternative to Pagination) */
.pagination-alternative {
  margin-top: 1.5rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.pagination-alternative p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-style: italic;
}

.load-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.load-more-btn {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  color: white;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(13, 193, 184, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 193, 184, 0.3);
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
}

.load-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(13, 193, 184, 0.2);
}

.load-more-btn:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.load-more-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.load-more-count {
  font-size: var(--fs-sm);
  font-weight: 400;
  opacity: 0.9;
}

/* Loading state for load more button */
.load-more-btn.htmx-request {
  opacity: 0.7;
  pointer-events: none;
}

.load-more-btn.htmx-request::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

[data-theme="dark"] .pagination-alternative {
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .load-more-btn {
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
  box-shadow: 0 2px 8px rgba(29, 193, 184, 0.3);
}

[data-theme="dark"] .load-more-btn:hover {
  box-shadow: 0 4px 12px rgba(29, 193, 184, 0.4);
}

@media (max-width: 768px) {
  .load-more-btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--fs-sm);
  }

  .load-more-count {
    font-size: var(--fs-xs);
  }

  .pagination-alternative {
    margin-top: 1rem;
    padding-top: 1rem;
  }

  .pagination {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .pagination-controls {
    gap: 0.35rem;
  }

  .pagination-btn {
    padding: 0.45rem 0.85rem;
    font-size: var(--fs-xs);
  }

  .pagination-number {
    min-width: 2rem;
    height: 2rem;
    font-size: var(--fs-xs);
  }

  .pagination-info {
    font-size: var(--fs-xs);
  }
}

/* ==========================================================================
   GLOSSARY
   ========================================================================== */
.glossary-intro {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--surface-dim);
  border-left: 3px solid var(--teal);
  border-radius: var(--r-md);
}

.glossary-intro p {
  margin: 0;
  color: var(--text-secondary);
}

.glossary-section {
  margin-bottom: 3rem;
}

.glossary-letter {
  font-size: var(--fs-3xl);
  color: var(--teal);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal);
  font-family: 'DM Serif Display', Georgia, serif;
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.glossary-term {
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  transition: border-color var(--speed-fast) var(--ease);
}

.glossary-term:hover {
  border-left-color: var(--teal);
}

.glossary-term dt {
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.glossary-term dd {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.glossary-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.glossary-footer p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

@media (max-width: 768px) {
  .glossary-letter {
    font-size: var(--fs-2xl);
  }

  .glossary-term dt {
    font-size: var(--fs-base);
  }
}

/* ==========================================================================
   DARK MODE TOGGLE
   ========================================================================== */
.dark-mode-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  color: var(--text-inverse);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dark-mode-icon,
.dark-mode-icon-moon {
  position: absolute;
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
  width: 18px;
  height: 18px;
}

.dark-mode-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.dark-mode-icon-moon {
  opacity: 0;
  transform: rotate(90deg);
}

.dark-mode-toggle.active .dark-mode-icon {
  opacity: 0;
  transform: rotate(90deg);
}

.dark-mode-toggle.active .dark-mode-icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  section {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: var(--fs-sm);
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  th, td {
    padding: 0.75rem;
    white-space: nowrap;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-card h3 {
    font-size: var(--fs-2xl);
  }

  h2::after {
    width: 36px;
  }

  .hero-section {
    padding: 2.5rem var(--gutter);
  }
}

/* ==========================================================================
   PRINT STYLESHEET
   Optimized for blog posts, educational content, and long-form pages
   ========================================================================== */
@media print {
  /* Reset colors for print */
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Hide non-content elements */
  header,
  nav,
  .nav-list,
  .hamburger,
  footer,
  .share-button,
  .post-footer,
  #back-to-top,
  #loading,
  .blog-card-footer,
  .skip-link,
  .cta,
  button:not(.print-only) {
    display: none !important;
  }

  /* Body and page setup */
  body {
    margin: 0;
    padding: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 12pt;
    line-height: 1.6;
  }

  body::before {
    display: none !important;
  }

  /* Main content */
  main,
  #main-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  section {
    page-break-inside: avoid;
    box-shadow: none;
    border: none;
    background: white !important;
    padding: 1rem 0;
    margin: 0;
  }

  /* Typography */
  h1 {
    font-size: 24pt;
    margin-top: 0;
    margin-bottom: 12pt;
    page-break-after: avoid;
    border-bottom: 2pt solid black;
    padding-bottom: 6pt;
  }

  h2 {
    font-size: 18pt;
    margin-top: 18pt;
    margin-bottom: 10pt;
    page-break-after: avoid;
  }

  h3 {
    font-size: 14pt;
    margin-top: 14pt;
    margin-bottom: 8pt;
    page-break-after: avoid;
  }

  h4, h5, h6 {
    font-size: 12pt;
    margin-top: 12pt;
    margin-bottom: 6pt;
    page-break-after: avoid;
  }

  p {
    margin-bottom: 10pt;
    orphans: 3;
    widows: 3;
  }

  /* Blog post header */
  .post-header {
    margin-bottom: 1.5rem;
    page-break-after: avoid;
  }

  .post-title {
    font-size: 24pt;
    margin-bottom: 8pt;
  }

  .post-meta {
    font-size: 10pt;
    color: #666 !important;
    margin-bottom: 12pt;
    padding-bottom: 8pt;
    border-bottom: 1pt solid #ccc !important;
  }

  .post-meta > * {
    display: inline;
    margin-right: 1rem;
  }

  .post-meta::before {
    content: "Published: ";
    font-weight: bold;
  }

  /* Blog content */
  .post-content,
  .blog-post {
    font-size: 11pt;
    line-height: 1.7;
  }

  /* Lists */
  ul, ol {
    margin-left: 20pt;
    margin-bottom: 10pt;
  }

  li {
    margin-bottom: 4pt;
  }

  /* Links */
  a {
    color: black !important;
    text-decoration: underline;
  }

  /* Print URLs after links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666 !important;
    word-break: break-all;
  }

  /* Don't print URLs for internal navigation links */
  a[hx-boost]::after,
  .nav-link::after,
  .blog-card-link::after {
    content: "" !important;
  }

  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }

  picture {
    page-break-inside: avoid;
  }

  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 12pt;
    font-size: 10pt;
    page-break-inside: avoid;
  }

  th, td {
    border: 1pt solid #333 !important;
    padding: 6pt;
    text-align: left;
  }

  th {
    background: #f0f0f0 !important;
    font-weight: bold;
  }

  /* Code blocks */
  code, pre {
    font-family: 'Courier New', monospace;
    font-size: 9pt;
    background: #f5f5f5 !important;
    border: 1pt solid #ddd !important;
    page-break-inside: avoid;
  }

  pre {
    padding: 8pt;
    margin-bottom: 10pt;
    overflow-x: visible;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  code {
    padding: 2pt 4pt;
  }

  /* Blockquotes */
  blockquote {
    margin: 12pt 20pt;
    padding-left: 12pt;
    border-left: 3pt solid #333 !important;
    font-style: italic;
    page-break-inside: avoid;
  }

  /* Stats and cards */
  .stat-card,
  .overview-card {
    border: 1pt solid #ddd !important;
    padding: 10pt;
    margin-bottom: 10pt;
    page-break-inside: avoid;
  }

  /* Page breaks */
  .page-break-before {
    page-break-before: always;
  }

  .page-break-after {
    page-break-after: always;
  }

  /* Footer info */
  .print-footer {
    display: block !important;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1pt solid #ccc !important;
    font-size: 9pt;
    color: #666 !important;
  }

  /* Add print footer to pages */
  body::after {
    content: "Printed from CatBonds.info";
    display: block;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1pt solid #ccc;
    font-size: 9pt;
    color: #666;
    text-align: center;
  }

  /* Section Pages Specific Styles */
  .section-page {
    padding: 0;
  }

  .section-header {
    page-break-after: avoid;
    margin-bottom: 1.5rem;
  }

  .section-title {
    font-size: 24pt;
    margin-bottom: 8pt;
  }

  .section-subtitle {
    font-size: 11pt;
    color: #666 !important;
    margin-bottom: 12pt;
  }

  .last-updated {
    font-size: 9pt;
    color: #999 !important;
    font-style: italic;
  }

  /* Feature boxes and content boxes */
  .features-grid,
  .content-grid {
    display: block;
  }

  .feature-box,
  .content-box {
    border: 1pt solid #ddd !important;
    padding: 12pt;
    margin-bottom: 12pt;
    page-break-inside: avoid;
    background: white !important;
  }

  .feature-box h3,
  .content-box h3 {
    font-size: 13pt;
    margin-top: 0;
    margin-bottom: 8pt;
    border-bottom: 1pt solid #ccc !important;
    padding-bottom: 4pt;
  }

  .feature-box p,
  .content-box p {
    font-size: 10pt;
    line-height: 1.6;
  }

  /* Market overview cards */
  .overview-grid {
    display: block;
  }

  .overview-card {
    margin-bottom: 10pt;
  }

  .overview-card h3 {
    font-size: 12pt;
    margin-bottom: 6pt;
  }

  .card-value {
    font-size: 16pt;
    font-weight: bold;
    margin-bottom: 4pt;
  }

  .card-label {
    font-size: 9pt;
    color: #666 !important;
  }

  /* Stats and data displays */
  .stat-value {
    font-size: 14pt;
    font-weight: bold;
  }

  .stat-label {
    font-size: 9pt;
    color: #666 !important;
  }

  /* Charts - hide canvas, show data tables if available */
  canvas {
    display: none !important;
  }

  .chart-container {
    page-break-inside: avoid;
  }

  .chart-data-table {
    display: table !important;
    width: 100%;
    margin-top: 10pt;
  }

  /* Section content */
  .section-content {
    font-size: 11pt;
    line-height: 1.7;
  }

  .section-content > * {
    margin-bottom: 10pt;
  }

  /* Timeline and list items */
  .timeline-item,
  .history-item {
    margin-bottom: 12pt;
    padding-left: 12pt;
    border-left: 2pt solid #ddd !important;
    page-break-inside: avoid;
  }

  .timeline-year,
  .history-year {
    font-weight: bold;
    font-size: 11pt;
    margin-bottom: 4pt;
  }

  /* Glossary terms */
  .glossary-term {
    margin-bottom: 12pt;
    page-break-inside: avoid;
  }

  .glossary-term dt {
    font-weight: bold;
    font-size: 11pt;
    margin-bottom: 4pt;
  }

  .glossary-term dd {
    margin-left: 12pt;
    font-size: 10pt;
  }

  /* Key insights/highlights */
  .key-insight,
  .highlight-box {
    border: 2pt solid #333 !important;
    padding: 10pt;
    margin: 12pt 0;
    page-break-inside: avoid;
  }

  .key-insight h4,
  .highlight-box h4 {
    margin-top: 0;
    font-size: 12pt;
  }

  /* Data tables specific to sections */
  .data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12pt 0;
    font-size: 9pt;
  }

  .data-table th {
    background: #e0e0e0 !important;
    font-weight: bold;
    text-align: left;
  }

  .data-table td {
    border: 1pt solid #ccc !important;
  }

  /* Hide interactive elements */
  .load-more-btn,
  .pagination,
  .pagination-alternative,
  .filter-chip,
  .news-filters,
  .search-box,
  .dark-mode-toggle,
  .share-button {
    display: none !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY — sr-only
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.nav-link:focus-visible,
.dropdown-link:focus-visible {
  outline: 2px solid rgba(14, 165, 160, 0.7);
  outline-offset: 2px;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   SECTION FRAGMENT (for HTMX-loaded sections)
   ========================================================================== */
.section-fragment {
  opacity: 0;
  animation: revealUp var(--speed-slow) var(--ease-out) forwards;
}

.section-fragment h1 {
  font-size: var(--fs-2xl);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* ==========================================================================
   IMAGE PLACEHOLDERS
   Styled containers marking where real photos should be added.
   Replace the .placeholder-image elements with <img> tags.
   ========================================================================== */

/* --- Generic placeholder block --- */
.placeholder-image {
  position: relative;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 60%, rgba(14, 165, 160, 0.15) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-inverse-muted);
  border: 1px dashed rgba(14, 165, 160, 0.3);
}

.placeholder-image--landscape {
  aspect-ratio: 16 / 7;
}

.placeholder-image--wide {
  aspect-ratio: 21 / 9;
}

.placeholder-image--square {
  aspect-ratio: 1 / 1;
}

.placeholder-image--banner {
  aspect-ratio: 3 / 1;
}

.placeholder-image__icon {
  width: 56px;
  height: 56px;
  opacity: 0.5;
}

.placeholder-image__label {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

.placeholder-image__hint {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-xs);
  font-weight: 400;
  opacity: 0.45;
  text-align: center;
  max-width: 320px;
  line-height: 1.4;
  font-style: italic;
}

/* --- Hero split layout with image --- */
.hero-section--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  text-align: left;
  align-items: center;
}

.hero-section--split .hero-text {
  position: relative;
  z-index: 1;
}

.hero-section--split .hero-image {
  position: relative;
  z-index: 1;
}

.hero-section--split .hero-image .placeholder-image {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  border-color: rgba(14, 165, 160, 0.25);
}

.hero-section--split .hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  display: block;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-section--split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-section--split .hero-image .placeholder-image {
    aspect-ratio: 16 / 9;
  }

  .hero-section--split .lead {
    margin: 0 auto;
  }
}

/* --- Section hero image (banner at top of section pages) --- */
.section-hero-image {
  margin-bottom: 2rem;
}

.section-hero-image .placeholder-image {
  aspect-ratio: 21 / 9;
}

.section-hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  display: block;
  object-fit: cover;
}

@media (max-width: 768px) {
  .section-hero-image .placeholder-image {
    aspect-ratio: 16 / 9;
  }
}

/* --- Overview card icon --- */
.overview-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--teal);
}

.overview-card-icon svg {
  width: 100%;
  height: 100%;
}

/* --- Flow diagram (permanent SVG illustration) --- */
.flow-diagram {
  width: 100%;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--ink);
  border-radius: var(--r-lg);
  overflow-x: auto;
  border: 1px solid rgba(14, 165, 160, 0.15);
}

.flow-diagram svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 800px;
  margin: 0 auto;
}

.flow-diagram__caption {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-xs);
  color: var(--text-inverse-muted);
  margin-top: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- About page image --- */
.about-hero {
  margin-bottom: 2.5rem;
}

.about-hero .placeholder-image {
  aspect-ratio: 21 / 9;
}

.about-hero img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  display: block;
  object-fit: cover;
}

/* --- Report cover image in resource cards --- */
.overview-card picture,
.overview-card > img.overview-card-cover {
  display: block;
  margin-bottom: 1rem;
}

img.overview-card-cover {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.overview-card picture img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  display: block;
  box-shadow: var(--shadow-md);
}

/* --- Media/resource card images --- */
.overview-card .placeholder-image--thumb {
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
}

.overview-card .placeholder-image--thumb .placeholder-image__icon {
  width: 36px;
  height: 36px;
}

.overview-card .placeholder-image--thumb .placeholder-image__label {
  font-size: 0.7rem;
}

/* ==========================================================================
   404 ERROR PAGE
   ========================================================================== */

.error-page-link {
  display: block;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--surface-dim);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: all var(--speed) var(--ease);
}

.error-page-link:hover {
  background: var(--surface-dim);
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.error-page-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.error-page-link strong {
  display: block;
  font-size: var(--fs-md);
  color: var(--teal);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.error-page-link span {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   BREADCRUMB NAVIGATION
   ========================================================================== */

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem var(--gutter);
  font-size: var(--fs-sm);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.breadcrumb-item:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--text-secondary);
  opacity: 0.5;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--speed-fast) var(--ease);
}

.breadcrumb-item a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.breadcrumb-item a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

.breadcrumb-item span[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 0.75rem var(--gutter);
    font-size: var(--fs-xs);
  }

  .breadcrumb-list {
    gap: 0.4rem;
  }

  .breadcrumb-item:not(:last-child)::after {
    margin-left: 0.4rem;
  }
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--teal);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--speed) var(--ease),
              visibility var(--speed) var(--ease),
              transform var(--speed) var(--ease),
              background-color var(--speed-fast) var(--ease);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--teal-bright);
  box-shadow: var(--shadow-xl);
}

#back-to-top:active {
  transform: scale(0.95);
}

#back-to-top:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

#back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  #back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }

  #back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  #back-to-top {
    transition-duration: 0.01ms;
  }
}

/* ========================================
   SEARCH FUNCTIONALITY
   ======================================== */

/* Search nav item */
.nav-item-search {
  margin-left: auto;
}

.nav-link-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-md);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link-search:hover,
.nav-link-search:focus-visible {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link-search svg {
  flex-shrink: 0;
}

.search-label {
  display: inline;
}

@media (max-width: 768px) {
  .search-label {
    display: none;
  }

  .nav-link-search {
    padding: 0.5rem;
  }
}

/* Search page */
.search-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.search-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--ink);
  border-radius: var(--r-lg);
  border: 1px solid rgba(14, 165, 160, 0.2);
}

.search-header h1 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--text-inverse);
  margin-bottom: 0.75rem;
}

.search-query-display {
  font-size: var(--fs-lg);
  color: var(--text-inverse-muted);
}

.search-query-display strong {
  color: var(--teal-bright);
  font-weight: 600;
}

.search-subtitle {
  font-size: var(--fs-base);
  color: var(--text-inverse-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Search form */
.search-form-wrapper {
  max-width: 700px;
  margin: 0 auto 3rem;
}

.search-form {
  width: 100%;
}

.search-input-group {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.search-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-size: var(--fs-base);
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29, 193, 184, 0.1);
}

.search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.search-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: var(--fs-base);
  font-weight: 600;
  font-family: var(--font-sans);
  color: white;
  background: var(--teal);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.search-button:hover {
  background: var(--teal-bright);
}

.search-button:active {
  transform: scale(0.98);
}

.search-button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.search-button svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .search-input-group {
    flex-direction: column;
  }

  .search-button {
    width: 100%;
    justify-content: center;
  }
}

/* Search results */
#search-results-container {
  min-height: 200px;
}

.search-results {
  max-width: 900px;
  margin: 0 auto;
}

.search-results-section {
  margin-bottom: 3rem;
}

.search-results-section:last-child {
  margin-bottom: 0;
}

.search-results-heading {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-results-count {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-secondary);
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Individual search result */
.search-result {
  padding: 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-result:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
}

.search-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.search-result-type {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--teal);
  background: rgba(29, 193, 184, 0.1);
  border-radius: var(--r-full);
}

.search-result-date {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.search-result-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.search-result-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.search-result-title a:hover,
.search-result-title a:focus-visible {
  color: var(--teal);
}

.search-result-title a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

.search-result-excerpt {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.search-result-source,
.search-result-category {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.search-result-category {
  padding: 0.25rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

/* No results state */
.search-no-results {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  text-align: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.search-no-results p {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.search-no-results p strong {
  color: var(--text);
}

.search-suggestions {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-suggestions li {
  margin: 0;
}

.search-suggestions a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--teal);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  font-weight: 500;
}

.search-suggestions a:hover,
.search-suggestions a:focus-visible {
  background: rgba(29, 193, 184, 0.05);
  border-color: var(--teal);
}

.search-suggestions a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Dark theme adjustments */
[data-theme="dark"] .search-input {
  background: var(--surface-dim);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
}

[data-theme="dark"] .search-input:focus {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(85, 224, 217, 0.15);
}

[data-theme="dark"] .search-result {
  background: var(--surface-dim);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-result:hover {
  border-color: var(--teal-bright);
}

[data-theme="dark"] .search-no-results {
  background: var(--surface-dim);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   RELATED POSTS
   ======================================== */

.related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--border);
}

.related-posts-heading {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  text-align: center;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.related-post-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.related-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.related-post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-post-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.related-post-card:hover .related-post-title {
  color: var(--teal);
}

.related-post-excerpt {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: var(--fs-xs);
}

.related-post-category {
  padding: 0.25rem 0.75rem;
  background: rgba(29, 193, 184, 0.1);
  color: var(--teal);
  border-radius: var(--r-full);
  font-weight: 600;
}

.related-post-reading-time {
  color: var(--text-secondary);
}

/* Single column on mobile */
@media (max-width: 768px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .related-post-card {
  background: var(--surface-dim);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .related-post-card:hover {
  border-color: var(--teal-bright);
}

/* ========================================
   DARK MODE TOGGLE
   ======================================== */

.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-right: 1rem;
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dark-mode-toggle:active {
  transform: scale(0.95);
}

.dark-mode-toggle:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

.dark-mode-toggle svg {
  width: 20px;
  height: 20px;
  color: white;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.dark-mode-toggle .sun-icon {
  display: none;
}

.dark-mode-toggle .moon-icon {
  display: block;
}

/* Rotate icons on theme change for smooth transition */
.dark-mode-toggle:active svg {
  transform: rotate(180deg);
}

/* Responsive: smaller on mobile */
@media (max-width: 768px) {
  .dark-mode-toggle {
    width: 36px;
    height: 36px;
    margin-right: 0.75rem;
  }

  .dark-mode-toggle svg {
    width: 18px;
    height: 18px;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .dark-mode-toggle {
  background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   CTA Banner & Guide Signup Form
   ========================================================================== */

.cta-banner {
  background: linear-gradient(135deg, var(--ink) 0%, #0a2a4a 60%, #0d3350 100%);
  border: 1px solid rgba(46, 196, 182, 0.25);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3rem);
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 40%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(46, 196, 182, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cta-banner-title {
  color: #fff;
  font-size: var(--fs-lg);
  margin: 0;
  font-family: 'DM Serif Display', serif;
}

.cta-banner-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-sm);
  margin: 0;
  max-width: 55ch;
  line-height: 1.6;
}

.cta-banner--inline {
  background: var(--surface);
  border: 1px solid var(--surface-dim);
}

.cta-banner--inline .cta-banner-content {
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-banner--inline .cta-banner-icon {
  flex-shrink: 0;
  color: var(--teal);
}

.cta-banner--inline .cta-banner-text {
  flex: 1;
  min-width: 0;
}

.cta-banner--inline .cta-banner-title {
  color: var(--text);
  font-size: var(--fs-base);
  margin-bottom: 0.25rem;
}

.cta-banner--inline .cta-banner-subtitle {
  color: var(--text-secondary);
}

.cta-banner--inline .guide-signup-form {
  flex-shrink: 0;
}

/* Guide Signup Form */

.guide-signup-form {
  display: contents;
}

.guide-signup-fields {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.guide-signup-input {
  padding: 0.65rem 1rem;
  border: 1px solid rgba(46, 196, 182, 0.4);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: var(--fs-sm);
  font-family: inherit;
  flex: 1;
  min-width: 200px;
  transition: border-color 0.2s, background 0.2s;
}

.guide-signup-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.guide-signup-input:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.12);
}

.guide-signup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  background: var(--teal);
  color: var(--ink);
  border: none;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.guide-signup-btn:hover {
  background: var(--teal-bright);
  transform: translateY(-1px);
}

.guide-signup-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Inline variant overrides */
.cta-banner--inline .guide-signup-input {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--surface-dim);
}

.cta-banner--inline .guide-signup-input::placeholder {
  color: var(--text-secondary);
}

.cta-banner--inline .guide-signup-input:focus {
  background: var(--surface);
  border-color: var(--teal);
}

/* Footer signup strip */
.footer-signup {
  background: rgba(46, 196, 182, 0.06);
  border-bottom: 1px solid rgba(46, 196, 182, 0.15);
  padding: 1.25rem clamp(1rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-signup-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-sm);
  margin: 0;
  white-space: nowrap;
}

.guide-signup-fields--footer {
  flex-wrap: nowrap;
}

.guide-signup-fields--footer .guide-signup-input {
  min-width: 200px;
}

/* Contact Form */
/* Contact page layout */
.contact-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.contact-page-header {
  margin-bottom: 3rem;
}

.contact-page-header h1 {
  font-size: var(--fs-xl);
  margin-bottom: 0.75rem;
}

.contact-page-header .lead {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0;
}

.contact-page-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form-wrapper {
  margin: 2rem 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 100%;
}

.contact-submit-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

.contact-privacy-note {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: 1.5rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .contact-page-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.form-input {
  padding: 0.65rem 1rem;
  border: 1px solid var(--surface-dim);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* CTA button (used on thank-you pages) */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 2rem;
  background: var(--teal);
  color: var(--ink);
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  margin-top: 1rem;
}

.cta-button:hover {
  background: var(--teal-bright);
  transform: translateY(-1px);
}

/* Thank-you pages */
.thank-you-page {
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.thank-you-icon {
  margin-bottom: 1.5rem;
}

.thank-you-page h1 {
  font-size: var(--fs-xl);
  margin-bottom: 1rem;
}

.thank-you-page ul {
  text-align: left;
  max-width: 320px;
  margin: 1rem auto 0;
}

/* Guide page layout */
.guide-page .guide-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--surface-dim);
}

.guide-meta {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.guide-toc {
  background: var(--surface);
  border: 1px solid var(--surface-dim);
  border-radius: var(--r-md);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  max-width: 400px;
}

.guide-toc h2 {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-toc li {
  margin-bottom: 0.4rem;
  font-size: var(--fs-sm);
}

/* Print styles for guide page */
@media print {
  .guide-page nav,
  .guide-page footer,
  .guide-page .cta-banner,
  .guide-page .footer-signup,
  #back-to-top,
  .skip-link,
  .scroll-indicator,
  header,
  #loading {
    display: none !important;
  }

  .guide-page {
    font-size: 11pt;
    color: #000;
    max-width: 100%;
  }

  .guide-page a {
    color: #000;
    text-decoration: underline;
  }

  .guide-page .highlight-box {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .guide-toc {
    page-break-after: always;
  }
}

/* Dark mode overrides */
[data-theme="dark"] .cta-banner--inline {
  background: rgba(46, 196, 182, 0.06);
  border-color: rgba(46, 196, 182, 0.2);
}

[data-theme="dark"] .form-input {
  background: var(--surface-raised);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

[data-theme="dark"] .form-input:focus {
  border-color: var(--teal);
}

[data-theme="dark"] .guide-toc {
  background: var(--surface-raised);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
  .cta-banner--inline .cta-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-banner--inline .guide-signup-form {
    width: 100%;
  }

  .cta-banner--inline .guide-signup-fields {
    width: 100%;
  }

  .cta-banner--inline .guide-signup-input {
    min-width: unset;
    width: 100%;
  }

  .footer-signup {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .guide-signup-fields--footer {
    width: 100%;
  }

  .guide-signup-fields--footer .guide-signup-input {
    width: 100%;
    min-width: unset;
  }
}
