@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&display=swap');

:root {
  --crimson: #c0152a;
  --crimson-dark: #8b0d1e;
  --crimson-light: #f8e8eb;
  --cream: #fdf9f6;
  --ink: #1a0a0d;
  --muted: #7a5a60;
  --border: #e8d0d4;
  --accent-gold: #c9973a;
  --white: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── HEADER HERO ── */
.hero {
  background: var(--crimson-dark);
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(192,21,42,0.5) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 1000px;
  margin: auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  font-family: 'Source Serif 4', serif;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 2px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: rgba(255,255,255,0.65);
}
.hero-subtitle {
  margin-top: 16px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  max-width: 500px;
}
.hero-icon {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  opacity: 0.9;
}
.urgency-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gold);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 18px;
  margin-top: 28px;
  border-radius: 2px;
}
.urgency-flag::before {
  content: '⚠';
  font-size: 1em;
}

/* ── NAV ── */
.toc-bar {
  background: var(--white);
  border-bottom: 2px solid var(--crimson);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.toc-bar-inner {
  max-width: 1000px;
  margin: auto;
  padding: 0 40px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.toc-bar-inner::-webkit-scrollbar { display: none; }
.toc-link {
  display: block;
  padding: 14px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.toc-link:hover, .toc-link.active {
  color: var(--crimson);
  border-bottom-color: var(--crimson);
}

/* ── LAYOUT ── */
.page-wrap {
  max-width: 1000px;
  margin: auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
}
.main-content { min-width: 0; }
.sidebar { position: sticky; top: 70px; }

/* ── SECTIONS ── */
.section {
  margin-bottom: 60px;
  animation: fadeUp 0.5s ease both;
}
.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }

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

.section-label {
  font-family: 'Source Serif 4', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1.2;
}
.section p {
  color: #3d2025;
  font-size: 1.02rem;
  margin-bottom: 16px;
  line-height: 1.8;
}

/* ── SYMPTOM GRID ── */
.symptom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
}
.symptom-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--crimson);
  padding: 16px 18px;
  border-radius: 4px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.symptom-card:hover {
  box-shadow: 0 6px 20px rgba(192,21,42,0.12);
  transform: translateY(-2px);
}
.symptom-card .icon { font-size: 1.5rem; margin-bottom: 6px; }
.symptom-card strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--crimson-dark);
  margin-bottom: 4px;
}
.symptom-card p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ── DIAGNOSIS STEPS ── */
.steps {
  counter-reset: steps;
  margin: 24px 0;
}
.step {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.step:last-child { border-bottom: none; }
.step-num {
  counter-increment: steps;
  width: 44px;
  height: 44px;
  background: var(--crimson);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.step-content p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ── ALERT BOX ── */
.alert-box {
  background: var(--crimson-light);
  border: 1px solid #e8b0b8;
  border-left: 5px solid var(--crimson);
  padding: 20px 22px;
  border-radius: 4px;
  margin: 28px 0;
}
.alert-box .alert-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--crimson-dark);
  font-size: 1rem;
  margin-bottom: 6px;
}
.alert-box p { font-size: 0.93rem; color: #6b2030; margin: 0; }

/* ── COMPLICATION TABLE ── */
.table-wrap { overflow-x: auto; margin: 20px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th {
  background: var(--crimson);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
}
td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: #3d2025;
}
tr:nth-child(even) td { background: var(--crimson-light); }
tr:hover td { background: #f5d8dc; }

/* ── SIDEBAR WIDGETS ── */
.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--crimson);
}
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.stat-item:last-child { border-bottom: none; }
.stat-item .label { color: var(--muted); }
.stat-item .value { font-weight: 700; color: var(--crimson); font-family: 'Playfair Display', serif; }

.emergency-widget {
  background: var(--crimson-dark);
  color: white;
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 20px;
}
.emergency-widget .widget-title {
  color: white;
  border-bottom-color: rgba(255,255,255,0.3);
}
.emergency-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  margin: 10px 0 6px;
}
.emergency-sub { font-size: 0.82rem; opacity: 0.75; }

/* ── TIMELINE ── */
.timeline { margin: 20px 0; position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.tl-item {
  position: relative;
  padding: 0 0 22px 20px;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--crimson);
  border: 2px solid var(--cream);
}
.tl-item .tl-time {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 3px;
}
.tl-item .tl-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.tl-item .tl-desc { font-size: 0.85rem; color: var(--muted); }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 30px 40px;
  font-size: 0.82rem;
  margin-top: 40px;
}
footer strong { color: rgba(255,255,255,0.8); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-icon { display: none; }
  .page-wrap { grid-template-columns: 1fr; padding: 30px 20px; }
  .sidebar { position: static; }
  .symptom-grid { grid-template-columns: 1fr; }
}
