@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600;1,700&family=JetBrains+Mono:wght@400;500;600&family=Onest:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-paper: #F7F6F1;
  --bg-card: #FFFFFF;
  --bg-warm: #EFECE4;
  --bg-navy: #0B2239;
  --bg-navy-mid: #12355B;
  --scrub-blue: #16528E;
  --scrub-accent: #2563EB;
  --sage-green: #166534;
  --sage-bg: #DCFCE7;
  --amber-warm: #D97706;
  --amber-bg: #FEF3C7;
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --border-hairline: #E2DFD5;
  --border-strong: #C9C5B8;
  --shadow-editorial: 0 12px 32px -8px rgba(11, 34, 57, 0.06), 0 2px 6px -1px rgba(11, 34, 57, 0.04);
  --shadow-hover: 0 20px 40px -12px rgba(11, 34, 57, 0.12), 0 4px 12px -2px rgba(11, 34, 57, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-paper);
  color: var(--text-primary);
}

body {
  background-color: var(--bg-paper);
  overflow-x: hidden;
  selection-background-color: #16528E;
  selection-color: #ffffff;
}

::selection {
  background-color: #16528E;
  color: #ffffff;
}

.font-serif-editorial {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -0.01em;
}

.font-mono-clinical {
  font-family: 'JetBrains Mono', monospace;
}

/* Architectural Grid Background Pattern */
.bg-clinical-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(226, 223, 213, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 223, 213, 0.45) 1px, transparent 1px);
}

.bg-navy-grid {
  background-size: 36px 36px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* Editorial Cards (Preline UI + Bento Aesthetic) */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  box-shadow: var(--shadow-editorial);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.bento-card-static {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  box-shadow: var(--shadow-editorial);
}

/* Doctor Portrait Frame */
.doctor-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(165deg, #EAE6DC 0%, #D8D3C6 100%);
  border: 1px solid var(--border-strong);
}

.doctor-frame img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.doctor-frame:hover img {
  transform: scale(1.02);
}

/* Floating Glass Badges */
.glass-pill {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 223, 213, 0.9);
  box-shadow: 0 12px 28px -6px rgba(11, 34, 57, 0.14);
}

.glass-nav {
  background: rgba(247, 246, 241, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
}

/* Custom Range Slider for Pediatric Dosage Calculator */
input[type="range"].clinical-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #E2DFD5;
  border-radius: 999px;
  outline: none;
}

input[type="range"].clinical-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #12355B;
  border: 4px solid #FFFFFF;
  box-shadow: 0 4px 10px rgba(18, 53, 91, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"].clinical-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  background: #16528E;
}

/* Custom Tabs */
.clinical-tab {
  transition: all 0.2s ease;
  border: 1px solid var(--border-hairline);
}

.clinical-tab.active {
  background-color: #0B2239;
  color: #FFFFFF;
  border-color: #0B2239;
  box-shadow: 0 8px 20px -4px rgba(11, 34, 57, 0.25);
}

/* Accordion Smooth Transition */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.open .accordion-content {
  max-height: 600px;
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

/* Preparation Step Checkbox Card */
.prep-step-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.prep-step-card.checked {
  background-color: #F0FDF4;
  border-color: #86EFAC;
}

/* Pulse indicator */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.live-dot {
  animation: pulse-ring 2s infinite;
}

/* Print Styles for Checklist / Guides */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff !important;
  }
}
