/* ============================================================
   GLP-1 Calculator — style.css
   Light theme: white bg, indigo/violet primary (#4F46E5)
   ============================================================ */

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

:root {
  --primary:     #4F46E5;
  --primary-d:   #3730A3;
  --primary-l:   #EEF2FF;
  --accent:      #0EA5E9;
  --accent-l:    #E0F2FE;
  --success:     #10B981;
  --success-l:   #D1FAE5;
  --warn:        #F59E0B;
  --warn-l:      #FEF3C7;
  --text:        #0F172A;
  --text-muted:  #64748B;
  --text-light:  #94A3B8;
  --bg:          #F8FAFC;
  --bg-card:     #FFFFFF;
  --border:      #E2E8F0;
  --border-d:    #CBD5E1;
  --radius:      12px;
  --radius-lg:   18px;
  --shadow-sm:   0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.05);
  --shadow-md:   0 4px 16px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg:   0 12px 40px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.06);
  --font-body:   'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

/* Reserve space for template-injected header/footer to prevent layout shift / FOUC */
#site-header {
  display: block;
  min-height: 64px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 100;
}
#site-footer { display: block; min-height: 240px; background: #0F172A; }
#sticky-shop { display: block; }
@media (max-width: 768px) {
  #site-header { min-height: 56px; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.nav-logo span { color: var(--primary); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-l); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: .875rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(79,70,229,.35);
}
.nav-cta:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,.4); }

/* Active nav link */
.nav-links a.active { color: var(--primary); background: var(--primary-l); }

/* Highlighted Cases nav link */
.nav-links a.nav-cases-link {
  background: linear-gradient(135deg, var(--primary) 0%, #6D28D9 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.nav-links a.nav-cases-link:hover {
  background: linear-gradient(135deg, var(--primary-d) 0%, #5B21B6 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,.4);
}
.nav-links a.nav-cases-link.active {
  background: var(--primary-d);
  color: #fff;
}

/* Mobile hamburger toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  margin-left: auto;
  line-height: 1;
}
.mobile-toggle:hover { background: var(--primary-l); color: var(--primary); }

/* ── Calculator Card Grid (landing page) ── */
.calc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}
.calc-tile {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.calc-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.calc-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  color: var(--text);
}
.calc-tile:hover::before { transform: scaleX(1); }
.calc-tile-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}
.calc-tile h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.calc-tile p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.calc-tile-cta {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.calc-tile.tile-accent::before { background: var(--accent); }
.calc-tile.tile-accent:hover { border-color: var(--accent); }
.calc-tile.tile-accent .calc-tile-cta { color: var(--accent); }
.calc-tile.tile-success::before { background: var(--success); }
.calc-tile.tile-success:hover { border-color: var(--success); }
.calc-tile.tile-success .calc-tile-cta { color: var(--success); }
.calc-tile.tile-warn::before { background: var(--warn); }
.calc-tile.tile-warn:hover { border-color: var(--warn); }
.calc-tile.tile-warn .calc-tile-cta { color: var(--warn); }

/* "Other tools" cross-link section */
.other-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 40px 0;
}
.other-tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.other-tool-link:hover { border-color: var(--primary); background: var(--primary-l); color: var(--text); }
.other-tool-icon { font-size: 1.5rem; flex-shrink: 0; }
.other-tool-text { flex: 1; min-width: 0; }
.other-tool-title { font-weight: 700; font-size: .88rem; line-height: 1.3; }
.other-tool-sub { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #FAFAFF 0%, #EEF2FF 50%, #E0F2FE 100%);
  padding: 72px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(79,70,229,.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-l);
  color: var(--primary);
  border: 1px solid rgba(79,70,229,.2);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.pill-icon { font-size: .85rem; }

/* ── Calculator Card ── */
.calc-section { padding: 0 0 72px; margin-top: -24px; position: relative; z-index: 2; }

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ── Tabs ── */
.calc-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #FAFAFA;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.calc-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.tab-btn:hover { color: var(--primary); background: var(--primary-l); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--bg-card);
}
.tab-icon { font-size: 1rem; }

/* ── Tab Panels ── */
.tab-panel { display: none; padding: 40px; }
.tab-panel.active { display: block; }

@media (max-width: 600px) {
  .tab-panel { padding: 24px 20px; }
}

/* ── Panel Layout ── */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 680px) {
  .panel-grid { grid-template-columns: 1fr; gap: 32px; }
}

.panel-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.panel-subtitle { font-size: .85rem; color: var(--text-muted); margin-bottom: 28px; }

/* ── Form Controls ── */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 7px;
}
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; margin-bottom: 0; }

.input-wrap { position: relative; }
.input-wrap input,
.input-wrap select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-d);
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.input-wrap input:focus,
.input-wrap select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.input-wrap .unit {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-light);
  pointer-events: none;
}
.input-wrap input[type="number"] { padding-right: 52px; }
.input-wrap .select-arrow {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-light);
}
.input-wrap select { padding-right: 40px; cursor: pointer; }

.calc-btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(79,70,229,.3);
  margin-top: 8px;
}
.calc-btn:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 5px 18px rgba(79,70,229,.38); }
.calc-btn:active { transform: translateY(0); }

/* ── Results ── */
.results-pane {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
.results-pane.hidden { opacity: .5; }
.results-pane-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-light); margin-bottom: 20px; }

.result-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.result-block:last-child { margin-bottom: 0; }
.result-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.result-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); letter-spacing: -.02em; line-height: 1.2; }
.result-value .result-unit { font-size: .9rem; font-weight: 600; color: var(--text-muted); margin-left: 3px; }
.result-note { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

.result-block.highlight {
  background: var(--primary-l);
  border-color: rgba(79,70,229,.2);
}
.result-block.highlight .result-value { color: var(--primary); }
.result-block.success { background: var(--success-l); border-color: rgba(16,185,129,.2); }
.result-block.success .result-value { color: var(--success); }

.placeholder-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  color: var(--text-light);
  gap: 10px;
  padding: 24px 0;
}
.placeholder-msg .placeholder-icon { font-size: 2.5rem; }
.placeholder-msg p { font-size: .88rem; }

/* ── Tip Box ── */
.tip-box {
  background: var(--accent-l);
  border: 1px solid rgba(14,165,233,.2);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .85rem;
  color: #0C4A6E;
  margin-top: 20px;
  line-height: 1.6;
}
.tip-box strong { font-weight: 700; }

.warn-box {
  background: var(--warn-l);
  border: 1px solid rgba(245,158,11,.2);
  border-left: 4px solid var(--warn);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .85rem;
  color: #78350F;
  margin-top: 16px;
  line-height: 1.6;
}

/* ── Titration Table ── */
.titration-section { }
.titration-header { margin-bottom: 28px; }
.compound-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.compound-btn {
  padding: 8px 18px;
  background: var(--bg);
  border: 1.5px solid var(--border-d);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .15s;
}
.compound-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.compound-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.3); }

.titration-config {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
@media (max-width: 640px) {
  .titration-config { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .titration-config { grid-template-columns: 1fr; }
}

.titration-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.titration-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.titration-table thead { background: var(--primary); color: #fff; }
.titration-table thead th {
  padding: 13px 16px;
  text-align: left;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.titration-table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
.titration-table tbody tr:last-child { border-bottom: none; }
.titration-table tbody tr:hover { background: var(--primary-l); }
.titration-table td {
  padding: 13px 16px;
  vertical-align: middle;
  white-space: nowrap;
}
.titration-table td:first-child { font-weight: 700; color: var(--primary); }
.table-highlight { background: #FFFBEB; }
.table-highlight td:first-child { color: var(--warn); }
.badge-current {
  display: inline-flex;
  align-items: center;
  background: var(--success-l);
  color: var(--success);
  border: 1px solid rgba(16,185,129,.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Info Section ── */
.info-section { padding: 56px 0; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.info-card-icon { font-size: 1.75rem; margin-bottom: 14px; }
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.info-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.65; }

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #6D28D9 100%);
  padding: 64px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 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.04'%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");
}
.cta-banner .container { position: relative; }
.cta-banner h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -.02em; }
.cta-banner p { color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 28px; }
.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--primary);
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,.25); }

/* ── Footer ── */
.site-footer {
  background: #0F172A;
  padding: 48px 0 28px;
  color: #94A3B8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-logo { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 10px; }
.footer-logo span { color: #818CF8; }
.footer-brand p { font-size: .85rem; line-height: 1.65; }
.footer-col h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #CBD5E1; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul a { color: #94A3B8; text-decoration: none; font-size: .85rem; transition: color .15s; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .8rem;
}
.footer-bottom a { color: #64748B; text-decoration: none; }
.footer-bottom a:hover { color: #94A3B8; }

/* ── Level Plotter — Dose Mode Toggle ── */
.dose-mode-toggle {
  display: flex;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 18px;
}
.dose-mode-btn {
  flex: 1;
  padding: 9px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.dose-mode-btn:hover { color: var(--primary); }
.dose-mode-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}

/* Titration schedule preview pill row */
.titr-preview {
  display: none;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.titr-preview-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.titr-pill {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-l);
  color: var(--primary);
  border-radius: 6px;
  font-weight: 600;
  font-size: .78rem;
  margin: 2px 4px 2px 0;
}
.titr-pill.last { background: var(--success-l); color: var(--success); }
.titr-arrow { color: var(--text-light); margin: 0 2px; font-weight: 600; }

/* ── Level Plotter ── */
.plot-config {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 4px;
}
@media (max-width: 540px) {
  .plot-config { grid-template-columns: 1fr 1fr; }
  .plot-config > div:last-child { grid-column: 1 / -1; }
}
.plot-canvas-wrap {
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}
.plot-canvas-wrap canvas { display: block; width: 100%; }
.plot-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 600px) { .plot-stat-grid { grid-template-columns: repeat(2, 1fr); } }
.plot-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.plot-stat-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.plot-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
  margin-bottom: 4px;
  line-height: 1.2;
}
.plot-stat-note { font-size: .72rem; color: var(--text-light); line-height: 1.4; }

/* ════════════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES
   ════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Container & body */
  body { font-size: 15px; }
  .container, .container-wide { padding: 0 16px; }

  /* Nav: hamburger menu on mobile */
  .nav { gap: 10px; height: 56px; position: relative; }
  .nav-logo { font-size: 1.05rem; }
  .mobile-toggle { display: block; order: 3; }
  .nav-cta { padding: 8px 14px; font-size: .8rem; order: 2; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    gap: 0;
    margin-left: 0;
    box-shadow: 0 6px 20px rgba(15,23,42,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 12px 20px;
    font-size: .92rem;
    border-radius: 0;
  }
  .nav-links a.active { background: var(--primary-l); color: var(--primary); border-radius: 0; }

  /* Hero */
  .hero { padding: 44px 0 36px; }
  .hero-badge { font-size: .68rem; padding: 4px 11px; margin-bottom: 14px; }
  .hero h1 { font-size: 1.85rem; line-height: 1.2; }
  .hero p { font-size: .95rem; margin-bottom: 22px; }
  .hero-pills { gap: 6px; }
  .pill { font-size: .72rem; padding: 4px 10px; }

  /* Calculator card */
  .calc-section { margin-top: -16px; padding-bottom: 48px; }
  .calc-card { border-radius: 14px; }
  .tab-btn { padding: 13px 16px; font-size: .8rem; }
  .tab-icon { font-size: .9rem; }
  .tab-panel { padding: 20px 16px; }

  /* Panel grid stacks (already does at 680, but tighten gap) */
  .panel-grid { gap: 24px; }
  .panel-title { font-size: 1rem; }
  .panel-subtitle { font-size: .82rem; margin-bottom: 22px; }

  /* Form fields */
  .field label { font-size: .72rem; }
  .input-wrap input, .input-wrap select { padding: 10px 12px; font-size: .92rem; }
  .calc-btn { padding: 12px 18px; font-size: .92rem; }

  /* Results pane */
  .results-pane { padding: 20px 16px; min-height: auto; }
  .result-block { padding: 14px 16px; }
  .result-value { font-size: 1.5rem; }
  .results-pane-title { font-size: .7rem; margin-bottom: 16px; }

  /* Tip / warn boxes */
  .tip-box, .warn-box { font-size: .8rem; padding: 12px 14px; }

  /* Compound buttons (titration & plotter) */
  .compound-btn { padding: 7px 14px; font-size: .78rem; }

  /* Titration table */
  .titration-table thead th { padding: 10px 10px; font-size: .7rem; }
  .titration-table td { padding: 10px 10px; font-size: .82rem; }
  .titration-config { padding: 14px; gap: 10px; }

  /* Dose mode toggle */
  .dose-mode-btn { padding: 8px 10px; font-size: .78rem; }

  /* Titration preview pills */
  .titr-pill { font-size: .72rem; padding: 3px 8px; }

  /* Plot stat cards */
  .plot-stat { padding: 12px 10px; }
  .plot-stat-label { font-size: .65rem; }
  .plot-stat-value { font-size: 1.15rem; }
  .plot-stat-note { font-size: .65rem; }

  /* Info / how-to cards */
  .info-section { padding: 36px 0; }
  .info-grid { gap: 14px; }
  .info-card { padding: 20px 18px; }
  .info-card h3 { font-size: .92rem; }
  .info-card p { font-size: .8rem; }

  /* CTA banner */
  .cta-banner { padding: 44px 0; }
  .cta-banner h2 { font-size: 1.4rem; }
  .cta-banner p { font-size: .9rem; }
  .btn-white { padding: 12px 22px; font-size: .92rem; }

  /* FAQ */
  .faq-section { padding: 40px 0 56px; }
  .faq-title { font-size: 1.2rem; }
  .faq-item { padding: 16px 18px; }
  .faq-item h3 { font-size: .85rem; }
  .faq-item p { font-size: .8rem; }

  /* Footer */
  .site-footer { padding: 36px 0 20px; }
  .footer-grid { gap: 28px; margin-bottom: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; font-size: .75rem; }

  /* Storage CTA inline card */
  .info-section > .container > div[style*="display:flex"][style*="gap:28px"] {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px !important;
    gap: 16px !important;
  }

  /* Disclaimer */
  .disclaimer { padding: 16px 18px; font-size: .76rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: .88rem; }
  .tab-btn { padding: 11px 12px; font-size: .75rem; }
  .tab-btn span.tab-icon { display: none; }   /* hide icons to save space */
  .compound-btn { padding: 6px 11px; font-size: .72rem; }
  .pill { font-size: .68rem; }
  .plot-stat-grid { gap: 8px; }
  .titr-pill { font-size: .68rem; }
}

/* ════════════════════════════════════════════════
   STICKY MOBILE SHOP BUTTON — always-visible CTA
   ════════════════════════════════════════════════ */
.mobile-shop-sticky {
  display: none;
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, #6D28D9 100%);
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(79,70,229,0.55), 0 2px 6px rgba(0,0,0,.15);
  z-index: 50;
  white-space: nowrap;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  border: 2px solid rgba(255,255,255,.2);
  padding: 0 5px 0 0;
}
.mobile-shop-sticky.dismissed { display: none !important; }
.mobile-shop-sticky-link {
  color: #fff;
  text-decoration: none;
  padding: 12px 8px 12px 22px;
  font-weight: 700;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.mobile-shop-sticky .stars { color: #FFD700; font-size: .75rem; letter-spacing: -1px; margin-left: 4px; }
.mobile-shop-sticky-close {
  background: rgba(255,255,255,0.18);
  border: none;
  color: rgba(255,255,255,0.95);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px 0 4px;
  flex-shrink: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.mobile-shop-sticky-close:hover,
.mobile-shop-sticky-close:active { background: rgba(255,255,255,0.32); }
@media (max-width: 768px) {
  .mobile-shop-sticky { display: inline-flex; }
  body.has-sticky-shop { padding-bottom: 80px; }
}

/* ── Syringe SVG mobile readability ── */
#recon-syringe svg, #dose-syringe svg { display: block; width: 100%; height: auto; max-height: 180px; }
@media (max-width: 600px) {
  #recon-syringe svg, #dose-syringe svg { max-height: 200px; }
}

/* ════════════════════════════════════════════════
   QUICK-SELECT BUBBLES — mobile-friendly preset values
   ════════════════════════════════════════════════ */
.quick-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.quick-select-btn {
  background: var(--bg);
  border: 1.5px solid var(--border-d);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  min-height: 38px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.quick-select-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-l);
}
.quick-select-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,.35);
}
.quick-select-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
  display: block;
}
.manual-entry-label {
  font-size: .72rem;
  color: var(--text-light);
  margin-bottom: 5px;
  font-style: italic;
  display: block;
}
@media (max-width: 600px) {
  .quick-select-btn {
    padding: 11px 16px;
    font-size: .92rem;
    min-height: 44px;
    flex: 1 1 calc(33.333% - 6px);
    text-align: center;
  }
  .quick-select { gap: 6px; }
}

/* ════════════════════════════════════════════════
   POST-CALCULATOR PRODUCT CTA — high conversion
   ════════════════════════════════════════════════ */
.post-calc-cta {
  display: none;
  background: linear-gradient(135deg, #fff 0%, var(--primary-l) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 28px;
  box-shadow: 0 10px 36px rgba(79,70,229,0.18);
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.post-calc-cta.visible { display: flex; }
.post-calc-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.post-calc-icon { font-size: 3rem; flex-shrink: 0; line-height: 1; display: none; }
.post-calc-img {
  width: 170px;
  aspect-ratio: 1/1;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--border);
}
.post-calc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) {
  .post-calc-cta { padding: 18px; gap: 16px; flex-direction: column; align-items: stretch; }
  .post-calc-img { width: 100%; max-width: 100%; aspect-ratio: 16/10; }
  .post-calc-body h3 { font-size: 1.1rem; }
  .post-calc-actions { flex-direction: column; align-items: stretch; }
  .post-calc-btn { justify-content: center; text-align: center; }
}

.inline-product-strip-img {
  width: 110px;
  aspect-ratio: 1/1;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--border);
}
.inline-product-strip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 540px) {
  .inline-product-strip { padding: 16px; gap: 14px; }
  .inline-product-strip-img { width: 90px; }
  .inline-product-strip-body h4 { font-size: .95rem; }
  .inline-product-strip-body p { font-size: .78rem; }
  .inline-product-strip-btn { padding: 9px 16px; font-size: .82rem; }
}
.post-calc-body { flex: 1; min-width: 240px; }
.post-calc-tag {
  display: inline-block;
  background: var(--success);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.post-calc-body h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.01em;
  color: var(--text);
}
.post-calc-body p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.post-calc-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.feature-pill {
  background: rgba(16,185,129,0.1);
  color: var(--success);
  font-size: .74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(16,185,129,0.2);
  white-space: nowrap;
}
.post-calc-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.post-calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff !important;
  text-decoration: none !important;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .95rem;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}
.post-calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,70,229,0.5);
}
.post-calc-trust {
  font-size: .78rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post-calc-trust .stars { color: #FFB800; font-size: .92rem; letter-spacing: -1px; }

/* ════════════════════════════════════════════════
   PRODUCT SHOWCASE GRID — homepage / inline
   ════════════════════════════════════════════════ */
.product-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 16px 0;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(15,23,42,.12);
  color: var(--text);
}
.product-card.popular { border-color: var(--accent); border-width: 2px; }
.product-card.popular:hover { border-color: var(--accent); }

.product-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.product-card:hover .product-card-image img { transform: scale(1.06); }

.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: .05em;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.product-card-content {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.3;
}
.product-card-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}
.product-card-rating {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.product-card-rating .stars { color: #FFB800; font-size: .9rem; letter-spacing: -1px; }
.product-card-cta {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.product-card.popular .product-card-cta { color: var(--accent); }

@media (max-width: 480px) {
  .product-showcase { gap: 14px; grid-template-columns: 1fr 1fr; }
  .product-card-image { aspect-ratio: 1/1; }
  .product-card-content { padding: 14px 14px 16px; }
  .product-card-title { font-size: .92rem; }
  .product-card-desc { font-size: .76rem; -webkit-line-clamp: 2; line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .product-card-rating { font-size: .7rem; margin-bottom: 8px; }
  .product-card-cta { font-size: .82rem; }
  .product-card-badge { font-size: .6rem; padding: 3px 7px; top: 8px; left: 8px; }
}

/* Inline product strip in blog posts */
.inline-product-strip {
  background: linear-gradient(135deg, var(--primary-l) 0%, #fff 60%);
  border: 1px solid rgba(79,70,229,0.15);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.inline-product-strip-icon { font-size: 2.5rem; flex-shrink: 0; }
.inline-product-strip-body { flex: 1; min-width: 240px; }
.inline-product-strip-body h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.inline-product-strip-body p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.inline-product-strip-btn {
  background: var(--primary);
  color: #fff !important;
  text-decoration: none !important;
  padding: 11px 22px;
  border-radius: 9px;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  display: inline-block;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(79,70,229,0.3);
}
.inline-product-strip-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(79,70,229,0.4); }

/* ── Disclaimer ── */
.disclaimer {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 40px 0 0;
  font-size: .82rem;
  color: #92400E;
  line-height: 1.7;
}
.disclaimer strong { font-weight: 700; }

/* ── FAQ ── */
.faq-section { padding: 56px 0 72px; background: var(--bg-card); border-top: 1px solid var(--border); }
.faq-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; text-align: center; }
.faq-subtitle { color: var(--text-muted); text-align: center; font-size: .9rem; margin-bottom: 36px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
@media (max-width: 640px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.faq-item h3 { font-size: .9rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.faq-item p { font-size: .85rem; color: var(--text-muted); line-height: 1.65; }
