:root {
  --primary-color: #2c5282;
  --secondary-color: #63b3ed;
  --accent-color: #ed8936;
  --text-color: #2d3748;
  --text-light: #718096;
  --bg-color: #ffffff;
  --bg-light: #f7fafc;
  --border-color: #e2e8f0;
  --success-color: #48bb78;
  --warning-color: #f6ad55;
  --error-color: #fc8181;
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --radius: 0.375rem;
  --max-width: 1200px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo svg {
  width: 32px;
  height: 32px;
}

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

nav a:hover, nav a:focus {
  background: var(--bg-light);
  color: var(--primary-color);
  outline: 2px solid transparent;
}

nav a.active {
  background: var(--primary-color);
  color: white;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

main {
  flex: 1;
  padding: 2rem 0;
}

.breadcrumb {
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb li::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb li:last-child::after {
  content: '';
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--primary-color);
  margin-top: 0;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: var(--primary-color);
  text-decoration: underline;
}

a:hover {
  color: var(--secondary-color);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover, .btn:focus {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 0;
  margin-bottom: 2rem;
  border-radius: var(--radius);
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.95;
  max-width: 600px;
}

.toc {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.125rem;
}

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

.toc li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.toc li:last-child {
  border-bottom: none;
}

.toc a {
  text-decoration: none;
  color: var(--text-color);
  display: block;
  transition: all 0.3s ease;
}

.toc a:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

.search-box {
  position: relative;
  max-width: 400px;
  margin: 1rem 0;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.search-box button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.calculator {
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  max-width: 500px;
}

.calculator h3 {
  margin-top: 0;
  color: var(--primary-color);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

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

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  border: 1px solid;
}

.alert-info {
  background: #e6f7ff;
  border-color: #91d5ff;
  color: #0050b3;
}

.alert-success {
  background: #f0f9ff;
  border-color: var(--success-color);
  color: #22543d;
}

.alert-warning {
  background: #fffaf0;
  border-color: var(--warning-color);
  color: #7c2d12;
}

.alert-error {
  background: #fff5f5;
  border-color: var(--error-color);
  color: #742a2a;
}

.disclaimer {
  background: var(--bg-light);
  border-left: 4px solid var(--warning-color);
  padding: 1rem;
  margin: 2rem 0;
  font-size: 0.875rem;
  color: var(--text-light);
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--secondary-color);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 0 0 1rem;
}

.faq-item.active .faq-answer {
  max-height: 2000px;
  padding-top: 0.5rem;
}

footer {
  background: var(--text-color);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

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

.footer-section li {
  padding: 0.25rem 0;
}

.footer-section a {
  color: #cbd5e0;
  text-decoration: none;
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: #cbd5e0;
}

.medical-disclaimer {
  background: #fef5e7;
  border: 2px solid #f39c12;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.medical-disclaimer strong {
  color: #d68910;
}

.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.progress-bar {
  background: var(--bg-light);
  border-radius: var(--radius);
  height: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  background: var(--primary-color);
  height: 100%;
  transition: width 0.3s ease;
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  position: relative;
}

.timeline-content {
  width: 45%;
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.timeline-date {
  width: 45%;
  text-align: right;
  color: var(--text-light);
  font-weight: 600;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item:nth-child(even) .timeline-date {
  text-align: left;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.image-container {
  margin: 2rem 0;
  text-align: center;
}

.image-container img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.image-container figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
}

.table-container {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

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

table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-color);
}

table tr:nth-child(even) {
  background: var(--bg-light);
}

table tr:hover {
  background: #f0f4f8;
}

.cluster-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.cluster-links a {
  padding: 0.75rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  display: block;
  text-align: center;
}

.cluster-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 10px;
}

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

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    padding: 1rem;
  }
  
  nav.active {
    display: flex;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 40px;
  }
  
  .timeline-content,
  .timeline-date {
    width: 100%;
    text-align: left;
  }
  
  .timeline-marker {
    left: 20px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  header,
  footer,
  nav,
  .breadcrumb,
  .search-box,
  .mobile-menu-toggle {
    display: none;
  }
  
  body {
    color: black;
    background: white;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}

.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-load.loaded {
  opacity: 1;
}