/* ============================================
   Corporate Actions Interactive Guide
   Design System & Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-border: rgba(255, 255, 255, 0.08);

  --accent-teal: #06d6a0;
  --accent-teal-dim: rgba(6, 214, 160, 0.15);
  --accent-gold: #f6c343;
  --accent-gold-dim: rgba(246, 195, 67, 0.15);
  --accent-blue: #3b82f6;
  --accent-blue-dim: rgba(59, 130, 246, 0.15);
  --accent-purple: #a78bfa;
  --accent-purple-dim: rgba(167, 139, 250, 0.15);
  --accent-rose: #f43f5e;
  --accent-rose-dim: rgba(244, 63, 94, 0.15);
  --accent-orange: #fb923c;
  --accent-orange-dim: rgba(251, 146, 60, 0.15);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark: #1e293b;

  --border-color: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(6, 214, 160, 0.3);

  --gradient-hero: linear-gradient(135deg, #0b1120 0%, #1a1a3e 50%, #0b1120 100%);
  --gradient-teal: linear-gradient(135deg, #06d6a0, #3b82f6);
  --gradient-gold: linear-gradient(135deg, #f6c343, #fb923c);
  --gradient-card: linear-gradient(145deg, rgba(17,24,39,0.9), rgba(30,41,59,0.5));

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-glow-teal: 0 0 30px rgba(6, 214, 160, 0.15);
  --shadow-glow-gold: 0 0 30px rgba(246, 195, 67, 0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background animated grid */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(6,214,160,0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59,130,246,0.03) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
  z-index: -1;
  pointer-events: none;
}

a { color: var(--accent-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 var(--space-xl);
  transition: var(--transition-base);
}

.navbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-teal);
  background: var(--accent-teal-dim);
  text-decoration: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-base);
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,214,160,0.08), transparent 70%);
  top: -100px; right: -100px;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.06), transparent 70%);
  bottom: -100px; left: -100px;
  animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 1; }
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-accent);
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
}

.hero h1 .gradient-text {
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Section Layout --- */
.section {
  padding: var(--space-4xl) var(--space-xl);
  max-width: 1320px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-teal);
  background: var(--accent-teal-dim);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

/* --- Glass Card --- */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(10px);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-teal);
  opacity: 0;
  transition: var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(6,214,160,0.15);
  box-shadow: var(--shadow-glow-teal);
}

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

.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-lg);
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card p, .card li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card ul li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-teal);
  font-weight: bold;
}

/* Color variants for card icons */
.icon-teal { background: var(--accent-teal-dim); color: var(--accent-teal); }
.icon-gold { background: var(--accent-gold-dim); color: var(--accent-gold); }
.icon-blue { background: var(--accent-blue-dim); color: var(--accent-blue); }
.icon-purple { background: var(--accent-purple-dim); color: var(--accent-purple); }
.icon-rose { background: var(--accent-rose-dim); color: var(--accent-rose); }
.icon-orange { background: var(--accent-orange-dim); color: var(--accent-orange); }

/* --- Grid Layouts --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-xl);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  justify-content: center;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-base);
}

.tab-btn:hover {
  border-color: rgba(6,214,160,0.3);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-teal-dim);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-teal), var(--accent-blue), var(--accent-purple));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--gradient-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.timeline-item:hover {
  border-color: rgba(6,214,160,0.2);
  box-shadow: var(--shadow-glow-teal);
}

.timeline-dot {
  position: absolute;
  left: -33px; top: 24px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-teal);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 12px rgba(6,214,160,0.4);
}

.timeline-item:nth-child(2) .timeline-dot { background: var(--accent-blue); box-shadow: 0 0 12px rgba(59,130,246,0.4); }
.timeline-item:nth-child(3) .timeline-dot { background: var(--accent-gold); box-shadow: 0 0 12px rgba(246,195,67,0.4); }
.timeline-item:nth-child(4) .timeline-dot { background: var(--accent-purple); box-shadow: 0 0 12px rgba(167,139,250,0.4); }

.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-teal);
  margin-bottom: var(--space-sm);
}

.timeline-item:nth-child(2) .timeline-date { color: var(--accent-blue); }
.timeline-item:nth-child(3) .timeline-date { color: var(--accent-gold); }
.timeline-item:nth-child(4) .timeline-date { color: var(--accent-purple); }

.timeline-item h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* --- Collapsible Sections --- */
.collapsible {
  margin-bottom: var(--space-md);
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: var(--gradient-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-base);
  user-select: none;
}

.collapsible-header:hover {
  border-color: rgba(6,214,160,0.2);
  background: var(--bg-card-hover);
}

.collapsible-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.collapsible-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition-base);
}

.collapsible-arrow {
  transition: var(--transition-base);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.collapsible.open .collapsible-arrow {
  transform: rotate(180deg);
  color: var(--accent-teal);
}

.collapsible.open .collapsible-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: rgba(6,214,160,0.2);
}

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--gradient-card);
  border: 1px solid var(--bg-glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.collapsible.open .collapsible-body {
  max-height: 2000px;
  border-color: rgba(6,214,160,0.2);
}

.collapsible-content {
  padding: var(--space-xl);
}

.collapsible-content p,
.collapsible-content li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
}

.collapsible-content ul {
  list-style: none;
  padding: 0;
}

.collapsible-content ul li {
  padding: 4px 0 4px 20px;
  position: relative;
}

.collapsible-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-teal);
}

/* --- Tables --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.88rem;
}

.data-table thead {
  background: rgba(6, 214, 160, 0.08);
}

.data-table th {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 14px 18px;
  text-align: left;
  color: var(--accent-teal);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid rgba(6,214,160,0.15);
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(6, 214, 160, 0.04);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-glass-border);
  background: var(--gradient-card);
}

/* --- SWIFT Message Blocks --- */
.swift-block {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-secondary);
  overflow-x: auto;
  position: relative;
}

.swift-block .tag {
  color: var(--accent-teal);
  font-weight: 600;
}

.swift-block .field-label {
  color: var(--accent-gold);
}

.swift-block .value {
  color: var(--text-primary);
}

.swift-block-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.swift-badge {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-sender { background: var(--accent-blue-dim); color: var(--accent-blue); }
.badge-receiver { background: var(--accent-purple-dim); color: var(--accent-purple); }

/* --- Flow Diagram --- */
.flow-diagram {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

.flow-step {
  display: flex;
  align-items: stretch;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--gradient-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
}

.flow-step::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, var(--accent-teal), transparent);
}

.flow-step:last-child::after { display: none; }

.flow-step:hover,
.flow-step.active {
  border-color: rgba(6,214,160,0.3);
  box-shadow: var(--shadow-glow-teal);
  transform: translateX(8px);
}

.flow-step-number {
  min-width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
  flex-shrink: 0;
}

.flow-step-content { flex: 1; }

.flow-step-content h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.flow-step-content p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: var(--space-sm);
}

.flow-step-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.flow-step-meta span {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.meta-sender { background: var(--accent-blue-dim); color: var(--accent-blue); }
.meta-receiver { background: var(--accent-purple-dim); color: var(--accent-purple); }
.meta-message { background: var(--accent-gold-dim); color: var(--accent-gold); }

.flow-detail-panel {
  display: none;
  margin-top: var(--space-md);
  padding: var(--space-lg);
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(6,214,160,0.1);
  animation: fadeIn 0.3s ease;
}

.flow-step.active .flow-detail-panel {
  display: block;
}

/* --- Institutions Diagram --- */
.institutions-hub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
  position: relative;
}

.institution-node {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--gradient-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  width: 200px;
  transition: var(--transition-base);
  cursor: pointer;
  position: relative;
}

.institution-node:hover {
  transform: translateY(-6px);
  border-color: rgba(6,214,160,0.3);
  box-shadow: var(--shadow-glow-teal);
}

.institution-node .node-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto var(--space-md);
}

.institution-node h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.institution-node p {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* --- Tooltips --- */
.tooltip-trigger {
  position: relative;
  border-bottom: 1px dashed var(--accent-teal);
  cursor: help;
  color: var(--accent-teal);
}

.tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.tooltip-trigger::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-accent);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 100;
}

.tooltip-trigger:hover::after,
.tooltip-trigger:hover::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* --- Accrual Calculation Box --- */
.calc-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 2;
}

.calc-box .calc-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

.calc-box .calc-line:last-child {
  border-bottom: none;
  font-weight: 700;
  color: var(--accent-teal);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 2px solid var(--accent-teal);
}

.calc-box .calc-label { color: var(--text-secondary); }
.calc-box .calc-value { color: var(--text-primary); }

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { 
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(11, 17, 32, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.open { display: flex; }

  .nav-hamburger { display: flex; }

  .hero-stats { gap: var(--space-lg); }

  .section { padding: var(--space-2xl) var(--space-md); }

  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  .flow-step {
    flex-direction: column;
  }

  .institutions-hub {
    gap: var(--space-lg);
  }

  .institution-node {
    width: 160px;
  }

  .tabs {
    gap: var(--space-xs);
  }

  .tab-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* Scroll-to-top button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-teal);
  color: var(--text-dark);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-base);
  z-index: 999;
  box-shadow: var(--shadow-glow-teal);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(6, 214, 160, 0.3);
}

/* Highlight Pulse for interactive elements */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6,214,160,0.2); }
  50% { box-shadow: 0 0 0 10px rgba(6,214,160,0); }
}

/* Additional status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-mandatory { background: var(--accent-rose-dim); color: var(--accent-rose); }
.badge-voluntary { background: var(--accent-blue-dim); color: var(--accent-blue); }
.badge-choice { background: var(--accent-gold-dim); color: var(--accent-gold); }
