
:root {
  --bg: #f5f7fb; --bg-w: #fff; --bg-s: #f0f4fa; --bg-s2: #e8eef8;
  --accent: #2563eb; --accent-l: #eff6ff; --accent-h: #1d4ed8;
  --green-bg: #ecfdf5; --green: #059669;
  --orange-bg: #fffbeb; --orange: #d97706;
  --red-bg: #fef2f2; --red: #dc2626;
  --purple-bg: #f3e8ff; --purple: #7c3aed;
  --t1: #0a0f1a; --t2: #1e293b; --t3: #64748b;
  --brd: #e2e8f0; --brd2: #cbd5e1;
  --sh: 0 1px 3px rgba(15,23,42,0.08);
  --r: 12px; --r2: 16px;
}
[data-theme="dark"] {
  --bg: #0b1120; --bg-w: #151d2e; --bg-s: #1a2540; --bg-s2: #1e2d50;
  --accent: #3b82f6; --accent-l: #172554; --accent-h: #60a5fa;
  --green-bg: #052e16; --green: #34d399;
  --orange-bg: #422006; --orange: #fbbf24;
  --red-bg: #450a0a; --red: #f87171;
  --purple-bg: #2e1065; --purple: #a78bfa;
  --t1: #e2e8f0; --t2: #94a3b8; --t3: #64748b;
  --brd: #1e293b; --brd2: #334155;
  --sh: 0 1px 3px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body {
  font-family: 'Inter', -apple-system, sans-serif; background: var(--bg);
  color: var(--t1); -webkit-font-smoothing: antialiased; line-height: 1.5;
  max-width: 100vw; overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }

/* ============================================
   NAV — compact mobile
   ============================================ */
.nav {
  position: sticky; top: 0; z-index: 100; height: 52px;
  background: var(--bg-w); border-bottom: 1px solid var(--brd);
  display: flex; align-items: center; padding: 0 16px; gap: 10px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px;
  color: var(--t1); text-decoration: none; flex-shrink: 0;
}
.logo-i {
  width: 30px; height: 30px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.logo-i svg { width: 16px; height: 16px; color: white; }

.nav-search {
  flex: 1; position: relative; min-width: 0;
}
.nav-search input {
  width: 100%; padding: 7px 10px 7px 32px; border: 1px solid var(--brd);
  border-radius: 8px; background: var(--bg-s); color: var(--t1);
  font-size: 13px; font-family: inherit; outline: none;
}
.nav-search input:focus { border-color: var(--accent); }
.nav-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--t3); }

.nav-btns { display: flex; gap: 6px; flex-shrink: 0; }
.nav-btn {
  width: 34px; height: 34px; border: 1px solid var(--brd); border-radius: 8px;
  background: var(--bg-s); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--t2); font-size: 14px;
}

/* Language dropdown */
.lang-dd {
  display: none; position: fixed; top: 52px; left: 0; right: 0;
  background: var(--bg-w); border-bottom: 1px solid var(--brd);
  padding: 8px 16px; z-index: 99; box-shadow: var(--sh);
}
.lang-dd.open { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-dd a {
  flex: 1; min-width: calc(50% - 6px); display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 500;
  color: var(--t2); background: var(--bg-s); text-decoration: none;
}
.lang-dd a.act { background: var(--accent-l); color: var(--accent); font-weight: 700; }

/* ============================================
   HERO — compact, info-dense
   ============================================ */
.hero {
  padding: 16px; background: linear-gradient(180deg, var(--bg-w) 0%, var(--accent-l) 100%);
  border-bottom: 1px solid var(--brd);
}
.breadcrumb {
  display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--t3);
  margin-bottom: 16px; overflow-x: auto; white-space: nowrap;
}
.breadcrumb a { color: var(--accent); font-weight: 500; }
.breadcrumb svg { width: 10px; height: 10px; flex-shrink: 0; }

.hero-top {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px;
}
.hero-icon {
  width: 56px; height: 56px; background: var(--bg-w); border: 1px solid var(--brd);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh); flex-shrink: 0;
}
.hero-icon svg { width: 28px; height: 28px; color: var(--accent); }

.hero-text h1 { font-size: 24px; font-weight: 900; line-height: 1.1; letter-spacing: -0.3px; }
.hero-inn { font-size: 13px; color: var(--t3); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }

.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge svg { width: 12px; height: 12px; }
.b-otc { background: var(--green-bg); color: var(--green); }
.b-rx { background: var(--red-bg); color: var(--red); }
.b-form { background: var(--bg-s); color: var(--t2); }
.b-mfr { background: var(--accent-l); color: var(--accent); }

/* Quick stats row */
.qstats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--brd);
}
.qstat {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 10px 4px; background: var(--bg-w); border: 1px solid var(--brd);
  border-radius: 10px;
}
.qstat svg { width: 20px; height: 20px; color: var(--accent); margin-bottom: 6px; }
.qstat-val { font-size: 14px; font-weight: 700; line-height: 1.2; }
.qstat-lbl { font-size: 10px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }

/* ============================================
   TOC — horizontal scroll, sticky
   ============================================ */
.toc {
  position: sticky; top: 52px; z-index: 50;
  background: var(--bg-w); border-bottom: 1px solid var(--brd);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.toc::-webkit-scrollbar { display: none; }
.toc-inner {
  display: flex; padding: 0 12px; min-width: max-content;
}
.toc a {
  display: flex; align-items: center; gap: 5px; padding: 10px 12px;
  font-size: 12px; font-weight: 500; color: var(--t3);
  border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none;
  transition: color 0.2s;
}
.toc a svg { width: 14px; height: 14px; }
.toc a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ============================================
   SECTIONS
   ============================================ */
.content { padding: 12px 16px 40px; }

.card {
  background: var(--bg-w); border: 1px solid var(--brd); border-radius: var(--r2);
  padding: 20px 16px; margin-bottom: 12px; box-shadow: var(--sh);
}

.card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--brd);
}
.card-ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-ico svg { width: 18px; height: 18px; }
.ico-blue { background: var(--accent-l); color: var(--accent); }
.ico-green { background: var(--green-bg); color: var(--green); }
.ico-orange { background: var(--orange-bg); color: var(--orange); }
.ico-red { background: var(--red-bg); color: var(--red); }
.ico-purple { background: var(--purple-bg); color: var(--purple); }

.card-head h2 { font-size: 17px; font-weight: 700; }

.text { font-size: 15px; color: var(--t2); line-height: 1.8; }
.text p + p { margin-top: 10px; }

/* Indication items */
.ind-list { display: flex; flex-direction: column; gap: 6px; }
.ind {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-s); border-radius: 10px;
}
.ind-chk {
  width: 20px; height: 20px; background: var(--green-bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ind-chk svg { width: 11px; height: 11px; color: var(--green); }
.ind span { font-size: 14px; font-weight: 500; color: var(--t1); }

/* Side effects */
.se-grp { margin-bottom: 16px; }
.se-grp:last-child { margin-bottom: 0; }
.se-title {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; color: var(--t2);
}
.se-dot { width: 7px; height: 7px; border-radius: 50%; }
.d-common { background: var(--orange); }
.d-rare { background: var(--accent); }
.d-serious { background: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: var(--bg-s); color: var(--t1);
}
.chip-bad { background: var(--red-bg); color: var(--red); font-weight: 600; }

/* Dosage table */
.dtbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.dtbl th {
  text-align: left; padding: 8px 10px; background: var(--bg-s);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--t3);
}
.dtbl th:first-child { border-radius: 8px 0 0 8px; }
.dtbl th:last-child { border-radius: 0 8px 8px 0; }
.dtbl td { padding: 10px; border-bottom: 1px solid var(--brd); }
.dtbl td:last-child { font-weight: 600; }
.dtbl tr:last-child td { border-bottom: none; }

/* FAQ */
.faq { border: 1px solid var(--brd); border-radius: 10px; margin-bottom: 6px; overflow: hidden; }
.faq-q {
  padding: 12px 14px; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-size: 13px; font-weight: 600; gap: 10px;
}
.faq-q svg { width: 16px; height: 16px; color: var(--t3); flex-shrink: 0; transition: transform 0.2s; }
.faq.open .faq-q svg { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 14px 14px; font-size: 14px; color: var(--t2); line-height: 1.8; }
.faq.open .faq-a { display: block; }

/* ============================================
   SIDEBAR-AS-CARDS (below main on mobile)
   ============================================ */
.side-card {
  background: var(--bg-w); border: 1px solid var(--brd); border-radius: var(--r2);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--sh);
}
.sc-title {
  display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--t3); margin-bottom: 12px;
}
.sc-title svg { width: 14px; height: 14px; }

.form-row {
  display: flex; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px solid var(--brd); font-size: 13px;
}
.form-row:last-child { border-bottom: none; }
.form-row .fn { color: var(--t2); }
.form-row .fs { font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 12px; }

.brand-lnk {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 8px; background: var(--bg-s); margin-bottom: 6px; text-decoration: none;
}
.brand-lnk:last-child { margin-bottom: 0; }
.bl-i {
  width: 28px; height: 28px; background: var(--accent-l); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.bl-i svg { width: 14px; height: 14px; color: var(--accent); }
.bl-n { font-size: 13px; font-weight: 600; color: var(--t1); }
.bl-m { font-size: 11px; color: var(--t3); }

.int-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--brd); font-size: 13px; color: var(--t2);
}
.int-row:last-child { border-bottom: none; }
.int-row svg { width: 14px; height: 14px; color: var(--red); flex-shrink: 0; }

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-h) 100%);
  border: none; border-radius: var(--r2); padding: 20px; text-align: center; color: white;
  margin-bottom: 12px;
}
.cta h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.cta p { font-size: 12px; opacity: 0.85; margin-bottom: 14px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px;
  background: white; color: var(--accent); border-radius: 8px; font-size: 13px;
  font-weight: 700; text-decoration: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #0f172a; color: #94a3b8; padding: 24px 16px 16px;
}
.footer h4 { color: #e2e8f0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.footer a { color: #94a3b8; text-decoration: none; font-size: 12px; display: block; padding: 2px 0; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.footer-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; margin-bottom: 20px; }
.ff { padding: 3px 7px; background: rgba(255,255,255,0.06); border-radius: 4px; font-size: 10px; }
.footer-bot { border-top: 1px solid #1e293b; padding-top: 12px; font-size: 10px; color: #64748b; }

/* ============================================
   DESKTOP (>768px) — 2-column layout
   ============================================ */
@media (min-width: 769px) {
  .nav { padding: 0 24px; }
  .hero { padding: 24px; max-width: 1140px; margin: 0 auto; }
  .content { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 24px; }
  .main { min-width: 0; }
  .aside { display: flex; flex-direction: column; gap: 12px; }
  .card { padding: 24px; }
  .hero-text h1 { font-size: 32px; }
  .hero-icon { width: 72px; height: 72px; }
  .hero-icon svg { width: 36px; height: 36px; }
  .qstats { grid-template-columns: repeat(3, auto); justify-content: flex-start; gap: 12px; }
  .qstat { flex-direction: row; gap: 10px; padding: 10px 16px; text-align: left; }
  .qstat svg { margin-bottom: 0; }
  .footer { padding: 32px 24px 16px; }
  .footer-cols { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* Drug images */
.drug-img {
  width: 100%; border-radius: var(--r2); margin-bottom: 16px;
  object-fit: cover; border: 1px solid var(--brd); box-shadow: var(--sh);
}
.drug-img-hero { max-height: 220px; }
.drug-img-card { max-height: 260px; margin-top: 12px; }
@media (min-width: 769px) {
  .drug-img-hero { max-height: 320px; }
  .drug-img-card { max-height: 300px; }
}

.inn-link {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px;
  background: var(--bg-s); border: 1px solid var(--brd); border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 12px;
  text-decoration: none;
}
.inn-link:hover { background: var(--bg-s2); text-decoration: none; }
.inn-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Pharmacy cards */
.ph-section { padding: 0 16px 20px; }
.ph-card {
  display: flex; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--brd);
}
.ph-card:last-of-type { border-bottom: none; }
.ph-icon {
  width: 36px; height: 36px; background: var(--accent-l, var(--bg-s));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ph-icon svg { width: 16px; height: 16px; color: var(--accent, #2563eb); }
.ph-info { flex: 1; min-width: 0; }
.ph-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.ph-addr { font-size: 12px; color: var(--t2, #475569); margin-bottom: 6px; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ph-phone {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--accent, #2563eb); text-decoration: none; font-weight: 500;
}
.ph-phone svg { width: 12px; height: 12px; }
.ph-tag {
  padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600;
  background: var(--bg-s, #f0f4fa); color: var(--t2, #475569);
}
.ph-open { background: var(--green-bg, #ecfdf5); color: var(--green, #059669); }
.ph-city {
  font-size: 11px; color: var(--accent, #2563eb); text-decoration: none;
}
.ph-all {
  display: block; text-align: center; padding: 12px; margin-top: 8px;
  font-size: 13px; font-weight: 600; color: var(--accent, #2563eb);
  background: var(--bg-s, #f0f4fa); border-radius: 10px; text-decoration: none;
}
.ph-all:hover { background: var(--bg-s2, #e8eef8); text-decoration: none; }

@media (min-width: 769px) {
  .ph-section { max-width: 1140px; margin: 0 auto; padding: 0 24px 24px; }
}
