:root {
  /* ── Brand colors from eMedicine BD app ── */
  --primary:        #0288D1;
  --primary-dark:   #0857A0;
  --primary-light:  #e3f4fc;
  --accent:         #08BD7B;
  --accent-light:   #e6faf3;

  /* Text */
  --text-dark:      #333333;
  --text-muted:     #6C7570;
  --text-white:     #ffffff;

  /* Backgrounds */
  --off-white:      #F6F6F6;
  --white:          #ffffff;
  --light-grey:     #F9F9F9;
  --dark-bg:        #272727;
  --black:          #232323;

  /* Borders */
  --border:         #D9D9D9;
  --border-sec:     #E6E6E6;

  /* Status */
  --success:        #388E3C;
  --error:          #D32F2F;
  --warning:        #F57C00;
  --info:           #1976D2;

  /* Neutral */
  --grey:           #E0E0E0;
  --dark-grey:      #939393;
  --darker-grey:    #4F4F4F;

  --shadow-sm: 0 2px 12px rgba(2,136,209,0.08);
  --shadow-md: 0 8px 32px rgba(2,136,209,0.13);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  line-height: 1.75;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  background: linear-gradient(135deg, #063d6e 0%, var(--primary-dark) 45%, var(--primary) 100%);
  padding: 64px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(8,189,123,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(2,136,209,0.2) 0%, transparent 55%);
}

header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--off-white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  padding: 8px 20px;
  margin-bottom: 28px;
  animation: fadeDown 0.6s ease both;
}

.logo-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}

.logo-icon img {
  width: 36px; height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

header h1 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  animation: fadeDown 0.7s 0.1s ease both;
}

.header-meta {
  margin-top: 16px;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeDown 0.7s 0.2s ease both;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
}

.header-badge span {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* ── LAYOUT ── */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── TOC ── */
.toc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.6s 0.3s ease both;
}

.toc-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toc-card h2 svg { flex-shrink: 0; }

.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.toc-list a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.toc-num {
  width: 22px; height: 22px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── SECTIONS ── */
.section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--primary-light);
}

.section-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--primary-light), #c8e9f8);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.section-title-wrap { flex: 1; }

.section-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.3;
}

.section p {
  color: #2d4a40;
  font-size: 15px;
  margin-bottom: 14px;
}

.section p:last-child { margin-bottom: 0; }

/* ── SUB GROUPS ── */
.sub-group {
  background: var(--light-grey);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 14px 0;
}

.sub-group-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ── BULLET LIST ── */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bullet-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14.5px;
  color: #2d4a40;
}

.bullet-list li::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

/* ── HIGHLIGHT BOX ── */
.highlight-box {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, var(--primary-light), #d4eef9);
  border: 1px solid #a8d8f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 16px 0;
}

.highlight-icon { font-size: 22px; flex-shrink: 0; }

.highlight-text { font-size: 14px; color: var(--primary-dark); line-height: 1.6; }

/* ── RETENTION TABLE ── */
.retention-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.retention-item {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.retention-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-bottom: 4px;
}

.retention-value {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

/* ── CONTACT CARD ── */
.contact-card {
  background: linear-gradient(135deg, #063d6e 0%, var(--primary-dark) 50%, var(--primary) 100%);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-top: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 80% 20%, rgba(8,189,123,0.18) 0%, transparent 60%);
}

.contact-card h2 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.6rem;
  margin-bottom: 8px;
  position: relative;
}

.contact-card p {
  color: rgba(255,255,255,0.8);
  font-size: 14.5px;
  margin-bottom: 24px;
  position: relative;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--primary-dark);
  padding: 12px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ── FOOTER ── */
footer {
  background: var(--dark-bg);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 28px 24px;
  font-size: 13px;
}

footer strong { color: rgba(255,255,255,0.85); }

/* ── ANIMATIONS ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .section { padding: 24px 20px; }
  .retention-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 28px 20px; }
  .toc-list { grid-template-columns: 1fr; }
}
