/* ==========================================================================
   symptomdatabase.com — knowledge graph styles
   System font stack for fast LCP (Core Web Vitals).
   ========================================================================== */

:root {
  --primary: #0b7a75;
  --primary-dark: #08605c;
  --primary-light: #12a8a0;
  --primary-soft: #e6f4f3;
  --accent: #0ea5b7;
  --secondary: #0f172a;
  --secondary-dark: #020617;
  --secondary-light: #334155;
  --muted: #5b6b7b;
  --text: #111827;
  --bg: #f6faf9;
  --surface: #ffffff;
  --border: #e4ecea;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px 0 rgba(11, 122, 117, 0.06);
  --shadow: 0 4px 6px -1px rgba(11, 122, 117, 0.07), 0 2px 4px -1px rgba(11, 122, 117, 0.04);
  --shadow-lg: 0 18px 40px -12px rgba(8, 47, 73, 0.18), 0 8px 20px -8px rgba(11, 122, 117, 0.10);
  --shadow-hover: 0 24px 48px -16px rgba(8, 47, 73, 0.22), 0 10px 24px -10px rgba(11, 122, 117, 0.14);
  --symptom: #2563eb;
  --condition: #16a34a;
  --test: #d97706;
}

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

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.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;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}
.site-header.scrolled {
  box-shadow: 0 8px 30px -12px rgba(8, 47, 73, 0.16);
  background: rgba(255, 255, 255, 0.96);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.brand { display: flex; align-items: center; }
.logo-img { flex: 0 0 auto; width: auto; height: 40px; object-fit: contain; }
.logo-mark { color: var(--primary); flex: 0 0 auto; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--secondary-light); font-weight: 600; font-size: 0.95rem;
  padding: 8px 14px; border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.menu-toggle {
  display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--secondary); border-radius: 2px; }

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: rgba(255,255,255,0.98); flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 20px 18px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 10px; width: 100%; border-radius: 10px; }
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs { background: var(--primary-soft); border-bottom: 1px solid var(--border); padding: 11px 0; font-size: 0.88rem; }
.breadcrumbs a { color: var(--primary); font-weight: 600; }
.breadcrumbs .sep { color: var(--muted); margin: 0 6px; opacity: 0.6; }
.breadcrumbs span { color: var(--secondary-light); }

/* --------------------------------------------------------------------------
   Hero / home
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: 28px;
  border-radius: 24px;
  padding: 56px 40px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(1000px 420px at 85% -20%, rgba(255,255,255,0.16), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(2,132,199,0.35), transparent 55%),
    linear-gradient(135deg, #08605c 0%, #0b7a75 45%, #0e8f8a 75%, #0ea5b7 100%);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2.15rem; line-height: 1.18; max-width: 760px; font-weight: 800;
  letter-spacing: -0.02em; text-wrap: balance;
}
.hero .lead { font-size: 1.08rem; margin: 16px 0 26px; max-width: 680px; opacity: 0.94; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 28px;
}
.hero-stats span {
  font-size: 0.9rem; opacity: 0.9;
  display: flex; align-items: baseline; gap: 8px;
}
.hero-stats strong {
  font-size: 1.7rem; font-weight: 800; opacity: 1;
  letter-spacing: -0.02em;
}

.search-bar { position: relative; max-width: 640px; }
.search-input {
  width: 100%; padding: 16px 128px 16px 20px; font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 14px;
  background: #fff; color: var(--text);
  box-shadow: 0 10px 30px rgba(2, 22, 20, 0.28);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,0.35), 0 10px 30px rgba(2,22,20,0.3); }
.search-btn {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  background: var(--primary); color: #fff; border: 0; border-radius: 11px;
  padding: 12px 22px; font-size: 0.98rem; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.search-btn:hover { background: var(--primary-dark); }
.search-btn:active { transform: translateY(-50%) scale(0.98); }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
  color: var(--text);
}
.search-suggest[hidden] { display: none; }
.suggest-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; transition: background 0.12s ease; }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover { background: var(--primary-soft); }
.suggest-type { font-size: 0.72rem; color: var(--muted); font-weight: 600; background: var(--bg); padding: 3px 10px; border-radius: 999px; }

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */
.section { margin-top: 44px; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 6px;
}
.section-eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--primary-light); }
.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.015em; color: var(--secondary); line-height: 1.25; }
.section-desc { color: var(--muted); margin-top: 6px; max-width: 680px; }

/* --------------------------------------------------------------------------
   Typography / content
   -------------------------------------------------------------------------- */
.page-content { padding: 36px 0 56px; }
.page-content h1 { font-size: 1.9rem; line-height: 1.22; font-weight: 800; margin-bottom: 14px; color: var(--secondary); letter-spacing: -0.02em; text-wrap: balance; }
.page-content h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 12px; color: var(--secondary); letter-spacing: -0.01em; }
.page-content p { margin-bottom: 12px; }
.page-content ul, .page-content ol { margin: 0 0 16px 22px; }
.page-content li { margin-bottom: 6px; }
.lead { font-size: 1.12rem; color: var(--secondary-light); line-height: 1.65; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 20px 0; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  position: relative;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary-light);
  transform: scaleY(0); transform-origin: center; transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.card:hover::before { transform: scaleY(1); }
.card h3 { font-size: 1.02rem; font-weight: 700; color: var(--secondary); margin-bottom: 6px; line-height: 1.35; }
.card p { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; line-height: 1.55; }
.card .meta { font-size: 0.76rem; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.card-cta {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.88rem; font-weight: 700; color: var(--primary);
}
.card-cta::after { content: "→"; transition: transform 0.15s ease; }
.card:hover .card-cta::after { transform: translateX(3px); }
.card-external { display: block; }
.card-external .card-cta::after { content: ""; }
.card-external:hover .card-cta .ext-icon { transform: translate(2px, -2px); }
.card-title-link h3 { color: var(--secondary); transition: color 0.15s ease; }
.card-title-link:hover h3 { color: var(--primary); }
.ext-icon { display: inline-block; transition: transform 0.15s ease; }

/* --------------------------------------------------------------------------
   CTA bars / rows
   -------------------------------------------------------------------------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cta-btn-ghost {
  background: transparent; color: var(--primary); box-shadow: none;
  border: 1.5px solid var(--primary);
}
.cta-btn-ghost:hover { background: var(--primary-soft); color: var(--primary-dark); transform: translateY(-1px); box-shadow: none; }

.cta-bar {
  background: linear-gradient(135deg, #ffffff 0%, #eef7f6 100%);
  border: 1px solid rgba(11,122,117,0.22); border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 22px 0;
}
.cta-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; flex-wrap: wrap; }
.cta-bar-text strong { display: block; font-size: 1.1rem; color: var(--secondary); margin-bottom: 2px; }
.cta-bar-text span { font-size: 0.92rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Filter chips
   -------------------------------------------------------------------------- */
.system-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.chip {
  display: inline-block; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 15px; font-size: 0.85rem; font-weight: 600; color: var(--secondary-light);
  transition: all 0.14s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px -2px rgba(11,122,117,0.4); }
.chip-count { opacity: 0.65; font-weight: 600; }
.filter-hint { font-size: 0.9rem; color: var(--muted); margin: 8px 0 4px; }

/* --------------------------------------------------------------------------
   Fact table
   -------------------------------------------------------------------------- */
.fact-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.fact-table > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.fact-table dt { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.fact-table dd { font-size: 0.98rem; font-weight: 600; color: var(--secondary); margin-top: 3px; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.compare-grid > div h3 { font-size: 1.05rem; font-weight: 800; color: var(--secondary); margin-bottom: 8px; }
@media (max-width: 720px) { .compare-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Graph embed
   -------------------------------------------------------------------------- */
.graph-embed, .graph-full {
  position: relative; width: 100%; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: #0f172a;
  margin: 18px 0; box-shadow: var(--shadow-lg);
}
.graph-full { height: 620px; background: linear-gradient(180deg, #0b1220, #0f172a); }
.graph-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.graph-tip {
  position: absolute; left: 14px; bottom: 14px; background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1; font-size: 0.8rem; padding: 6px 12px; border-radius: 8px; pointer-events: none;
  backdrop-filter: blur(6px);
}

.graph-toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; flex-wrap: wrap; }
.graph-toolbar label { font-weight: 700; font-size: 0.9rem; }
.graph-toolbar input[type="search"] {
  flex: 1; min-width: 220px; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.95rem; background: var(--surface);
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.graph-toolbar input[type="search"]:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(11,122,117,0.12); }
.graph-toolbar button {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 16px; font-weight: 700; cursor: pointer; color: var(--secondary);
  transition: all 0.14s ease;
}
.graph-toolbar button:hover { border-color: var(--primary); color: var(--primary); }

.graph-detail { margin: 18px 0; }
.graph-detail-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.graph-detail-type { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); font-weight: 800; }
.graph-detail-card h3 { font-size: 1.2rem; margin: 4px 0 8px; }
.jump-list { list-style: none; margin: 8px 0 0; }
.jump-list li { margin: 6px 0; }

/* --------------------------------------------------------------------------
   CTA / order card
   -------------------------------------------------------------------------- */
.order-card {
  background: linear-gradient(135deg, var(--primary-soft), #f2faf8);
  border: 1px solid rgba(11,122,117,0.25); border-radius: var(--radius);
  padding: 24px; margin: 20px 0;
}
.order-card-content h2 { font-size: 1.2rem; margin-bottom: 8px; }
.order-card-meta { font-size: 0.85rem; color: var(--secondary-light); margin-top: 12px; }

.cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border-radius: 12px;
  padding: 13px 24px; font-weight: 700; font-size: 0.98rem;
  box-shadow: 0 6px 18px -4px rgba(11,122,117,0.45);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(11,122,117,0.5); }

/* --------------------------------------------------------------------------
   Disclaimer / emergency / care
   -------------------------------------------------------------------------- */
.disclaimer-box {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 18px 22px; font-size: 0.9rem; color: #78350f; margin-top: 32px;
  line-height: 1.6;
}
.emergency-box {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius);
  padding: 18px 22px; color: #7f1d1d; margin: 22px 0;
}
.emergency-box h2 { color: #7f1d1d; font-size: 1.1rem; }
.category-tag {
  display: inline-block; background: var(--primary-soft); color: var(--primary-dark);
  font-weight: 700; font-size: 0.82rem; padding: 5px 13px; border-radius: 999px; margin: 4px 0 14px;
}
.care-box {
  background: var(--primary-soft); border: 1px solid rgba(11,122,117,0.22);
  border-radius: var(--radius); padding: 20px 24px; margin-top: 22px;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 20px; margin-bottom: 10px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-item summary { font-weight: 700; cursor: pointer; color: var(--secondary); }
.faq-item p { margin-top: 10px; color: var(--secondary-light); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--secondary); color: #cbd5e1; margin-top: 48px; padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #94a3b8; font-size: 0.9rem; transition: color 0.15s ease; }
.site-footer a:hover { color: #fff; }
.footer-base { border-top: 1px solid #1e293b; margin-top: 32px; padding-top: 20px; font-size: 0.82rem; color: #64748b; }

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.inline-cta { margin-top: 24px; }

/* Scroll reveal (progressive enhancement) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover, .cta-btn:hover, .chip:hover { transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 720px) {
  .hero { padding: 40px 24px; border-radius: 20px; }
  .hero h1 { font-size: 1.65rem; }
  .hero .lead { font-size: 1rem; }
  .section-title { font-size: 1.3rem; }
  .page-content h1 { font-size: 1.55rem; }
}

/* Drug pages */
.table-wrap { overflow-x: auto; margin: 12px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border, #e2e8f0); }
.data-table thead th { background: var(--surface-2, #f6f8fa); font-weight: 600; }
.pill-list { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li a { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--surface-2, #f6f8fa); border: 1px solid var(--border, #e2e8f0); text-decoration: none; font-size: .92rem; }
.pill-list li a:hover { border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); }
.footnote { font-size: .85rem; color: var(--muted, #64748b); margin-top: 10px; }
