/* ==========================================================================
   Financial Prosperity Foundation (FPF) - Bespoke Institutional Theme
   Anti-AI Design System: Zero glassmorphism, zero noise gradients, solid surfaces,
   80% dominant green with strategic accents, sharp brutalist mechanical precision.
   ========================================================================== */

:root {
  --bg-color: #f7faf8;
  --surface-color: #ffffff;
  --surface-subtle: #f0f6f2;
  --surface-hover: #e8f3ec;
  
  /* Primary Dominant Green (~80%) */
  --primary-green: #16a34a;
  --primary-green-hover: #15803d;
  --primary-green-light: rgba(22, 163, 74, 0.08);
  --secondary-green: #14532d;
  --border-color: #d1ded4;
  --border-strong: #9ec3aa;
  
  /* Strategic Complementary Accents (~20%) */
  --accent-gold: #d97706;
  --accent-gold-hover: #b45309;
  --accent-gold-light: rgba(217, 119, 6, 0.08);
  --accent-gold-border: rgba(217, 119, 6, 0.3);
  
  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --accent-blue-light: rgba(2, 132, 199, 0.08);
  --accent-blue-border: rgba(2, 132, 199, 0.3);
  
  --accent-rose: #e11d48;
  --accent-rose-light: rgba(225, 29, 72, 0.08);
  --accent-rose-border: rgba(225, 29, 72, 0.3);
  
  --accent-purple: #7c3aed;
  --accent-purple-light: rgba(124, 58, 237, 0.08);

  /* Solid Typography (No Gradients) */
  --text-main: #0a140d;
  --text-muted: #47614f;
  --text-subtle: #6d8775;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', 'Courier New', monospace;
  /* Organic & Asymmetric Curvature Tokens */
  --radius-card-1: 26px 8px 22px 8px;
  --radius-card-2: 8px 26px 8px 22px;
  --radius-stat-1: 18px 4px 18px 4px;
  --radius-stat-2: 4px 18px 4px 18px;
  --radius-hero: 32px 10px 32px 10px;
  --radius-badge: 6px;
  --radius-btn: 999px;
  --radius-pill: 999px;
  --radius-input: 10px;
  --radius-soft: 14px;
  --transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Clean Drafting Background: No SVG noise filters, no gradient mesh */
body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Solid Typography Hierarchy (Zero Gradient Text) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--text-main);
  text-transform: uppercase;
}

p {
  color: var(--text-muted);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-green);
  font-weight: 600;
}

/* Badges (~20% Strategic Color Accents) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.badge-green {
  background: var(--primary-green-light);
  color: var(--primary-green);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.badge-gold {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
}

.badge-blue {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue-border);
}

.badge-rose {
  background: var(--accent-rose-light);
  color: var(--accent-rose);
  border: 1px solid var(--accent-rose-border);
}

.badge-purple {
  background: var(--accent-purple-light);
  color: var(--accent-purple);
  border: 1px solid var(--accent-purple-border);
}

/* Header (Solid Opaque Surface - No Glassmorphism) */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 76px;
  background-color: var(--surface-color);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  gap: 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: static;
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-img {
  height: 52px;
  width: auto;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--primary-green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
}

/* Skewed Architecture Navigation */
.nav {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  height: 100%;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: var(--transition);
  padding: 0 1.25rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: skewX(-18deg);
  border-left: 1px solid rgba(22, 163, 74, 0.2);
  background-color: transparent;
}

.nav-link:last-child {
  border-right: 1px solid rgba(22, 163, 74, 0.2);
}

.nav-text {
  display: inline-block;
  transform: skewX(18deg);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-green);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-green);
  background-color: rgba(22, 163, 74, 0.08);
  transform: skewX(-18deg) translateY(-2px);
  z-index: 10;
}

.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  color: var(--primary-green);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Header Controls Right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  position: static;
  flex-shrink: 0;
}

.anim-toggle,
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.2s ease;
}

.toggle-label:hover {
  color: var(--text-main);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  border-radius: 999px !important;
  overflow: hidden;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1ded4;
  border: 1px solid #b8cebd;
  border-radius: 999px !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #4b6352;
  border-radius: 999px !important;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: rgba(22, 163, 74, 0.22);
  border-color: var(--primary-green);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background-color: var(--primary-green);
}

/* Dedicated Theme Slider with Sun & Moon Visual Indicators */
.theme-toggle-switch {
  width: 44px;
  height: 22px;
}

.theme-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1ded4;
  border: 1px solid #b8cebd;
  border-radius: 999px !important;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.theme-toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #f59e0b;
  border-radius: 999px !important;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.theme-slider-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  pointer-events: none;
  font-size: 0.65rem;
  line-height: 1;
  user-select: none;
  z-index: 1;
}

.theme-icon-sun {
  margin-left: 2px;
  color: #d97706;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.theme-icon-moon {
  margin-right: 2px;
  color: #22c55e;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.theme-toggle-switch input:checked + .theme-toggle-slider {
  background-color: #17261c;
  border-color: #22c55e;
}

.theme-toggle-switch input:checked + .theme-toggle-slider::before {
  transform: translateX(22px);
  background-color: #22c55e;
}

.theme-toggle-switch input:checked + .theme-toggle-slider .theme-icon-sun {
  opacity: 0.35;
}

.theme-toggle-switch input:checked + .theme-toggle-slider .theme-icon-moon {
  opacity: 1;
}

/* Kinetic Ticker Tape */
.ticker-wrap {
  width: 100%;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.ticker-wrap::before, .ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}

.ticker-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--surface-color), transparent);
}

.ticker-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--surface-color), transparent);
}

.ticker-move {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-slide 32s linear infinite;
}

.ticker-move:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticker-item strong {
  color: var(--secondary-green);
  font-weight: 700;
}

.ticker-item .dot {
  width: 6px;
  height: 6px;
  background-color: var(--primary-green);
  display: inline-block;
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

body.fast-mode .ticker-move {
  animation-duration: 16s;
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  position: relative;
  z-index: 1;
}

/* Hero Section (Solid Opaque Surface - No Glassmorphism) */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48vh;
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-hero);
  padding: 4rem;
  background: var(--surface-color);
  margin-bottom: 3.5rem;
  margin-left: 0;
  margin-right: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.home-hero {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  border-left: 6px solid var(--primary-green);
  left: 0;
  margin-left: 0;
  margin-right: 0;
}

.hero-content {
  flex: 1;
  max-width: 62%;
  z-index: 2;
}

.hero-graphic {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 48%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.halftone-image {
  width: 100%;
  height: 100%;
  background-color: transparent;
  background-image: linear-gradient(var(--primary-green), var(--primary-green)), url('halftone_mission_light.png');
  background-blend-mode: color;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%);
  mask-image: linear-gradient(to right, transparent, black 15%);
}

.hero h2 {
  font-size: 3.8rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.15;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* Typewriter */
.typewriter::after {
  content: '|';
  display: inline-block;
  color: var(--primary-green);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter.typewriter-done::after {
  display: none;
}

/* Status Ribbon */
.institution-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-green);
  border-radius: 14px 4px 14px 4px;
  padding: 0.75rem 1.5rem;
  margin-bottom: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ribbon-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-green);
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-rose);
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

/* Stat Counters Row (Asymmetric Editorial Cards) */
.stat-ticker-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 3.5rem;
}

.stat-box {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-stat-1);
  padding: 1.75rem;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.28s ease,
              background-color 0.28s ease;
  box-shadow: 0 2px 10px rgba(10, 20, 13, 0.025);
  overflow: hidden;
}

.stat-box:nth-child(even) {
  border-radius: var(--radius-stat-2);
}

.stat-box:nth-child(odd):hover {
  border-color: var(--primary-green);
  transform: translateY(-3px) rotate(-0.65deg);
  box-shadow: 0 12px 28px -6px rgba(22, 163, 74, 0.16);
}

.stat-box:nth-child(even):hover {
  border-color: var(--primary-green);
  transform: translateY(-3px) rotate(0.65deg);
  box-shadow: 0 12px 28px -6px rgba(22, 163, 74, 0.16);
}

.stat-box.stat-anchor {
  background: linear-gradient(145deg, var(--surface-color) 0%, var(--surface-subtle) 100%);
  border-color: var(--border-strong);
  border-left: 3px solid var(--accent-gold);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--primary-green);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Buttons (Instant Mechanical Hover - No Opacity Fade) */
.btn {
  border-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.88rem;
  background-color: var(--primary-green);
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  border: 2px solid var(--primary-green);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

.btn:hover {
  background-color: var(--primary-green-hover);
  border-color: var(--primary-green-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--primary-green);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: 0.8rem;
}

/* Section Header */
.section-title {
  font-size: 2.6rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-main);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background-color: var(--primary-green);
}

/* Grid Layouts */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* Cards: Solid Opaque Surface (No Glassmorphism, Clean Structural Borders) */

/* Asymmetrical Bento & Stagger Rhythm */
.grid-asymmetric-3 {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.grid-bento-2 {
  display: grid;
  grid-template-columns: 1.28fr 0.92fr;
  gap: 2rem;
}

.grid-bento-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-stagger > *:nth-child(2) { margin-top: 1.85rem; }
.grid-stagger > *:nth-child(3) { margin-top: 0.5rem; }

@media (max-width: 960px) {
  .grid-asymmetric-3,
  .grid-bento-2,
  .grid-bento-4 {
    grid-template-columns: 1fr;
  }
  .grid-stagger > *:nth-child(2),
  .grid-stagger > *:nth-child(3) {
    margin-top: 0;
  }
}

/* Cards: Organic Asymmetrical Geometry, Abstract Accents, Micro-Tilt Hover */
.card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card-1);
  padding: 2.5rem 2.25rem;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.28s ease,
              background-color 0.28s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(10, 20, 13, 0.025);
  overflow: hidden;
  transform-origin: center center;
}

/* Alternating Asymmetry for Natural Visual Rhythm */
.card:nth-child(even) {
  border-radius: var(--radius-card-2);
}

.card:nth-child(odd) {
  border-radius: var(--radius-card-1);
}

/* Top Organic Accent Tab that Expands on Hover */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2rem;
  width: 44px;
  height: 3px;
  border-radius: 999px;
  background-color: var(--primary-green);
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease;
}

/* Abstract Decorative Watermark Numerals */
.card::after {
  content: attr(data-num);
  position: absolute;
  right: 1.25rem;
  bottom: 0.25rem;
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  opacity: 0.035;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  user-select: none;
}

/* Micro-Tilt Hover Dynamics (Alternating Tactile Angle, Ambient Glow Diffusion) */
.card:nth-child(odd):hover {
  border-color: var(--primary-green);
  transform: translateY(-4px) rotate(-0.75deg);
  box-shadow: 0 16px 36px -8px rgba(22, 163, 74, 0.16),
              0 0 0 1px rgba(22, 163, 74, 0.12);
}

.card:nth-child(even):hover {
  border-color: var(--primary-green);
  transform: translateY(-4px) rotate(0.75deg);
  box-shadow: 0 16px 36px -8px rgba(22, 163, 74, 0.16),
              0 0 0 1px rgba(22, 163, 74, 0.12);
}

.card:hover::before {
  width: 95px;
}

.card:hover::after {
  opacity: 0.075;
  transform: translateY(-4px) scale(1.05);
}

/* Color Variant: Gold */
.card.card-gold::before {
  background-color: var(--accent-gold);
}
.card.card-gold:nth-child(odd):hover,
.card.card-gold:nth-child(even):hover {
  border-color: var(--accent-gold);
  box-shadow: 0 16px 36px -8px rgba(217, 119, 6, 0.18),
              0 0 0 1px rgba(217, 119, 6, 0.15);
}
.card.card-gold:hover h3 {
  color: var(--accent-gold);
}

/* Color Variant: Blue */
.card.card-blue::before {
  background-color: var(--accent-blue);
}
.card.card-blue:nth-child(odd):hover,
.card.card-blue:nth-child(even):hover {
  border-color: var(--accent-blue);
  box-shadow: 0 16px 36px -8px rgba(2, 132, 199, 0.18),
              0 0 0 1px rgba(2, 132, 199, 0.15);
}
.card.card-blue:hover h3 {
  color: var(--accent-blue);
}

/* Color Variant: Purple */
.card.card-purple::before {
  background-color: var(--accent-purple);
}
.card.card-purple:nth-child(odd):hover,
.card.card-purple:nth-child(even):hover {
  border-color: var(--accent-purple);
  box-shadow: 0 16px 36px -8px rgba(124, 58, 237, 0.18),
              0 0 0 1px rgba(124, 58, 237, 0.15);
}
.card.card-purple:hover h3 {
  color: var(--accent-purple);
}

/* Color Variant: Green */
.card.card-green::before {
  background-color: var(--primary-green);
}
.card.card-green:nth-child(odd):hover,
.card.card-green:nth-child(even):hover {
  border-color: var(--primary-green);
  box-shadow: 0 16px 36px -8px rgba(22, 163, 74, 0.18),
              0 0 0 1px rgba(22, 163, 74, 0.15);
}
.card.card-green:hover h3 {
  color: var(--primary-green);
}

/* Featured / Anchor Card Treatment */
.card.card-featured {
  background: linear-gradient(150deg, var(--surface-color) 0%, var(--surface-subtle) 100%);
  border-color: var(--border-strong);
  border-left: 4px solid var(--primary-green);
}
.card.card-featured::before {
  width: 72px;
}
.card.card-featured:hover::before {
  width: 120px;
}

/* Internal Typography Lateral Glide */
.card h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.25s ease;
}

.card:hover h3 {
  transform: translateX(6px);
  color: var(--primary-green);
}

.card p {
  color: var(--text-muted);
  flex-grow: 1;
  font-size: 1.02rem;
  line-height: 1.7;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-green);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: block;
}

/* Step Roadmap for Chapters */
.roadmap-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.roadmap-step {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-stat-1);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
}

.roadmap-step:hover {
  border-color: var(--primary-green);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px rgba(22, 163, 74, 0.2);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-green);
  border-right: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body h4 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

/* Table / Rules Matrix */
.rules-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.rules-table th {
  background: var(--surface-subtle);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-main);
}

.rules-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.rules-table tr:hover td {
  background: var(--surface-hover);
}
/* Rules table — Action column centering */
.rules-table th:last-child,
.rules-table td:last-child {
  text-align: center;
}

/* Rules table — Key Skills column vertical alignment */
.rules-table td:nth-child(4) {
  vertical-align: middle;
}


/* Institutional Callout */
.institutional-callout {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--secondary-green);
  padding: 2rem;
  margin: 2.5rem 0;
  position: relative;
}

.institutional-callout h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-green);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.25s ease, color 0.25s ease;
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  background-color: var(--surface-color);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.form-group input[type="checkbox"] {
  accent-color: var(--primary-green);
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.form-group select {
  background-color: var(--surface-color);
  cursor: pointer;
}

.form-group option {
  background-color: var(--surface-color);
  color: var(--text-main);
}

/* Notice Banner */
.notice-banner {
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  font-size: 0.92rem;
  display: none;
}

.notice-banner.success {
  background-color: #f0fdf4;
  border-color: #86efac;
  color: #14532d;
  display: block;
}

.notice-banner.error {
  background-color: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
  display: block;
}

/* Custom Dropdown (Solid Surface - No Glassmorphism) */
.custom-dropdown-container {
  position: relative;
}

.custom-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-top: none;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.custom-dropdown::-webkit-scrollbar {
  width: 8px;
}
.custom-dropdown::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}
.custom-dropdown::-webkit-scrollbar-thumb {
  background: rgba(22, 163, 74, 0.4);
}
.custom-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 163, 74, 0.7);
}

.country-option {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  transition: background-color 0.15s ease;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.country-option:hover {
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--primary-green);
}

/* Footer (Institutional & Legal) */
.footer {
  position: relative;
  z-index: 50;
  background-color: var(--surface-subtle);
  border-top: 2px solid var(--border-color);
  padding: 4rem 2.5rem 2.5rem;
  margin-top: auto;
  isolation: isolate;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h4 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--secondary-green);
}

.footer-brand p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.footer-col h5 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary-green);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.fiscal-disclosure {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 800px;
}

/* Page Transitions (Rapid & Crisp - No Scroll-Triggered Delay) */
.page {
  animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hidden-fade {
  opacity: 1;
}

/* Responsive Media Queries */
@media (max-width: 1680px) {
  .header {
    padding: 0 1.5rem;
    gap: 1rem;
  }
  .nav-link {
    padding: 0 0.95rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 1440px) {
  .header {
    padding: 0 1.15rem;
    gap: 0.75rem;
  }
  .logo-title {
    font-size: 1.05rem;
  }
  .logo-img {
    height: 44px;
  }
  .nav-link {
    padding: 0 0.65rem;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
  }
  .hero {
    padding: 3rem;
  }
  .hero h2 {
    font-size: 3.2rem;
  }
}

@media (max-width: 1220px) {
  .header {
    height: auto;
    padding: 0.85rem 1.25rem;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .logo {
    position: static;
    order: 1;
  }
  .header-actions {
    position: static;
    order: 2;
    margin-left: auto;
    gap: 0.75rem;
  }
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
    margin-left: 0.5rem;
    height: 38px;
    padding: 0 0.85rem;
  }
  .nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    margin-top: 0.75rem;
    height: auto;
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
  }
  .nav.open {
    display: flex;
  }
  .nav-link {
    transform: none;
    padding: 0.85rem 1rem;
    border-left: none;
    border-bottom: 1px solid var(--border-color);
    justify-content: flex-start;
  }
  .nav-text {
    transform: none;
  }
  .nav-link:hover, .nav-link.active {
    transform: none;
    border-left: 4px solid var(--primary-green);
  }
  .nav-dropdown {
    width: 100%;
    flex-direction: column;
    transform: none;
  }
  .nav-dropdown-trigger {
    transform: none;
    justify-content: space-between;
  }
  .nav-dropdown-menu {
    position: static;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--primary-green);
    margin-left: 1rem;
    padding: 0.25rem 0 0.5rem;
    background: transparent;
  }
  .nav-dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.84rem;
  }

  /* Prevent hero content and halftone graphic from overlapping */
  .home-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 2rem 22rem;
    border-image: linear-gradient(to bottom, var(--primary-green) 45%, transparent 80%) 1;
    position: relative;
  }
  .hero-content {
    max-width: 100%;
    z-index: 2;
  }
  .hero-graphic {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 20rem;
    z-index: 1;
  }
  .halftone-image {
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 35%);
    mask-image: linear-gradient(to bottom, transparent, black 35%);
    background-position: center bottom;
  }
  .hero h2 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
  }

  /* Multi-column grids: avoid squishing */
  .grid-asymmetric-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .grid-bento-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .grid-stagger > *:nth-child(2),
  .grid-stagger > *:nth-child(3) {
    margin-top: 0;
  }
  .roadmap-step {
    grid-template-columns: 1fr;
  }
  .step-number {
    border-right: none;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    justify-content: flex-start;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
  }
}

@media (max-width: 860px) {
  .main-content {
    padding: 2rem 1.25rem 4rem;
  }
  .hero {
    margin-left: 0;
    margin-right: 0;
    padding: 2.25rem 1.5rem;
  }
  .home-hero {
    padding: 2.25rem 1.5rem 18rem;
  }
  .hero-graphic {
    height: 16rem;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .doc-attachment-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }
  .doc-attachment-actions {
    width: 100%;
    flex-direction: row;
    margin-top: 1rem;
  }
  .guideline-block {
    padding: 1.5rem;
  }
  .guideline-header-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  .rules-table-wrapper,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
    margin: 1rem 0;
  }
  .guideline-table {
    min-width: 520px;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 0.75rem 1rem;
  }
  .logo-title {
    font-size: 0.95rem;
  }
  .logo-sub {
    font-size: 0.58rem;
  }
  .logo-img {
    height: 38px;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .finedu-nav-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
  }
  .anim-toggle .toggle-label {
    display: none;
  }
  .main-content {
    padding: 1.5rem 1rem 3.5rem;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero {
    padding: 1.75rem 1.25rem;
  }
  .home-hero {
    padding: 1.75rem 1.25rem 16rem;
  }
  .hero h2 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .stat-ticker-row {
    grid-template-columns: 1fr;
  }
  .institution-ribbon {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .legal-section-block {
    padding: 1.5rem 1.25rem;
  }
}


/* ==========================================================================
   Competitions Architecture, Dropdowns & Documentation Guidelines Styling
   ========================================================================== */

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

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

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 270px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(10, 20, 13, 0.08);
  z-index: 1000;
  padding: 0.5rem 0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1.25rem;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: var(--surface-subtle);
  border-left-color: var(--primary-green);
  color: var(--primary-green);
}

.nav-dropdown-item .nav-item-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Competition Breadcrumb Sub-Navigation */
.comp-breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
}

.comp-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.comp-nav-pill:hover {
  color: var(--text-main);
  border-color: var(--primary-green);
}

.comp-nav-pill.active-track {
  background: var(--primary-green);
  color: #ffffff;
  border-color: var(--primary-green);
  font-weight: 600;
}

.comp-nav-divider {
  color: var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Official Document Attachment Card */
.doc-attachment-card {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.75rem 2rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary-green);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.doc-attachment-icon {
  font-size: 2.75rem;
  line-height: 1;
  color: var(--primary-green);
  flex-shrink: 0;
}

.doc-attachment-info {
  flex-grow: 1;
}

.doc-attachment-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.doc-attachment-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  text-transform: uppercase;
}

.doc-attachment-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.55;
}

.doc-attachment-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Quick Jump TOC */
.guidelines-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.toc-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: var(--transition);
}

.toc-pill:hover {
  background: var(--primary-green-light);
  border-color: var(--primary-green);
  color: var(--primary-green);
}

/* Guidelines Layout Blocks */
.guidelines-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.guideline-block {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2.25rem 2.5rem;
  position: relative;
}

.guideline-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.guideline-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  color: var(--text-main);
  margin-bottom: 0;
}

.guideline-list {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 1.25rem 0;
}

.guideline-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.guideline-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-size: 0.6rem;
  color: var(--primary-green);
}

.guideline-numbered-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0.75rem 0 1.25rem 0;
}

.guideline-numbered-list li {
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.guideline-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}

.guideline-table th,
.guideline-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.guideline-table th {
  background: var(--surface-subtle);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.guideline-table tr:nth-child(even) td {
  background: rgba(240, 246, 242, 0.4);
}

.guideline-callout {
  padding: 1.25rem 1.5rem;
  background: var(--surface-subtle);
  border-left: 4px solid var(--primary-green);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 1.25rem 0;
}

.guideline-callout.callout-gold {
  border-left-color: var(--accent-gold);
  background: var(--accent-gold-light);
}

.guideline-callout.callout-blue {
  border-left-color: var(--accent-blue);
  background: var(--accent-blue-light);
}

.guideline-callout.callout-rose {
  border-left-color: var(--accent-rose);
  background: var(--accent-rose-light);
}

/* Documentation & Guidelines Mobile Adjustments */
@media (max-width: 900px) {
  .doc-attachment-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }
  .doc-attachment-actions {
    width: 100%;
    flex-direction: row;
    margin-top: 1rem;
  }
  .guideline-block {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   PAGE BACKGROUND BACKDROP SYSTEM
   Full-viewport photographic background for Main, Environment, Initiatives,
   and Competitions hub pages, with semi-opaque institutional grid overlay.
   ========================================================================== */

.page {
  position: relative;
  z-index: 2;
  animation: fadeIn 0.25s ease forwards;
}

.page-bg-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--bg-color);
}

.page-bg-image {
  position: absolute;
  top: 16px;
  left: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border-radius: 8px !important;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  will-change: opacity;
}

/* Page Background System */
.page-bg-image.bg-home {
  background-image: url('assets/bg-home.jpg');
}

.page-bg-image.bg-about {
  background-image: url('assets/bg-about.jpg');
}

.page-bg-image.bg-environment {
  background-image: url('assets/bg-environment.jpg');
}

.page-bg-image.bg-initiatives {
  background-image: url('assets/bg-initiatives.jpg');
}

.page-bg-image.bg-competitions {
  background-image: url('assets/bg-competitions.jpg');
}

.page-bg-image.bg-chapters {
  background-image: url('assets/bg-chapters.jpg');
}

.page-bg-image.bg-horizon {
  background-image: url('assets/bg-horizon.jpg');
}

.page-bg-image.bg-membership {
  background-image: url('assets/bg-membership.jpg');
}

.page-bg-image.bg-payment {
  background-image: url('assets/bg-payment.jpg');
}

/* Active states driven by data-bg attribute on backdrop */
.page-bg-backdrop[data-bg="home"] .bg-home {
  opacity: 1;
}

.page-bg-backdrop[data-bg="about"] .bg-about {
  opacity: 1;
}

.page-bg-backdrop[data-bg="environment"] .bg-environment {
  opacity: 1;
}

.page-bg-backdrop[data-bg="initiatives"] .bg-initiatives {
  opacity: 1;
}

.page-bg-backdrop[data-bg="competitions"] .bg-competitions {
  opacity: 1;
}

.page-bg-backdrop[data-bg="chapters"] .bg-chapters,
.page-bg-backdrop[data-bg="chapter-register"] .bg-chapters {
  opacity: 1;
}

.page-bg-backdrop[data-bg="horizon"] .bg-horizon,
.page-bg-backdrop[data-bg="partner-register"] .bg-horizon {
  opacity: 1;
}

.page-bg-backdrop[data-bg="membership"] .bg-membership {
  opacity: 1;
}

.page-bg-backdrop[data-bg="payment"] .bg-payment {
  opacity: 1;
}












/* Active states driven by data-bg attribute on backdrop */










.fast-mode .page-bg-image {
  transition: none !important;
}

/* Semi-opaque institutional background overlay maintaining 100% contrast & legibility */
.page-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(247, 250, 248, 0.86);
  background-image: radial-gradient(rgba(22, 163, 74, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}




/* US State / Territory Select */
@keyframes stateReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.state-dropdown-group {
  overflow: hidden;
}

.state-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-main);
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2316a34a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.state-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

/* FinEdu Top Bar Access Button */
.finedu-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  padding: 0.45rem 0.95rem;
  background: #0a0f1a;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.finedu-nav-btn:hover {
  background: #060911;
  border-color: rgba(176, 38, 255, 0.7);
  box-shadow: 0 0 16px rgba(176, 38, 255, 0.35), 0 0 24px rgba(0, 229, 255, 0.2);
  transform: translateY(-1px);
}

.finedu-btn-logo {
  font-family: 'Cinzel Decorative', 'Cinzel', 'Playfair Display', Georgia, serif !important;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #00e5ff, #b026ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.45)) drop-shadow(0 0 14px rgba(176, 38, 255, 0.25)) !important;
  line-height: 1;
}

.finedu-btn-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.5);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  letter-spacing: 1px;
}

/* Disabled CTA button and temporary closure notice */
.btn.btn-disabled, .btn-disabled {
    background-color: #e2e8f0 !important;
    background: #e2e8f0 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: none !important;
    opacity: 1 !important;
}
.btn.btn-disabled:hover, .btn-disabled:hover {
    background-color: #e2e8f0 !important;
    background: #e2e8f0 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    transform: none !important;
    box-shadow: none !important;
}
.closed-notice {
    margin-top: 1rem;
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}
.closed-notice .notice-tag {
    color: #d97706;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    font-size: 0.84rem;
    margin-right: 0.4rem;
}

/* ==========================================================================
   OFFICIAL MEMBERSHIP CREDENTIAL CARD
   ========================================================================== */
.credential-card-wrapper {
  margin-top: 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

.credential-card-inner {
  background: #0d1627;
  color: #f0f4fc;
  border: 2px solid #d4af37;
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  background-image: radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 0% 100%, rgba(0, 229, 255, 0.05) 0%, transparent 40%);
}

.credential-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.credential-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cred-crest {
  font-size: 2rem;
  line-height: 1;
}

.cred-foundation-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #d4af37;
  text-transform: uppercase;
}

.cred-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.credential-badge-verified {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid #d4af37;
  color: #d4af37;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
}

.credential-id-section {
  background: #060b14;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.75rem;
}

.cred-id-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #00e5ff;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.cred-id-value {
  font-family: 'Space Grotesk', 'Courier New', monospace;
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 4px;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
  user-select: all;
}

.cred-id-sub {
  font-size: 0.68rem;
  color: #7f95b7;
  letter-spacing: 1px;
  margin-top: 0.35rem;
  font-family: monospace;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cred-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cred-label {
  font-size: 0.72rem;
  color: #7f95b7;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.cred-val {
  font-size: 0.95rem;
  color: #f0f4fc;
}

.credential-security-footer {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cred-security-barcode {
  font-family: monospace;
  letter-spacing: 4px;
  color: rgba(212, 175, 55, 0.7);
  font-size: 1.1rem;
  user-select: none;
}

.cred-security-note {
  font-size: 0.8rem;
  color: #a4b8d5;
  line-height: 1.4;
  text-align: right;
  flex: 1;
}

.credential-actions-bar {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.credential-actions-bar .btn {
  flex: 1;
  text-align: center;
}

@media print {
  body * {
    visibility: hidden;
  }
  #member-credential-card, #member-credential-card * {
    visibility: visible;
  }
  #member-credential-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .credential-actions-bar {
    display: none !important;
  }
}

/* ==========================================================================
   GLOBAL DARK MODE SYSTEM
   Persisted via localStorage ('fpf_theme': 'dark' | 'light')
   ========================================================================== */
html.dark-mode,
body.dark-mode {
  --bg-color: #0b130e;
  --surface-color: #121e16;
  --surface-subtle: #17261c;
  --surface-hover: #1e3325;
  
  --primary-green: #22c55e;
  --primary-green-hover: #4ade80;
  --primary-green-light: rgba(34, 197, 94, 0.15);
  --secondary-green: #86efac;
  --border-color: #233a2a;
  --border-strong: #33543d;
  
  --accent-gold: #fbbf24;
  --accent-gold-hover: #f59e0b;
  --accent-gold-light: rgba(251, 191, 36, 0.15);
  --accent-gold-border: rgba(251, 191, 36, 0.35);
  
  --accent-blue: #38bdf8;
  --accent-blue-hover: #60a5fa;
  --accent-blue-light: rgba(56, 189, 248, 0.15);
  --accent-blue-border: rgba(56, 189, 248, 0.35);
  
  --accent-rose: #fb7185;
  --accent-rose-light: rgba(251, 113, 133, 0.15);
  --accent-rose-border: rgba(251, 113, 133, 0.35);
  
  --accent-purple: #c084fc;
  --accent-purple-light: rgba(192, 132, 252, 0.15);

  --text-main: #f0fdf4;
  --text-muted: #9bb5a3;
  --text-subtle: #688571;
}

/* Base Body & Surface Adjustments in Dark Mode */
html.dark-mode body {
  background-color: var(--bg-color);
  color: var(--text-main);
}

html.dark-mode .page-bg-overlay {
  background-color: rgba(11, 19, 14, 0.92);
  background-image: radial-gradient(rgba(34, 197, 94, 0.12) 1px, transparent 1px);
}

html.dark-mode .page-bg-image {
  opacity: 0;
  filter: brightness(0.65) contrast(1.15);
}

html.dark-mode .page-bg-backdrop[data-bg="home"] .bg-home,
html.dark-mode .page-bg-backdrop[data-bg="about"] .bg-about,
html.dark-mode .page-bg-backdrop[data-bg="environment"] .bg-environment,
html.dark-mode .page-bg-backdrop[data-bg="initiatives"] .bg-initiatives,
html.dark-mode .page-bg-backdrop[data-bg="competitions"] .bg-competitions,
html.dark-mode .page-bg-backdrop[data-bg="chapters"] .bg-chapters,
html.dark-mode .page-bg-backdrop[data-bg="chapter-register"] .bg-chapters,
html.dark-mode .page-bg-backdrop[data-bg="horizon"] .bg-horizon,
html.dark-mode .page-bg-backdrop[data-bg="partner-register"] .bg-horizon,
html.dark-mode .page-bg-backdrop[data-bg="membership"] .bg-membership,
html.dark-mode .page-bg-backdrop[data-bg="payment"] .bg-payment {
  opacity: 0.72;
}

html.dark-mode .header {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

html.dark-mode .card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

html.dark-mode .card:nth-child(odd):hover,
html.dark-mode .card:nth-child(even):hover {
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(34, 197, 94, 0.25);
}

html.dark-mode .card::after {
  opacity: 0.06;
  color: #ffffff;
}

html.dark-mode .stat-box {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html.dark-mode .halftone-image {
  mix-blend-mode: screen;
  opacity: 0.35;
}

html.dark-mode .notice-banner.success {
  background-color: rgba(22, 163, 74, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

html.dark-mode .notice-banner.error {
  background-color: rgba(225, 29, 72, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fca5a5;
}

html.dark-mode .guideline-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

html.dark-mode code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary-green);
}

html.dark-mode #competition-payment-amount {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--primary-green) !important;
}

html.dark-mode .custom-dropdown-item:hover,
html.dark-mode .country-option:hover {
  background-color: rgba(34, 197, 94, 0.15);
  color: var(--primary-green);
}

html.dark-mode .state-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2322c55e' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

html.dark-mode .state-select option {
  background-color: var(--surface-color);
  color: var(--text-main);
}

html.dark-mode .form-group option {
  background-color: var(--surface-color);
  color: var(--text-main);
}

html.dark-mode .institution-ribbon {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

html.dark-mode .rules-table-wrapper {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html.dark-mode .custom-dropdown {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   LEGAL & POLICY DOCUMENTS STYLING (Terms, Privacy, Refunds, Accessibility)
   ========================================================================== */
.legal-container {
  max-width: 920px;
  margin: 0 auto 3.5rem auto;
}

.legal-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  margin-bottom: 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legal-section-block {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  transition: border-color var(--transition-fast);
}

.legal-section-block:hover {
  border-color: rgba(34, 197, 94, 0.4);
}

.legal-section-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legal-section-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary-green);
  background: rgba(34, 197, 94, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-soft);
}

.legal-callout-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 4px solid var(--accent-cyan);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  border-radius: var(--radius-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
}

.legal-callout-box.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
  border-left-color: #f59e0b;
}

.legal-callout-box.success {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.35);
  border-left-color: var(--primary-green);
}

/* ==========================================================================
   FAQ ACCORDION COMPONENT
   ========================================================================== */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.faq-category-header {
  margin-top: 2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.faq-category-header h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  text-transform: uppercase;
  margin: 0;
  color: var(--text-main);
}

.faq-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-soft);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(34, 197, 94, 0.45);
}

.faq-question-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  gap: 1rem;
  transition: color var(--transition-fast);
}

.faq-question-btn:hover {
  color: var(--primary-green);
}

.faq-chevron {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--primary-green);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(90deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(0, 0, 0, 0.015);
}

html.dark-mode .faq-answer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
}

.faq-item.active .faq-answer {
  display: block;
  animation: stateReveal 0.25s ease;
}

/* ==========================================================================
   ARCHITECTURAL 404 PAGE VIEWPORT
   ========================================================================== */
.error-page-wrapper {
  max-width: 820px;
  margin: 3rem auto 5rem auto;
  text-align: center;
}

.error-badge-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.35rem 1rem;
  display: inline-block;
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.error-title-huge {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.error-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
}

.error-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.error-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.error-link-card:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
  transform: translateY(-2px);
}

/* ==========================================================================
   INSTITUTIONAL COOKIE & STORAGE CONSENT SYSTEM
   ========================================================================== */

/* Bottom Consent Bar (First Visit / Reset) */
.cookie-consent-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  background: rgba(8, 14, 11, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1.5px solid rgba(34, 197, 94, 0.5);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.85);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.cookie-consent-bar.is-hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}

.cookie-consent-bar.is-visible {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cookie-consent-text {
  flex: 1 1 440px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.cookie-consent-text strong {
  color: var(--primary-green);
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Floating Cookie Preferences Pill Button */
.cookie-pref-floating-badge,
#cookie-pref-floating-btn {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 99980;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background: #09140e;
  border: 1.5px solid #22c55e;
  border-radius: 9999px;
  color: #f0fdf4;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), 0 0 16px rgba(34, 197, 94, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, bottom 0.3s ease, border-color 0.2s ease;
  user-select: none;
  font-family: inherit;
}

body.cookie-banner-active .cookie-pref-floating-badge,
body.cookie-banner-active #cookie-pref-floating-btn {
  bottom: 5.75rem;
}

.cookie-pref-floating-badge:hover,
#cookie-pref-floating-btn:hover {
  background: #153c25;
  border-color: #4ade80;
  color: #ffffff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.45);
}

.cookie-pref-floating-badge:active,
#cookie-pref-floating-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Footer Link */
.cookie-footer-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
}

.cookie-footer-link:hover {
  color: var(--primary-green);
  text-decoration: underline;
}

/* Preferences Modal Backdrop */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 15, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.cookie-modal-backdrop.is-hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.cookie-modal-backdrop.is-open {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

/* Preferences Modal Dialog Card */
.cookie-modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  background: #070d18;
  border: 1.5px solid rgba(34, 197, 94, 0.45);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.92), 0 0 32px rgba(34, 197, 94, 0.2);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: cookieModalZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieModalZoom {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cookie-modal-header {
  padding: 1.25rem 1.5rem;
  background: #0c1527;
  border-bottom: 1px solid rgba(34, 197, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
}

.cookie-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cookie-pref-item {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-pref-item.is-locked {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.05);
}

.cookie-modal-footer {
  padding: 1.25rem 1.5rem;
  background: #0c1527;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Toast Box */
.cookie-toast-box {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0c2014;
  border: 1px solid #22c55e;
  color: #f0fdf4;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 16px rgba(34, 197, 94, 0.35);
  z-index: 100010;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cookie-toast-box.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cookie-toast-icon {
  font-size: 1.1rem;
  color: #4ade80;
}

@media (max-width: 768px) {
  .cookie-consent-bar {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-consent-actions {
    width: 100%;
    justify-content: stretch;
  }
  .cookie-consent-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .cookie-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-modal-footer > div {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
}

