/* FUHN Knowledge Portal - Prince Purple Edition */
:root {
  /* Deep Purple Theme - Prince & Vikings Inspired */
  --bg: #0a0612;
  --panel: #12081d;
  --text: #e8d5ff;
  --muted: #9d84b8;
  --accent: #8b4fc9;
  --accent-bright: #a855f7;
  --accent-glow: #c084fc;
  --card: #0e0619;
  --border: #2d1b47;
  --purple-deep: #1a0f2e;
  --purple-mid: #3d2563;
  --purple-bright: #7c3aed;
  --gold-accent: #fbbf24;
  /* Layout metrics */
  --header-height: 96px;
  --tabbar-height: 56px;
  --stack-top: calc(var(--header-height) + var(--tabbar-height));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(139, 79, 201, 0.15);
  --shadow-lg: 0 20px 60px rgba(139, 79, 201, 0.25);
  --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.3);
}

/* Light theme - Purple tinted */
:root[data-theme="light"] {
  --bg: #faf5ff;
  --panel: #f3e8ff;
  --text: #4c1d95;
  --muted: #7c3aed;
  --accent: #8b5cf6;
  --accent-bright: #a855f7;
  --card: #ffffff;
  --border: #e9d5ff;
  --shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { 
  margin: 0; 
  font: 15px/1.6 "Inter", system-ui, Segoe UI, Arial, sans-serif; 
  background: radial-gradient(ellipse at top, var(--purple-deep), var(--bg)), var(--bg);
  color: var(--text); 
  position: relative;
}
/* Subtle animated gradient overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(139, 79, 201, 0.08), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.06), transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes float {
  0%, 100% { opacity: 0.4; transform: translateY(0px); }
  50% { opacity: 0.6; transform: translateY(-20px); }
}
main, header, nav { position: relative; z-index: 1; }
h1,h2,h3 { letter-spacing: -0.02em; }
.hide-sm { display:inline; }
@media (max-width: 640px) { .hide-sm { display:none; } }

/* Accessibility: Focus styles */
:focus { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.show-focus :focus { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { 
  outline: 2px solid var(--accent-bright); 
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25);
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-bright);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}


/* Loading Overlay */
.loading-overlay { 
  position:fixed; top:0; left:0; right:0; bottom:0; 
  background: radial-gradient(circle at center, var(--purple-deep), var(--bg));
  display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:9999; 
}
.loading-overlay.hidden { display:none; }
.spinner { 
  width:60px; height:60px; 
  border:5px solid var(--border); 
  border-top-color:var(--accent-bright); 
  border-right-color: var(--accent-glow);
  border-radius:50%; 
  animation:spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  box-shadow: var(--shadow-glow);
}
@keyframes spin { to { transform:rotate(360deg); } }
.loading-overlay p { margin-top:24px; color:var(--accent-glow); font-weight: 500; letter-spacing: 0.5px; }

/* Modern Floating Header */
.site-header { 
  padding: 20px 32px; 
  border-bottom: 1px solid rgba(139, 79, 201, 0.2);
  background: rgba(18, 8, 29, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  position: sticky; 
  top: 0; 
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 80px rgba(139, 79, 201, 0.1);
}
.header-top { 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap: 24px; 
}
.brand { 
  display:flex; 
  align-items:center; 
  gap: 16px; 
}
.brand-mark { 
  width: 48px; 
  height: 48px; 
  display: grid; 
  place-items: center; 
  background: linear-gradient(135deg, var(--purple-bright), var(--accent-bright));
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 14px; 
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 28px;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: var(--shadow-glow); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(168, 85, 247, 0.5); }
}
.brand-copy h1 { 
  margin: 0 0 4px; 
  font-size: 24px; 
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-glow), var(--gold-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.brand-copy p { 
  margin: 0; 
  color: var(--muted); 
  font-size: 13px;
  letter-spacing: 0.3px;
}
.header-actions { 
  display: flex; 
  gap: 10px; 
  align-items: center;
}
.header-actions .btn-ghost { 
  background: rgba(139, 79, 201, 0.1);
  color: var(--accent-glow);
  border: 1px solid rgba(139, 79, 201, 0.3);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}
.header-actions .btn-ghost:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
}
.header-stats { 
  display: flex; 
  gap: 12px; 
  margin-top: 16px; 
  flex-wrap: wrap; 
}
.stat-pill { 
  background: rgba(61, 37, 99, 0.4);
  border: 1px solid rgba(139, 79, 201, 0.4);
  color: var(--accent-glow);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
.stat-pill:hover { 
  border-color: var(--accent-bright);
  background: rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
}
/* Remove redundant quick-links */
.quick-links { 
  display: none;
}

/* Sleek Tab Navigation */
.top-nav { 
  display: flex; 
  gap: 8px; 
  padding: 16px 32px; 
  border-bottom: 1px solid rgba(139, 79, 201, 0.15);
  background: rgba(12, 6, 19, 0.6);
  backdrop-filter: blur(16px);
  position: sticky; 
  top: var(--header-height); 
  z-index: 90; 
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.tab { 
  background: rgba(61, 37, 99, 0.2);
  color: var(--text);
  border: 1px solid rgba(139, 79, 201, 0.3);
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.2), transparent);
  transition: left 0.5s ease;
}
.tab:hover::before {
  left: 100%;
}
.tab.active { 
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(168, 85, 247, 0.3));
  border-color: var(--accent-bright);
  color: var(--accent-glow);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-weight: 600;
}
.tab:hover { 
  transform: translateY(-2px);
  background: rgba(124, 58, 237, 0.3);
  border-color: var(--accent-bright);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.notice { 
  background: rgba(61, 37, 99, 0.3);
  color: var(--accent-glow);
  padding: 14px 18px;
  margin: 16px 24px;
  border-left: 4px solid var(--accent-bright);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(139, 79, 201, 0.2);
}
.notice code { 
  background: rgba(26, 15, 46, 0.8);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--accent-glow);
  border: 1px solid rgba(139, 79, 201, 0.3);
}

main { padding: 24px; }
.panel { display:none; }
.panel.active { display:block; }

/* Abstract Hero - replaces redundant ribbons */
.hero-abstract {
  position: relative;
  margin: 8px 16px 6px;
  border-radius: var(--radius);
  border: 1px solid rgba(139,79,201,0.25);
  overflow: hidden;
  min-height: 108px; /* reduced ~50% */
  background: radial-gradient(1200px 600px at -10% -20%, rgba(168,85,247,0.15), transparent 60%),
              radial-gradient(800px 500px at 120% 10%, rgba(124,58,237,0.12), transparent 60%),
              linear-gradient(180deg, rgba(18,8,29,0.9), rgba(10,6,18,0.9));
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), var(--shadow-glow);
}
.hero-abstract .hero-art {
  position: absolute; inset: 0;
  background-image: url('../img/abstract-fuhn.svg');
  background-size: cover; background-position: center; opacity: 0.35;
  filter: saturate(120%) hue-rotate(-8deg) blur(0.2px);
}
.hero-abstract::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(600px 280px at 20% 30%, rgba(192,132,252,0.25), transparent 60%),
              radial-gradient(700px 300px at 80% 70%, rgba(168,85,247,0.2), transparent 60%);
  mix-blend-mode: screen;
}
.hero-inner { position: relative; z-index: 1; padding: 14px 20px; max-width: 1200px; }
.hero-inner h2 {
  margin: 0 0 2px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-glow), var(--gold-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-inner p { margin: 0; color: var(--accent-glow); opacity: 0.9; font-size: 13px; }

/* Executive header styling */
.executive-header {
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(47,129,247,0.1), rgba(47,129,247,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.executive-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: var(--text);
}
.executive-header .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* KPIs (metrics row under Executive) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.kpi-number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
.kpi-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Subtle entrance animation for KPI grid */
.reveal { animation: fadeInUp 0.35s ease both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.toolbar { 
  display:flex; 
  gap:10px; 
  align-items:center; 
  margin-bottom:12px; 
  position: sticky; 
  top: var(--stack-top); 
  background: var(--bg); 
  z-index: 8; 
  padding: 10px 0; 
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.toolbar input, .toolbar select { background:var(--panel); color:var(--text); border:1px solid var(--border); border-radius:6px; padding:9px 12px; }
.toolbar .toolbar-spacer { flex:1; }

/* Button styles with better contrast */
button, .btn-ghost, .btn-primary, .btn-secondary { 
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Explicit button styles with high contrast - Purple Edition */
button.primary, a.primary { 
  background: linear-gradient(135deg, var(--accent-bright), var(--purple-bright));
  color: #ffffff !important; 
  border: 1px solid var(--accent-bright);
  border-radius: 10px; 
  padding: 12px 20px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
  position: relative;
  overflow: hidden;
}
button.primary::before, a.primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
button.primary:hover::before, a.primary:hover::before {
  width: 300px;
  height: 300px;
}
button.primary:hover, a.primary:hover { 
  background: linear-gradient(135deg, var(--accent-glow), var(--accent-bright));
  border-color: var(--accent-glow);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.5), 0 0 60px rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}
button.secondary, a.secondary { 
  background: rgba(61, 37, 99, 0.3);
  color: var(--accent-glow) !important; 
  border: 1px solid rgba(139, 79, 201, 0.4);
  border-radius: 10px; 
  padding: 12px 20px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
button.secondary:hover, a.secondary:hover { 
  background: rgba(124, 58, 237, 0.4);
  border-color: var(--accent-bright);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}

.btn-ghost { 
  background: rgba(61, 37, 99, 0.2);
  color: var(--accent-glow);
  border: 1px solid rgba(139, 79, 201, 0.3);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 500;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { 
  background: rgba(124, 58, 237, 0.3);
  color: var(--accent-glow);
  border-color: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

button.primary, .btn-primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--purple-bright));
  color: white !important;
  border: 1px solid var(--accent-bright);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}
button.primary:hover, .btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-glow), var(--accent-bright));
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.5);
}

button.secondary, .btn-secondary {
  background: rgba(61, 37, 99, 0.3);
  color: var(--accent-glow) !important;
  border: 1px solid rgba(139, 79, 201, 0.4);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
button.secondary:hover, .btn-secondary:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}

.saved-views-container { display: flex; gap: 8px; align-items: center; }

/* Autocomplete */
.search-wrapper { position: relative; flex: 1; max-width: 400px; }
.search-wrapper input { width: 100%; }
.autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-top: none; border-radius: 0 0 6px 6px; max-height: 300px; overflow-y: auto; box-shadow: var(--shadow); z-index: 100; margin-top: -1px; }
.autocomplete-item { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.15s; display: flex; align-items: center; gap: 8px; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.selected { background: var(--accent); color: white; }
.autocomplete-item:hover .autocomplete-meta, .autocomplete-item.selected .autocomplete-meta { color: rgba(255,255,255,0.9); }
.autocomplete-icon { font-size: 16px; flex-shrink: 0; }
.autocomplete-text { flex: 1; min-width: 0; }
.autocomplete-label { font-size: 13px; font-weight: 500; }
.autocomplete-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.autocomplete-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12px; }

.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap:14px; }
.grid.list { grid-template-columns: 1fr; }
.card { border:1px solid var(--border); border-radius:var(--radius); background: var(--card); padding:16px; display:flex; flex-direction:column; gap:8px; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.card:hover h3 { color: var(--accent); }
.card h3 { margin:0; font-size:16px; }
.card p { margin:0; color: var(--muted); }
.card .meta { font-size:12px; color: var(--muted); }
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.tag { background:#0f141b; border:1px solid var(--border); color:#c7d1db; padding:2px 6px; border-radius:999px; font-size:12px; }

/* Abstract category icons - sophisticated gradient shapes */
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.category-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.15;
}

.category-icon::after {
  content: '';
  position: absolute;
  border-radius: inherit;
}

/* Network Ecosystem - interconnected nodes */
.category-icon.network {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.category-icon.network::after {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 
    -14px -14px 0 -6px rgba(255,255,255,0.4),
    14px -14px 0 -6px rgba(255,255,255,0.4),
    -14px 14px 0 -6px rgba(255,255,255,0.4),
    14px 14px 0 -6px rgba(255,255,255,0.4);
}

/* Organization Profile - layered structure */
.category-icon.organization {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.category-icon.organization::after {
  width: 28px;
  height: 3px;
  background: white;
  top: 15px;
  left: 10px;
  box-shadow: 
    0 8px 0 0 rgba(255,255,255,0.7),
    0 16px 0 0 rgba(255,255,255,0.5);
}

/* Leadership Analysis - connected hierarchy */
.category-icon.leadership {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.category-icon.leadership::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 
    -12px 14px 0 -2px rgba(255,255,255,0.7),
    12px 14px 0 -2px rgba(255,255,255,0.7),
    -12px 28px 0 -3px rgba(255,255,255,0.5),
    12px 28px 0 -3px rgba(255,255,255,0.5);
}

/* Vendor Opportunities - partnership symbol */
.category-icon.vendor {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.category-icon.vendor::after {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid white;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  box-shadow: 14px 0 0 -3px white;
}

/* Competitive Intelligence - target/focus */
.category-icon.competitive {
  background: linear-gradient(135deg, #ff9a56 0%, #ff6a88 100%);
}
.category-icon.competitive::after {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,0.5);
}

/* Member Clinics - location marker */
.category-icon.clinics {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
.category-icon.clinics::after {
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50% 50% 50% 0;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  box-shadow: inset -3px -3px 0 0 rgba(0,0,0,0.1);
}

/* Default/Generic - abstract data visualization */
.category-icon.default {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}
.category-icon.default::after {
  width: 4px;
  height: 20px;
  background: white;
  border-radius: 2px;
  bottom: 8px;
  left: 12px;
  box-shadow: 
    8px -6px 0 0 rgba(255,255,255,0.7),
    16px -12px 0 0 rgba(255,255,255,0.5);
}
.card a.primary, .card button.primary { 
  margin-top: 8px; 
  align-self: flex-start; 
  text-decoration: none; 
  background: var(--accent); 
  color: white; 
  padding: 8px 14px; 
  border-radius: 6px; 
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.card a.primary:hover, .card button.primary:hover { 
  background: #1e6fe0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 129, 247, 0.2);
}
.card a.secondary, .card button.secondary { 
  text-decoration: none; 
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.card a.secondary:hover, .card button.secondary:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .card { transition: box-shadow .12s ease, border-color .12s ease; }
  .card:hover { transform: none; }
}

mark { background: rgba(255, 207, 64, 0.25); color: inherit; padding: 0 2px; border-radius: 2px; }

.map-wrap { display:flex; flex-direction:column; gap:10px; }
.map-wrap iframe { width:100%; height:70vh; border:1px solid var(--border); border-radius:10px; }

/* Document Overlay (inline viewer) */
.doc-overlay {
  position: fixed;
  top: var(--stack-top);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 17, 22, 0.97);
  backdrop-filter: blur(8px);
  z-index: 1000;
  overflow-y: auto;
  animation: overlayFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.doc-overlay[hidden] {
  display: none;
}
@keyframes overlayFadeIn {
  from { 
    opacity: 0;
    transform: scale(0.98);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

/* Click outside to close */
.doc-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.doc-overlay-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.doc-overlay-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.doc-overlay-header h2 {
  margin: 0;
  font-size: 20px;
  flex: 1;
}

.doc-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

.doc-breadcrumb::before {
  content: '•';
  margin-right: 8px;
}

.doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-hint {
  font-size: 11px;
  color: var(--muted);
  margin-left: 16px;
  padding: 4px 8px;
  background: var(--panel);
  border-radius: 4px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .doc-hint {
    display: none;
  }
}

.doc-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1024px) {
  .doc-body {
    grid-template-columns: 1fr;
  }
  .doc-toc-inline {
    position: static !important;
  }
}

/* Inline TOC (sidebar style) */
.doc-toc-inline {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.doc-toc-inline h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-progress-badge {
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.toc-search {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 12px;
}

.toc-search:focus {
  outline: none;
  border-color: var(--accent);
}

.doc-toc-inline ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.doc-toc-inline li {
  margin: 0;
}

.doc-toc-inline a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  position: relative;
}

.doc-toc-inline a:hover {
  background: var(--card);
  border-left-color: var(--accent);
  transform: translateX(2px);
}

.doc-toc-inline a.active {
  background: var(--accent);
  color: white;
  font-weight: 500;
  border-left-color: white;
}

.doc-toc-inline a.active::after {
  content: '←';
  position: absolute;
  right: 12px;
  opacity: 0.7;
}

/* Indent nested headings */
.doc-toc-inline .toc-h2 { padding-left: 12px; }
.doc-toc-inline .toc-h3 { padding-left: 24px; font-size: 12px; color: var(--muted); }

.markdown-content {
  max-width: 900px;
  padding: 0;
  line-height: 1.7;
}

.markdown-content h1 { 
  font-size:28px; 
  margin:48px 0 20px; 
  scroll-margin-top: 120px;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, var(--panel) 0%, transparent 100%);
  padding: 16px;
  border-radius: 8px;
}
.markdown-content h2 { 
  font-size:22px; 
  margin:40px 0 16px; 
  border-bottom:2px solid var(--border); 
  padding-bottom:12px; 
  scroll-margin-top: 120px;
  color: var(--accent);
  font-weight: 700;
}
.markdown-content h3 { 
  font-size:18px; 
  margin:28px 0 12px; 
  scroll-margin-top: 120px;
  padding-left: 12px;
  border-left: 3px solid var(--muted);
  color: var(--text);
  font-weight: 600;
}
.markdown-content h4 { 
  font-size:16px; 
  margin:20px 0 10px; 
  scroll-margin-top: 120px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}
.markdown-content h3 { font-size:18px; margin:20px 0 8px; scroll-margin-top: 120px; }
.markdown-content p { margin:12px 0; }
.markdown-content ul, .markdown-content ol { margin:12px 0; padding-left:28px; }
.markdown-content li { margin:6px 0; }
.markdown-content code { background:#0f141b; padding:2px 6px; border-radius:4px; font-size:13px; font-family:Consolas,monospace; }
.markdown-content pre { background:#0f141b; border:1px solid var(--border); border-radius:8px; padding:12px; overflow-x:auto; }
.markdown-content pre code { background:none; padding:0; }
.markdown-content a { color:var(--accent); text-decoration:none; }
.markdown-content a:hover { text-decoration:underline; }
.markdown-content blockquote { border-left:3px solid var(--accent); padding-left:16px; margin:16px 0; color:var(--muted); }
.markdown-content table { border-collapse:collapse; width:100%; margin:16px 0; }
.markdown-content th, .markdown-content td { border:1px solid var(--border); padding:8px 12px; text-align:left; }
.markdown-content th { background:var(--panel); font-weight:600; }

/* Related Documents Section */
.related-docs {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}

.related-docs h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
}

.related-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.related-doc-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.related-doc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.related-doc-card .doc-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.related-doc-card h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--accent);
}

.related-doc-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.related-doc-card .doc-badge {
  display: inline-block;
  background: var(--card);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  margin-top: 8px;
  color: var(--muted);
}

/* Reading Progress */
.reading-progress { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 0%; 
  height: 3px; 
  background: var(--accent); 
  z-index: 1001; 
  transition: width 0.1s ease; 
}

/* Network Visualization */
.network-viz { max-width:1200px; margin:0 auto; }
.network-viz h2 { font-size:24px; margin-bottom:8px; }
.network-viz .subtitle { color:var(--muted); margin-bottom:32px; }
.network-viz h3 { font-size:18px; margin:24px 0 16px; }

.org-legend { margin-bottom:32px; }
.org-legend-inline { display:flex; flex-wrap:wrap; gap:8px; margin: 6px 2px 14px; max-height: 120px; overflow-y: auto; }
.org-legend-inline .legend-item { display:flex; align-items:center; gap:8px; padding:6px 10px; border:1px solid var(--border); border-radius:999px; background:#0f141b; cursor:pointer; transition: all 0.2s; }
.org-legend-inline .legend-item:hover { background: var(--accent); color: white; transform: scale(1.05); }
.org-legend-inline .legend-dot { width:12px; height:12px; border-radius:50%; border:1px solid rgba(255,255,255,0.2); }
.org-legend-inline .legend-name { font-size:12px; color:var(--text); white-space: nowrap; }

@media (max-width: 768px) {
  .org-legend-inline { max-height: 60px; }
  .org-legend-inline .legend-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
}
.org-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:12px; }
.org-card { background:var(--card); border:1px solid var(--border); border-radius:8px; padding:12px; display:flex; align-items:center; gap:10px; }
.org-card-color { width:16px; height:16px; border-radius:50%; flex-shrink:0; border:1px solid rgba(255,255,255,0.2); }
.org-card-info { flex:1; min-width:0; }
.org-card-name { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.org-card-count { font-size:11px; color:var(--muted); }

.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:16px; margin-bottom:32px; }
.stat-card { background:var(--card); border:1px solid var(--border); border-radius:8px; padding:20px; text-align:center; }
.stat-number { font-size:36px; font-weight:700; color:var(--accent); margin-bottom:8px; }
.stat-label { font-size:13px; color:var(--muted); }

.relationships { margin-top:32px; }
.relationship-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px,1fr)); gap:16px; }
.rel-card { background:var(--card); border:1px solid var(--border); border-radius:8px; padding:16px; }
.rel-card h4 { font-size:15px; margin-bottom:12px; }
.rel-card ul { margin:0; padding-left:20px; }
.rel-card li { margin:8px 0; font-size:13px; line-height:1.5; }

/* Sources & Citations */
.sources-content { max-width:1000px; margin:0 auto; }
.sources-content h2 { font-size:28px; margin-bottom:8px; }
.sources-content .subtitle { color:var(--muted); font-size:16px; margin-bottom:32px; }
.sources-content h3 { font-size:20px; margin:40px 0 16px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.source-section { margin-bottom:24px; }
.citation-card { background:var(--card); border:1px solid var(--border); border-radius:8px; padding:20px; margin-bottom:16px; }
.citation-card h4 { margin:0 0 12px; font-size:16px; color:var(--accent); }
.citation-card p { margin:8px 0; line-height:1.6; }
.citation-card ul { margin:8px 0; padding-left:24px; }
.citation-card li { margin:6px 0; line-height:1.6; }
.citation-card a { color:var(--accent); text-decoration:none; }
.citation-card a:hover { text-decoration:underline; }
.citation-card code { background:#0f141b; padding:2px 6px; border-radius:4px; font-size:13px; font-family:Consolas,monospace; }
.citation-card strong { color:var(--text); }

/* Loading skeleton */
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--card) 50%, var(--panel) 75%); background-size: 200% 100%; animation: loading 1.5s infinite; border-radius: 4px; }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 200px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.skeleton-title { height: 24px; width: 70%; margin-bottom: 12px; }
.skeleton-text { height: 14px; width: 100%; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }

/* Badge improvements */
.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 6px; margin-bottom: 6px; }
.badge-primary { background: var(--accent); color: white; }
.badge-success { background: #2E7D32; color: white; }
.badge-info { background: #1976D2; color: white; }
.badge-secondary { background: var(--panel); color: var(--text); border: 1px solid var(--border); }

/* Integrated Map */
.map-container { display: flex; height: calc(100vh - 200px); min-height: 600px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.map-sidebar { width: 340px; background: var(--card); border-right: 1px solid var(--border); padding: 14px 14px 16px; overflow-y: auto; flex-shrink: 0; position: relative; scrollbar-color: var(--accent) var(--panel); }
/* Sidebar scroll hints */
.map-sidebar.scroll-hints.has-scroll-top::before,
.map-sidebar.scroll-hints.has-scroll-bottom::after { content: ''; position: sticky; left: 0; right: 0; height: 16px; display: block; pointer-events: none; z-index: 5; }
.map-sidebar.scroll-hints.has-scroll-top::before { top: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent); }
.map-sidebar.scroll-hints.has-scroll-bottom::after { bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.35), transparent); }
/* Thin visible scrollbar (Chromium/WebKit) */
.map-sidebar::-webkit-scrollbar { width: 10px; }
.map-sidebar::-webkit-scrollbar-track { background: var(--panel); }
.map-sidebar::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent), var(--purple-bright)); border-radius: 8px; border: 2px solid var(--panel); }
.map-sidebar::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--accent-glow), var(--accent-bright)); }

.map-header { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.map-header h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.map-subtitle { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

.map-controls { margin-bottom: 12px; }
.map-controls .search-input { width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; color: var(--text); font-size: 14px; transition: border-color 0.2s; }
.map-controls .search-input:focus { border-color: var(--accent); outline: none; }

.map-stats { display: flex; gap: 8px; }
.stat-pill { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; text-align: center; }
.stat-pill .stat-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-pill .stat-value { display: block; font-size: 18px; font-weight: 700; color: var(--accent); }

.map-legend { margin-bottom: 12px; }
.map-legend h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }
.org-legend-items { display: flex; flex-direction: column; gap: 6px; }
.org-legend-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(61,37,99,0.25); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s; user-select: none; }
.org-legend-item:hover { background: var(--card); transform: translateX(2px); }
.org-legend-item.active { background: var(--accent); border-color: var(--accent); }
.org-legend-item.active .org-legend-name, .org-legend-item.active .org-legend-count { color: white; }
.org-legend-color { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.3); }
.org-legend-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; background: var(--org-color); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.3px; border: 2px solid rgba(255,255,255,0.35); box-shadow: 0 0 10px rgba(168,85,247,0.25), inset 0 0 4px rgba(255,255,255,0.15); text-shadow: 0 1px 1px rgba(0,0,0,0.35); }
.org-legend-info { flex: 1; min-width: 0; }
.org-legend-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; }
.org-legend-count { font-size: 11px; color: var(--muted); }

.map-results { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.map-result-item { padding: 12px; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.map-result-item:hover { background: var(--accent); color: white; transform: translateX(2px); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.map-result-item .clinic-name { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.map-result-item .clinic-org { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.map-result-item .clinic-city { font-size: 11px; color: var(--muted); }
.map-result-item:hover .clinic-city, .map-result-item:hover .clinic-org { color: rgba(255,255,255,0.85); }
.map-view { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

/* Leaflet dark theme integration */
.leaflet-container { background: var(--bg); }
.leaflet-control-zoom a {
  background: rgba(61, 37, 99, 0.6);
  border: 1px solid rgba(139, 79, 201, 0.4);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.leaflet-control-zoom a:hover {
  background: rgba(124, 58, 237, 0.5);
  border-color: var(--accent-bright);
}

/* Integrated state styling */
/* Precise Minnesota outline with respectful glow (no fill) */
.mn-outline {
  stroke: var(--accent-bright) !important;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(168,85,247,.4)) drop-shadow(0 0 14px rgba(168,85,247,.25));
  animation: mnOutlinePulse 5.5s ease-in-out infinite;
}
@keyframes mnOutlinePulse {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(168,85,247,.35)) drop-shadow(0 0 12px rgba(168,85,247,.2)); }
  50% { filter: drop-shadow(0 0 10px rgba(168,85,247,.7)) drop-shadow(0 0 22px rgba(168,85,247,.45)); }
}

/* Subtle MN–ND shared border glow (edge emphasis only) */
.nd-edge-glow {
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(139,92,246,0.35)) drop-shadow(0 0 20px rgba(139,92,246,0.2));
  animation: ndEdgeBreath 6.5s ease-in-out infinite;
}
@keyframes ndEdgeBreath {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.55; }
}

/* ND sprawl lines: horizontal strokes that fade by 25% length */
.nd-sprawl-line {
  stroke: url(#ndSprawlGrad);
  stroke-width: 3px;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(168,85,247,0.35)) drop-shadow(0 0 18px rgba(168,85,247,0.25));
  animation: ndSprawlPulse 7s ease-in-out infinite;
}
@keyframes ndSprawlPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Leaflet custom styles */
.leaflet-popup-content-wrapper { border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.leaflet-popup-content { margin: 16px; font-family: 'Inter', sans-serif; }
.leaflet-popup-content h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.leaflet-popup-content p { margin: 4px 0; font-size: 13px; line-height: 1.5; }
.leaflet-popup-content a { color: #3b82f6; text-decoration: none; font-weight: 600; }
.leaflet-popup-content a:hover { text-decoration: underline; }

/* Monogram map marker */
.map-marker { width:26px; height:26px; border-radius:50%; background: var(--org-color); color:#fff; border:3px solid #ffffff; display:grid; place-items:center; box-shadow: 0 3px 10px rgba(0,0,0,0.4); font-size:11px; font-weight:800; letter-spacing: .2px; cursor: pointer; }
.map-marker > span { transform: translateY(-0.5px); }

@media (max-width: 768px) {
  .map-container { flex-direction: column; }
  .map-sidebar { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
  .map-view { height: 400px; }
}

.site-footer { padding: 16px; border-top:1px solid var(--border); color: var(--muted); text-align:center; }

/* Back to top */
.back-to-top { position: fixed; right: 16px; bottom: 16px; background: var(--accent); color: #fff; border: none; width: 40px; height: 40px; border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 18px; }
.back-to-top.show { display: inline-flex; }

/* Global Navigation Drawer */
.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 3000; display: none; }
.nav-overlay[hidden] { display: none; }
.nav-overlay:not([hidden]) { display: block; }
.nav-drawer { position: absolute; left: 0; top: 0; bottom: 0; width: min(420px, 92vw); background: var(--panel); border-right: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.4); transform: translateX(-100%); animation: drawerIn .28s ease forwards; display: flex; flex-direction: column; }
@keyframes drawerIn { from { transform: translateX(-100%); opacity: 0.6; } to { transform: translateX(0); opacity: 1; } }
.nav-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); background: var(--card); }
.nav-title { display: flex; align-items: center; gap: 10px; }
.nav-title .brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: #0f141b; border:1px solid var(--border); border-radius: 8px; }
.nav-header h3 { margin: 0; font-size: 16px; }
.nav-subtitle { font-size: 12px; color: var(--muted); }
.nav-search { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.nav-search input { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text); }
.nav-sections { padding: 10px 12px 16px; overflow-y: auto; flex: 1; }
.nav-section { border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; background: var(--card); }
.nav-section summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px; border-bottom: 1px solid var(--border); }
.nav-section summary::-webkit-details-marker { display: none; }
.nav-section summary .label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.nav-section summary .chev { opacity: 0.7; }
.nav-items { padding: 8px 6px; display: grid; grid-template-columns: 1fr; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; text-decoration: none; color: var(--text); }
.nav-item:hover { background: var(--panel); border-color: var(--border); }
.nav-item .icon { width: 22px; text-align: center; }
.nav-item .meta { font-size: 11px; color: var(--muted); margin-left: auto; }
.nav-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.nav-footer .btn-ghost { padding: 8px 10px; }
.btn-close { background: transparent; border: none; font-size: 24px; color: var(--muted); cursor: pointer; padding: 0; width: 28px; height: 28px; border-radius: 6px; }
.btn-close:hover { background: var(--accent); color: #fff; }
body.nav-open { overflow: hidden; }

/* Modal Styles */
.modal { display: none; position: fixed; z-index: 1100; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background: rgba(0,0,0,0.85); backdrop-filter: blur(4px); }
.modal.active { display: block; }
.modal-content { background: var(--card); margin: 40px auto; padding: 0; border: 1px solid var(--border); border-radius: 12px; max-width: 800px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: modalSlideIn 0.3s ease-out; }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--panel); }
.modal-header h2 { margin: 0; font-size: 22px; font-weight: 700; }
.modal-close { background: transparent; border: none; font-size: 32px; font-weight: 300; color: var(--muted); cursor: pointer; padding: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: all 0.2s; }
.modal-close:hover { background: var(--accent); color: white; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-section { margin-bottom: 24px; }
.modal-section h3 { font-size: 16px; margin: 0 0 12px; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.modal-stat { background: var(--panel); padding: 16px; border-radius: 8px; border: 1px solid var(--border); }
.modal-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.modal-stat-value { font-size: 20px; font-weight: 700; color: var(--accent); }
.modal-list { list-style: none; padding: 0; margin: 0; }
.modal-list li { padding: 10px; background: var(--panel); margin-bottom: 6px; border-radius: 6px; display: flex; align-items: center; gap: 10px; border-left: 3px solid var(--accent); }
.modal-list li::before { content: "•"; color: var(--accent); font-size: 20px; line-height: 1; }
.modal-badge { display: inline-block; padding: 6px 12px; background: var(--accent); color: white; border-radius: 6px; font-size: 12px; font-weight: 600; margin-right: 6px; margin-bottom: 6px; }
.modal-badge.good { background: #2E7D32; }
.modal-badge.medium { background: #F57C00; }
.modal-badge.poor { background: #C62828; }

/* Map Legend Overlay */
.map-legend-overlay { position: absolute; top: 16px; right: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; max-width: 300px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 500; }
.legend-overlay-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.legend-overlay-header strong { font-size: 15px; font-weight: 700; }
.btn-close { background: transparent; border: none; font-size: 24px; color: var(--muted); cursor: pointer; padding: 0; width: 24px; height: 24px; border-radius: 4px; transition: all 0.2s; }
.btn-close:hover { background: var(--accent); color: white; }
.legend-overlay-content { display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid white; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* Map Insights Panel */
.map-insights { margin: 12px 0; padding: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.map-insights h4 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.insight-cards { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 420px) { .insight-cards { grid-template-columns: 1fr 1fr; } }
.insight-card { background: var(--card); padding: 10px; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.insight-card-title { font-size: 11px; font-weight: 700; margin-bottom: 2px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.insight-card-value { font-size: 16px; font-weight: 800; color: var(--accent); margin-bottom: 2px; }
.insight-card-desc { font-size: 11px; color: var(--muted); line-height: 1.35; }
.legend-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.legend-header h4 { margin: 0; }
.btn-ghost-sm { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 4px 8px; font-size: 11px; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.btn-ghost-sm:hover { background: var(--accent); color: white; border-color: var(--accent); }

@media print {
  /* Hide interactive elements */
  .site-header, .top-nav, .toolbar, .back-to-top, .btn-ghost, 
  .autocomplete-dropdown, .org-legend-inline, .saved-views-container,
  .map-sidebar, #backToTop, button { display: none !important; }
  
  /* Reset colors for print */
  * { background: white !important; color: black !important; }
  
  body { 
    margin: 0;
    padding: 20px;
    font-size: 11pt;
    line-height: 1.5;
  }
  
  /* Page breaks */
  .card, .org-card, .stat-card, .rel-card, .citation-card {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 12pt;
    border: 1px solid #ccc !important;
    padding: 10pt;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }
  
  /* Clinic cards - compact for print */
  .grid { 
    display: block !important;
  }
  
  .card {
    margin-bottom: 8pt;
    padding: 8pt;
  }
  
  .card h3 {
    font-size: 12pt;
    margin: 0 0 4pt;
  }
  
  .card p {
    font-size: 10pt;
    margin: 2pt 0;
  }
  
  /* Show links as text */
  a::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }
  
  /* Markdown content */
  .markdown-content {
    max-width: 100%;
  }
  
  .markdown-content h1 {
    font-size: 18pt;
    margin: 16pt 0 8pt;
  }
  
  .markdown-content h2 {
    font-size: 14pt;
    margin: 12pt 0 6pt;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4pt;
  }
  
  .markdown-content h3 {
    font-size: 12pt;
    margin: 10pt 0 4pt;
  }
  
  .markdown-content code {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    padding: 2pt 4pt;
    font-size: 9pt;
  }
  
  .markdown-content pre {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    padding: 8pt;
    overflow-x: visible;
    white-space: pre-wrap;
  }
  
  /* Network visualization */
  .network-viz h2 {
    font-size: 16pt;
    margin-bottom: 8pt;
  }
  
  .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 8pt;
  }
  
  .stat-card {
    text-align: center;
    padding: 8pt;
  }
  
  .stat-number {
    font-size: 20pt;
    font-weight: bold;
  }
  
  .stat-label {
    font-size: 9pt;
  }
  
  
  /* Sources section */
  .sources-content h3 {
    font-size: 14pt;
    margin: 12pt 0 6pt;
  }
  
  .citation-card strong {
    font-weight: bold;
  }
  
  /* Map - hide completely in print */
  .map-container, #map, .map-view {
    display: none !important;
  }
  
  /* Add header to each page */
  @page {
    margin: 1cm;
    size: letter;
  }
  
  @page :first {
    margin-top: 1cm;
  }
  
  /* Print header */
  body::before {
    content: "FUHN Knowledge Portal - Printed " attr(data-print-date);
    display: block;
    text-align: center;
    font-size: 10pt;
    margin-bottom: 12pt;
    padding-bottom: 6pt;
    border-bottom: 2px solid #333;
  }
}

/* Ecosystem Visual Map Styles */
.ecosystem-header {
  margin-bottom: 3rem;
}

.ecosystem-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: linear-gradient(135deg, var(--card) 0%, rgba(47, 129, 247, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tier Architecture */
.tier-container {
  margin: 3rem 0;
}

.tier-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.tier-card:hover {
  box-shadow: var(--shadow);
}

.tier-card.tier-1 {
  border-left: 4px solid #10b981;
  background: linear-gradient(to right, rgba(16, 185, 129, 0.05) 0%, var(--card) 10%);
}

.tier-card.tier-2 {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(to right, rgba(245, 158, 11, 0.05) 0%, var(--card) 10%);
}

.tier-card.tier-3 {
  border-left: 4px solid #8b5cf6;
  background: linear-gradient(to right, rgba(139, 92, 246, 0.05) 0%, var(--card) 10%);
}

.tier-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.tier-section {
  background: rgba(47, 129, 247, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
}

.governance-badge {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(47, 129, 247, 0.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
}

/* Clinic Cards Grid */
.clinic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.clinic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

/* Executive KPI tiles */
.kpi-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0 4px; }
.kpi { background: linear-gradient(135deg, rgba(47,129,247,0.08), rgba(0,0,0,0) 70%), var(--panel); border:1px solid var(--border); border-radius: 12px; padding: 16px; text-align:center; box-shadow: var(--shadow-sm); }
.kpi-number { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.kpi-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-top:6px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.show { opacity: 1; transform: none; }

/* Data-definition tooltip (glossary) */
[data-definition] { position: relative; cursor: help; border-bottom: 1px dotted var(--border); }
[data-definition]:hover::after { content: attr(data-definition); position: absolute; left: 0; top: 100%; margin-top: 6px; width: max(240px, 40ch); max-width: 72vw; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); z-index: 30; }

/* Command Palette */
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: start center;
  padding-top: 10vh;
  z-index: 2000;
}
.palette-overlay[hidden] { display: none !important; }
.palette {
  width: min(720px, calc(100% - 24px));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
  overflow: hidden;
}
.palette input {
  width: 100%;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text);
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.palette-list {
  max-height: 55vh;
  overflow: auto;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.palette-item:last-child { border-bottom: none; }
.palette-item:hover, .palette-item[aria-selected="true"] {
  background: var(--accent);
  color: white;
}
.palette-item .pi-icon { font-size: 18px; width: 22px; text-align: center; }
.palette-item .pi-main { flex: 1; min-width: 0; }
.palette-item .pi-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item .pi-meta { font-size: 12px; opacity: 0.8; }
.palette-hint { padding: 10px 14px; font-size: 12px; color: var(--muted); background: var(--panel); }

/* Shortcuts overlay */
.help-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 2000; }
.help-overlay[hidden] { display: none !important; }
.help-modal { position: relative; width: min(720px, calc(100% - 24px)); background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,0.35); padding: 20px; }
.help-modal h3 { margin-top: 0; }
.btn-close-overlay { position: absolute; top: 16px; right: 16px; background: transparent; border: none; color: var(--text-muted); font-size: 32px; cursor: pointer; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: all 0.15s ease; }
.btn-close-overlay:hover { background: var(--hover); color: var(--text); }
.shortcut-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; }
.kbd { background: #0f141b; border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.clinic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.clinic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.clinic-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--accent);
}

.clinic-sites-badge {
  background: rgba(47, 129, 247, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.unique-services,
.impact-stats,
.cultural-badge,
.partnership-count,
.quality-badges,
.umn-badge,
.academic-badge,
.indigenous-badge {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.unique-services {
  background: rgba(16, 185, 129, 0.05);
  border-left-color: #10b981;
}

.impact-stats {
  background: rgba(245, 158, 11, 0.05);
  border-left-color: #f59e0b;
}

.cultural-badge {
  background: rgba(139, 92, 246, 0.05);
  border-left-color: #8b5cf6;
}

.quality-badges {
  background: rgba(59, 130, 246, 0.05);
  border-left-color: #3b82f6;
}

.umn-badge,
.academic-badge {
  background: rgba(236, 72, 153, 0.05);
  border-left-color: #ec4899;
}

.indigenous-badge {
  background: rgba(234, 179, 8, 0.05);
  border-left-color: #eab308;
}

/* UMN Hub */
.umn-hub-container {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.umn-connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.umn-connection-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.umn-connection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.umn-connection-card.direct {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, var(--card) 100%);
  border-color: #ec4899;
}

.umn-connection-card.residency {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--card) 100%);
  border-color: #3b82f6;
}

.umn-connection-card.network {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--card) 100%);
  border-color: #10b981;
}

.umn-connection-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Geography */
.geography-container {
  margin: 3rem 0;
}

.geo-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.geo-summary {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(47, 129, 247, 0.1) 0%, var(--card) 100%);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}

/* Service Tiers */
.service-tiers {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.service-tier {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
}

.service-tier.universal {
  border-left: 4px solid #10b981;
  background: linear-gradient(to right, rgba(16, 185, 129, 0.08) 0%, var(--card) 15%);
}

.service-tier.common {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.08) 0%, var(--card) 15%);
}

.service-tier.specialized {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(to right, rgba(245, 158, 11, 0.08) 0%, var(--card) 15%);
}

.service-tier.unique {
  border-left: 4px solid #8b5cf6;
  background: linear-gradient(to right, rgba(139, 92, 246, 0.08) 0%, var(--card) 15%);
}

/* Cultural Network */
.cultural-network {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.cultural-card {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.cultural-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.cultural-card.multi-cultural {
  grid-column: span 1;
}

@media (min-width: 1024px) {
  .cultural-card.multi-cultural {
    grid-column: span 2;
  }
}

.cultural-insight {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(47, 129, 247, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-style: italic;
}

/* Decision Flow */
.decision-flow {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.decision-level {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
}

.decision-level.level-1 {
  border-left: 4px solid #dc2626;
  background: linear-gradient(to right, rgba(220, 38, 38, 0.08) 0%, var(--card) 15%);
}

.decision-level.level-2 {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(to right, rgba(245, 158, 11, 0.08) 0%, var(--card) 15%);
}

.decision-level.level-3 {
  border-left: 4px solid #10b981;
  background: linear-gradient(to right, rgba(16, 185, 129, 0.08) 0%, var(--card) 15%);
}

/* Complexity Scorecard */
.complexity-scorecard {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.complexity-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-group {
  padding: 1rem;
  background: rgba(47, 129, 247, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.complexity-rating {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, var(--card) 100%);
  border: 2px solid #8b5cf6;
  border-radius: var(--radius);
  text-align: center;
}

.complexity-rating strong {
  color: #8b5cf6;
  font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ecosystem-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .clinic-grid {
    grid-template-columns: 1fr;
  }
  
  .tier-content-grid {
    grid-template-columns: 1fr;
  }
  
  .umn-connection-grid {
    grid-template-columns: 1fr;
  }
  
  .cultural-network {
    grid-template-columns: 1fr;
  }
  
  .complexity-metrics {
    grid-template-columns: 1fr;
  }
}

/* Historic Callout Banner */
.historic-callout {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  margin: 2rem 0 3rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(47, 129, 247, 0.1) 100%);
  border: 2px solid #10b981;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.callout-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
}

.callout-content h3 {
  margin: 0 0 0.5rem 0;
  color: #10b981;
  font-size: 1.4rem;
}

.callout-content p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Glossary Terms with Tooltips */
.term {
  position: relative;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--accent);
  cursor: help;
  transition: all 0.2s ease;
}

.term:hover {
  color: var(--accent);
  text-decoration-style: solid;
}

.term::after {
  content: attr(data-definition);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 0.75rem 1rem;
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 320px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.term:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* External Links Styling */
.doc-content a[target="_blank"] {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.doc-content a[target="_blank"]:hover {
  border-bottom-color: var(--accent);
  opacity: 0.8;
}

.doc-content a[target="_blank"]::after {
  content: "↗";
  font-size: 0.8em;
  opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .historic-callout {
    flex-direction: column;
    text-align: center;
  }
  
  .callout-icon {
    font-size: 2.5rem;
  }
  
  .term::after {
    left: 0;
    right: 0;
    transform: translateX(0) translateY(-8px);
    width: auto;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .term:hover::after {
    transform: translateX(0) translateY(-4px);
  }
}

/* Partner Directory Styles */
.partner-directory {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--panel-bg);
  border-radius: 12px;
  border: 2px solid var(--accent);
}

.partner-directory h3 {
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.partner-directory h3:first-of-type {
  margin-top: 0;
}

.partner-directory details {
  margin: 1rem 0 1.5rem 0;
  padding: 1.2rem;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.partner-directory details:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.18);
}

.partner-directory details[open] {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
}

.partner-directory summary {
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.partner-directory summary::-webkit-details-marker {
  display: none;
}

.partner-directory summary::before {
  content: '▶';
  color: var(--accent);
  font-size: 0.9rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.partner-directory details[open] summary::before {
  transform: rotate(90deg);
}

.partner-directory summary:hover {
  background: rgba(47, 129, 247, 0.1);
  color: var(--accent);
}

.partner-directory details ul,
.partner-directory details ol {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
}

.partner-directory details li {
  margin: 0.6rem 0;
  line-height: 1.6;
}

.partner-directory details li a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.partner-directory details li a:hover {
  border-bottom-color: var(--accent);
}

.partner-directory details strong {
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.partner-directory details strong:first-child {
  margin-top: 0.5rem;
}

.partner-summary-box {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(47, 129, 247, 0.1) 100%);
  border: 2px solid var(--accent);
  border-radius: 12px;
  text-align: center;
}

.partner-summary-box strong {
  font-size: 1.5rem;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
}

.partner-summary-box ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
  text-align: left;
}

.partner-summary-box li {
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .partner-directory {
    padding: 1rem;
  }
  
  .partner-summary-box ul {
    grid-template-columns: 1fr;
  }
}

/* Comparison Cards for Executive Summary */
.clinic-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.comparison-card {
  background: rgba(47, 129, 247, 0.05);
  border: 2px solid rgba(47, 129, 247, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.comparison-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(47, 129, 247, 0.2);
  border-color: var(--accent);
}

.comparison-card h4 {
  margin: 0 0 0.8rem 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.comparison-card h4 a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.comparison-card h4 a:hover {
  color: #10b981;
}

.stat-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.comparison-card p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.comparison-card strong {
  color: var(--text-primary);
  font-weight: 600;
}

.partnership-categories {
  margin-top: 1rem;
  line-height: 1.8;
}

.partnership-categories strong {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 1.05rem;
}

.partnership-categories a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.partnership-categories a:hover {
  border-bottom-color: var(--accent);
}

@media (max-width: 768px) {
  .clinic-comparison-grid {
    grid-template-columns: 1fr;
  }
}
