/* PetMed Dose Hub — mobile-first, no frameworks */
:root {
  --bg: #f7faf9;
  --card: #ffffff;
  --ink: #1d2b26;
  --muted: #5c6f67;
  --brand: #0e7c5b;
  --brand-dark: #0a5f46;
  --brand-soft: #e3f2ec;
  --warn-bg: #fff7e6;
  --warn-border: #e8a13d;
  --danger-bg: #fdeeee;
  --danger-border: #d9534f;
  --info-bg: #eaf3ff;
  --info-border: #4a90d9;
  --line: #e2eae6;
  --radius: 14px;
  --maxw: 880px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--brand); }
img { max-width: 100%; }

/* header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.logo { font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.logo span { color: var(--brand); }
.site-nav { margin-left: auto; display: flex; gap: 0.9rem; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--brand); }
.site-nav a.pro-link { color: var(--brand); }

/* layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 0.6rem; }
.hero p.lede { color: var(--muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 0.5rem; }

/* disclaimer — must stay prominent */
.disclaimer {
  background: var(--warn-bg);
  border: 2px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  margin: 1.2rem 0;
}
.disclaimer strong { display: block; margin-bottom: 0.25rem; }
.disclaimer p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.88rem; }
.caution-box {
  background: var(--danger-bg);
  border: 2px solid var(--danger-border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.rx-box {
  background: var(--info-bg);
  border: 2px solid var(--info-border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}

/* calculator card */
.calc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 1rem 0 1.5rem;
  box-shadow: 0 2px 10px rgba(20, 60, 45, 0.05);
}
.calc-card label { font-weight: 700; display: block; margin: 0.7rem 0 0.3rem; }
.calc-card label:first-child { margin-top: 0; }
.calc-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.calc-row > * { flex: 1 1 140px; }
input[type="number"], input[type="text"], select {
  width: 100%; padding: 0.65rem 0.7rem; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.unit-toggle { display: flex; gap: 0.4rem; }
.unit-toggle button {
  flex: 1; padding: 0.6rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; font-weight: 700; cursor: pointer; color: var(--muted);
}
.unit-toggle button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn {
  display: inline-block; background: var(--brand); color: #fff; border: none;
  padding: 0.75rem 1.4rem; font-size: 1rem; font-weight: 700; border-radius: 10px;
  cursor: pointer; text-decoration: none; text-align: center; margin-top: 0.9rem;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-dark); }
.calc-result {
  margin-top: 1rem; padding: 1rem; border-radius: 10px;
  background: var(--brand-soft); border: 1px solid #bfe0d2; display: none;
}
.calc-result.show { display: block; }
.calc-result .dose-big { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); }
.calc-result .freq { font-weight: 700; margin-top: 0.3rem; }
.calc-result table { width: 100%; margin-top: 0.7rem; font-size: 0.92rem; border-collapse: collapse; }
.calc-result th, .calc-result td { text-align: left; padding: 0.35rem 0.3rem; border-top: 1px solid #cfe6da; }
.calc-hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }

/* dose chart table */
table.chart { width: 100%; border-collapse: collapse; background: var(--card); font-size: 0.95rem; border-radius: var(--radius); overflow: hidden; }
table.chart th, table.chart td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; }
table.chart th { background: var(--brand-soft); font-size: 0.88rem; }
table.chart tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* cards grid */
.grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem; margin: 1rem 0; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: 2.1rem; } }
.drug-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; text-decoration: none; color: var(--ink); display: block;
}
.drug-card:hover { border-color: var(--brand); box-shadow: 0 3px 12px rgba(14,124,91,.12); }
.drug-card h3 { margin: 0 0 0.3rem; color: var(--brand-dark); }
.drug-card p { margin: 0.2rem 0; font-size: 0.92rem; color: var(--muted); }
.drug-card .links { margin-top: 0.5rem; font-size: 0.92rem; font-weight: 700; }

/* lists */
ul.tight li { margin-bottom: 0.35rem; }
.warn-list li::marker { content: "⚠️ "; }
.vet-list { background: var(--danger-bg); border-radius: var(--radius); padding: 1rem 1rem 1rem 2.2rem; border: 1px solid var(--danger-border); }
.vet-list li { margin-bottom: 0.4rem; }

/* faq */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.6rem; padding: 0.8rem 1rem; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 0.5rem 0 0; color: var(--muted); }

/* sources */
.sources { font-size: 0.88rem; color: var(--muted); }
.sources li { margin-bottom: 0.3rem; }

/* pro CTA banner */
.pro-banner {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff; border-radius: var(--radius); padding: 1.4rem; margin: 2rem 0; text-align: center;
}
.pro-banner h2 { color: #fff; margin-top: 0; }
.pro-banner p { opacity: 0.92; }
.pro-banner .btn { background: #fff; color: var(--brand-dark); }
.pro-banner .btn:hover { background: var(--brand-soft); }

/* pricing */
.price-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 640px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.price-card.featured { border-color: var(--brand); border-width: 2.5px; position: relative; }
.price-card .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 800; padding: 0.2rem 0.8rem; border-radius: 20px; }
.price-card h3 { margin-top: 0; }
.price { font-size: 2rem; font-weight: 800; color: var(--brand-dark); }
.price small { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.price-card ul { padding-left: 1.2rem; }
.price-card li { margin-bottom: 0.4rem; }

/* paywall modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 35, 30, 0.55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 1rem;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); max-width: 440px; width: 100%;
  padding: 1.6rem; max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin-top: 0; font-size: 1.25rem; }
.modal .close { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.modal ul { padding-left: 1.2rem; font-size: 0.95rem; }
.checkout-note { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 10px; padding: 0.7rem; font-size: 0.88rem; margin-top: 0.8rem; display: none; }
.checkout-note.show { display: block; }

/* pets */
.pet-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.9rem; }
.pet-card h3 { margin: 0 0 0.4rem; }
.plan { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.plan:last-child { border-bottom: none; }
.reminder { display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; padding: 0.25rem 0; }
.reminder.done span { text-decoration: line-through; color: var(--muted); }
.local-note { font-size: 0.82rem; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 0.5rem 0.7rem; margin-top: 0.6rem; }

/* toast */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 0.8rem 1.2rem; border-radius: 30px;
  opacity: 0; transition: all .3s; z-index: 200; font-size: 0.92rem; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 2rem; }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 1rem; font-size: 0.88rem; color: var(--muted); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1rem; }
.site-footer .cols div { min-width: 150px; }
.site-footer strong { color: var(--ink); display: block; margin-bottom: 0.4rem; }
.site-footer a { color: var(--muted); text-decoration: none; display: block; margin-bottom: 0.25rem; }
.site-footer a:hover { color: var(--brand); }

.breadcrumb { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; }
.breadcrumb a { color: var(--muted); }
.kicker { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 0.78rem; padding: 0.25rem 0.7rem; border-radius: 20px; margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; }
.note { font-size: 0.88rem; color: var(--muted); }
